Home | Home Automation | All about Homebridge, drive your smarthome from iOS

All about Homebridge, drive your smarthome from iOS

Homebridge is an Open Source project developed by Nick Farina (Github, website ). It is a modular project which can add plugins depending on the material you want to add to the iPhone (or iPad). There are already more than 260 plugins (the list complete here) and you can even expand your (examples to start).

You have plugins for leading home automation software (Domoticz, Home Assistant, OpenHAB, Jeedom, FHEM…) and for many Devices (bulbs Philips Hue, Synology NAS…).

Install Homebridge on Raspbian

Let’s start with updating the system

If your distribution does not support the automatic expansion of the partition (at first launch, it is for example the case for Domoticz image), run raspi-config.

Go to Option 1 – Expand Filesystem. Then Finish and finally Allow reboot.

Once re-connected, we can install homebridge

Find the Mac address of your Raspberry PI. It is unrated but without this configuration (trick found here), you may not be able to detect the HB bridge on iPhone (or iPad).

Run ifconfig . The Mac address of the RPI is HWaddr right .

hombridge domoticz adresse mac rpi hwaddr

Open the configuration file in a text editor (pico or nano)

Change the value of the key username Mac using the address of your RPI. You can assign a personal Pin code. Save (Ctrl + X) then O (or Y). The following example is taken from the installation for Domoticz tutorial . You will need to adjust the plugin you need.

homebrige domoticz edomoticz config
Example of configuration of Homebridge for Domoticz.

Launch HB manually with the command homebridge.

homebrige domoticz premier demarrage
At startup, home automation devices are presented to iOS

At startup, HB search all devices configured and makes them visible by an iPhone or an iPad connected to the local network.

At he moment, “hot change” are not able. We need to restart Homebridge manually whenever you add a material. This is so a few useful commands.

Launch Homebridge automatically at startup Raspberry

Check first of all that the sources of HB have been installed globally.

Then it publishes the init.d file

Copy this code in the file (original source code).

We need to make the script executable
And now we ask the OS to start the script at startup
You can run it manually with the command
If HB is already running, the script will inform you and will do nothing more.

Other useful commands for fly Homebridge


To manually stop

Know the State

Run the following command to see if the service is started or stopped.


You come to make a change in the configuration file ~/.homebridge/config.json, run the option restart to revive.

Check logs

Once HB is configured to start at boot, we have more visual feedback of what’s happening. Here are two other very useful commands to access logs in real time.

And look at the log of errors

Sources :