ebaauw / homebridge-rpi

Homebridge plugin for Raspberry Pi.
Apache License 2.0
311 stars 19 forks source link

Is it possible to use this plugin for Homebridge installed in Docker? #186

Closed alexsannikov closed 2 weeks ago

alexsannikov commented 3 weeks ago

Hello, I am using Docker and Homebridge in container on the same host (which is Raspberry Pi 4). Trying this plugin, I am a bit confused in separation of Homebridge as a HB system and the host real RPi system. For me, it looks like HB plugin is trying to connect to the host system's pigpiod process, on the same physical host but in fact on another system. Also, Docker uses its own root, and it may be difficult to include Docker "root" user into host "video" group. Did anyone ever tried to install and configure this plugin for such a environment? I am using Bookworm, and I need only CPU temperature and (maybe) Throttling status. No any GPIO etc. Thanks

ebaauw commented 3 weeks ago

See README,

If you run Homebridge in a container on the Raspberry Pi, let Homebridge RPi connect remotely to (the pigpiod daemon running on) the host. Do not try to run pigpiod in the container.

For all intents and purposes, the host system is a remote Pi to Homebridge RPi. Homebridge RPi accesses the system resources remotely through pigpiod, through the getState script. So you need pigpiod on the host, even if you don’t use any GPIOs. The user running docker won’t need access to the system resources, and you don’t need to expose these to the container running Homebridge RPi (if that’s even possible).

alexsannikov commented 2 weeks ago

Thanks Erik, I was able to configure your plugin successfully!