Set up the configure and name /home/pi/.homebridge/config.json
1 2 3 4 5 6 7 8
{ "bridge": { "name": "Homebridge", "username": "FF:FF:FF:FF:FF:FF", // MAC address of Ethernet on Raspberry "port": 51826, "pin": "111-11-111" // Set up what you want to }, }
Set up boot up
To save the following words and to name homebridge into /etc/default
1 2 3 4 5 6 7
# Defaults / Configuration options for homebridge # The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more # You can display this via systemd's journalctl: journalctl -f -u homebridge # DEBUG=*
To save the following words and to name homebridge.service into /etc/systemd/system/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[Unit] Description=Node.js HomeKit Server After=syslog.target network-online.target
[Service] Type=simple User=homebridge EnvironmentFile=/etc/default/homebridge # Adapt this to your specific setup (could be /usr/bin/homebridge) # See comments below for more information ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS Restart=on-failure RestartSec=10 KillMode=process