Retrieve sensor values from sensors on OpenHab request



  • I know that OpenHab can store the last value of a sensor with persistance, but sometimes OH could go down and then sensor value change and then when it comes back it will show an outdated value.
    So far a sensor does not change its value, OH will have null / old data, so how should I approach this?
    I'd like it to be automatic, but I really don't know if that is a good idea, e.g. OH requesting all values from all sensors that might flood MS network.

    I believe one solution could be from the sensor side implementing receive to answer the req message and then...
    from OH side have a rule that will (trigger when?) and request a sensor value, do I have to use the "expert mode" of the binding here?
    Please advice


  • Mod

    just add some code in the nodes that if sensor data hasm't changed after 5 or 10 measurement, it will force the send of the value to make the controller aware that the sensor is still alive. Implementing a receive function on nodes it can be done but not for battery powered ones.



  • either what @gohan said or persist the values in OH


Log in to reply
 

Suggested Topics

  • 22
  • 4
  • 19
  • 1
  • 10
  • 7

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts