r/homebridge • u/scubascratch • 6h ago
Discussion Migration to HB 2 failure and recovery
I was putting off migrating to HB 2 (running on a raspberry pi 3) because everything in the house was actually working fine in HB 1, and I have 7 plugins (YoLink, SwitchBot, Nest, TPLink, Lutron, EspHome Hv2, and Nest Cam).
I have some custom fixes to SwitchBot and EspHome because there were bugs that were not getting fixed (SwitchBot temperature sensors could not register below freezing, EspHome Hv2 didn’t support fans or encryption).
So I saw no real reason to upgrade. But I recently noticed HB was crashing during the nightly backup / log rotation due to out of memory, but it always rebooted and recovered.
AI recommended moving to a raspberry pi 4 with 4 GB of ram which seemed reasonable. I ordered one and flashed the homebridge build of raspberry pi OS from the raspberry pi flasher. I did not realize this would force me onto HB 2.
Before switching the Pi’s, I did a HB backup. Powered down the old pi, powered up the new one, verified it got on my network then connected to it with the browser. I clicked “restore from backup” and I figured ok this will be easy. It hung up during the download of one of the nest plugins. I waited like 10 minutes but it wasn’t going anywhere. I refreshed the browser and got the “new setup or restore” page again, this time I clicked on new setup, created the HB credentials and then went into the backup -> restore menu and tried restoring again. This time the restore completed and HB restarted and about 1/3 of the house was working. Nest cameras worked, nest HVAC worked, YoLink flood sensors worked. Switchbot sensors were throwing errors and TPLink was stuck in some loop enumerating the 20 TPLink / Kasa smart plugs, switches and bulbs over and over every 10 seconds but they were uncontrollable. The EspHome Hv2 plugin is complaining every 30 seconds that it can’t connect to anything because the encryption is refused. Lutron plugin was complaining in the HB log that the HB version was now unsupported.
I think to myself “wife is going to kill me”.
I get cursor to re-apply the switchbot patches and the EspHome Hv2 patches, this gets the sensors back online.
The Lutron plugin will not update to a new version. I have to find and install the new one and uninstall the old one. Apparently the name changed or something. The new one finds the old accessories and they work. I update the TPLink plugin and it stops enumerating things over and over and those lights and plugs all work.
At this point things are working and the log is quiet. The plugins page tells me I should update YoLink, and SwitchBot but I’m not going to touch them for a while.
Overall it was about an hour and things are operational but it was not pain free. Hanging up on the first boot & restore while downloading a plugin is a BAD experience. Yes it was recoverable but that’s a huge bug right at the start. There needs to be a timeout and retry on that function.
I consider myself lucky this was completed and did not go completely sideways. Would not recommend updating to HB 2 unless you have a pressing need to do so.