I bought a few GU-10 light bulbs, some sockets and two LED strip lights from Lidl last week. They comply with the Zigbee compliant version 3 standard. I already had a Philips Hue hub so when Lidle had an offer on smart home gadgets I jumped at the chance.
But I quickly ran into a problem! I could see my Philips Hue bridge in the Apple Home app but I could never find the lights in the Home app. A bit of digging told the story. Well, it actually told several stories. Certain blog posts say that the devices must be the same maker as the bridge. So that would mean that I could only use Philips lights with the Philips bridge. Other posts said that only devices compatible with the Friends of hue standard would work. Either way, I had two choices. Either send the lights back or try to find a way of making them work. So I picked the second option. Mainly because while searching on Google for various reasons why this might not be working, I found people talking about this cool little application written using Note.JS that was Homekit compliant. This would act as a bridge between Home kit and Philips Hue so that devices that weren’t quite compliant would be recognised. It’s a beautifully light application that packs a huge amount of power. Isn’t open source amazing!
Please enter Homebridge!
Because I have plenty of Raspberry Pi devices hanging around, and actually one is already used as my Wifi controller, it was easy to get this up and running. There are plenty of guides on the interwebs.However, I encountered a few problems. So I thought I should write down my experiences. The troubleshooting secion is at the bottom. Scroll down if you have already gone through the installation.
Installing Homebridge on a Raspberry pi
Install the repository:
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
Install Node.JS, Python and the GCC compiler.
sudo apt install -y nodejs gcc g++ make python
Verify that Node.js is installed:
With any luck, you will be presented with the version of Node.JS installed. Make sure that it’s higher than version 14. Also, keep an eye on the homebridge.log file later on to see if there are errors relating to the version of Node.JS installed. If Homebridge takes advantage of new features in later versions of Node.JS, you will want to make sure you have the latest version.
Install the latest version of NPM is installed. If it’s not there already.
sudo npm install -g npm
Now you can install Homebridge. You have all the dependencies at this point.
sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x
Install the service so that it runs at boot:
sudo hb-service install --user homebridge
Now you need the iP address of your Raspberry pi. Type one of the following to obtain it:
Homebridge listens on TCP port 8581 by default. If you have a firewall, please open this port. The default username and password are admin. Use the following URL to access the Homebridge UI. Replace
The first thing I noticed was when I moved among wifi zones in my house covered by different access points, I lost the connection to Homekit and it took IOS ages to reaquire the connection. This lead to discovery number one and two.
- Discovery 1
If you are using Homebridge, you should really leave an Apple TV or iPad connection available at all times. Something needs to keep the connection persistent to Homebridge. Your phone, watch etc will then connect back to that hub.
- Discovery 2
If you try to connect to Homebridge twice from the same device as a result of the connection being dropped when you move between wireless access points, you will first need to manually delete your device from the persistent cache on the Homebridge server.
Remove the persistance cache from Homebridge
- The Homebridge installation is at /var/lib/homebridge and there is a directory in there called Persist. It’s in there where the files need to be removed. Change to that directory
- Remove the files in that directory.
rm -rf *
Restart the Homebridge service.
service homebridge restart
Check the Homebridge logs
You can always find the logs in the web interface. But I like to be able to grep them etc so here goes.
You can also see the new log entries as they are written with this command:
tail -f /var/lib/homebridge/homebridge.log -f