Home Energy Management - Part 2 - Where Apple Home failed me.

The Default Energy Dashboard in Home Assistant

 In late May of 2023 I had 5.8kW of solar panels an Inverter and a 6kW home battery system installed. The system itself, the inverter and battery are from a Chinese company called Fox, comes with an app but I didn't find it to be terribly useful. It's too hard to read, as the UI puts too much information in one graph.

FoxESS graph of the same information

Unfortunately and inexplicably, in my opinion, Apple had chosen to not do anything around energy management even though some vendors were already using it as a differentiator for their devices, such as Eve. That seems to be changing now, slowly, but I don't see any UK energy companies working with Apple and that is at a macro level. I want to see what is going on in my house.

I had been keeping my eye on Home Assistant (HA) for a while and was aware of their move into Energy Management, so I thought I'd give it a whirl. Initially, I was on EDF as a supplier, but they didn't have an EV rate and their feed-in rate was, and still is, terrible. So I switched suppliers and went on to a tariff known as Octopus Intelligent Go, which is for EV's and gives you a cheap rate for 6 hrs a night and then also gives you cheaper electricity for 30 minutes at a time when the wholesale price of electricity is really low. 

Initial installation of Home Assistant

Now, though, I really did need to know what was going on and, thus, I decided to implement Home Assistant. I didn't want to buy more hardware and so decided to run it as a Virtual Machine (VM), for which there is an HA distribution. I installed it on my M2 Mac mini, which also runs my audio and video libraries as well as my homebridge instance, which I potentially thought about retiring.... but that's for a different post.

Initially I used Virtualbox, which had added support for Apple Silicon, but I found it t be less than stable and so did some research and settled on UTM for MacOS as it was getting good reviews. Now? Well, I'm actually looking at VMware Fusion as it is now free for personal use.... but I have to convert the disk image, or do an HA backup & Restore. Maybe a project over the Christmas & New Year break. 

Getting up that initial HA imagine was relatively easy, but after that, you have to understand that HA requires work to get it to be what you want and, 18 months later, I'm still changing what I see. This is all enabled by wonderful programmers out there, of which I am not, who create the integrations I need. Also, HA has gone through a major change over the last 18 months and has become much easier to use. Not easy, but easier! I remember Homebridge going through a similar moment a few years back. In both cases it is due to the implementation of a half decent UI.

HACS (Home Assistant Community Store)

Getting the information I needed was not so easy. I first had to install HACS. HA has official an unofficial integrations. Official ones are built into HA and known as core, unofficial ones are integrated in various ways, but mostly via HACS. To give you an idea on how important HACS is, of the 35 integrations I use I have 26 via HACS. Some of them are enhancements to  core, integrations such as SmartThings or the official UI. Some HACS integrations do migrate to core and I've seen that happen with a couple of those.

Initially, I just needed the HA & FoxESS Cloud Integration. This uses FoxESS' Cloud API. It does have limitations, as in the cloud instance only get updated every 5 mins from the inverter and if the cloud is down, I don't get any information. It also does not have a UI, and the integration is done via modifying a YAML (Yet Another Markup Language) file, which now mean that I had to install Studio Code Server so that I could easily get to the file that needed modifying. YAML is extremely sensitive to mistakes, SCS will check your changes, so I highly recommend it.

Now, I could modify configuration.yaml and added:

sensor:
- platform: foxess
deviceID: 5d32249a-94b9-4f60-8295-ThisBitIsBS
deviceSN: ImNotTellingYouMySN
apiKey: whatever my API key is

On the Restart of HA, I now got over 60 pieces of information coming from that integration, which are documented on the integration's GitHub page.

There's now a great video on Installation, done by Will Eccles, on YouTube. The first 19 minutes covers the Cloud integration. He does it slightly differently than me, but it's mostly the same.

Configuring the default Energy Dashboard

This now gave me the basic information I needed to update the Energy dashboard.

Configuration of the HA Energy Dashboard

I have two sets of Solar Panels, thus why it has two listed. One on the main house, which is SSE facing, and the other set on the Eastern side of the Garage.

The Grid carbon footprint is another integration known as Electricity Maps, and is part of HA core.

This was great as a start, as it told me exactly what I was using, and from where. It also showed how much I was putting back int the grid. 

Solar Production showing the two sources

Electricity Usage & Production

Legend:

  • Blue is the Grid consumption
  • Dark Pink is battery charge
  • Green is charging the Battery
  • Orange is Solar used
  • Purple is Feeding into the Grid
At a glance, I can very much see the home. But if I want to see totals for the day:

Electricity totals for the day


However, the FoxESS grid consumption is from a clamp and is only roughly correct. What I needed was to be exactly correct and that meant being able to read my Smart Meter.... which, annoyingly, is not as easy as it should be.

To get my actual Meter information I had to purchase a Glow Display and CAD (Consumer Access Device), which then means that I can access this via a Cloud API or MQTT. Again, at the moment I'm using the Cloud integration. This then meant another Integration called Hildebrand Glow (DCC). What is nice about this integration is that it also automatically picks up the price you are paying, so when you configure the Grid consumption, it now looks like:


More Granular Information - Where am I actually driving consumption?

This is all well and good, but what's driving that consumption?

As I said earlier on, the UI for HA has been having some amazing work done on the UI. One area that got some attention was the Energy Dashboard and individual device reporting was added.

Home Assistant Individual Device Total

So, we can see that the Car Charger was the big user of the day, but when was it used? How did I get that information?

Well the answer to the first was by looking at the history of the device I can see that it was between the off peak hours.

Car Charger in Home Assistant

Where did the information come from? Well, my car charger itself. I have a Pod Point Solo, which meant I had to install the Pod Point integration, again a HCS integration. It has a number of sensors and switches, for automation. In this case we are interested in just one sensor, which tells me what the power usage is.


The rest of the information I get from the Netatmo integration which is actually part of HA core. However, to use this you also need to have set up Home Assistant Cloud, which is one of the few fee paying parts on HA. Handily, it also gives you remote access to your HA instance. Once done and set up, you can now see all of your devices that are powered by Netatmo, which includes my Legrand installation I discussed in Part 1. This gave me all of my circuits power, as well as certain sockets that I have also upgraded to Legrand Arteor with Netatmo.

Whilst this now gave me a better understanding, another update to the UI introduced showing the individual devices over time in a stacked bar graph.

Home Assistant Individual devices stacked bar graph over time.

Now I can clearly see that the car charger was used during off-peak hours and was a major user of power.

There are issues, though, with the integration. For example, I can't tell it that the Fridge Freezer is on a particular circuit, and so it counts the data twice, which is why you'll see some negative usage. Still it isn't a bad indicator.

Other graphs on the dashboard

Energy Distribution

HA Energy Distribution
I've found this one interesting. It's showing things like Grid kWh in and out. What it thinks is green, although theoretically mine is 100% green according to the tariff I use. It also shows me in and out of the battery and the total usage of the home. You can also see water usage, it shows 0L in this one as I did not have the Watergate Sonic integration set up for the date I have taken screen shots. I found it limiting though, as it doe snot show what is going to the car charger or the flat. Both of which are significant draws on energy and are both sort of out of my control, especially the flat.

Other graphs


These are fairly self explanatory. One thing I'll say is that I've really discovered that you can either tune your house to be green, and not use much electricity from the grid, or you can tune it to be low cost. To be green and cost effective you have to do a couple of things:
  1. Use a supplier that guarantees 100% green energy
  2. Have a house battery so you can: 
    • charge up at low cost times
    • use low cost electricity during peak times, or
    • sell back low cost electricity for more than you paid for it
If you look at these counters and the previous graphs, you can see I produced a great deal of solar energy and I could've used less of the grid electricity, but I choose to feed in as I make a profit out of it. Essentially, instead of waiting to charge my batteries from Solar, I choose to charge from the grid at 6p/kWh and then sell back to them at 16p/kWh. This may seem selfish, at first, but I am helping to green the grid as I am not using electricity at peak times and am, in fact, a micro generator providing energy when it is most needed.

What size of house battery has been an interesting journey. Personally, I've grown mine from 6kW (5.4kW usable) to 20.3kW (18.3kW usable). I'm finding the extra batteries are paying themselves back in about 3 years and the whole system in about 6 years 4 months. About £100 a month of the savings are contributed by the battery system.

Beyond the default Energy Dashboard

HA is extremely customisable. This is a great strength, but also adds to its complexity. HA has recently brought in a new style of dashboard much more flexible on its own, but there are also HACS extensions to some of the graphs you can produce.

I am working on my own dashboard at the moment.

Energy Distribution


The 0Wh is a bug I've introduced that I'm working on, but other than that you can see that I can now see the % of the battery left, but more importantly, I can split up the electricity showing what the flat is using as well as the car charger. This is a HACS UI enhancement called Power Flow Card Plus.

Sankey Chart


This is another HACS integration called Sankey Chart Card, and really gives a great idea on how electricity is being consumed. For me, this is one of the most useful charts I've seen.

Live Circuit usage


I'm also getting live circuit usage, Pod Point usage and also information from the inverter. I'm showing the circuits for the main house in the above table.

Other changes

Initially I charged the car via the car API, but then JLR pulled the API, which was unofficial, and Octopus could no longer control the car and so I had to jump tariff to, what I consider is a better one, Eon.next next drive. However, whilst on Octopus, there were a number of extra integrations that gave me better reporting and control over Octopus Intelligent Go. However, Eon gives me:
  • more hours at off-peak at a lower price which means all year round cheaper charging of the car and the battery.
  • Better feed-in tariff, so I earn more when I feed into the grid.
This helps me to drive my costs down further.

Summary

I'm using HA because I have no other choice. Matter is adding more and more capabilities as far as energy reporting and management is concerned, especially with Matter 1.3 & 1.4. I'm hoping that, eventually, Apple will take on this reporting and I'll be able to convert my Legrand and FoxESS systems to Matter.

It has taken me a great deal of time, and all of those wonderful contributors to HA, to get close to what I want in terms of a display. It has been worth the effort, in lieu of anything else.

What's next?

I'll be using the Modbus integration for the FoxESS system and also moving to MQTT for the meter, getting more up to date information for the display.




Comments

Popular Posts