Page 1 of 1

operate my thermostat with MQTT

Posted: Monday 22 January 2024 15:05
by remko2000
I can control my thermostat via domoticz.
However, I want to go one step further. I want to be able to operate this via mqtt. I want 1 command that increases one degree each time and 1 that decreases one degree each time.
I have now reached the point where this command works to set a setpoint via mqtt with:
mosquitto_pub -h localhost -m '{ "idx" : xxx, "nvalue" : 0, "svalue" : "15;0000.00" }' -t 'domoticz/in'
but I want to be able to increase or decrease with a command without entering a value. Is this possible and how does it work?

Re: operate my thermostat with MQTT

Posted: Monday 22 January 2024 18:23
by waltervl
No, that is not possible without scripting (get the current value and do the delta plus or minus).

The Domoticz user interface does the same: Get the current setpoint and then do the delta with plus or minus arrow.

Re: operate my thermostat with MQTT

Posted: Monday 22 January 2024 20:47
by remko2000
that's to bad. Can you help me get started? Scripting? Do I have to use LUA for this? I've never written a script myself before, so that seems like quite a challenge

Re: operate my thermostat with MQTT

Posted: Monday 22 January 2024 23:17
by waltervl
What is the use case?
From what script/application do you want to do the mosquitto_pub mqtt command to up/down the thermostat?
That script/application should first read the current value (it should be readable in mqtt domoticz/out) and the send the domoticz/in mqtt command setpoint to be.

Re: operate my thermostat with MQTT

Posted: Tuesday 23 January 2024 16:14
by remko2000
I ordered a button plus
https://button.plus/

This works with MQTT.
I want to remove my thermostat and and this is where I want to place this display. With the button plus I want to be able to turn on my thermostat with two programmable buttons. One button can be set warmer and one to set it colder.
how could I achieve this (with my limited programming knowledge)?

Re: operate my thermostat with MQTT

Posted: Tuesday 23 January 2024 18:55
by waltervl
Ask button+ to support mqtt auto discover protocol and configure it to be a thermostat. Then Domoticz will recognize it and no programming from your side is required.

How does the button+ knows what the current setpoint is? It should need some internal configuration rules to send Pröpper mqtt messages.

Else you have to wait for a button+ owner with programming skills to do it for you, or dig in the programming world yourself :-)

A in between solution is the mqtt mapper plugin where you can configure non compliant device mqtt protocols to create and update devices with mqtt protocol of the button+