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
mqtt update value if changed
Moderators: leecollings, remb0
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
mqtt update value if changed
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
- Posts: 90
- Joined: Saturday 22 August 2020 13:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: mqtt update value if changed
I was exactly looking for this functionally. Is this already possible, or is there a workaround?
- waltervl
- Posts: 5846
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: mqtt update value if changed
I think there is an option in Domoticz menu setup - settings -tab Log history that do just that: "Only add newly received values to the log"
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 90
- Joined: Saturday 22 August 2020 13:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: mqtt update value if changed
If I understand the manual correctly this is aimed at showing and keeping the data in the log of a sensor. Not about the update of the sensor itself?
- waltervl
- Posts: 5846
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: mqtt update value if changed
Give it a try and you will see if it works.
In what manual did you read this?
In what manual did you read this?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 90
- Joined: Saturday 22 August 2020 13:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: mqtt update value if changed
This is where I found it, it is really a description about how the log is kept: https://www.domoticz.com/wiki/Applicati ... og_History
But you might be right, i'll give it a try later!
But you might be right, i'll give it a try later!
Who is online
Users browsing this forum: No registered users and 1 guest