Use the meter you already have.

A B2500, Venus or Jupiter only steers toward zero when it can see a power meter it recognises. AstraMeter pretends to be that meter (a Shelly Pro 3EM, CT002 or CT003) and feeds it live grid readings from your Shelly, Home Assistant, MQTT broker, smart-meter IR head, or any of 18 supported sources.

Free software, GPL-3.0. Runs as a Home Assistant add-on, in Docker, with plain Python, or on an ESP32.

The Overview tab: the grid held within a few watts of zero while three batteries between them supply what the house is drawing
Three batteries, one house. The grid sits at zero because the fleet is holding it there.

How it fits in

The battery polls AstraMeter over your local network, exactly as it would poll a real meter, and gets back the current grid power. AstraMeter reads that number from whatever you already measure it with.

As a CT002 or CT003, AstraMeter gives each battery its own target. Every poll also reports what that battery delivered, so AstraMeter corrects the next target and the batteries share the load instead of all reacting to the same reading and overshooting.

Source
Your grid meter Shelly, Home Assistant, MQTT, SML, Modbus, HomeWizard…
Emulator
AstraMeter Poses as a CT002/CT003, smooths the reading and works out a target per battery
Storage
Your batteries One or more Marstek batteries: B2500, Venus, Jupiter…

Features

Several batteries, one grid connection
In CT002/CT003 mode the load is split evenly, or by a weight you set per battery. On small loads it can run fewer batteries so each stays above its efficient minimum, rotating them to share wear.
18 meter sources
Shelly, Tasmota, Home Assistant, MQTT, Modbus TCP/UDP, SML over an IR head, HomeWizard, Enphase, SMA, Fronius, Tibber Pulse, a JSON endpoint, or your own script.
Filtering for noisy meters
Smoothing, a deadband and Hampel outlier rejection, plus an optional PID controller, for meters that jump around or report late.
Three-phase
Per-phase readings on L1, L2 and L3, each with its own offset and multiplier for calibration.
Home Assistant entities
MQTT Insights publishes grid power, per-battery targets and meter health through MQTT discovery, along with controls to pause a battery or set its share.
ESP32 build
The CT002/CT003 emulator also ships as an ESPHome component, so a small ESP32 board can do the job without a server.

Status page

Open it from the Home Assistant sidebar, on port 52500 with Docker or Python, or at the ESP32's own address. It shows the grid reading, what each battery is being asked to do, and the health of your meter. Except on an ESP32, whose settings are compiled in, you can also edit the configuration from the browser. Dashboard docs

The Batteries tab: three battery cards side by side, each with its own trend line, phase, target and saturation
Every battery's own power, target and share of the load, with a trend line drawn as the readings arrive.

Compatibility

Works with the B2500, Venus, Jupiter and other Marstek storage systems that can be paired with a CT002/CT003 or Shelly meter. Once AstraMeter is running, switch the battery to Self-Adaptation mode.

Emulated meterNotes
Marstek CT002 (HME-4)Recommended. Per-battery targets and load sharing
Marstek CT003 (HME-3)Same as CT002
Shelly Pro 3EMPort 1010 for B2500 firmware up to v224, 2220 from v226
Shelly EM Gen3
Shelly Pro EM-50

Meter sources

The right-hand column says whether the ESP32 build can read each one. Everything not marked ESP32 only also works with the Python version. Each row links to its settings in the Python and ESP32 docs.

    Install

    MethodBest for
    Home Assistant add-on Home Assistant users. The easiest route. Guide
    Docker A NAS or home server Guide
    Python Linux, macOS or a Raspberry Pi Guide
    ESPHome on an ESP32 A dedicated board, no server Guide

    Config generator

    Tell it how you'll run AstraMeter and which meter you have, and it writes the config.ini or ESPHome YAML, explaining each option. It runs in your browser and uploads nothing.

    Open the generator

    FAQ

    Do I need to buy a specific power meter?

    No. AstraMeter reads grid power from something you probably already have (a Shelly, Home Assistant, an MQTT topic, a smart-meter reader, Modbus and so on) and presents it to the battery as the meter it expects.

    Should I use Shelly emulation or CT002/CT003?

    CT002/CT003. Each battery reports its output back, so AstraMeter can steer it to its own target and share the load across batteries.

    What's the difference between Home Assistant, Docker and ESP32?

    The add-on, Docker and Python run the full emulator as software on a machine that's already on. The ESP32 build runs on a small board of its own and emulates CT002/CT003 only. The config generator writes the right file for each.

    Does it cost anything?

    No. AstraMeter is free software under the GPL-3.0. The config generator runs in your browser and uploads nothing.

    Which Marstek batteries are supported?

    B2500, Venus, Jupiter and others. If the battery can be paired with a CT002/CT003 or Shelly meter, AstraMeter can drive it.

    More in the documentation and the troubleshooting FAQ.