Category Archives: Misc

Linux HIMS – Permissions for WordPress Running Scripts

So a key part of HIMS is to send messages to the remote Raspberry Pis. To do this I created some basic python scripts to send messages that the Raspberry Pis are monitoring for.

The biggest issue I had was related to permissions of the files so that I could call them from my PHP code in WordPress.

Ultimately, it appears the security context attributes need to be set correctly along with the permissions. Essentially chcon, and chmod etc need to be set right.
You can see the security context attributes by typing ls -Z
You can see permissions by typing ls -l

In my CENTOS build running SELINUX, they have the httpd_sys_rw_content_t type.

Here’s some info on chcon:


Zyxcel C1000Z Modem and Router – Plex Remote Access Issues

I was having some trouble getting the remote access working for my plex server and realized I had setup the port forwarding incorrectly within my ZyXEL C1000Z modem. I was entering the manual static IP of the server, the starting and ending port of 32,400, the protocol TCP/UDP.

I then left the Remote Port and IP to All Ip Addresses. I applied thinking I was set. Unfortunately, this did not seem to work.

I then enabled the DMZ for my server and tried again and it was fine. I had another router so I set it to bridge mode, disabled the DMZ, reset the manual port forwarding and it still didn’t work.

The fix was making sure to choose Define IP Addresses within step 4. of the Port forwarding page. From there I left the remote Ip address to blank and set the remote port range to be the same as the LAN port range info. That fixed it.

ProForm 590s Treadmill Starts Full Speed Then Stops

I have a ProForm 590s treadmill that started going full speed when I started it for about 2 seconds then would stop. The console worked fine but the unit did nothing. After spending some time researching on the web. I confirmed that the speed sensor was still good by using a multi-meter and doing a continuity test on the sensor. When the sensor was aligned with the magnet on the motor, it was closed and completed the circuit.

After that, I scoured some boards and found this post:
“Yep, control board has a shorted HexFET and/or kickback diode. The MC2100 usually comes back to life by replacing the IRFP250 with IRFP260 or better, check current limit resistor in series with the HexFET. A good signal from the console will show a red blinking LED on the MC2100, when the controller see’s too much motor current, as in a runaway, or a feedback mismatch, it kills the drive to the motor section but will leave power to the console intact usually. Fitness Remedy in Sun Prairie Wisc repairs all kinds of fitness electronics for fractions of replacement costs. Good Luck, and remember, there are lethal voltages on many motor control boards, so take care troubleshooting. signed….former treadmill control board engineer ;o) ”

I found the IRFP260 on Amazon prime and ordered it. I also tested the IRFP250 with my multi-meter and confirmed it appeared to be bad. This board has some good info on testing a MOSFET in a circuit.

In any case, I swapped out the MOSFET and the treadmill is now working again. I really appreciate everyone who responded to the other boards. $7 fix versus $160 board.

One item to note, when you solder the new MOSFET in place, make sure the hole aligns properly so that the little bolt will line up with the heatsink hole.

Hopefully this will help some others who may be experiencing a similar issue.

CENTOS 7 Media Server

1. Install CENTOS 7 with GNOME (From DVD)
2. Setup VNC server for remote access (CENTOS 7 VNC Server Guide)
3. Make sure all internal hard drives are mounting correctly (Used the GNOME Applications/Utilities/Disks)
4. Make sure all USB hard drives are mounting correctly, this make require NTFS support
* Install EPEL repository. Followed this link.
* Installed ntfs-3g ($yum –enablerepo epel install ntfs-3g)
* Make sure the fstab file is set correctly to allow for SELinux /dev/sdd1 /mnt/wd502 ntfs-3g nosuid,nodev,nofail,x gvfs-show,context=system_u:object_r:samba_share_t:s0 0 0
* Utilized the GNOME Applications/Utilities/Disks to setup mount options
5. Setup SAMBA server there’s a pretty good guide Samba Server Setup.
6. Setup Plex Server downloaded from Plex. Guide Plex Server Guide.
7. Setup rync to “mirror” local drives. Used this guide and this also. Make sure to run crontab -e in the instance of the user that is default in CENTOS.
8. Install LAMP, just google there’s tons of easy guides, nothing specific required.
9. Install WordPress, utilized this as guide.
10. Set WordPress permissions appropriately, had to do this to make it work. :
semanage fcontext -a -t httpd_sys_rw_content_t /path/to/php/dir
restorecon -R /path/to/php/dir
The permissions are key for writing in wordpress and I always have issues. Here’s another document that fixed them for me. LINK


Toilet Flush Causes Refrigerator Knocking

So I noticed my refrigerator seemed to make a knocking or hammering noise when a toilet on the other side of the house was flushed. I have a Whirpool side by side refrigerator and Toto toilet. The refrigerator also occasionally makes the noise without flushing the toilet. After scouring the web it sounded like a bad refill valve in the toilet causing a water hammer. I replaced the valve in the toilet and that appears to have fixed it. The toilet itself had a very small knocking going on with the water line once the toilet was almost full but was barely noticeable. However, the noise on the refrigerator side was quite loud. I just wanted to post this in case anyone else ever experiences the same issue.