RepositoryPythonDEGermany
tomquist

tomquist/AstraMeter

This project emulates Smart Meter devices for Marstek storages such as the B2500, Marstek Jupiter and Marstek Venus energy storage system while allowing integration with almost any smart meters.

400stars
71forks
18issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: juputer

#1 Repository of the week

1
TINIX TRENDING·Topic: venus

#1 Repository of the week

1
TINIX TRENDING·Topic: ct003

#1 Repository of the week

AstraMeter

Formerly known as b2500-meter. The project was renamed to reflect support for the full range of Marstek storage systems (B2500, Jupiter, Venus, …), not just the B2500.

AstraMeter emulates Smart Meter devices for Marstek storage systems such as the B2500, Jupiter, and Venus, while letting you feed it from almost any real smart meter. Your storage system sees a meter it understands; AstraMeter reads your actual grid power from a source of your choosing and steers the batteries toward net-zero grid exchange.

It does this by emulating one or more of these devices:

  • CT002 / CT003 (Marstek's native CT protocol) — use for multiple storage devices; it coordinates a shared target across the fleet.
  • Shelly Pro 3EM — uses port 1010 (B2500 firmware up to v224) and port 2220 (B2500 firmware v226+); target a specific port with shellypro3em_old (1010) or shellypro3em_new (2220).
  • Shelly EM gen3
  • Shelly Pro EM50

Which device type? Use CT002/CT003 when you steer multiple storage devices; use a Shelly type (shellypro3em, shellyemg3, shellyproem50, …) otherwise. See CT002 / CT003 steering and the Configuration reference.

⚡ Quick start with the config generator

The easiest way to get going is the config generator: a beginner-friendly tool that asks a few questions about your power meter and produces a ready-to-use config.ini (Home Assistant add-on / Docker / direct install) or ESPHome YAML, explaining each option as you go. It runs entirely in your browser — nothing is uploaded — and you can save, share, and reload your answers.

Installation

AstraMeter can be installed and run in several ways:

MethodBest forGuide
Home Assistant add-onHome Assistant users (easiest)docs/installation/home-assistant.md
DockerStandalone server deploymentdocs/installation/docker.md
Direct (Python)Development or custom setupsdocs/installation/direct.md
ESPHome on an ESP32A dedicated board, no serverdocs/installation/esphome.md

When AstraMeter is running, switch your Marstek battery to "Self-Adaptation" mode to enable the powermeter functionality.

Supported power meter sources

AstraMeter reads your real grid power from a wide range of sources. The full per-source config.ini reference lives in docs/powermeters.md; for the ESPHome external component, see docs/esphome-powermeters.md.

Supported sources include: Shelly, Tasmota, Shrdzm, Emlog, ioBroker, Home Assistant, VZLogger, ESPHome, AMIS Reader, Modbus (TCP/UDP), MQTT, JSON HTTP, TQ Energy Manager, HomeWizard, Enphase Envoy, SMA Energy Meter, FRITZ!Smart Energy 250, Fronius Smart Meter, Tibber Pulse, Script, and SML.

Configuration

Configuration is managed via a config.ini file (or ESPHome YAML on an ESP32). Start with the config generator, then consult the reference docs as needed:

Testing without hardware

The bundled simulator (astra-sim) simulates N batteries speaking the CT002 UDP protocol and serves a powermeter endpoint, so you can exercise the full emulator and balancer end-to-end without any real devices.

Help & reference

License

This project is licensed under the General Public License v3.0 — see the LICENSE file for details.

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
tomquist/hame-relay

Bridge MQTT messages between Marstek storage systems (Saturn/B2500, Venus, Jupiter) and local home automation, enabling simultaneous use of the official mobile app and local automation control.

122
Nov 27, 2026
RepositoryPython
ViperRNMC/marstek_venus_modbus

Marstek Venus battery Modbus TCP integration for Home Assistant

223
Nov 29, 2026
RepositoryC#
lukassoo/ShellyExporters

All Shelly Exporters for Prometheus

52
Nov 29, 2026
RepositoryPython
ffunes/Omnibattery

Custom integration to monitor and control Marstek Venus, Zendure, Anker Solix, Sessy, Hoymiles batteries in Home Assistant.

265
Nov 27, 2026
RepositoryPython
jaapp/ha-marstek-local-api

Home Assistant integration for Marstek energy storage systems using local API

211
Nov 7, 2025
RepositoryPython
bieniu/ha-shellies-discovery-gen2

Script that adds MQTT discovery support for Shellies Gen2+ devices

189
Nov 24, 2026
RepositoryPython
fabian-lauer/dbus-shelly-3em-smartmeter

Integrate Shelly 3EM smart meter into Victron Energies Venus OS

173
Jun 1, 2024
RepositoryPython
reserve85/HoymilesZeroExport

Zero Export Script for Hoymiles Inverters using AhoyDTU / OpenDTU and Tasmota Smart Meter inferface / Shelly 3EM / SHRDZM / Emlog / ioBroker

171
Nov 16, 2026
RepositoryPython
henne49/dbus-opendtu

Integrate opendtu and ahoy into Victron Energies Venus OS as a pv inverter

157
Oct 30, 2026