Smart Home Heating with HEATHER

Project HEATHER

This project consolidates all the components of my Home Assistant heating control system previously published as separate Github Gists and HA community pages.

The new name HEATHER is coined for the consolidated project and Github repository comprising:

  • Three Home Assistant blueprints
    • Heating X2
    • Calendar Switch Y2
    • Zone Switch Z2
  • The Heating XYZ Code Generator
    • A series of WORD (.docx) mail merge files that are used to create YAML files for Home Assistant configuration
    • An example EXCEL (.xls) mail merge DATA file
  • The packaged script Logfile Entry

The files in this repository supersede all previous versions of the above-named files in other locations.

This reorganisation is made solely for ease of maintenance. The current version (2.4) is compatible with all previous version 2.x installations (not with 1.x, which is deprecated and no longer supported).

To get started

Download and read the Guide PDF.

It contains full instruction on how to install and configure a full home smart heating system using the blueprints, script, and code generator in the HEATHER repository.


If you find the ideas in this project useful, please Buy Me a Coffee

3 Likes

Hi Andy,

Firstly, sorry for not replying to your suggestions on the original topic about how I might be able to achieve different temperature settings depending on house occupancy (Heating X2: Schedule Thermostats with Calendars [CLOSED] - #32 by AndySymons). Iā€™d missed the post in the changeover to this new topic. All good suggestions & Iā€™ll investigate the best way forwards (I like the idea of different automations that can be selected for the same ā€œzoneā€).

Since my last posts Iā€™ve moved my Home Server across onto a new system & Iā€˜ve been setting Home Assistant up again from scratch as a clean install. Iā€™m not sure if itā€™s due to newer versions of Home Assistant (Iā€™m currently running 2024.8.3), but Iā€™ve had a few issues getting Heating X2 running.

It seems to be based around logging and errors are produced if I donā€™t generate the specific logfile & notify service (& specify them in the automation). ie If I decide that I donā€™t want to use logging, the script.logfile_entry causes an error.

I have logfile_entry.yaml installed as a package and it is recognised by the automations. By way of example, I have two automations both based on the HeatingX2 blueprint. Zone 1 is configured to use a notification service notify.zone1_log (held withing /config/log_files/zone1.log), but for Zone 2 I have not specified logging.

I get the following error in the Main Home Assistant log when changing the temperature setting for Zone 2:

2024-09-01 11:07:22.681 ERROR (MainThread) [homeassistant.components.script.logfile_entry] Log File Entry: If at step 1: Error executing script. Invalid data for call_service at pos 1: not a valid value for dictionary value @ data['entity_id']
2024-09-01 11:07:22.682 ERROR (MainThread) [homeassistant.components.script.logfile_entry] Log File Entry: Error executing script. Invalid data for if at pos 1: not a valid value for dictionary value @ data['entity_id']
2024-09-01 11:07:22.682 ERROR (MainThread) [homeassistant.components.automation.zone_2_heating] Zone 2 heating: Error executing script. Invalid data for call_service at pos 1: not a valid value for dictionary value @ data['entity_id']
2024-09-01 11:07:22.682 ERROR (MainThread) [homeassistant.components.automation.zone_2_heating] Error while executing automation automation.zone_2_heating: not a valid value for dictionary value @ data['entity_id']

If I look at the Automation Trace for Zone 2 I get:

Error: not a valid value for dictionary value @ data['entity_id']
 Result:
 params:
   domain: script
   service: logfile_entry
   service_data:
     notification_service: ''
     logfile_title: Heating X2
     message_preamble: Zone 2 heating
     message_body: '---'
   target: {}
 running_script: true
 child_id:
   domain: script
   item_id: logfile_entry

If I compare this to zone 1, which does have a logfile:

Executed: 1 September 2024 at 11:05:05
Result:
params:
  domain: script
  service: logfile_entry
  service_data:
    notification_service: zone1_log
    logfile_title: Heating X2
    message_preamble: Zone 1 heating
    message_body: '---'
  target: {}
running_script: true
child_id:
  domain: script
  item_id: logfile_entry

Zone 1 seems to be functioning correctly. Of additional note, in order to setup the notify service using the File Integration I had to add the following to my Home Assistant config, else I had permission issues:

homeassistant:
allowlist_external_dirs:
- ā€œ/config/log_files/ā€

The requirement for allowlist_external_dirs is specified at File - Home Assistant

Again, thank you for this great automation. Iā€™m looking forward to getting it fully up-and-running before the winter kicks in!

Hello, i have the same Problems.
I didnt us Zones but the Problem is the same with my thermostat.
I made also an GitHub issue.

1 Like

Why there is no reaction. Neither here nor on Github ?

This looks like a bug that I fixed a couple of days ago in logfile_entry.yaml (someone else raised it on Github)
It occurs when no logfile is specified
Try the new version
Sorry for the inconvenience :pray:

1 Like

Thanks for the reply & the fix Andy. Iā€™ve copied the new logfile across, but in the mean time Iā€™d setup logging on my instances, so when I get the chance Iā€™ll try a new instance without logging.

1 Like

Hi Andy, what a fantastic (lot) of work youā€™ve done. I am working through your pdf guide and using your code generator.
One silly question (sorry) you say in page 18 section 7.4 General mail merge procedure at 8. ā€œIn Home Assistant, find the file xxxx.yamlā€. Which file are you referring too?

1 Like

Hi Andy,
great work here, at first glance this looks like fantastic blueprint/project, but also quite complicated.
And just to let you know, the links in your PDF dont seem to be working?

1 Like

Iā€™m affraid im running into problems already with the code generatorsā€¦
The input-numbers generator generates a whole bunch of duplicate entries.
I have four TRVā€™s in my living room that i have given different Locations in the xls sheet. i think these locations are supposed to be added to the generated entities in the generator? or do i have to only create one entity for my living room?

Further, what is not yet clear to me: so i have 8 TRVā€™s throughout my house, but one main thermostat that controls the actual heating that should turn on/off depending on TRV status. should i set this main thermostat as ā€œzone1ā€ or will i select this somewhere down the line in the setup progress? i havent seen any mention of it in the PDF

1 Like

I simply mean that you have to iterate through the instructions for each of the files

02 Heating XYX code generator for input_texts.yaml.docx
03 Heating XYX code generator for input_numbers.yaml.docx
04 Heating XYX code generator for input_booleans.yaml.docx
05 Heating XYX code generator for timers.yaml.docx
06 Heating XYX code generator for binary_sensors.yaml.docx
07 Heating XYX code generator for templates.yaml.docx
08x Heating XYX code generator for automations X.yaml.docx
08y Heating XYX code generator for automations Y.yaml.docx
08z Heating XYX code generator for automations Z.yaml.docx
09x Heating XYX code generator for dashboard cards X.yaml.docx
09y Heating XYX code generator for dashboard cards Y.yaml.docx
09z Heating XYX code generator for dashboard cards Z.yaml.docx

The subsequent sections give details for each YAML type.
I am due to refresh the manual soon and will take your comment into account :slight_smile:

If you find the ideas in this repository useful, please remember to Buy Me a Coffee

Sorry, I must have selected the wrong option when saving to PDF from WORD :face_with_open_eyes_and_hand_over_mouth:

I am due to refresh the manual soon and will take more care when generating the file.

You should not get duplicate entries provided the combination of Zone, Room, and Location is unique. If they are unique but you are still getting duplicates, please post your DATA file and a sample YAML with duplicates so that I can investigate further.

Each ā€˜Roomā€™ in the DATA sheet corresponds to one calendar and therefore one temperature. I use a separate calendar per room. The ā€˜Locationā€™ field ensures that each TRV in the same room has a unique name, so there should be no duplicate YAML entries and they are uniquely identified in notification messages. You can use any unique names. I use ā€˜Northā€™, 'South, ā€˜Eastā€™ and ā€˜Westā€™, but you can call them 1,2,3,4 or A,B,C,D if you prefer ā€“ whatever is meaningful to you to distinguish the TRVs in one room.

I am not sure what function this main thermostat has, or whether it is smart?

Whether you need a zone switch or not depends on your boiler. Some modern boilers have a built-in demand sensor and can be wired to cut off the pump when there is no demand. Older boilers need to be told, often by the old mechanical thermostat.

  • If your boiler does not need a demand (zone) switch AND ā€˜main thermostatā€™ is the original (dumb) thermostat, then just dial it up to something higher than you will ever set in your calendars (e.g. 30C), otherwise it will limit the actual heating (and this will not be apparent in HA).
  • If it is a smart switch AND your boiler needs a zone switch, AND you do not have any other smart zone switch, then yes, you can use it as a zone valve switch. You should then configure all your TRVs to be in ā€˜Zone 1ā€™.
  • If you have an electric electric zone valve switch that is not smart, AND your boiler needs a zone switch, AND you do not have any other smart zone switch, then you can make it smart by adding a smart switch to operate it and configure that as your zone switch.
  • If it is a smart thermostat then how do you want it to relate to the TRVs? I use the temperature measured by the TRVs to control the radiators; the automation sets the target temperature (the same for all TRVs in a room) and then lets the TRV control the radiator. The central thermostat can be set to anything higher. The automation does not currently have the facility to take into account temperature sensors outside the TRVs (it might be a nice addition, but I would need an algorithm for it). In this case, if your boiler needs a zone switch, AND you do not have any other smart zone switch, then you could define a switch as a ā€˜toggleā€™ helper and write an automation that sets the smart thermostat to 5C when the switch is off, and 30C when it is on, so making it work like a switch. Then configure the helper as your zone switch.

I hope that helps! If not, please give me more specifics about your boiler, any exiting zone valve or boiler demand switch, and the nature of your ā€˜main thermostatā€™.


If you find the ideas in this repository useful, donā€™t forget to Buy Me a Coffee

Thanks Andy I was being a bit dense and sorted it out thanks

1 Like