homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 240 forks source link

BME280 initialization issue #374

Closed jos149 closed 3 years ago

jos149 commented 3 years ago

Describe Your Problem:

Hey, short docker question: in oznu/homebridge my i2c communication fails with the bme280. Is it because I defined my PGID and PUID incorrect in my compose file? It is 1000 now.

Response from my terminal: pi@homeserver:~ $ id pi uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),109(netdev),999(spi),998(i2c),997(gpio),995(docker)

jos149 commented 3 years ago

To update on this: on the pi running the i2cdetect gives me an address. Running a python script also returns data from the sensor, so it is working!

I was wondering whether it is possible to maybe add a directory in the docker-compose file. Something like: volumes:

jos149 commented 3 years ago

To elaborate on this, in oznu/homebridge nothing is mentioned on parameters based on mapping devices But, if you want to add your i2c device, for example a BME280 temperature sensor you just can add the following to your docker-compose:

`devices: