-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Temperature sensor not showing any data #13
Comments
HTU21D is not yet supported by But it looks there are other drivers available: Tell me you manage to use any of those ? Then it should be easy to add it as a new "controller" in Just add an else statement in: Then adapter can be updated Does this help ? |
I'm trying to use sensor-htu21d but I'm not sure what are the steps. So I did:
Then I edited
But I'm pretty sure I'm not doing it right :-) |
well it's a good start This module could be preferable to use: Then it will be easier to also support iotjs: To make it easier may I suggest that we use focus only on humidity value first Let me suggest this plan 1/ duplicate: 2/ 3/ replace "read" by "readHumidity" (update simulator too) https://github.com/bbx10/node-htu21d/blob/master/index.js#L95 4/ then you can try by running once it work you can open a PR node ./lib/humidity 5/ Add Humidity to: 6/ import driver and add controller like you did in init part, test it update PR 7/ I will suggest a plan for refactoring this into temperature sensor too 8/ Multiple type sensors should be also specified, eventually as non w3c API, relate to: |
API could be renamed to readHumidity to align some drivers Relate-to: #13 Change-Id: I0b26199d4384e8aab9fd0894ded26664fe50663a Signed-off-by: Philippe Coval <[email protected]>
API could be renamed to readHumidity to align some drivers Relate-to: #13 Change-Id: I0b26199d4384e8aab9fd0894ded26664fe50663a Signed-off-by: Philippe Coval <[email protected]>
I have prepared you the last for step 6 and later On trouble feel free to reach me here or on irc May I ask @dror3go what distro are you using ? If debian please can you try Iot.js: https://github.com/rzr/webthing-iotjs/wiki/IotJs with |
I made the changes manually, but the humidity is not available in the UI. Is there a command I need to run 1st in order to be able to use it? As for the distro - well I'm using Mozilla gateway 0.10.0 and when I SSH to the Pi I see that it's indeed Debian. What's the motivation to use IotJs and what is its current replacement in the default setup? |
yes I am about to update the mozilla adapter without the humidity sensor... Originally i made this module for iotjs and since it's backward compatible with node, then i reused this module in mozilla addon. |
Oh sorry, I totally forgot about the readings. So after I've added
That's fine. |
yes the simulator is used by default https://github.com/rzr/generic-sensors-lite/blob/master/lib/humidity/index.js like I made for https://github.com/rzr/generic-sensors-lite/blob/master/lib/temperature/index.js#L94 Then you can test it using:
I can prepare this in a branch if you can try find me in chat room. |
Test using: node lib/humidity '{ "controller": "htu21d" }' Relate-to: #13 Change-Id: I8f4dfa53b478a42019f445e46da9f9de93768c4a Signed-off-by: Philippe Coval <[email protected]>
Relate-to: #13 Change-Id: I9872317ed9cae7c8a6966da962a71e2eb252ff95 Signed-off-by: Philippe Coval <[email protected]>
Test using: node lib/humidity '{ "controller": "htu21d" }' Relate-to: #13 Change-Id: I8f4dfa53b478a42019f445e46da9f9de93768c4a Signed-off-by: Philippe Coval <[email protected]>
Relate-to: #13 Change-Id: I9872317ed9cae7c8a6966da962a71e2eb252ff95 Signed-off-by: Philippe Coval <[email protected]>
Note only humidity is used with this sensor also measuring temperature, maybe an other API will be needed to support both type. Relate-to: rzr/generic-sensors-lite#13 Change-Id: I19a57898209ed6421cc760ae5a2ab3f4d8034379 Signed-off-by: Philippe Coval <[email protected]>
@dror3go If you also added htu21d to temperature, please confirm if both can be added to mozilla gateway and used at the same time maybe not in that case other API will be needed any idea ? |
Thx @dror3go to confirm your change Is fixing this bug, I will release a new version once my patches are merged, starting with: |
Test using: node lib/humidity '{ "controller": "htu21d" }' Relate-to: #13 Change-Id: I8f4dfa53b478a42019f445e46da9f9de93768c4a Signed-off-by: Philippe Coval <[email protected]>
Relate-to: #13 Change-Id: I9872317ed9cae7c8a6966da962a71e2eb252ff95 Signed-off-by: Philippe Coval <[email protected]>
Back to the original temperature use: Please @dror3go forward this change with a PR: Make sure to update requiere path like I did for humidity: |
Note only humidity is used with this sensor also measuring temperature, maybe an other API will be needed to support both type. Relate-to: rzr/generic-sensors-lite#13 Change-Id: I19a57898209ed6421cc760ae5a2ab3f4d8034379 Signed-off-by: Philippe Coval <[email protected]>
Current release should fix this bug, please @dror3go test to confirm this issue should be closed. See you at: |
I purchased ANAVI Infrared pHAT together with a temperature & humidity sensor (HTU21D), and attached it to a Pi 3 with a newly installed gateway version 0.10.0.
I was able to add the device in the gateway, however I can't seem to get a reading of it: when I try to turn it on (browsing to /things/generic-sensors-2) I see in the browser's network log that when I press the "on" button there's a request to PUT /things/generic-sensors-2/properties/on which doesn't get an answer. Another click on the button, to turn it off, results in an immediate response in the network tab (
{"on":false}
).When I SSH to the Pi I get this:
How can I make the sensor up and running?
Thanks a lot
The text was updated successfully, but these errors were encountered: