Homebridge, Raspberry Pi camera, HomeKit
Installing homebridge on Raspberry Pi seems to be easy if we follow tutorials like nfarina/homebridge: HomeKit support for the impatient and Running Homebridge on a Raspberry Pi · nfarina/homebridge Wiki.
But, once we finish all the processes and setup systemd configuration, then hit this command to run homebridge in background.
$ sudo systemctl start homebridge.service
Then, some of you may encounter error like this,
And we use following command to check the status of service.
$ sudo systemctl status home-assistant@homeassistant.service
We may see error like this,
[rpi camera] ffmpeg exited with code 1
How to fix this error is really simple. If we have followed tutorials mentioned above, then we already created a user homebridge.
Run the following command to add user homebridge to the video group.
$ sudo usermod -a -G video homebridge
then, restart homebridge.
If homebridge failss even earlier, take a look at the location of homebridge binary. In /etc/systemd/system/homebridge.service in tutorial, it says /usr/local/bin/homebridge, but, somehow, it is located in /usr/bin/homebridge in my case. So, I modified it in /etc/systemd/system/homebridge.service
[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
ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
No comments:
Post a Comment