We save heating. Window detection mode.

Igor Mullin
4 min readOct 19, 2021

We have learned how to control heating (RU), but we do not yet have algorithms for ventilation. It is necessary to fill in the gaps and at the same time I will tell you my vision of this issue.

This is a translation of my article in Zen. Also, do not forget to read us in other services: Instagram, telegram (RU, EN, DE). Medium, LiveJournal, YouTube(old channel), YouTube (new channel).

If a common heat meter is installed in your house, then saving in one apartment will not allow the house to save money. In apartments with autonomous heating, the situation is completely different. Here you are the owner of the wallet and the habit of closing the battery when airing the room would be useful.

In Europe, the situation is more interesting, there they pay a lot of money for heating, there are meters on each battery. Residents there have learned to adjust and turn off the batteries during ventilation to save money. We’re just learning to live like this. Here’s an example from Germany. The conclusion is that the apartment needs to be ventilated several times a day for short periods of time so that the air in the apartment is replaced by fresh air from the street, but so that the walls do not have time to cool down, and heat, but not at the same time.

I have automatic valves and window opening sensors in my apartment. Nothing prevents me from turning off the heating when airing and turning it on after closing the windows. As always, there are many ways, but let’s take a closer look at the objects of the regulator. You can see an interesting switch “window detection”.

The mode seems to be interesting. Let’s see his description:

There are 3 modes for this switch: on, off and toggle. But, unfortunately, the function, as described, did not work for me. I pushed the switch and the valve instantly turned off the heating in the room, the window symbol on the case light up, but the mode did not turn off on its own after 30 minutes. Obviously, the entity has nothing to do with the described mode.

The automation algorithm was born instantly. When opening the window, I propose to turn off the heating and return it after closing it. This mode should help me. The rule for opening is very simple: the trigger is the opening of any window; the action will be to turn on the “window” mode on the thermostat.

alias: ‘Bedroom: Window open’
description: Turn off heating in the room
trigger:
- type: opened
platform: device
device_id: 157a36b19a0e9dbe6948ff1a8ae0f928
entity_id: binary_sensor.0x00158d0001120236_contact
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- type: opened
platform: device
device_id: 69c7e90c03d9f9f787990f90fd37f644
entity_id: binary_sensor.0x00158d0001120219_contact
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
condition: []
action:
- type: turn_on
device_id: cc1c565c549d74937d6ad0e3a250f34d
entity_id: switch.0x842e14fffee5564b_window_detection
domain: switch
mode: single

The rule for closing is already more difficult. The trigger is the closing of any window, the action will disable the “window” mode on the thermostat. But if one window closes and the second one does not, then the rule will still work, so we add a condition that all other windows must also be closed.

alias: ‘Bedroom: Window close’
description: Turn on heating in the room
trigger:
- type: not_opened
platform: device
device_id: 0dbd0d1b6b1ce2425fb2d2cd03ca5ae6
entity_id: binary_sensor.0x00158d00010df4fa_contact
domain: binary_sensor
- type: not_opened
platform: device
device_id: 69c7e90c03d9f9f787990f90fd37f644
entity_id: binary_sensor.0x00158d0001120219_contact
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
condition:
- condition: and
conditions:
- type: is_not_open
condition: device
device_id: 157a36b19a0e9dbe6948ff1a8ae0f928
entity_id: binary_sensor.0x00158d0001120236_contact
domain: binary_sensor
- type: is_not_open
condition: device
device_id: 69c7e90c03d9f9f787990f90fd37f644
entity_id: binary_sensor.0x00158d0001120219_contact
domain: binary_sensor
action:
- type: turn_off
device_id: cc1c565c549d74937d6ad0e3a250f34d
entity_id: switch.0x842e14fffee5564b_window_detection
domain: switch
mode: single

We will check the automation in the work and supplement it with my conclusions and observations if necessary.

And that’s all, subscribe, likes, repost… ☺

--

--

Igor Mullin

I´m a Hardware and Software Engineer and a PhD. In my professional activity I focus on such things like smart home systems and electric development.