Upgrading from microSD to SSD
I’ve been rather quiet recently as I’ve been banging my head against a brick wall which I’ve finally broken through. What I was expecting to be a quick and painless upgrade to my Home Assistant setup took me several weeks to resolve. This blog is sub-titled “making mistakes so you don’t” and it’s particularly apt in this case.
Why upgrade?
My Home Assistant system has become ever more important to how I run and monitor my home, to the point where its failure would be extremely inconvenient, especially as you can bet it would happen at the worst possible time (think Xmas day)! The obvious weak link in my Raspberry Pi4-based system is the microSD card. Sooner or later, it’ll fail. So I decided to replace it with a Solid State Disk (SSD) which should be reliable for the expected lifetime of my system. Without going into details, I bought a 250GB Kingstone SSD (I went for a reliable brand) along with an external case with a cable that would plug into the USB3 drive on the Pi.
The first issue
There are many guides and videos on how to migrate HA from a microSD to an SSD (I particularly liked this one). I followed the instructions and it went like a breeze. HA booted up on the SSD immediately and all looked well until I checked my integrations. Damn! ZHA (the HA ZigBee integration) had failed. Something at the back of my head stirred, there was something I had to do when I first started using HA and ZigBee; what was it? Ping! It’s an extra line in config.txt (with an SSD, editing config.txt is a doddle - simply plug the SSD into a Windoze system and you can see the drive and edit the file there and then). The following line should be added near the top after the kernel=… line:
dtoverlay=disable-bt
This done, I rushed to reboot my Pi with the updated SSD and, bingo!, the ZHA integration no longer failed. All sorted!
The second issue
Unfortunately, all was not sorted! Although my ZigBee devices seemed to be working, any attempt to control them failed. I couldn’t turn any lights on or off or change their colours or brightness, switches couldn’t be controlled and thermometers didn’t transmit readings. I tried various permutations, rebooting, reloading, repeating re-anythinging. Nothing worked even though the ZigBee devices “seemed” to be visible.
Googling around, this seems to be a common problem caused by radio interference from the SSD. The solution mentioned by almost everyone was to put your ZigBee controller as far away from the Pi. Tricky this as my controller (a RaspBee II) is inside my Pi on the GPIO board so can’t be moved. I thought I’d try moving the SSD away from the Pi.
So I bought a couple of new USB3 cables, 1m and 2m long (they came as a cheap package on Amazon). I tried the 1m cable between the Pi and the SSD. No good, still nothing working. With some doubt I then tried with the 2m cable. Joy! Every ZigBee device worked exactly as they had with the micro SD.
Now, with the SSD, I have what I hope is a more robust Home Assistant system.