Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
homeautomation:heating [2024/12/11 17:40] – willy | homeautomation:heating [2025/03/13 14:55] (current) – [The smart solution] willy | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Smart Heating ====== | + | ====== |
Your home, most probably, has some kind of heating system for those months of the year when the outside temperature is too low to be comfortable. At least, in most of the world, every home has some kind of heating system. Of course, then, why don't we make it smart? | Your home, most probably, has some kind of heating system for those months of the year when the outside temperature is too low to be comfortable. At least, in most of the world, every home has some kind of heating system. Of course, then, why don't we make it smart? | ||
Line 6: | Line 6: | ||
Let me describe my heating approach and how my home heating system is structured, so the following will be easier to understand. Please consider that this is a complex matter, and many of the issues i have encountered over the years can be different from your experience, because every heating system is different, and mine is indeed a bit unique. | Let me describe my heating approach and how my home heating system is structured, so the following will be easier to understand. Please consider that this is a complex matter, and many of the issues i have encountered over the years can be different from your experience, because every heating system is different, and mine is indeed a bit unique. | ||
+ | |||
+ | ====== Key concepts ====== | ||
+ | |||
+ | Here is a list of key concepts useful for the topic at hand. | ||
+ | |||
+ | **eco temperature**: | ||
+ | |||
+ | **comfort temperature**: | ||
+ | |||
+ | **boiler**: with this word, i will indicate an heater generator. It could be a gar boiler, a wood pellet boiler, or whatever means you have to heat your home (heat pump...) | ||
+ | |||
+ | **wood pellet boiler**: a specific heat generator that uses //wood pellets// as fuel, and it's directly connected to your radiators or radiating floors. This is usually like a wood/coal furnace, but more automated and can autofeed during the day. It comes with a few caveats, like needs a dedicated water circuit, has limitations on maximum water temperature, | ||
==== My heating system ==== | ==== My heating system ==== | ||
Line 13: | Line 25: | ||
The house itself has radiators in every room, while floor heating is a trend now, i didn't installed it when i moved in for various reasons. My heating system is pretty complex because i have both a gas boiler and a wood pellet (=pellet) boiler. As it is customary in these cases, the gas boiler is directly installed on the radiators water circuit, while the pellet boiler has a dedicated water circuit and a copper heat exchange is in charge, coupled with a dedicated circulation pump, to heat the radiator water circuit and, well, circulate it when the gas boiler is off. | The house itself has radiators in every room, while floor heating is a trend now, i didn't installed it when i moved in for various reasons. My heating system is pretty complex because i have both a gas boiler and a wood pellet (=pellet) boiler. As it is customary in these cases, the gas boiler is directly installed on the radiators water circuit, while the pellet boiler has a dedicated water circuit and a copper heat exchange is in charge, coupled with a dedicated circulation pump, to heat the radiator water circuit and, well, circulate it when the gas boiler is off. | ||
- | This solution is pretty complex and requires a lot of logic to function properly, | + | This solution is pretty complex and requires a lot of logic to function properly, |
+ | {{ : | ||
* When the gas boiler is on, it's internal pump will circulate the water in the radiators, and that's pretty simple. | * When the gas boiler is on, it's internal pump will circulate the water in the radiators, and that's pretty simple. | ||
Line 30: | Line 44: | ||
At first i went fully // | At first i went fully // | ||
- | I quickly moved to a //smarter// self-made approach using an [[http:// | + | I quickly moved to a //smarter// self-made approach using an [[http:// |
The //smarter// solution worked fine for a few years. I improved the software and the logic behind it a few times, until i discovered Home Assistant and ZigBee devices, now new amazing opportunities where available! | The //smarter// solution worked fine for a few years. I improved the software and the logic behind it a few times, until i discovered Home Assistant and ZigBee devices, now new amazing opportunities where available! | ||
Line 68: | Line 82: | ||
=== Creating the schedule & main temperature set === | === Creating the schedule & main temperature set === | ||
- | Device | + | Create a schedule to control when during the day and the week you want your home to be in a **comfort** temperature, |
+ | |||
+ | Go to: | ||
+ | * Settings -> Devices | ||
+ | |||
+ | You could create more than one schedule then use a selector connected to the blueprint below to choose between the scheduler. | ||
+ | |||
+ | Now, also create two numeric helpers to define the **eco** and the **comfort** temperatures. | ||
+ | |||
+ | Go to: | ||
+ | * Settings -> Devices -> helpers -> create two new numeric values | ||
+ | |||
+ | I called them **eco temperature** and **comform temperature**. | ||
Line 90: | Line 116: | ||
The basic logic is simple: whenever at least ONE thermo-valve is open (heating), the generators should be operative. Only when ALL the thermo-valves are closed (idle), then the generators can be turned off (actually the pellet is not turned on or off, but switched between minimum to modulation...). | The basic logic is simple: whenever at least ONE thermo-valve is open (heating), the generators should be operative. Only when ALL the thermo-valves are closed (idle), then the generators can be turned off (actually the pellet is not turned on or off, but switched between minimum to modulation...). | ||
- | The point now is how to connect Home Assistant with the OrangePi Zero... Well, using [[homeautomation: | + | The point now is how to connect Home Assistant with the OrangePi Zero... Well, using [[homeautomation:protocols: |
- | I have rewritten the OrangePi Zero code to become an MQTT client and connect to the Home Assistant broker, this is pretty simple following the Mosquitto documentation and example code. In the future, i will post the code i am using. | + | I have rewritten the OrangePi Zero code to become an MQTT client and connect to the Home Assistant broker, this is pretty simple following the Mosquitto documentation and example code. |
- | So, let's assume we have the // | + | The code to my dedicated control software is published [[https:// |
+ | |||
+ | The choice between heating with the gas or the pellet boiler, or both, is controlled by two dedicated Home Assistant toggles (create them from settings -> devices -> helpers): | ||
+ | * **use_pellet** toggle: if true, pellet boiler is used, if false, gas boiler is used | ||
+ | * **quick heat** toggle: if true, gas boiler will be turner on together with the pellet boiler. This is important because the pellet boiler will take up to one hour before it's startup phase is over and the hot water start circulating. Activating the gas boiler too will speed up initial warming of the house (the safety measures inside the OrangePi will take care to turn the gass off once the pellet is hot) | ||
+ | |||
+ | The key point here is that when in eco mode (at night, and such...) only the gas boiler will be used for heating. Instead, the bulk of the comfort heating will be done with the pellet boiler, or the gas boiler (for example, when away from home for a few days and the pellet tank will be empty). | ||
+ | |||
+ | I choose to chain the toggles together with the thermostat-valves states to send the associated MQTT topic to the OrangePi so that all the topics will be published together. Better send the information twice, than forget about it once. | ||
+ | |||
+ | So, let's assume we have the // | ||
<code yaml> | <code yaml> | ||
- | alias: Send Heating consensus | + | alias: Send topics |
- | description: | + | description: |
triggers: | triggers: | ||
+ | - trigger: state | ||
+ | entity_id: | ||
+ | - sensor.termo_bathroom_hvac_action | ||
+ | - trigger: state | ||
+ | entity_id: | ||
+ | - sensor.termo_kitchen_hvac_action | ||
- trigger: state | - trigger: state | ||
entity_id: | entity_id: | ||
Line 105: | Line 147: | ||
- trigger: state | - trigger: state | ||
entity_id: | entity_id: | ||
- | - sensor.termo_bathroom_hvac_action | + | - input_boolean.use_pellet |
- trigger: state | - trigger: state | ||
entity_id: | entity_id: | ||
- | - sensor.termo_bedroom_hvac_action | + | - input_boolean.quick_heat |
+ | - trigger: state | ||
+ | entity_id: | ||
+ | - schedule.my_heating_schedule | ||
actions: | actions: | ||
- action: mqtt.publish | - action: mqtt.publish | ||
data: | data: | ||
payload: >- | payload: >- | ||
- | {{ is_state(' | + | {{ is_state(' |
- | is_state(' | + | is_state(' |
- | is_state(' | + | is_state(' |
- | topic: heating/consensus | + | topic: heating/feedback |
+ | retain: true | ||
+ | - action: mqtt.publish | ||
+ | metadata: {} | ||
+ | data: | ||
+ | evaluate_payload: | ||
+ | qos: 0 | ||
+ | retain: true | ||
+ | topic: heating/ | ||
+ | payload: |- | ||
+ | {{ is_state(' | ||
+ | is_state(' | ||
+ | - action: mqtt.publish | ||
+ | metadata: {} | ||
+ | data: | ||
+ | evaluate_payload: | ||
+ | qos: 0 | ||
retain: true | retain: true | ||
+ | topic: heating/ | ||
+ | payload: " | ||
mode: single | mode: single | ||
</ | </ | ||
Line 123: | Line 186: | ||
Of course you need to specify all the thermo-valves here. You should check under // | Of course you need to specify all the thermo-valves here. You should check under // | ||
+ | === Feedbacks from the heating system to Home Assistant === | ||
- | === Future steps === | + | Since i like to keep everything under control, the OrangePi |
- | + | ||
- | Currently | + | |
- | + | ||
- | Maybe i could remove | + | |
- | + | ||
- | I also need to publish my code for the backend and the frontend | + | |
+ | This can be achieved by adding the following custom YAML lines inside your **configuration.yaml** file: | ||
+ | <code yaml> | ||
+ | mqtt: | ||
+ | binary_sensor: | ||
+ | - name: " | ||
+ | state_topic: | ||
+ | device_class: | ||
+ | value_template: | ||
+ | payload_on: 1 | ||
+ | payload_off: | ||
+ | unique_id: " | ||
+ | - name: " | ||
+ | state_topic: | ||
+ | device_class: | ||
+ | value_template: | ||
+ | payload_on: 1 | ||
+ | payload_off: | ||
+ | unique_id: " | ||
+ | - name: " | ||
+ | state_topic: | ||
+ | device_class: | ||
+ | value_template: | ||
+ | payload_on: 1 | ||
+ | payload_off: | ||
+ | unique_id: " | ||
+ | </ | ||
+ | ==== Future steps ==== | ||
+ | Maybe i could remove the OrangePi Zero altogether using some ZigBee relays, or maybe coupling ZigBee switches with the relays i have today. This would require to rewrite in Home Assistant the logic between switching the generators and the various protection logic. | ||
- | === Smart thermostatic valves === | ||
- | Thermostatic valves are valves that will open or close the flow of hot water in your heating elements according to a set temperature. Smart thermostatic valves are exactly the same kind of valves, but in addition they can be controlled remotely. This means not only set the temperature, | ||
- | This is pretty interesting, | ||
- | You will need to take care that: | ||
- | * The gas furnace is turned off when the pellet generator manifold is hot, or the pellet generator will not dissipate it's heat and will result in a forced shutoff. | ||
- | * The additional circulation pump is turned on when the pellet generator manifold is hot, or the hot water will not actually reach the rooms | ||
- | * The gas furnace is turned on if the pellet generator fails to start, which can happen sometimes | ||