With the energy, and particularly gas price, crisis here in Europe I’m thinking about how Home Assistant could help with saving through awareness.
I do have a sensor connected to my gas meter, and I have my gas price in the energy dashboard, but that still doesn’t help me with goals like “use 20% less than last year”. I would very much like to have a relative view on my gas usage, so that there could be a display that shows “you’re currently on track for 20% less” or “yesterday you used much more than you should”. I’ll just spout off the ideas I had so that they may resonate with someone.
I posit that total gas usage = gas for hot water + gas for heating
- Hot water consists of hand washing, 2-3 shower per day, ~2 hot baths per week. I think we can assume that gas for hot water is reasonably fixed (in weekly granularity) the year over. There may be longer/warmer showers in winter, but maybe that cancels out with the heater already being warm for hot water and needing less time (gas) to warm up. Let’s call it fixed.
- Heating varies strongly the year over, but I think we can model it as a simple function of outside temperature (min, max, or mean), if the temperature falls below a certain value.
I did some simple modelling in Excel with historical average temperature data for my location:
The important insight is that the total gas usage is the area under the curve. This way I can scale the factors so that the area matches the total amount on my last bill which should give me a baseline estimate of how much I used/am expecting to use per week.
That estimation would already be a useful component for home assistant: Input expected total amount and a usage profile and it gives you a time dependent estimate. This way you can weigh all measurements with the expected profile, instead a simple “you’re 50% through the year, so we expect your total bill to be twice your usage to date”.
Crucially: I don’t need (nor do I have) historical data on my gas or actual temperature measurements.
There could then be a display that shows “usage yesterday vs. expected usage yesterday” that helps with saving.
The usage profile could either be input as a prepared table, or maybe automatically calculated for a location and some values (fixed hot water usage per week, cutoff outside temperature for heating) based on publicly available statistics. Or temperature sensor long-term statistics, if available.
Next evolution: Instead of heating consumption being a simple function of mean outside temperature I suspect it’s actually linearly related to integrated outside temperature. So if we actually have a (virtual) sensor, we can integrate the temperature and get a much better estimate of what the heating need for a particular past day actually is.
The display could now be “usage yesterday vs. expected usage yesterday based on yesterdays temperature”. This way I won’t get an aberrant “you heated too much, relative to statistical mean” if there’s a particularly cold day.
Next step: This data can then be used to update the internal temperature/gas usage model. So if it sees two months of cold winter it could alert that the temperatures have been consistently colder than anticipated, so maybe the expected total usage should be increased.
In fact, I think the model could even learn (over the course of a month or so) fully automatically, much like battery life estimation, with only the goal yearly usage as an input.
If live-ish temperature data is available, then the same area-under-the-curve insight can also be applied to intra-day gas usage, giving feedback before the day is over. (The other estimations should only be applied to full 24h cycles since there’s so mich variation.) Though at this point probably the variability of hand washing/shower times may overwhelm any savings effect you might want to see.
I am mostly struggling on how to design something like this to be useful for multiple people. I could probably copy my Excel stuff into an AppDaemon app, but that’s not easily reproducible. Could a “future and past usage model” be part of the Home Assistant energy dashboard?
Henryk Plötz,
Grüße aus Berlin