This series will record my adventures in building a home Energy Management System, to monitor and control solar PV generation, battery storage, EV charging, hot water heating, and grid import/export.
Back in 2018 I had a solar PV (photovoltaic) system installed, comprising 4kW solar panels, a Bosch inverter, a Marlec iBoost+ to divert excess solar power to the hot water tank immersion heater, and iBoost+ Buddy to display and amount of grid energy import/export and the amount of power used for water heating.
Last year I bought a battery electric vehicle and had a Hypervolt EV charge point installed.
In response to the recent increase in energy costs, I recently had an additional 6.4kW solar PV installed along with a Alpha ESS inverter and 10.4kWh battery. My system now looks like this:
Individually, these systems work well. Also the new inverter is aware of the older 4kW PV array and monitors the power it generates, so that it can account for it when deciding whether or not to charge the battery, and to enforce the 5kW export limitation that my DNO (Western Power) has unfortunately mandated. However, the system as a whole has some issues because the various parts don’t communicate:
- Sometimes the solar hot water diverter comes on in the middle of the night when there is no PV generation, causing the battery to power the immersion heater. This is not in general a good use of electricity. In some cases it might be desirable, depending on the battery state of charge (it is high?) and the hot water temperature (is it low enough that the oil-fired boiler is about to fire up?).
- The Hypervolt (in common with other Type 2 EV charge points) needs a minimum of 1.4kW power. It can be set to charge the car only when there is at least 1.4kW of solar power available, or to import enough for the grid to make up the solar power to 1.4kW when necessary, There can be times when there is e.g. 1kW of excess PV generation, but the battery is full so that power is being exported to the grid. If the EV charge state is low then I would rather use that 1kW plus 400W of grid energy to charge the EV. However, I don’t want the house battery to discharge to provide the 400W.
So I need a home energy management system that will allow me a greater degree of control:
- Not allow the house battery to power the hot water diverter unless I want it to
- Never allow the house battery to charge the EV
- If the EV state of charge is low and the home battery state of charge is high, prioritise the EV charger over the home battery when there is sufficient PV generation to charge the EV
and some additional nice-to-haves:
- Display in a convenient location the power being generated by solar PV, grid power import or export, battery charge/discharge power, water heater power, EV charge power and other load power. The Alpha ESS app can display the first three of these along with total load power on a smartphone, but there is some delay in the readings and I would also like a fixed display.
- Display the hot water temperature
- Integrate with the Octopus Energy Agile and Outgoing Agile time-of-use tariffs, so that I can import electricity when the price is negative and export it when the export price is highest
In order to achieve this, the Energy Management System (EMS) will need to sense the following:
- Total PV generation
- Battery charge/discharge
- Hot water diverter power
- EV charging power
- Grid import/export
- Hot water temperature
and the EMS will need to exert some control over the following:
- Hot water diverter power
- Battery charge/discharge rate
- EV charging rate
Unfortunately, there are as yet no open protocols for monitoring or controlling any of these devices – something that I hope will change in future! So it will be necessary to use a degree of hacking to achieve these goals. My aims will be:
- Not to make any hardware modifications to individual items. Doing so would invalidate manufacturer’s warranties and the MCSE certification.
- Not to compromise any safety or regulatory facilities, for example the ability of the EV charger to throttle its output if it detects that excessive power is being drawn from the grid.
- To maintain the ability to restore the system to its original configuration in the event of having to get specialist help to resolve a fault
To achieve these aims I will need to focus on the communication protocols between components of the system. These include:
- The iBoost current sensor, main unit and Buddy display use 868MHz RF for communication. It may he possible to identify the protocols in use to achieve control and monitoring of that subsystem.
- The Hypervolt uses a current transformer to sense when there is sufficient grid export to turn on the charger when it is in solar mode, and how much power to deliver. It should be possible to add additional voltage or current to the output to fake additional grid import, to persuade the device not to charge or to reduce the charging power.
- The Alpha ESS system sends data to the cloud every few seconds. It may be possible to use a proxy server to intercept this data.
- The battery is connected to the inverter through a pair of thick wires. A clamp-on DC current sensor could be used to monitor the charging current. This would give an approximate indication of charging power if we can estimate the battery voltage.
- The Alpha ES uses separate power monitoring units to monitor grid import/export and the output from the old solar PV array. The communication protocol is based on Modbus and is published, so we could snoop this communication.
My provisional plan for the EMS will use the following pieces of hardware:
- A unit located close to the Alpha ESS inverter and consumer unit. This will snoop the modbus sensor data used by the inverter, measure the current draw of the Hypervolt using a current transformer, add voltage/current to the Hypervolt CT input to fake a reduction in grid power export, and if necessary monitor the battery charge/discharge current.
- A unit on the LAN to act as a proxy server for the inverter, to snoop the data being sent to the cloud by the inverter, and query Octopus Agile import and export prices.
- A unit close to the hot water cylinder to measure the hot water temperature, command the boiler hot water heating on/off using a relay, control the iBoost either via its RF protocol or by faking the sender CT input, and monitor the iBoost power either via its RF transmissions or using an additional CT.
- A display and control unit with TFT touch screen in the hallway.
I plan to use a Raspberry Pi to provide the proxy server and a web server for remote access. The other units will be built around ESP32 or RPi Pico-W modules.
Before I proceed, here are some observations about existing equipment available:
- myEnergi sells the Zappi EV charger and the Eddi hot water diverter (similar to the iBoost). These units can work together with solar PV to assign priority to one of the other when excess solar power is available. It looks as though they may announce integration with a home battery system soon. Ths nay provide a good solution for anybody starting from scratch with solar PC, battery storage and EV charging.
- Open Energy Monitor (https://openenergymonitor.org/) is a set of modules based on Raspberry Pi and Arduino to monitor energy use and provide some aspects of control.
Next: Hacking the iBoost protocol
Glad to see you open this venue. I am searching for a backup solution for my home.
Have installed 50 amp in for portable air cooled 12.5 KW Gen set to run necessary components but looking to supplement with Portable PV Solar generator 240 volt output with minimum 7kw. Also want capability for charging solar generator with air cooled Gen set. Can not find solar generator to do this job.