How to Charge Your Home Battery During Octopus Free Electricity Sessions Using Home Assistant
Could your home battery automatically charge itself whenever Octopus offers free electricity? With Home Assistant, compatible battery storage and the right integrations, it is possible to automate the process – meaning you don't have to be at home when a free electricity session starts.
Octopus Energy customers enrolled in its free electricity scheme can sometimes receive Power Up sessions, where electricity is available at no charge for a limited period.
The opportunity is particularly interesting for households with battery storage. Rather than relying on solar generation alone, you could use a free electricity window to charge your battery and save that stored energy for later.
But there's a catch: your electricity tariff, battery controls and automation software all need to work together.
In this guide, we explain how the system works, how to connect a compatible Anker SOLIX Solarbank 4 Pro to Home Assistant, and what owners of other battery systems need to consider.
Key points
Eligible Octopus customers may receive Power Up free electricity sessions, subject to the event terms.
Home Assistant can detect a Power Up session and automate supported battery controls.
The Anker SOLIX Solarbank 4 E5000 Pro has a documented Home Assistant integration using Modbus TCP.
Compatibility is not universal: other battery manufacturers and models require separate checks.
Octopus Power Ups
Eligible Octopus customers can receive free electricity sessions through the Octoplus programme. These sessions can provide an opportunity to charge compatible home batteries, alongside running appliances or charging an electric vehicle.
Home Assistant
Home Assistant can detect when an eligible free electricity session is active and automate supported battery charging controls. The exact controls depend on the battery, model, firmware and integration.
Anker SOLIX
The Anker SOLIX Solarbank 4 E5000 Pro has a documented Home Assistant integration using Modbus TCP. That documented integration is specific to supported Anker equipment and should not be assumed to work with every battery brand.
What are Octopus Power Up sessions?
Octopus Energy's Power Up sessions are free electricity events offered through its Octoplus programme.
During an active session, eligible customers can benefit from free electricity consumption, subject to the terms of the event.
These sessions can provide an opportunity to run appliances, charge an electric vehicle or charge a home battery.
The difficulty is that sessions can be announced at short notice and may happen during working hours.
You might receive notification that a free electricity session is starting in the afternoon, but if you're away from home, manually changing your battery settings isn't particularly convenient.
This is where Home Assistant comes in.
Important: Power Up sessions are not guaranteed to happen at a particular time or frequency. You need to be enrolled in the relevant Octoplus free electricity programme and check the terms of each event.
Why combine Octopus Energy with Home Assistant?
Home Assistant is a home automation platform that allows compatible devices and services to communicate with each other.
In this example, there are two main connections:
Octopus Energy provides information about when a free electricity session is active.
Home Assistant communicates with the battery and changes its charging settings.
The automation can then follow a simple sequence:
Detect when an Octopus Power Up begins.
Switch the battery into a mode that allows third-party control.
Set the battery to charge from the grid.
Apply the appropriate charging power.
Detect when the free electricity session ends.
Return the battery to its normal operating mode.
The benefit is that the process can happen automatically, without someone needing to open the battery app and change the settings manually.
What equipment and software do you need?
Requirement | Purpose |
Anker SOLIX Solarbank 4 E5000 Pro | Battery storage system |
Home Assistant | Runs the automation |
HACS | Installs the required community integrations |
Anker Solix Official integration | Connects Home Assistant to the battery |
Octopus Energy integration | Provides Power Up session information |
Octopus Energy account | Access to eligible free electricity sessions |
Home network | Connects Home Assistant and the battery |
You will also need a suitable device to run Home Assistant, such as a Raspberry Pi or mini PC.
This is not a plug-and-play feature for someone who has never used home automation. Some technical setup is required.
Step 1: Set up Home Assistant
Home Assistant needs to be installed and running before you can create the automation.
It can run on supported hardware such as:
Home Assistant Green.
Raspberry Pi.
Compatible mini PC.
Other supported installation hardware.
Once installed, make sure Home Assistant is accessible on your home network.
You'll also need HACS, the Home Assistant Community Store, to install the integrations used in this example.
Official resource: Home Assistant – Getting Started
Official resource: HACS – Installation Guide
Step 2: Connect the Anker SOLIX Solarbank 4 Pro

Anker provides an official Home Assistant integration using Modbus TCP.
Unlike a cloud-only connection, this allows supported Solarbank equipment to communicate with Home Assistant over your local network.
First, open the Anker app.
Select your Solarbank.
Open the device settings.
Find Third-Party Control Settings.
Enable Modbus TCP.
Make a note of the IP address displayed.
Next, open HACS in Home Assistant.
Go to Integrations.
Find Anker Solix Official.
Install the integration.
Restart Home Assistant if requested.
Open Settings and Devices & Services.
Select Add Integration.
Search for Anker Solix Official.
Enter the Solarbank's local IP address.
Home Assistant should then detect the supported device and create the relevant entities.
You can find Anker's official instructions here: Anker SOLIX – Home Assistant Integration Guide
Read the source integration here: Anker Official Home Assistant Integration on GitHub
Compatibility: Anker currently lists the Solarbank 4 E5000 Pro among the supported storage devices. Check the current supported-device list and firmware requirements before attempting installation.
Step 3: Connect Octopus Energy to Home Assistant
The next step is connecting your Octopus Energy account.
The Home Assistant Octopus Energy integration is maintained by BottlecapDave and is available through HACS.
You'll need:
Your Octopus Energy account number.
An Octopus Energy API key.
An active Octoplus account and eligibility for the relevant Power Up events.
Install the Octopus Energy integration through HACS and follow its configuration instructions.
Once connected, the integration can create entities relating to your electricity account.
One particularly important entity is the Power Up calendar.
It allows Home Assistant to identify when an eligible free electricity session is active.
The relevant calendar follows this naming pattern:
calendar.octopus_energy_ACCOUNTID_octoplus_power_up
Your actual account ID will replace ACCOUNTID.
The Power Up calendar is disabled by default in the integration, so check its configuration and enable it if required.
Official documentation: Home Assistant Octopus Energy – Octoplus and Power Up
Step 4: Create the charging automation
Now the interesting part.
With both integrations working, Home Assistant can use the Octopus Power Up calendar as the trigger for controlling the battery.
The automation needs to perform two separate jobs.
When a free electricity session starts
Check that the Power Up calendar is active.
Switch the Solarbank into third-party control.
Set the grid flow direction to charging.
Apply the selected charging power.
Confirm that the battery has accepted the settings.
When the free electricity session ends
Detect that the Power Up session has finished.
Stop the forced grid charging.
Return the Solarbank to its normal operating mode.
It is important to include a recovery check if Home Assistant restarts or loses communication during a session.
Otherwise, the battery could be left in a different operating mode from the one you normally use.
Don't simply copy an automation from somebody else's installation. The entity IDs, account identifier, device configuration and preferred normal operating mode must match your own system.
The Octopus calendar and battery controls should also be tested individually before allowing an automation to control them.
How much electricity could you store during a free session?
This is where battery charging power becomes important.
The Anker SOLIX Solarbank 4 E5000 Pro supports grid charging at up to 2,500W under the relevant operating conditions.
Using that maximum as an illustration:
Free charging time | Energy supplied at 2,500W |
30 minutes | 1.25kWh |
1 hour | 2.5kWh |
90 minutes | 3.75kWh |
2 hours | 5kWh |
These are theoretical energy-input figures before charging losses and any power limitations.
Actual charging will depend on the battery's state of charge, temperature, firmware, settings and available charging power.
For example, if your battery is already nearly full, it won't be able to accept the full theoretical amount.
What could this mean for your electricity bill?
Imagine you receive a one-hour free electricity session and your battery manages to store 2.3kWh after charging losses.
You then use that stored energy during a period when your electricity costs 25p per kWh.
The potential avoided electricity cost would be:
2.3kWh × £0.25 = £0.575
That's approximately 58p of electricity value from one session.
If the same amount of usable energy were stored and used during a 30p per kWh period, the equivalent value would be 69p.
These are illustrative calculations, not guaranteed savings. The actual benefit depends on the energy you would otherwise have purchased, battery losses, export arrangements and the tariff terms.
It is also worth checking whether your tariff or event has any conditions around free consumption, battery charging or export.
Can you do this with EcoFlow, Indevolt or Zendure?
This is where things become more complicated.
Home Assistant supports many energy products, but the available controls differ between manufacturers and models.
Manufacturer | What needs checking |
Anker SOLIX | Official local Modbus integration supports the Solarbank 4 E5000 Pro |
EcoFlow | Check the specific model's Home Assistant integration and available grid-charge controls |
Indevolt | Confirm whether the exact PowerFlex model exposes the required third-party controls |
Zendure | Check model compatibility and available charging controls |
The important question isn't simply whether Home Assistant can display your battery's charge level.
It needs to be able to control grid charging safely and return the battery to its previous operating mode when the free session ends.
We would not recommend assuming that an automation written for Anker will work with another manufacturer's equipment.
Important safety and compatibility considerations
Before setting up automated grid charging, consider the following:
Only use manufacturer-supported control methods and compatible firmware.
Keep Home Assistant and the battery on a trusted private network.
Protect API credentials and account details.
Check the manufacturer's installation and operating instructions.
Confirm the maximum permitted charging power for your installation.
Make sure the automation has a reliable stop condition.
Check that another battery schedule or automation isn't fighting for control.
Never bypass electrical protection or installation requirements.
Anker also warns that certain battery protection and maintenance functions can override third-party control commands.
Enabling Modbus TCP and allowing Home Assistant to control the battery should therefore be approached carefully.
Is this worth setting up?
For someone who already runs Home Assistant and has a compatible battery, this could be a useful way of making the most of occasional free electricity sessions.
The real attraction is automation.
You don't have to be sitting at home waiting for an Octopus notification. The system can detect the session and change the battery's charging behaviour automatically.
For people who are already investing in home battery storage, smart tariffs and energy management, this is another way technology can help reduce reliance on expensive grid electricity.
However, if you're new to Home Assistant, it may be worth starting with monitoring and simple automations before allowing it to control your battery.
The best energy-saving automation is one that works reliably, respects the manufacturer's limits and doesn't leave you with an unexpected charging schedule.
More from UK Power Tech Hub
Want to get more from your home battery?
Explore our guides to battery storage, plug-in solar, smart electricity tariffs and portable power.
Visit our Battery Storage Directory.
Explore our UK Plug-in Solar guides.
Read our latest battery deals.
Subscribe to The Weekly Power Brief for UK energy news and product developments.
Related UKPTH guides: What is home battery storage? · AC vs DC batteries · How much battery capacity do I need? · Can a battery save me money? · Time-of-use tariffs · What is plug-in solar?
Weekly Power Brief
Get the latest UK solar, battery and energy news with The Weekly Power Brief newsletter.
Editorial disclosure
This guide explains a Home Assistant setup using publicly available manufacturer and integration documentation. UK Power Tech Hub has not independently verified this complete automation on every supported device. Product compatibility, firmware and integration behaviour can change. Always check current documentation before enabling battery control.









Comments