Smart Heating Recovery Time calculation for Home Assistant
- Concepts
- Why there is a self-calibration script?
- Interface
- Installation
- Testing and using the recovery optimization
- TODO
Why do I need it? The thermal mass of my radiators and walls provides good thermal comfort but makes it hard to predict the heating recovery time in the morning. Without predicting the correct time to start heating at night, it is either too late (and too cold) or too soon (heating the living room unnecessarily while sleeping).
The principle is simple: while sleeping, heating can be completely turned off and boosted at the correct recovery time.
The challenge is to identify the recovery time, neither too soon (to avoid wasting money, emitting CO2, and using excess kWh), nor too late (to obtain thermal comfort). This problem involves:
- 2 variables: interior & exterior temperatures (
Tint&Text) - 1 objective: set point temperature
Tspat wake up timetarget_hour
Every home is unique, but when it comes to room temperature evolution, physics can simplify things to just two parameters:
RCth: this combines your home's insulation (including air infiltrations) & its effective thermal mass (emitter, furniture, walls, ...)RPth: this combines the same insulation & the effective heating power
Both RCth & RPth are necessary to determine the recovery time
Damned, unlike many existing controllers, this is clearly non-linear!
The "magic" of this program is to figure out and adjust relaxation parameter :)
NOTE: disable
Recovery time calculation CONFIGURATIONduring the holydays and the non-heating seasons
-
CONFIGURATIONpanel (4 inputs required):- SET the interior temperature
sensor name(e.g. my own indoor sensor ->sensor.salon_temperature) - SET the time of heating interruption (
recoverycalc_hour) - e.g. 11PM - SET the wake-up time (
target_hour) - e.g. 6AM - OR SET your phone next alarm
sensor namein order to get an automatic update of the target time with your wake up time (e.g. my phone alarm is synchronized in home assistant assensor.clt_l29_next_alarm) - SET your target temperature (
tsp) - e.g. 20°C
Default adaptive mode (can be adjusted or deactivated for further manual tuning -> see advanced mode):
Self Calibration(activated by default) which computes coefficients for your own room after each recovery cycle
- SET the interior temperature
-
TESTpanel: run the calculation script to check the predictedrecovery time. The script predicts the decrease inTintbeforerecovery timebased on room constants -
OUTPUTSpanel:- predicted
recovery time - interior temperature graph
- predicted
- For script and automation package:
- Set up a package folder if not already done (see https://www.home-assistant.io/docs/configuration/packages/)
- For dashboard interface:
- A simple calendar, timetable, and/or automation for heating during the week to know the interruption time at night (and to set the
recoverycalc_hourcorrectly)
- Download thermal_recovery_time.yaml and copy the file to your package folder
- Restart Home Assistant
- Download dashboard_base.yaml
- open the file with a text editor
- in your Home Assistant dashboard, click on the 3 dots in the upper right corner and add a tab
- on the new blank tab, click on edit > 3 dots in the upper right corner > select YAML edition
- copy and paste the content of
dashboard_base.yaml-> save.
- Add the calculated recovery time (
input_datetime.recoverystart_hour) as a condition to start the radiators (amongst the other calendar rules) in your own automation
e.g. I have this automation to manage my radiators
- Configure the 4 required inputs
- Test the script for the calculation of
recovery time - Check next morning if everything went well - The
Self Calibrationrequires a few days to adaptRCthandRPthconstants for better predictions; the first night may not be accurate. Following days should give better predictions with self calibration mode (further manual adjustments are always possible in advanced mode)
- ADD readme for advanced use
- DONE
ADD automatic wind correlation forRthvariations (important for old buildings with high infiltration rates, and high-rise buildings) - ADD recovery optimization based on energy prices and periods (e.g. TEMPO in France)
- DONE
ADD predicted exterior temperature (weather data) in the recovery time calculation (important for very cold mornings) - ADD solar radiation effects (weather data) for a future diurnal recovery time calculation
- ADD second order effects for vacation recovery calculation vs. typical weekly occupancy variations.
- INTEGRATE all variables and parameters into a single entity to manage different rooms (important for castle owners)
- NEW: coefficients RCth and RPth are now correlated to average winds, the self calibration auto-adjust values for low an high winds (10 an 60km/h) assuming a linear variation between both
- NEW: future exterior temperatures and winds are taken into account to assess recovery start time
- NEW: text field to set-up the Next alarm sensor name of your phone (e.g. sensor.mynexus_next_alarm) to automatically sync the target time with your phone alarm in the morning
- NEW option: additional wakeup automation template (see wakeUp_automation_for_smartphone_alarm_sync.txt) to automatically sync the target time with the smartphone alarm (no more need to set target time manually)
- NEW: time lag monitoring after heating systems is turned off for better prediction of temperature's decrease parameter (RCth)
- FIXED: no more initial values that overwrite parameters when HA reboots
- FIXED: missing nighttime sensor for the graph added to the package


