operate my thermostat with MQTT

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
remko2000
Posts: 167
Joined: Thursday 28 December 2017 14:38
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Broek op Langedijk
Contact:

operate my thermostat with MQTT

Post 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?
User avatar
waltervl
Posts: 5852
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: operate my thermostat with MQTT

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
remko2000
Posts: 167
Joined: Thursday 28 December 2017 14:38
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Broek op Langedijk
Contact:

Re: operate my thermostat with MQTT

Post 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
User avatar
waltervl
Posts: 5852
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: operate my thermostat with MQTT

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
remko2000
Posts: 167
Joined: Thursday 28 December 2017 14:38
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Broek op Langedijk
Contact:

Re: operate my thermostat with MQTT

Post 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)?
User avatar
waltervl
Posts: 5852
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: operate my thermostat with MQTT

Post 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+
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest