Monthly Archives: May 2014

HIMS Progress

I’ve made some good progress with the water heater controls / HIMS. My wordpress plugin is functioning allowing me to update settings on the remote Raspberry Pi. I’m also able to dump the log data into the Mysql database which I’m still refining. I still have a lot of work to do before installing it on my water heater but things are definitely much closer. I was also able to use my memory card reader and hook up the “bad” SD card into one of my other Raspberry Pis and pull off my Python programs. The file structure appeared fine so some of the boot files must have become corrupted on it. It’s probably fixable and I may mess around with it later to see if I can get it to boot from the card again. Hopefully more to come soon with pictures and possibly code.

Raspberry Pi Trouble & Python Network Messages

Well, I spent what time I had last night and tonight troubleshooting one of my Raspberry Pis. I couldn’t connect in via my VNC client so did a hard boot on it. I ended up with just a solid red PWR light. After investigating I determined the SD card is bad or corrupted. I ordered a new SD card from Amazon last night, received it today, and loaded a fresh Raspbian image. The Pi then booted and I was able to get x11vnc going again. I’ll have to do some further investigation on my other SD card to determine if the OS was just corrupted or if the SD card is truly bad. In any case, I lost several of the python programs I had created on there. Lesson learned, BACKUP!

On a side note, I did determine a method to trigger a Raspberry Pi to download updated data from a Mysql database. I followed the guide found here to send messages over the network using python. My plan is to utilize a PHP form to run a separate python script which will send a message to the remote Raspberry Pi which will essentially trigger it to go query the mysql database to download any changes the user makes in the Home Intelligence Management System I’m working on. This will eliminate me from having to constantly query the database looking at a flag indicating the data has changed. Next step, put together a functioning python program to control my water heater then be able to control it via a WordPress Plugin.

Home Intelligent Management System

I’ve been learning a little about setting up plugins for WordPress. I found a fairly good guide here. I’m somewhat familiar with WordPress so figured I’d use that as the content management system for my “Home Intelligence Management System”. So far I’ve created a really basic plugin that adds a settings page to configure some times and durations for shutting off my water heater. It needs some formatting work but for what I’m looking to do, it should work fine. The next step will be to setup a python program to monitor the mysql database values from the wordpress plugin and verify the python program runs correctly to shut the water heater off and turn it back on when appropriate. Ultimately, I will convert my Python sprinkler timer program into this format along with the addition of some other projects.

Raspberry Pi LAMP Server WordPress Install

Finally got WordPress working. I ended up doing a sudo apt-get remove wordpress and manually cleaning things up. I then downloaded the latest version from their website and did a manual install placing all files into the /var/www folder. Once setup I ended up doing a sudo chmod -R 777 on a few directories to enable write access for the theme ultimatum. I then followed the guide I had previously posted to setup secure updates which appear to be working. So far I’ve just installed a new theme but that seemed to work without issue. My next step will be to get a basic layout going for what I’m going to call the Home Intelligence Management System.

Raspberry Pi LAMP Server WordPress Install

I installed WordPress on my Raspberry Pi LAMP server the other day. Ran into a few issues using sudo apt-get install wordpress but ended up getting it working. It’s a touch slow but does operate. Right away I decided to test updating a plugin and found that it was asking for FTP information. I had no plans on installing FTP access on the server but saw that this could be addressed using suPHP. I attempted to install suPHP and got myself into trouble. Ultimately, I could not get it working right and spent some time removing it and getting things working again the way it was. I was able to finally get it working again and found another guide on getting updates to work securely. You can find the site here. Unfortunately, I ran into some other issues related to privileges I believe. I’m currently down to this error when I try to update:

An error occurred while updating Twenty Thirteen: Could not remove the old theme.

To be continued . . .