Skip to the content.

On This Page

    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.

    Connector options

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

    Brands

    Marstek

    Marstek

    Ready to use config for Marstek are found here

    Ethernet cable (Venus V3 and Venus A/D only):

    Esphome based - Modbus 4-string

    Modbus RTU bridge to Modbus tcp/ip:

    Important notice

    Home Battery Control assumes the sensor and entity names used in the Fonske projects 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

    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

    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.

    1. In the Anker app: Settings → Third-Party Control Setting → enable Modbus TCP. Note the device IP (port 502).
    2. Copy home assistant/other-batteries/Anker-Solarbank/anker_solarbank_m1_modbus_tcp.yaml to /config/packages/.
    3. Set host: to your device IP (replace [YOUR_IP_ADDRESS]).
    4. Do not also load a Marstek m1 Modbus package (entity IDs would clash).
    5. Restart Home Assistant, then validate with the checklist in the Anker Solarbank README.
    6. Set max charge/discharge helpers as needed (helper max 3500 W; values persist across HA restarts; device registers still clamp).
    7. Optionally set input_text.marstek_m1_anker_solarbank_product_name to your model name.

    Register map references:

    Thanks to @wouterbouvy for building and hardware-validating this package.

    Anker SolarBank 3 PRO (cloud)

    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

    Marstek

    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.

    ← Back to Home