mqtt update value if changed
Posted: Wednesday 05 September 2018 15:24
Ciao,
it might be possible to add a boolean option in the mqtt string for domoticz/in topic where to update the vale ONLY if the actual value is different (like already done in dzvents with the .checkFirst() function)?
something like:
{"command": "switchlight", "idx": 0, "switchcmd": "Off", "checkfirst": true }
if omitted the "checkfirst": true (or setted to false) the value will be overwritten without control
this would be useful in keeping track of devices and variables state based on a time value (if a variable/switch is not updated for a certain amount of time do stuff)
thank
ciao
M
it might be possible to add a boolean option in the mqtt string for domoticz/in topic where to update the vale ONLY if the actual value is different (like already done in dzvents with the .checkFirst() function)?
something like:
{"command": "switchlight", "idx": 0, "switchcmd": "Off", "checkfirst": true }
if omitted the "checkfirst": true (or setted to false) the value will be overwritten without control
this would be useful in keeping track of devices and variables state based on a time value (if a variable/switch is not updated for a certain amount of time do stuff)
thank
ciao
M