Upgrading the HomeSeer/HomeTroller hardware

My 1st gen HomeSeer HomeTroller Pi was built on a Raspberry Pi 3 B with 1gb of RAM. While this was fine back when I bought it and was just starting my home security and automation re-design and foray into using HS4, recently I’d been having issues with performance and out-of-memory conditions. In 2021 when I bought the HomeTroller, the HS4 software was only permitted to run 5 plug-ins but that limitation was removed in later releases and I upgraded the microSD card to allow for unlimited plug-ins. Unfortunately, 1gb of RAM is not “unlimited” so now that I’m running more plug-ins (10 at last count) I suspected that the cause of the crashes was due to lack of free RAM. Thus, I decided to try and upgrade the Raspberry Pi in the HomeTroller to a beefier model.

I purchased a RasPi 4 B with 4gb of RAM to be my new HomeTroller Pi. After making a complete backup image of the 32gb microSD card in the current Pi, I shut it down, opened the case, and moved the card and Z-Wave hat to the new Pi.

Pi 4 with Z-Wave hat attached

Most of my research seemed to confirm that the old card (running Debian Buster) would work just fine swapped into the newer hardware. That seemed to bear out since the new Pi successfully booted and I was able to SSH back in, but the HS4 software hadn’t started.

I was starting to get worried but doing a little digging I determined that there were errors being thrown by the /etc/rc.local file that was causing the script to exit before it got around to starting the HomeSeer services. I went down a rabbit hole researching the error (Oops: Unable to determine board revision from /proc/cpuinfo / -> No "Hardware" line / -> You'd best google the error to find out why) and eventually figured out that the older gpio libraries didn’t work on the newer hardware. After some more poking around, I figured out that the gpio calls in rc.local were just to change the color of the LED on the Z-Wave hat to indicate boot status (yellow, then blue, then green)! When I commented them out, the Pi booted normally and HS4 also started successfully, so it was just the LED affected. I did some quick testing in HomeSeer to make sure all my Z-Wave devices still worked (they did, whew!) and then wrote a quick Python script using the RPi.GPIO library to set the LED color and inserted those commands into rc.local.

That was about it. I ran some updates on the Pi to get the latest packages and kernel for the new hardware and after a few successful reboots confirmed HS4 was operating just the same as it had on the old Pi 3 B, except with 4x the RAM now. The HS4 interface is definitely a little snappier as well, so win-win.

Ok, there was one other minor cosmetic problem: the Pi 4 has a different port layout (USB-C power and micro HDMI) than the Pi 3 so I had also purchased a new case. Unfortunately, with the Z-Wave hat installed, the Pi wouldn’t fit properly in the case. It’s not pretty, but I managed to fit the Pi 4 into the original HomeTroller case and get the screws in enough to hold it somewhat closed while still allowing access to the power jack.

Pi 4 sandwiched into the original Pi 3 HomeTroller case

I’ll see if I can find and print a good Pi 4 case design from Thingiverse that will accomodate the additional with of the Z-Wave board, but for now, I’m up and running!

2 Comments

  1. Rather than try to find (or print) a case that would fit with the Z-Wave hat, I decided to try and do some (physical) hacking of the case I had already purchased. Two quick cuts with a saw to remove the end, and bingo! It even provides some extra ventilation! 🙂

  2. Crash!

    I’m not positive this was related to my recent hardware upgrade, but on Sunday morning I found HomeSeer wasn’t running. I was able to SSH into the Raspberry Pi but found odd errors in the syslog that seemed to indicate a problem with the 32gb microSD card and it had basically locked itself into read-only mode!

    After spending a few hours trying to fix the card and recover the data (using fsck, e2fsck, gparted, etc.) I decided that the card was corrupted and the big partition containing my HS4 data was unrecoverable. Luckily, since I had just done this hardware upgrade less than two weeks ago, I had a relatively recent backup image of the microSD card. Using dd, I restored the image to a new 64gb microSD card and then used gparted to expand the partition to use up the extra space (which worked this time, no more wasted 1gb at the end!).

    With the new 64gb card in the Raspberry Pi, I booted it up and had a working HomeSeer system again, albeit from two weeks ago … which also meant it was still on Debian Buster so I had to re-do the upgrade to Bullseye and everything else I had done since making the dd backup image.

    I’m hoping this was just the 32gb microSD card going bad and not something related to my hardware upgrade. Anyway, all of this is why I ended up messing with the case for the new Ras Pi 4 and ended up with the hack job I posted above.

Leave a Reply

Your email address will not be published. Required fields are marked *