NorthernMan54 / homebridge-dht

Homebridge plugin for DHT22 Temperature / Humidity Sensors
73 stars 14 forks source link

bcm2835_init: Unable to open /dev/gpiomem: No such file or directory #50

Closed sachasmart closed 3 years ago

sachasmart commented 3 years ago

Hey everyone,

Somewhat new to these parts of the wood. I am running homebridge on my Raspberry Pi 4b through docker. I am getting: bcm2835_init: Unable to open /dev/gpiomem: No such file or directory [dht22] Error: [Error: failed to initialize sensor]

Yes, I know that I need to: sudo adduser homebridge gpio

When I try to use that line with my Pi I get:

pi@mypi:~ $ sudo adduser homebridge gpio 
adduser: The user `homebridge' does not exist.

Current Config: { "bridge": { "name": "Home Bridge", "username": "CC:22:3D:E3:CD:33", "port": 51826, "pin": "031-45-154" }, "description": "HomeBridge", "platforms": [ { "name": "Config", "port": 8080, "platform": "config" }, { "name": "RPi", "hosts": [ { "host": "10.0.1.29:8888", "name": "mypi", "noPowerLed": true, "noSmokeSensor": true } ], "platform": "RPi" } ], "accessories": [ { "accessory": "DS18B20", "name": "DS18B20", "device": "28-00000912a17d" }, { "accessory": "Dht", "name": "dht22", "service": "dht22", "refresh": "15", "gpio": "18" } ] }

Any direction will be greatly appreciated.

sachasmart commented 3 years ago

Tinkered and somehow got it working.