Analyzing home energy usage with AI
My house has the following features:
- Solar panels on the roof. These were heavily subsidized and on a 10-year lease, so excess electricity is taken by the power company for the first 10 years. After that, I can export it for profit (although I expect prices to keep falling).
- An ENE-FARM, a fuel cell that uses natural gas to generate electricity, using that heat to produce hot water.
The solar panels are great. They generate more than we need during the day on most days, and have really brought our electricity bill down.
The ENE-FARM came with the solar panels as part of the subsidy package. It’s a fascinating device, the idea being that gas prices are generally lower than electricity prices, and you can save some money especially since you can use that hot water. But in our experience, it felt like the residual cost of having it on increased gas prices more than it decreased electricity prices, so we have turned the generation off and are using it just like a normal water heater.
I was about 80% convinced that we were using these appliances in the most cost-effective way, but recently was able to use AI tools to actually do the math.
Getting the data
All energy usage goes through the fuel cell’s power unit, and I can see usage data via the in-wall controller or through the official smartphone app. I figured that the app is just a wrapper for authenticated API calls, so the first step was reverse engineering this to get access from my computer.
Claude drove most of this process. I set up a temporary man-in-the-middle proxy to see all data coming and going from my phone. From this I quickly found the authentication parameters, and the API calls used to get data from the power unit. The fields had non-descriptive binary names, but comparing the numbers to screenshots taken within the app made it easy to map what each field represented.
Now I had access to monthly/daily/hourly data for things like:
- How much electricity I used
- How much electricity my solar panels generated
- How much electricity I bought from the grid
- How much left over electricity was exported
- How much gas I used/bought
I could now make web dashboards that show this information, but I already had those from the app. The more interesting application is then using this information to answer various questions:
Question 1: Why was my electricity bill so expensive last month?
Answer: Consumption was about the same as the previous year. Solar generation was what had dropped.
This question itself was fairly straightforward, but the exciting thing is that now I have a corpus of personal data and a method for answering any small questions like this that may come up in the future.
As a follow up, I found the Open-Meteo historical archive, a database that can show how much sunshine a given location received on any day. This confirmed that more days were rainy/cloudy than last year. And now I have another useful set of data.
Question 2: Are my solar panels still as effective as before?
I expect that performance will decline eventually, and I also worried that if one of the panels was knocked out for some reason it may take me a long time to notice.
Cloudy days create a lot of variance, so I looked at generation/sunlight ratios for only sunny days over the year. Comparing the data across multiple years showed that the solar panels are healthy, running about as effectively as we could expect.
The solar cells have a total capacity of 6.74 kWp, and actual performance caps out at around 80%. That is about what can be expected, especially since they are split across two roof faces.
Question 3: Is keeping ENE-FARM generation off a smart move?
Short answer: yes.
The main issue is that solar provides more electricity than I need during the day, so most electricity generated by burning gas is wasted.
Follow up: What if I just turned it on at night, when there is no sunlight?
Since the fuel cell needs to run hot, there is a significant cost when turning on from a cold start. Also checking the manual told me that the manufacturer recommends at most 10 startups per year, and significantly more than this could void any warranty.
Follow up: What if I just turned it on during winter months?
This scenario was the interesting one. With less sunlight, there are more hours during the day when I am just buying electricity from the grid. There is a ratio of electricity price to gas price that acts as a threshold for when burning gas would cost less, and it becomes more forgiving when there is less sunlight.
I got the recent per kWh and per m^3 prices, and saw that it was very close. Some months were above and some months were below, with it generally within the variance of those two rates. But even in the winter months, the total savings would only come out to be around 1,500JPY per year, and after considering other factors like wear on the fuel cell, keeping it off is probably the right move.
Question 4: Should I buy a residential battery to offset nighttime costs?
Short answer: Batteries are too expensive.
Getting even a 5kWh battery would cover a lot of nighttime usage. I could expect to save 50,000~60,000JPY per year, which is actually a large fraction of my total annual cost.
But installing a 5kWh battery costs upwards of 1 million JPY! It would take 20 years to break even, and the battery wouldn’t even last that long.
Battery cell prices have been dropping globally, but this cost in Japan has stayed mostly flat. Most of the cost comes from equipment and installation fees, so cheaper battery cells has minimal impact. Even with the possibility of receiving government subsidies, this seems unlikely to be practical any time soon.
(The impression I get is that most people who have residential batteries are doing it for disaster-preparedness, rather than financial reasons)
Conclusions
I could confirm that I was doing things mostly correctly, and now I have the numbers and math to back it up. And since I have raw numbers easily accessible, I should be able to answer similar questions in the future as they come up.
Of course, I could have done the same analysis by myself with a spreadsheet, but the reality is that I hadn’t. The AI drastically reduced the friction of digging into the data, and now I have more peace of mind.