-
Notifications
You must be signed in to change notification settings - Fork 14
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
[dht22] Error: [Error: failed to read sensor] #47
Comments
Without coming onsite and taking a look, my guess is account permissions. And the account you are using on the command line is different than the one running homebridge. Is the account running home bridge also parmissioned to access the sensor? |
I thought the same, that is why i tried it with the homebridge user as following:
I made sure that homebridge-config-ui-x has all the rights it can get... But still same problem...nothing changed |
is the dht22 command actually used? I can't find its usage in the index.js. There you use sensor.read( from the node-dht-sensor lib. I took a closer look to that and noticed if i run the code
copied from https://github.com/momenso/node-dht-sensor then i also get as result
and the part "Error: failed to read sensor" is the exact message i get in homebridge so maybe there is a problem with this lib? |
I've rewritten (quick and dirty) some of your code so the dht22 executable is actually used...now it works
Will check tomorrow if i can further improve it for myself. |
If you go back thru the version history about 18-24 months ago I switched from this approach ( of calling an exec ) to the library as a lot of people had issues with getting the binary working. The included binary is from the old version of the code. |
hi i have the same problem, i was using a dht11 and it worked perfect, now i use a dht22 (it is more accurate) and i get: “[dht22] Error: [Error: failed to read sensor]” have you found any solution to this problem? (I apologize I am a very beginner) |
As i mentioned, i used the code i wrote myself (which is similar to his actual code from some months ago). Works for me. Sry |
perfect, I'll try your code, thank you very much |
Good evening @lwitzani , I have tried to paste your code in index.js replacing the original code with yours, but when restarting the raspberry and running homebridge again I get this error:
maybe if we can solve it together we could update index.js in the plugin, where can I be failing? I apologize for my little knowledge |
The root cause of this problem is mentioned at momenso/node-dht-sensor#116 . |
Hi, hope you are still around :) thx for the plugin.
I can't get it to work :(.
I installed the homebridge plugin via homebridge-config-ui-x. My config is:
I installed the BCM2835 library etc and i can run dht22 in my terminal as normal pi user and also as homebridge user. It returns something like
When i boot my homebridge, the init stuff is
But later when it actually runs it there is the error
Any idea what this could be?
The text was updated successfully, but these errors were encountered: