Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wotfan

macrumors newbie
Original poster
Apr 27, 2011
20
2
Hi,

I have homebridge running on a Mac Mini and want to move it to a Raspberry Pi. I followed the instructions here and everything seems to work until I try to add homebridge to HomeKit. HomeKit see homebridge and accepts the 8 digit code but hangs on the "Adding Homebridge, Make sure it stays connected to power and nearby" screen. Eventually it displays a failed to connect to accessory message.

I am very new to the raspberry pi and linux for that matter. I would appreciate any advice. Thanks.

By the way, I am using a Raspberry Pi 3 and used the NOOB installer to install the latest version of Raspbian before following the installation instructions. It has a wired connection to my network now but I will eventually move it to wireless.
 

wotfan

macrumors newbie
Original poster
Apr 27, 2011
20
2
Update: I have made some progress getting Homebridge working. I am now able to add homebridge to HomeKit. The only thing I did differently was I added Homebridge to HomeKit using my iPhone instead of my iPad. I don't know why that made any difference.

I have now run into a problem adding a pi camera to HomeKit. I tested the camera with the sample python script on the official Pi site so I know it works. I installed the camera into homebridge following the instructions here. When I launch homebridge, I get "v4l2-ctl failed to open /dev/video0". Anyone have a suggestion on what to do? Thanks in advance.
 

BillGates1969

macrumors 68000
Sep 11, 2008
1,813
3,723
Poole, UK
Update: I have made some progress getting Homebridge working. I am now able to add homebridge to HomeKit. The only thing I did differently was I added Homebridge to HomeKit using my iPhone instead of my iPad. I don't know why that made any difference.

I have now run into a problem adding a pi camera to HomeKit. I tested the camera with the sample python script on the official Pi site so I know it works. I installed the camera into homebridge following the instructions here. When I launch homebridge, I get "v4l2-ctl failed to open /dev/video0". Anyone have a suggestion on what to do? Thanks in advance.

Does this stop HomeBridge from running?

Is the Pi camera on the same pi that is running HomeBridge?
 

wotfan

macrumors newbie
Original poster
Apr 27, 2011
20
2
Does this stop HomeBridge from running?

Is the Pi camera on the same pi that is running HomeBridge?
Thanks for the reply. Yes the error prevented HomeBridge from running and yes I am running Homebridge on the same pi as the camera. I do have another HomeBridge on HomeKit that is running on a Mac Mini but that only has some virtual switches on it.

I have been playing around with this since I last posted and have made some progress. I found that the reason I was getting that error message was that I wasn't loading the bcm2835-v4l2 module after I rebooted the pi. From the instructions I thought that I only had to do it once during the install. Now that it is configured to automatically load every time the pi boots I no longer receive the error.

Homebridge runs with only the normal warnings and I am able to add it to HomeKit. For some reason the camera is not loading into HomeKit though. The switches I configured using the dummy switch plugin are added to HomeKit but not the camera.

Any ideas?
 

BillGates1969

macrumors 68000
Sep 11, 2008
1,813
3,723
Poole, UK
Thanks for the reply. Yes the error prevented HomeBridge from running and yes I am running Homebridge on the same pi as the camera. I do have another HomeBridge on HomeKit that is running on a Mac Mini but that only has some virtual switches on it.

I have been playing around with this since I last posted and have made some progress. I found that the reason I was getting that error message was that I wasn't loading the bcm2835-v4l2 module after I rebooted the pi. From the instructions I thought that I only had to do it once during the install. Now that it is configured to automatically load every time the pi boots I no longer receive the error.

Homebridge runs with only the normal warnings and I am able to add it to HomeKit. For some reason the camera is not loading into HomeKit though. The switches I configured using the dummy switch plugin are added to HomeKit but not the camera.

Any ideas?

Unfortunately not :(

I run homebridge on a Pi3, but use only external plugins (Nest, WeMo, TPLink, Netatmo, MQTT, Sonoff-Tasmota, etc). I do know that the logs have helped me loads of times.

CD to /var/log and run a tail -f on the daemon.log to see what is happening to HomeBridge as it is running.



EDIT: I seem to remember something on the NPM plugin page for the Nest that mentions the nest cameras and needs additional installs in the Pi to get it to work. I know you don't have a Nest cam, but i seem to remember there is something needed to be installed on the Pi to stream any video
 
Last edited:

wotfan

macrumors newbie
Original poster
Apr 27, 2011
20
2
Unfortunately not :(

I run homebridge on a Pi3, but use only external plugins (Nest, WeMo, TPLink, Netatmo, MQTT, Sonoff-Tasmota, etc). I do know that the logs have helped me loads of times.

CD to /var/log and run a tail -f on the daemon.log to see what is happening to HomeBridge as it is running.



EDIT: I seem to remember something on the NPM plugin page for the Nest that mentions the nest cameras and needs additional installs in the Pi to get it to work. I know you don't have a Nest cam, but i seem to remember there is something needed to be installed on the Pi to stream any video
Thanks for the reply. I am going to try a fresh install of the OS tonight since I have played with so many things I may have made it worse. I'll check out the logs if/when I run into problems. Thank you for the info.

Right now I am trying to use the raspberry pi's add on camera with homebridge. I have tested the pi camera with a python script so I know it works. I am not getting any error messages so I am not sure why it isn't working in homebridge. Hopefully the fresh install combined with the info you provided will do the trick.

Thanks again.
 
  • Like
Reactions: BillGates1969

BillGates1969

macrumors 68000
Sep 11, 2008
1,813
3,723
Poole, UK
Thanks for the reply. I am going to try a fresh install of the OS tonight since I have played with so many things I may have made it worse. I'll check out the logs if/when I run into problems. Thank you for the info.

Right now I am trying to use the raspberry pi's add on camera with homebridge. I have tested the pi camera with a python script so I know it works. I am not getting any error messages so I am not sure why it isn't working in homebridge. Hopefully the fresh install combined with the info you provided will do the trick.

Thanks again.
One last thing - I am not sure if you have checked the GitHub page for the plugin

https://github.com/moritzmhmk/homebridge-camera-rpi

If you look under issues, there maybe some help there.

Good luck :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.