Hello everyone.
Lately I have managed to connect an esp to an OT shield from https://diyless.com/ / http://ihormelnyk.com/opentherm_adapter .
Because of this, I decided to concentrate some of my time to trying to make a smarter than your average hvac system. After finishing, this will be moved probably to projects section.
My heating project looks like this at the moment:
I can control my boiler now based on the temperature from a sensor in my house. Any of them, but only one at a time.
What I want to do is, a lot more complicated. I want to have control over the temperature in any of my 3 rooms, turn off heating of in a certain room if the window is opened, and maybe have a vacation button to set temp to a very low value.
Now, I am writing here because, of course, I am missing all the config needed for the automation.

What needs to be done:
automation temp
- alias: sendtemp-room1
trigger:
- platform: time_pattern
seconds: "/20"
action:
service: mqtt.publish
data: {"payload": "{{ states('sensor.0x00158d000465809a_temperature') }}", "topic": "dummy-current-temp-room-1", "qos": 0, "retain": 0}
Where 0x00158d000465809a is the entity id of my zigbee aqara temperature sensor.
automation window room1 open
- alias: window-open
trigger:
- platform: time_pattern
seconds: "/20"
condition:
??? state of window sensor is open
action:
service: mqtt.publish
data: {"payload": "10", "topic": "dummy-eco-set-temp-room1"}
This should publish a value of 10 (as in degrees) to dummy-eco-set-temp-room1
. I do not know yet what values does the sensor output, if it is on/off or open/close.
I do not know how to format the condition.
automation window room1 closed
- alias: window-closed
trigger:
- platform: time_pattern
seconds: "/20"
condition:
??? state of window sensor is closed
action:
service: mqtt.publish
data: {"payload": ??? value on topic "dummy-set-temp-room1", "topic": "dummy-eco-set-temp-room1"}
I also do not know if this will work. It should take a value from topic dummy-set-temp-room1
and forward it to dummy-eco-set-temp-room1
.
automation TRV room1
automation mode loop room1
automation setpoint loop room1
automation mode on
- alias: boiler mode on
trigger:
- platform: time_pattern
minutes: "/1"
condition: or
conditions:
??? mode received on topic "dummy-mode-room1" is on
??? mode received on topic "dummy-mode-room2" is on
??? mode received on topic "dummy-mode-room3" is on
action:
service: mqtt.publish
data: {"payload": "on", "topic": "opentherm-thermostat/mode/set"}
This should send on
payload to the topic opentherm-thermostat/mode/set
if any of the rooms has the thermostat set to heating.
I do not know how to formulate the line for checking if the state received on mqtt topic dummy-mode-room1
is on.
automation mode off
- alias: boiler mode off
trigger:
- platform: time_pattern
minutes: "/1"
condition: and
conditions:
??? mode received on topic "dummy-mode-room1" is off
??? mode received on topic "dummy-mode-room2" is off
??? mode received on topic "dummy-mode-room3" is off
action:
service: mqtt.publish
data: {"payload": "off", "topic": "opentherm-thermostat/mode/set"}
This should send payload off
to topic opentherm-thermostat/mode/set
if all the thermostats are switched off.
as well as above, I do not know how to check the state for conditions.
automation algorithm
mqtt climate config in configuration.yaml:
- platform: mqtt
modes:
- "off"
- "heat"
name: Boiler
current_temperature_topic: "dummy-current-temp-room-1"
mode_command_topic: "dummy-mode-room1"
mode_state_topic: "loop-mode-room1"
temperature_command_topic: "dummy-set-temp-room1"
temperature_state_topic: "loop-setpoint-room1"
min_temp: 12
max_temp: 28
value_template: "{{ value }}"
temp_step: 0.2
I will come back with more info on what I think should be.
1 post - 1 participant