Battery to Home Assistant
Home Assistant speaks “ModBus language” to communicate with your Battery and vise versa. Use the configurations on this page and HomeBatteryControl will work out of the box.
Review the available connectors on your battery:
- B) RJ45 Ethernet port
- Use a regular network cable, no extras needed.
- A) Four string ModBus wire
- Use an EspHome or RTU bridge device - communicates via Wifi to HA.
- C) RJ45 ModBus port
- Confusingly looks like an Ethernet port, but isn’t. Use Elfin EW11 to communicate via Wifi.
Decide wether you go WiFi or cable.

| Reading tip | this Marstek topic on Tweakers.net (NL/BE) for detailed info curated by SuperDuper1969 |
Brands
Marstek

Ready to use config for Marstek are found here
Ethernet cable (Venus V3 and Venus A/D only):
-
Ethernet port RJ45 (not modbus RTU RJ45 port) : https://github.com/fonske/MarstekVenusV3-modbus-TCP-IP/tree/main
Copy the YAML to
/config/packages/in Home Assistant folder
Esphome based - Modbus 4-string
- lilygo: Venus E V1/2: https://github.com/fonske/MarstekVenus-LilygoRS485/blob/main/lilygo_mt1.yaml
- lilygo: Venus E V3: https://github.com/fonske/MarstekVenus-LilygoRS485/blob/main/lilygo_mt1_v3.yaml
- lilygo poe: Venus E V3: https://github.com/Adam600david/Marstek-venus-V3-Lilygo-T-POE-pro/blob/main/MarstekVenus-Lilygo-T-POE-Pro%20MTforum.yaml (by Adam David)
- M5stack rs485 Atom s3: Venus E V1/2: https://github.com/fonske/MarstekVenus-M5stackRS485/blob/main/esphome/atom_s3_lite_rs485.yaml
- M5stack rs485 Atom s3: Venus V3: https://github.com/fonske/MarstekVenus-M5stackRS485/blob/main/esphome/atom_s3_lite_rs485_v3.yaml
Modbus RTU bridge to Modbus tcp/ip:
- Elfin EW11: Venus V1/2: https://github.com/fonske/MarstekVenusV3-modbus-TCP-IP/tree/v12
-
Elfin EW11: Venus V3: https://github.com/fonske/MarstekVenusV3-modbus-TCP-IP/tree/main
Copy the YAML to
/config/packages/in Home Assistant folder
Important notice
Home Battery Control assumes the sensor and entity names used in the
Fonskeprojects above.Using alternate naming or different code projects requires you to create HA helper entities to map values from your custom setup to the expected entities in the Home Battery Control (HBC) project.
Altering the mapping in the Node-RED flows is also possible, but less advised as this makes updating later on very cumbersome.
Special thanks to Fonske for his work and efforts to the project.
Anker SOLIX

Several HBC-tweakers have started support for Anker SOLIX batteries:
- Anker SOLIX SolarBank 3 Pro (cloud bridge)
- Anker SOLIX Solarbank Max AC (local Modbus TCP — shared package below)
- Anker SOLIX Solarbank 4 E5000 Pro (local Modbus TCP — same package)
- Anker SOLIX Smartplug Gen 2
Track progress and discussion:
- GitHub issue: https://github.com/gitcodebob/marstek-venus-rs485-node-red/issues/126
- Discord Anker channel: community
Anker Solarbank Max AC & Solarbank 4 (recommended — local Modbus TCP)
Native Modbus TCP package for Max AC and Solarbank 4 E5000 Pro (identical third-party register map). Exposes the Fonske marstek_m1_* entity names so HBC works without changing Node-RED flows.
- In the Anker app: Settings → Third-Party Control Setting → enable Modbus TCP. Note the device IP (port 502).
- Copy
home assistant/other-batteries/Anker-Solarbank/anker_solarbank_m1_modbus_tcp.yamlto/config/packages/. - Set
host:to your device IP (replace[YOUR_IP_ADDRESS]). - Do not also load a Marstek m1 Modbus package (entity IDs would clash).
- Restart Home Assistant, then validate with the checklist in the Anker Solarbank README.
- Set max charge/discharge helpers as needed (helper max 3500 W; values persist across HA restarts; device registers still clamp).
- Optionally set
input_text.marstek_m1_anker_solarbank_product_nameto your model name.
Register map references:
Thanks to @wouterbouvy for building and hardware-validating this package.
Anker SolarBank 3 PRO (cloud)
- Package: Anker to M1 Marstek (Jos1958)
- Uses the community cloud integration (thomluther/ha-anker-solix), not local Modbus
- Self-consumption / PID is not practical (cloud command rate limits)
- Thanks to Jos1958
Official Anker HA integration (optional)
- https://github.com/anker-charging/ha-anker-solix-official — local Modbus entities in HA
- For HBC you can either use the native Solarbank package above (preferred for Max AC / SB4) or map official entities onto
marstek_m1_*names as described in For Integrators
An overview of available connection schemas

Table
| Asset | Connection | Communication | HA integrations | HA config | HBC interface |
|---|---|---|---|---|---|
| P1 Meter | Direct USB or LAN | USB or local (TCP-IP) | HomeWizard Integration / Other P1 Integrations | — |
Fonske entity naming schema ↓ Home Assistant • HA Add-Ons (Node-RED) • HA HBC Package (YAML) — Home Battery Control + Config • HA HBC Dashboard (YAML) ↓ HBC Strategy Flows (Bob) ↓ HBC Dashboard (Bob) |
| Marstek Venus V3 | Direct LAN / Wifi | modbus (TCP-IP) | — | Marstek Package (YAML) — MarstekVenusV3-modbus-TCP-IP (Fonske) | |
| Marstek Venus V1/2/3 | via LilyGo, M5stack, Elfin | modbus (RS485) | — | Marstek Package (YAML) — MarstekVenus-ESPHome (Fonske) | |
| Anker SolarBank 3 | via Anker Cloud | Anker Cloud (TCP-IP) | HA-Anker-Solix (thomluther) | Cloud Anker to Marstek Package (YAML) — Anker to M1 Marstek (Jos) | |
| Anker Solarbank Max AC / Solarbank 4 | Direct LAN / Wi‑Fi | modbus (TCP-IP) | — (native package) or HA-Anker-Solix-Official (optional) | Native Modbus Package (YAML) — Anker Solarbank m1 | |
| Other Battery | Any | Any | Other Battery Integration | Other Battery to Marstek Package (YAML) — Other to M1 Marstek (Future) (*) |
(*) Use the Anker Solarbank native Modbus package or Jos’s Anker-to-M1 template as a starting point for other batteries.