-
Notifications
You must be signed in to change notification settings - Fork 0
Install HomeBridge
Volodymyr Huz edited this page Mar 9, 2020
·
7 revisions
You need to install nvm (Node Version Manager) and Node.js latest version before it.
Install Homebridge
npm install -g homebridge
Create the config.json file
nano ~/.homebridge/config.json
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},
"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a templ$
"ports": {
"start": 52100,
"end": 52150,
"comment": "This section is used to control the range of ports that separate accessory (like camera or television) should be b$
},
"accessories": [
{
"accessory": "WeMo",
"name": "Coffee Maker"
}
],
"platforms": [
{
"platform" : "PhilipsHue",
"name" : "Hue"
}
]
}
Running Homebridge on Bootup (systemd)
sudo nano /etc/systemd/system/homebridge.service
[Unit]
Description=Node.js HomeKit Server
After=syslog.target network-online.target
[Service]
Type=simple
User=osmc
# Adapt this to your specific setup (could be /usr/bin/homebridge)
# See comments below for more information
Environment=PATH=/home/osmc/.nvm/versions/node/v13.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/osmc/bin:/sbin:/usr/sbin
WorkingDirectory=/home/osmc/
ExecStart=/home/osmc/.nvm/versions/node/v13.9.0/bin/homebridge -U /home/osmc/.homebridge
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable homebridge
systemctl start homebridge
systemctl status homebridge
journalctl -f -u homebridge