-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeouts reading from sensor #116
Comments
Hello! I also had the same error and found a solution for myself. I found a difference between the dht-sensor implementation and the protocol, in particular the low trigger value timeout it should be within 1-18ms. I have increased the low voltage latency from 800ms to 1000ms. |
I too had this problem. The mentioned changes fixed my problem as well. |
thanks for this hint. Since I am no c++ guy at all: am I right that I need to complile the cpp files? And if so: do you have any hints how a bloody starter is able to do so ;) |
Yes you need rebuild native cpp code for your target platform. Just follow the instruction https://github.com/momenso/node-dht-sensor#reference-for-building-from-source |
a big up to you, @cainpsycode! After some back and forth it worked for me! If someone else wants to build it from source:
Instead I need to run the following commands as sudo in the node-dht-sensor directory
I was also missing the package Once the build process has been completed I could import the self-made build via - in my case with promises -
// edit: no I hope that the library does not suffer from the negativ values bug as the Python lib I used to use does ;) |
There is no hope. The negative values are wrong. I fixed it, but I can't be sure if the solution is correct. |
I have the same timeout problem when I run the DHT11 sensor on 3.3V. I have changed my setup and use 5V on the sensor. But even there it happens sometimes! I hope this problem will be solved soon in the LIB |
Hi, sorry for my english, but isn't my first languege. |
I have searched a lot in this repository but unfortunately I couldn't find a solution for the problem I am facing.
I constantly get an error reading data from the sensor:
Error: failed to read sensor
First off
Raspberry Model B V2.0
/npm -v: 6.14.8
/node -v: v9.11.1
npm install node-dht-sensor --dht_verbose=true
If I run that simple script (taken from the examples) it returns an error. The logfile just says
Results in:
If I run the same script but with type 11 it returns completely wrong values, but it returns at least something
To me this looks like an issue with the DHT22 type of sensor. Any hints are welcome. I am happy to provide more information if needed
The text was updated successfully, but these errors were encountered: