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


    Log in to reply
     

  • 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
 

3 out of 3

Suggested Topics


  • Enclosures / 3D Printing   31 Aug 2014, 19:27

    22

  • OpenHAB   22 Feb 2022, 13:44

    4

  • OpenHAB   3 Dec 2023, 09:37

    135

  • OpenHAB   17 Jul 2022, 18:00

    7

  • OpenHAB   4 May 2022, 20:47

    5

  • OpenHAB   22 Oct 2020, 13:38

    10

12
Online

11.5k
Users

11.1k
Topics

112.8k
Posts