mqtt update value if changed

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.
Post Reply
User avatar
Posts: 942
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy

mqtt update value if changed

Post by emme » Wednesday 05 September 2018 15:24


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)

The most dangerous phrase in any language is:
"We always done this way"

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests