Tweaking sensor configs



  • So I've come a long way in my quest to get a sensor node working. I'm currently sending readings from a DHT22 on an arduino nano via nrf24l01 to my arduino uno then to a r-pi running openhab. I'm now trying to understand how to make some minor changes.

    1. My temperatures are showing in Celsius instead of Fahrenheit.

    I know that I could go hack up the arduino sensor code to have it display in either, but I can see that it is incorporated into the sensor code to determine if the controller is configured for Celsius or Fahrenheit. I also see in the serial protocol that there is an internal message type for configs (I_CONFIG) that is used for sending either metric or imperial unit of measurement. I have a very vague understanding of the rules on the openhab end, however I think it is a mapping that needs to happen there. Confirmation and any examples would be great. I would also like to poll other things such as battery life, etc, so understanding this would be great.

    1. How do you push data TO the sensor node?

    I have two projects lined up right now that would require both pushing data to and receiving data from a sensor node. Is this also in the rules configuration on openHAB that the mappings/instructions would be configured? Anyone have examples they could share?



  • So I still haven't quite figured this out. There doesn't seem to be any information out there on this feature, at least not that I can find. I believe I've successfully transmitted "101;255;3;0;6;I\n" from my gateway, which from what I understand should set the sensor node to Imperial units. While watching the serial monitor on the sensor node, I did not see anything received and the units did not change. There is a possibility that my code did not transmit that code successfully, however the rule associated with the command was triggered successfully and I'm not sure of any way to verify.

    I know what I could easily modify the code on the sensor node to change the units, however I like the idea of being able to control multiple sensor nodes centrally. I also like the fact that the sensor code was written to include this functionality, and I'd like to take advantage of the well written code published by mysensors...

    Any help would be greatly appreciated.


Log in to reply
 

Suggested Topics

  • 3
  • 3
  • 1
  • 2
  • 24
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts