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
-
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
Suggested Topics
-
Boxes and Enclosures
Enclosures / 3D Printing • 29 Mar 2014, 21:02 • PITP2 31 Aug 2014, 19:27 -
OH3 Serial Gateway Problem
OpenHAB • 15 Feb 2022, 09:48 • seppi9 22 Feb 2022, 13:44 -
OH3 - MySensors Binding
OpenHAB • 17 Dec 2020, 16:35 • Peter Loeffler 3 Dec 2023, 09:37 -
MQTT losing messages...
OpenHAB • 8 Jul 2022, 11:27 • ben999 17 Jul 2022, 18:00 -
openHAB 2.5 binding and V_VARx
OpenHAB • 25 May 2020, 15:49 • syntacrsc 4 May 2022, 20:47 -
OH2.5.9 / ethernet gateway / autodiscovery?
OpenHAB • 20 Oct 2020, 15:31 • Stefferd 22 Oct 2020, 13:38