momenso / node-dht-sensor

Node.js Humidity and Temperature sensor addon
GNU Lesser General Public License v3.0
309 stars 72 forks source link

node-dht-sensor broken on RPI4 #101

Closed jgarvey955 closed 5 years ago

jgarvey955 commented 5 years ago

After updating to buster on my RPI3B+ my system was running fine. All other peripherals work fine except the DHT11 and when i shift the 3B+ out for the 4B i get an 2835 MMAL error saying that memory can not be mapped. when i swap the 4B back to the 3B+ it runs fine. Is there something new???

Have verified DHT11 works with RPI4B through a python script. Am currently on node 12.6.0 - am going to try to drop to latest stable 10.15.2 and see.

Have verified same issue with node 10.15.2

momenso commented 5 years ago

We had a similar problem reported in #16.

Perhaps you can run a simple test code (e.g. the First Example from the README file) to confirm if you still have the problem.

jgarvey955 commented 5 years ago

I have confirmed with Raspberry Pi Org that the bcm2835 library will need to be rewritten for the rpi4b due to changes with the chip.

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=245107&p=1495602&sid=2abe572cd359aafd8155eec8705e1f5d#p1495602

momenso commented 5 years ago

Thanks for the update @jgarvey955!

ronasick commented 5 years ago

How would you use this library with the new bcm2835 1.60 version? Is an update of this library needed?

vladimirvolek commented 5 years ago

I have the same problem. Is there any workaround?

image

schadokar commented 5 years ago

I am experiencing the same issue. I am using DHT22 and raspberry pi 4.

momenso commented 5 years ago

Due to the limited availability of the RPi 4 I have been unable to work on this issue. If any lucky owner of a RPi4 is interested in working on this issue it will be most welcome! If not, I am stuck waiting for my order to be fullfilled, hopefully soon.

ronasick commented 5 years ago

Excited for the update! This is my current workaround

Screen Shot 2019-09-01 at 1 21 16 PM
momenso commented 5 years ago

Fix for running node-dht-sensor on the Raspberry Pi 4 is now released. Please make sure you upgrade to version 0.4.0 and check if it works for you.