Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a support for central boiler: switch on the boiler when one underlying is on #234

Closed
jmcollin78 opened this issue Nov 29, 2023 · 14 comments
Labels
developed When development is done and tested enhancement New feature or request P1 Priority 1

Comments

@jmcollin78
Copy link
Owner

jmcollin78 commented Nov 29, 2023

Cf. title. Give some clues to solve this: (listen the hvac_action changes, when one is Heating -> start the central boiler)

@jmcollin78 jmcollin78 added the documentation Improvements or additions to documentation label Nov 29, 2023
@jmcollin78 jmcollin78 changed the title Add into documentation that VTherm does not manage the central boiler Add into documentation that VTherm does not manage the central boiler/pump Nov 29, 2023
@jmcollin78 jmcollin78 changed the title Add into documentation that VTherm does not manage the central boiler/pump Add a support for central boiler: switch on the boiler when one underlying is on Jan 1, 2024
@jmcollin78
Copy link
Owner Author

The feature could be:

  1. add a central configuration switch which turns on / off the central boiler,
  2. add an optional flag on over_climate to control the boiler,
  3. if configured, turns on the boiler if at least one of all VTherm (over_climate / over_valve only) are heating (hvac_action is Heating),
  4. turn off the boiler if all VTherm are Idle or Off.

@jmcollin78 jmcollin78 added enhancement New feature or request P1 Priority 1 labels Jan 1, 2024
@HACS-bank
Copy link

Would this idea work better as a separate integration?

Reasoning: I have eight UFH circuits which share the same heat source, but only five are controlled by VTherm ...
so if I wanted to use this, I would need some way to have it cover all eight physical zone valves / alternatively, if i wanted to use this feature, I would need to create three more Vtherms ...

but my zone valves already command the heat source using a relay box, so I am not a good person to imagine the use case. I would not use this feature if developed.

@jmcollin78
Copy link
Owner Author

Hello @HACS-bank,

I understand your point. I have difficulty to understand why you don't have all your climate controlled by VTherm. But I guess this is something I will have to take into account... or not and then, like you said, this feature will not be usable for your case.

I'm pretty sure some people have to implement an automation that does exactly what I propose to implement natively: start central boiler when at least one heater need to heat.

But because I'm not sure, of that I will wait if this need is a real need. I understand, it is not applicable for your case.

@garywg
Copy link

garywg commented Jan 3, 2024

Hi, firstly, thank you for great efforts on Versatile Thermostat. I was looking at VTherm to use and could not figure out from the instructions how to control the central boiler using VTherm if one or more TRV is requesting heat using VTherm until I saw this issue which means (currently) it does not support this functionality. Having the ability to control the boiler on/off in the method you describe here would be useful for my use case.

My use case scenario as follows;
I am using Hive Thermostat and Hive TRVs connected using Zigbee2MQTT. All my radiator have installed a Hive TRV. (Except 1 - this I standard in Uk to prevent overpressure if boiler pump runs and all TRV are closed)

To control the boiler I have to do exactly us you say above, I have an automation that runs if any TRV requests heat ( I use template sensor across all TRVs to do this check) I increase set point temp to 1.5 above current on boiler, and then switch mode to heat. (the Hive thermostat serves no purpose in the setup other than I must use it to activate the boiler if any TRV requests heat). When the automation switches on the boiler, I also start a timer for one minute, at the end of 1 minute, I check if any TRV is still requesting heat, if no TRV is requesting heat, I switch off the boiler (if there is TRV still requesting heat, I restart timer for another minute) and set the thermostat temp back to the original value. (the 1 minute is a variable for the timer - I am currently experimenting to see what is optimum) I don't want the boiler to run for longer than 1 minute if no TRV is requesting heat. I use timer instead of directly go to off if no TRV requesting heat, in case someone is manually adjusting TRV up/down - I did not want boiler jumping on/off/on/off etc

The challenges/complications I have:

  1. if somone manually change the TRV target temp on TRV itself - boiler could run 'forever', to combat this :
  • I could reset all TRVs to the their scheduled temp at a set time each day
  • or-
  1. if there is an overall schedule that sets various modes/temps through the day reset all TRVS when the next schedule change is triggered (might make user crazy if they manually change a few minutes before a schedule change happens)
  • or-
  1. I could have no schedule and for each TRV and base temp on the mode of the room. E.g. away, sleep, Eco, comfort based on Presence, time of day, lights on off. e.g. in the Master bedroom, I have movement sensors, light sensors - if user goes to bed they push button to prevent movement sensor from activating lights , based on time of day _I can set the TRV in that room to the 'Sleep' mode/temp and if user presence is away set to away, in the day time set to ECO etc etc. if user manually adjust TRV, start timer for X hours and do not adjust TRV mode/temp until timer is done(will be required for each room with a TRV)

I am leaning towards option 3 above using the Presence, time of day, lux reading to set mode of each room, then depending on mode TRV may or may not call for heat which is why I am looking at VTherm. If heat is requested from any TRV, then activate the boiler, increase set point temp to 1.5c above current. This means boiler needs no schedule, no specific temp, only that set point temp is 'boosted' above current temp to ensure boiler does switch on.

Short Summary
I think, certainly for my use case, this will be a 'real need'. If you do implement the ability to trigger boiler if any TRV requesting heat, in my use case it would need :

  • trigger boiler to heat mode and to set a specified temp that is above the current on the boiler to make sure boiler does activate to provide heat.
  • I will be interested to know thoughts on how you would manage the switch off for the boiler when TRVs stop requesting heat ( I use timer per above)

I hope use case info was useful.

@jmcollin78
Copy link
Owner Author

Thank you, @garywg ,

This is a very valuable return of experience.
What I intend to do is not to control directly the boiler but to give an easy way to inform (an automation / a user ...) that the boiler should be turned on.

Depending of the boiler, one will need to change the target temperature and hvac_mode to force heat, one will just need to activate a switch. I think It could be difficult to try to manage all different use case. With VTherm, the philosophie it to simplify the integration with each specific environment and limit as much as possible any automation. Your post reinforces this idea for me.

What could be possible:

  1. add a virtual switch entity which represent the boiler. When this switch is on, the boiler should be turned on else turned off,
  2. add a flag on each VTherm: True if it should control the boiler,
  3. each time a VTherm with the flag at true, turns on or off, checks for all VTherm if one is 'on'. If yes, turns on the virtual switch of the boiler.

This is simple to implement and should be useful to integrate on different environment.

What do you think about that proposal ?

@johnbur1
Copy link

johnbur1 commented Jan 3, 2024

@jmcollin78 many thanks for all your work on this, it is excellent. Regarding control of the boiler, what you suggest is pretty much what I do currently in an automation - using the count of how many climate entities are calling for heat to decide when to fire the boiler.
One thing I have found is that if you have multiple vtherms, you can get in a situation where the boiler is constantly on as the vtherms are out of sync - ie one calls for heat, reaches temp, then another does the same etc, etc.
Therefore, some way of coordinating them to reduce boiler on time would be great.
Hope that makes sense!

@jmcollin78
Copy link
Owner Author

Hello @johnbur1 ,

Thank you for your feedback. I agree with your statement. It is possible that the boiler will be always on. But it is already the case without VTherm I guess and is it really an issue ?

Remember that for VTHerm over climate, VTherm doesn't control directly the TRV. So it will rely on the TRV climate heating algorithm and will not be able to optimize things.

For VTherm over_valve, the VTherm is controlling the valve open percent directly but I don't see how to have any optimisation possible. If we need to open 30% to regulate the temperature, the regulation will be impacted if the 30% are not respected.

@garywg
Copy link

garywg commented Jan 4, 2024

Thank you, @garywg ,

This is a very valuable return of experience. What I intend to do is not to control directly the boiler but to give an easy way to inform (an automation / a user ...) that the boiler should be turned on.

Depending of the boiler, one will need to change the target temperature and hvac_mode to force heat, one will just need to activate a switch. I think It could be difficult to try to manage all different use case. With VTherm, the philosophie it to simplify the integration with each specific environment and limit as much as possible any automation. Your post reinforces this idea for me.

What could be possible:

  1. add a virtual switch entity which represent the boiler. When this switch is on, the boiler should be turned on else turned off,
  2. add a flag on each VTherm: True if it should control the boiler,
  3. each time a VTherm with the flag at true, turns on or off, checks for all VTherm if one is 'on'. If yes, turns on the virtual switch of the boiler.

This is simple to implement and should be useful to integrate on different environment.

What do you think about that proposal ?

Hello, that is a simple and effective solution that you propose. Some automation/logic will be still needed to make use of the boiler switch, but, I think anything more will not cover all possible scenarios and therefore makes it good proposal. In my case, it will additionally simplify the logic needed to check the TRVs so that is also a plus for what you propose for my user case.

@garywg
Copy link

garywg commented Jan 4, 2024

In my opinion don't think there is a solution for the case where because of when each TRV requests heats the boiler could run 24/7. In my testing this indeed what I experienced - boiler ran 24/7.

The only way around this was to 'fine tune' each room where there is TRV. to Explain: using presence, motion, time of day set a 'profile' for each TRV (and therefore room). The profile, in my case to keep things simple (I am always a believer in KISS principal), is something like ;
Bedrooms: No-one Home = 14c, Room Occupied = 19c, People Sleeping=18c, Unoccupied=16c
Other rooms: No-one Home = 14c, Room Occupied = 21c, Unoccupied=17c

By 'applying' these profiles to each room type based on presence, motion, lux level, time of day and then adjusting the temp in each profile for further 'tuning' you can significantly limit this issue.

I tried using

  • calendar schedules for each mode/room, did not work as people move about dynamically in my house with no real pattern to that movement - but people complain about too cold, too hot and boiler ran most of day
  • initially, I set each TRV to 21, then 20, then 19 down to 16, and also different rooms different set temps and left TRVs - but people complain about too cold, too hot and boiler ran 24/7.

Most success I had in limiting run time was 2 room types, profiles for each room type and applying these dynamically. Also biggest test was passed on this approach - wife did not complain about too hot/too cold.

Having tested all these combos I am now rewriting my heating automations with a view to also using VTherm as follows;

  1. Use outside temp to determine if heating will be active
  2. House can have 2 Heating Profiles selected by user a) House Schedule -or- b) Room Occupancy
  3. House Schedule = 1 schedule where you can set required temp at specified times for entire house and then an automation sync each TRV temp to the central thermastat temp when change in temp on the schedule. This give equivalent of 'traditional' heating logic.
  4. Room Occupancy - per above apply profile to room based on presence etc - each profile has associated temp which the automation set TRV. Another automation turn boiler on/off based on demands from TRV

VTherm if I understood everything correctly will allow me achieve most of the functionality around the "Room Occupancy" profile functionality with minimal need for 'extra' work needing to be built by me. And if the boiler control is implemented, then even less extra work for me.

@pieri70
Copy link

pieri70 commented Jan 8, 2024

I already made this automation with help of HA community.
I made an automation that controls the state of each underlying TRV and sets the central thermostat target temperature high/low if heat is needed or not.
If at least one TRV is in heating state the central wifi thermostat is set to 25°C and the boiler starts. If all TRV are idle then the central thermostat target temperature is set to 15°C so the boiler is turned off.
I used this automation but you could also use a switch (dry contact) turned on/off.

This is the automation:

alias: TurnOnBoiler
description: Turn on boiler if any TRV demands heat
trigger:
  - id: "25"
    platform: template
    value_template: >
      {{ ['climate.trv_cucina', 'climate.trv_davide', 'climate.trv_matr','climate.trv_sog_g']
      | select('is_state_attr', 'hvac_action', 'heating') | list | count > 0 }}
  - id: "15"
    platform: template
    value_template: >
      {{ ['climate.trv_cucina', 'climate.trv_davide', 'climate.trv_matr','climate.trv_sog_g']
      | select('is_state_attr', 'hvac_action', 'heating') | list | count == 0 }}
condition: []
action:
  - service: climate.set_temperature
    target:
      entity_id: climate.casa
    data:
      temperature: "{{ trigger.id|int(15) }}"

P.S.
I don't know how to format yaml code with correct indent, sorry

@jmcollin78
Copy link
Owner Author

jmcollin78 commented Jan 9, 2024

I don't know how to format yaml code with correct indent, sorry

To format in yaml, just select the code and click on the "code" button (<>)

This is an interesting post you have done. This will inspire myself for doing this feature. You will have directly a binary_sensore which is true is boiler should be On or false else. This will simplify (but not cancel) the automation you done.

@pieri70
Copy link

pieri70 commented Jan 9, 2024

Here is the original discussion I had on Home Assistant community
https://community.home-assistant.io/t/best-way-to-turn-on-switch-based-on-true-false-conditions/664551
The solution was given by Taras, I just modified it on my needs.

At the beginning I wanted to control a zigbee switch that I wanted to install in parallel with the Tuja Wifi Thermostat.

So Taras suggested me to use an automation with on/off action on that switch.

Then I discovered that I could also set the temperature of the Tuja Wifi Thermostat.
So I modified the automation and now the Tuja Thermostat works as a "switch", its reading of the temperature is irrelevant.
With authomation I just set target temperature on it (25°C turns on the boiler and 15 turns it off).
You can use any value you want, I used 25°C and 15°C because usually in my home temperature range is 23/17°C
So there is no need for a parallel switch to the Wifi thermostat

@jmcollin78 jmcollin78 added developed When development is done and tested and removed documentation Improvements or additions to documentation labels Jan 14, 2024
@jmcollin78
Copy link
Owner Author

Hello dear users,

I have released a pre-release with the central boiler feature: https://github.com/jmcollin78/versatile_thermostat/releases/tag/5.3.3.beta1

Because I don't have any central boiler in my house I would like to ask you to make some real tests. It have been tested locally with a fake boiler, so I guess it is working as expected. But real conditions are always necessary.

If you would like to help me to test this feature, please install the 5.3.3.beta1 release and announce yourself here (#339). I will centralize all remarks in this discussion.

The documentation have been updated here (not on the main branch now): EN, FR

My objective is to have a full release on next week.

Have a nice day.

Ping @HACS-bank, @garywg , @johnbur1 , @pieri70

@jmcollin78
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developed When development is done and tested enhancement New feature or request P1 Priority 1
Projects
None yet
Development

No branches or pull requests

5 participants