OK, I’ve been running the same Raspberry Pi 4 with the Homebridge image for the last three years and I finally had an issue with it. Homebridge is a node application, so it requires regular updates to pick up new Nodejs versions and also updates to the Homebridge itself and then all the plugins, so here is what you have to do reasonably regularly. As an aside, hopefully, many of the devices I use in Apple Home will just become compatible with Matter, but right now this isn’t true for:
- UniFi Protect. Outdoor cameras
- Roborock via MiHome. A very cool, right now this is modeled as a fan (since Matter 1.2 just shipped with Robovac support but it isn’t there yet). You also have to use a Python program to extract the token with a one-liner
bash <(curl -L https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/run.sh)
- Denon AVRs. My old Denons appear
- Samsung TVs. Same with older Samsungs
- Tesla. Yes, I do have support for it, but I don’t use it much
- Sony PlayStation 3. I can control it from there although I usually do it through Harmony
- Alarm.com to see all the control points
- Harmony. Logitech has discontinued this, but it still works fine.
- RPi. These are the various lights and temperatures of the Raspberry Pi itself
Standard Upgrades via the HomeBridge User Interface
Homebridge makes this pretty easy by navigating to https:homebridge.local
:
- From the homepage interface, you can click on Plugins and click to get to the Plugins page and choose UPDATE for each one that needs it. Note that Homebridge is actually two parts, there is the user interface which is implemented as a plugin, and then the underlying Server doing the real work.
- The server updates on the homepage and click on the update button.
- Occasionally you have to update the version of node, they’ve also made this easy by putting on the home page a little terminal window and even giving you the magic command
hb-service update-node
- Although not recommended, I’ve been doing updates to the underlying operating system with the traditional sudo
apt update && sudo apt upgrade
Eventually, your Node version can’t get updated: Make a new OS image
This has worked great for three years, but recently I ran the node update and it said, the version of glibc was out of date and all the updates didn’t work it turns out I’ve been using Debian Buster and it is time to move to the next release Bullseye. Turns out that it needs a .new glibc and this is very tightly bound to the operating system, so the easiest way is just to move to the new release
I tried the trick of changing /etc/apt/source.list
from Buster to Bulleye but this didn’t work, so read the homebridge site and instead did this. Note that I even went to the raspi.list file in sources.list.d and change it from buster to bullseye but still no joy:
- Backup the Homebridge installation which downloads a zip file with all of your secrets etc. And put it in a safe place
- Run the Raspberry Pi Imager and go to Other Specific OS > Home assistance and home automation > Homebridge
- Then get a microSD card and blow a new one. Note that I didn’t say customize it although I could of to set the username and password
This gets you the latest Bullseye version, but also the later node.js version 20.9.0 and sets the base for the future.
- Then restart the RAspberry pi login and you should see the option to restore a backup
- The image by the way is somewhat out of date, so you should see the System needs an update and so forth.
Despite all this, I’m having trouble keeping UniFi Protect up
The GitHub is not much help, but maybe the Discord will find some answers. The main issues are it says the unifi.localdomain is not available and also Apple Home does not record any video events. This has been very hacky for a long time. I think the Raspberry Pi 4 probably doesn’t have enough power to send videos along, so more work to do.
The only solution seems to be to reboot your UniFi Controller. A bit painful, but that’s all I’ve found that works is a reboot to try to get the UniFi cameras online. Looking back on all of this, it probably would have made sense just to get an Apple Home-compatible camera as the Eufy’s that we have seem to work great.
Harmony Remote Integration
This is also pretty confusing, I can say the least, but basically, you can say “Siri, Turn on the TV”, but it seems to default to the last input which isn’t what I want. I think there is someplace in the homebridge UI, but it is hard to figure out. I’ve gone through all the entries, but they are pretty obscure.
RoboRock Integration
This is another one that’s confusing. YOu have to download a helper application that gets you the private token which is exposed by the MiHome could application, but after multiple reboots, two of our three Robovacs seem to be working, but not the last. Very curious.