We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Using Home Assistant to monitor energy usage and compare tariffs

Options
2

Comments

  • FreeBear
    FreeBear Posts: 18,223 Forumite
    Tenth Anniversary 10,000 Posts Name Dropper Photogenic
    edited 15 October 2023 at 9:24PM
    noitsnotme said: Are you using any other hardware to control the boiler through OpenTherm (eg Nest, Tado, etc)?  Or is that what you use ESP32 for?
    The ESP32 is just acting as an interface between the boiler and HA. I have a climate component to signal the boiler when heat is required, and a custom python script to set the temperature depending on the time & day. Once I have set the PID parameters, the ESP32 should take care of things like modulation, and between the two, do the weather compensation. Just need a few days of cold weather to run the autotune routine on the ESP32.
    Also need to fine tune the radiator balance..

    Can share the code & configs if you need them.

    Her courage will change the world.

    Treasure the moments that you have. Savour them for as long as you can for they will never come back again.
  • noitsnotme
    noitsnotme Posts: 1,307 Forumite
    Fifth Anniversary 1,000 Posts Name Dropper
    FreeBear said:
    noitsnotme said: Are you using any other hardware to control the boiler through OpenTherm (eg Nest, Tado, etc)?  Or is that what you use ESP32 for?
    The ESP32 is just acting as an interface between the boiler and HA. I have a climate component to signal the boiler when heat is required, and a custom python script to set the temperature depending on the time & day. Once I have set the PID parameters, the ESP32 should take care of things like modulation, and between the two, do the weather compensation. Just need a few days of cold weather to run the autotune routine on the ESP32.
    Also need to fine tune the radiator balance..

    Can share the code & configs if you need them.

    Thanks, that would be useful.

    What climate component are you using?  I have a Hive stat and smart TRVs from the previous boiler which I can use to send on/off calls to the boiler based on temp at the stat and can control individual room temp with the TRVs but I’ve never liked the Hive interface.
  • mmmmikey
    mmmmikey Posts: 2,326 Forumite
    Part of the Furniture 1,000 Posts Homepage Hero Name Dropper
    FreeBear said:
    noitsnotme said: Are you using any other hardware to control the boiler through OpenTherm (eg Nest, Tado, etc)?  Or is that what you use ESP32 for?
    The ESP32 is just acting as an interface between the boiler and HA. I have a climate component to signal the boiler when heat is required, and a custom python script to set the temperature depending on the time & day. Once I have set the PID parameters, the ESP32 should take care of things like modulation, and between the two, do the weather compensation. Just need a few days of cold weather to run the autotune routine on the ESP32.
    Also need to fine tune the radiator balance..

    Can share the code & configs if you need them.

    Thanks, that would be useful.

    What climate component are you using?  I have a Hive stat and smart TRVs from the previous boiler which I can use to send on/off calls to the boiler based on temp at the stat and can control individual room temp with the TRVs but I’ve never liked the Hive interface.

    Not sure what @FreeBear is using but if you Google "Home Assistant Generic Thermostat" you'll find loads of info you might find useful ( if you haven't found it already :-) ). One of my next projects is to set one up to control an ASHP (learning, I hope, from the mistakes I made with the last one).
  • FreeBear said:
    noitsnotme said: Are you using any other hardware to control the boiler through OpenTherm (eg Nest, Tado, etc)?  Or is that what you use ESP32 for?
    The ESP32 is just acting as an interface between the boiler and HA. I have a climate component to signal the boiler when heat is required, and a custom python script to set the temperature depending on the time & day. Once I have set the PID parameters, the ESP32 should take care of things like modulation, and between the two, do the weather compensation. Just need a few days of cold weather to run the autotune routine on the ESP32.
    Also need to fine tune the radiator balance..

    Can share the code & configs if you need them.

    Thanks, that would be useful.

    What climate component are you using?  I have a Hive stat and smart TRVs from the previous boiler which I can use to send on/off calls to the boiler based on temp at the stat and can control individual room temp with the TRVs but I’ve never liked the Hive interface.
    Home Assistant has a core Hive integration which should be auto-discovered --> Hive - Home Assistant (home-assistant.io)
  • FreeBear said:
    Another HA user here... I use a couple of Peacefair PZEM-016 & PZEM-014 to monitor electricity consumption. Only recently had my gas & electricity meters replaced with SMETS2 models, so getting a Hildebrand Glow IHD is on the cards. That way, I can get realtime data directly from the meter(s) using the MQTT API. In the meantime, I'm logging data from the boiler using an ESP32 & OpenTherm interface - Recording burner on/off time & modulation gives me a reasonably good indicator of gas consumption.
    All data is being stored in an Influx database and graphs generated by Grafana - A word of warning. Influx databases can get very large which could cause a problem if you do a reboot of the data store (had to massively increase the systemd timeout for the influx daemon after saving >12m of data). Also, set the include & exclude domains/entities in the HA influx component so that you are recording just the data you want to generate graphs for. If you don't, you'll end up with masses of irrelevant data clogging up the database. Oh, and don't use SD cards for data storage - You will kill them in a matter of weeks of months.
    I have a Hildebrand Glow IHD and you won't be disappointed. Personally, I use the in-built HA Energy Dashboard for my own graphs.

    There is a HACS component that you can use to set up the various MQTT sensors but I would imagine you are comfortable with YAML so you will create your own.
  • FreeBear
    FreeBear Posts: 18,223 Forumite
    Tenth Anniversary 10,000 Posts Name Dropper Photogenic
    edited 16 October 2023 at 12:32PM
    mmmmikey said:
    FreeBear said:
    noitsnotme said: Are you using any other hardware to control the boiler through OpenTherm (eg Nest, Tado, etc)?  Or is that what you use ESP32 for?
    The ESP32 is just acting as an interface between the boiler and HA. I have a climate component to signal the boiler when heat is required, and a custom python script to set the temperature depending on the time & day. Once I have set the PID parameters, the ESP32 should take care of things like modulation, and between the two, do the weather compensation. Just need a few days of cold weather to run the autotune routine on the ESP32.
    Also need to fine tune the radiator balance..

    Can share the code & configs if you need them.

    Thanks, that would be useful.

    What climate component are you using?  I have a Hive stat and smart TRVs from the previous boiler which I can use to send on/off calls to the boiler based on temp at the stat and can control individual room temp with the TRVs but I’ve never liked the Hive interface.

    Not sure what @FreeBear is using but if you Google "Home Assistant Generic Thermostat" you'll find loads of info you might find useful ( if you haven't found it already :-) ).
    https://www.home-assistant.io/integrations/generic_thermostat/ is the one I use. The input temperature is from a small SHT20 sensor using MODBUS (got several of them dotted around the house).


    Her courage will change the world.

    Treasure the moments that you have. Savour them for as long as you can for they will never come back again.
  • noitsnotme
    noitsnotme Posts: 1,307 Forumite
    Fifth Anniversary 1,000 Posts Name Dropper
    FreeBear said:
    noitsnotme said: Are you using any other hardware to control the boiler through OpenTherm (eg Nest, Tado, etc)?  Or is that what you use ESP32 for?
    The ESP32 is just acting as an interface between the boiler and HA. I have a climate component to signal the boiler when heat is required, and a custom python script to set the temperature depending on the time & day. Once I have set the PID parameters, the ESP32 should take care of things like modulation, and between the two, do the weather compensation. Just need a few days of cold weather to run the autotune routine on the ESP32.
    Also need to fine tune the radiator balance..

    Can share the code & configs if you need them.

    Thanks, that would be useful.

    What climate component are you using?  I have a Hive stat and smart TRVs from the previous boiler which I can use to send on/off calls to the boiler based on temp at the stat and can control individual room temp with the TRVs but I’ve never liked the Hive interface.
    Home Assistant has a core Hive integration which should be auto-discovered --> Hive - Home Assistant (home-assistant.io)
    I was looking at that last night.  I'm not overly keen with the Hive system.  The only benefit I can see to keeping it is for the smart TRVs.  I'll have a play with that integration before I decide whether to keep them or not.

    My mini PC arrived this afternoon so I'll start to set HA up in the next few days.

    Not sure yet whether to go with a bare metal HA OS or Proxmox with the OS. Not yet sure what else I would use the PC for if I go with Proxmox but at least it gives me options down the line.
  • FreeBear
    FreeBear Posts: 18,223 Forumite
    Tenth Anniversary 10,000 Posts Name Dropper Photogenic
    edited 16 October 2023 at 3:24PM
    noitsnotme said: Not sure yet whether to go with a bare metal HA OS or Proxmox with the OS. Not yet sure what else I would use the PC for if I go with Proxmox but at least it gives me options down the line.
    Just install Debian on it, and then HA on top.

    Influx & Grafana both provide .deb packages should you wish to use them.

    Her courage will change the world.

    Treasure the moments that you have. Savour them for as long as you can for they will never come back again.
  • noitsnotme
    noitsnotme Posts: 1,307 Forumite
    Fifth Anniversary 1,000 Posts Name Dropper
    edited 16 October 2023 at 3:40PM
    FreeBear said:
    noitsnotme said: Not sure yet whether to go with a bare metal HA OS or Proxmox with the OS. Not yet sure what else I would use the PC for if I go with Proxmox but at least it gives me options down the line.
    Just install Debian on it, and then HA on top.

    Influx & Grafana both provide .deb packages should you wish to use them.

    Are there benefits to using a Linux install?  I like the idea of the easy backup with Proxmox.  The only downside I can see is that USB passthrough might be a little bit more troublesome with Proxmox.
  • mmmmikey
    mmmmikey Posts: 2,326 Forumite
    Part of the Furniture 1,000 Posts Homepage Hero Name Dropper
    I've been stuck inside all day with covid so have got a new thermostat set up to control an ASHP in the bedroom. As well as the normal day/night/away settings which are fairly self-explanatory, I've also got "economy" and "plunge" settings which are triggered by Agile prices. If the price goes below a "low" threshold - currently set at 5p/kWh then the heating runs continually at the normal temperature at night or at a slightly increased temperature during the day. In plunge mode, i.e. price below 0p/kWh the same happens at night but during the day it heats the house up to 21C. There's also a boost made which can be started from the HA app or a button on a Philips Hue dimmer switch (I find I don't need all the buttons for lighting, so the bedroom switch now has button 1 - lights on/off, button 2 - lighting scene, button 3 - heating boost, button 4 - music (i.e.Sonos speaker). 

    All working well in testing - app screenshots below. The fourth screenshot is a generic HA thermostat in heat only mode.

    I had a cruder version running over the summer controlling the ASHP in cooling mode and apart from the increased control options I've found that using a remote temperature sensor (SwitchBot in my case) works much better than the ASHP built in thermostat.




Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.6K Spending & Discounts
  • 244K Work, Benefits & Business
  • 598.9K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.3K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.