Back to Trending
RepositoryPython
ffunes

ffunes/Marstek-Venus-Energy-Manager

Custom integration to monitor and control Marstek Venus E v2, Venus E v3, Venus A, and Venus D systems in Home Assistant.

149stars
22forks
4issues
5views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: marstek-venus

#1 Repository of the week

1
TINIX TRENDING·Topic: solar-battery

#1 Repository of the week

1
TINIX TRENDING·Topic: energy-management

#1 Repository of the week

Marstek Venus Energy Manager for Home Assistant

The Marstek Venus Energy Manager is a comprehensive Home Assistant integration designed to monitor and control Marstek Venus E and C series batteries (v2 and v3) and Venus D and Venus A series batteries via Modbus TCP. It provides advanced energy management features including predictive grid charging, customizable time slots for discharge control, and device load exclusion logic.

[!CAUTION] LIABILITY DISCLAIMER: This software is provided "as is", without warranty of any kind, express or implied. By using this integration, you acknowledge and agree that:

  1. Use is at your own risk. The developer(s) assume NO RESPONSIBILITY or LIABILITY for any damage, loss, or harm resulting from the use of this software.
  2. This includes, but is not limited to: damage to your batteries, inverters, home appliances, electrical system, fire, financial loss, or personal injury.
  3. You are solely responsible for ensuring that your hardware is compatible and safely configured.
  4. Interacting with high-voltage battery systems and Modbus registers always carries inherent risks. Incorrect settings or commands could potentially damage hardware.

If you do not agree to these terms, DO NOT install or use this integration.

Dashboard

Support

If you find this integration useful, you can support my work:

Buy Me A Coffee

Documentation

Full documentation (configuration, features, entities, troubleshooting) is available at:

https://ffunes.github.io/Marstek-Venus-Energy-Manager/

Key Features

  • Zero Export/Import PD Controller: Keeps grid exchange near zero using a Proportional-Derivative algorithm.
  • Oscillation Prevention: Deadband and derivative gain prevent rapid charge/discharge cycling.
  • One-Click PD Profiles + Quality Sensor: Pick a tuning profile (Very smooth → Very aggressive) instead of tuning gains by hand; a control-quality sensor reports whether the result is stable, oscillating or sluggish.
  • Multi-Battery Support: Manage up to 6 batteries with intelligent load sharing and SOC-based priority.
  • Predictive Grid Charging: Automatically charges from the grid when solar forecast + battery won't cover tomorrow's consumption. Supports fixed time slots, dynamic pricing, and real-time pricing modes. An optional grid-charge margin (%) tops up the grid amount to hedge optimistic solar forecasts.
  • Time Slots (v2): Per-battery windows with independent charge/discharge ticks, optional SOC and power overrides, and a manual mode that forces a fixed charge or discharge power. Up to 8 slots per integration.
  • Weekly Full Charge: Forces 100% SOC once a week for LFP cell balancing.
  • Solar-Aware Charge Delay: Holds back grid charging while solar can still cover the required energy.
  • Peak Shaving: Reserves battery capacity to cover demand spikes above a configurable power threshold, keeping energy in reserve rather than covering all consumption.
  • Load Exclusion: Mask high-power devices (e.g. EV chargers) so the battery doesn't try to cover them.

Requirements

RequirementDetails
BatteryMarstek Venus E v2/v3, Venus A or Venus D
Modbus bridgeElfin-EW11 or compatible RS485-to-TCP converter — Venus E v2 only. Venus E v3, Venus A and Venus D connect via Ethernet with native Modbus TCP support.
Grid sensorHA sensor measuring total grid consumption (e.g. Shelly EM3, Neurio, smart meter)
NetworkBattery reachable by IP from Home Assistant
Home AssistantRecent version (tested on 2024.x+)
Solar forecast (optional)Sensor providing tomorrow's production in kWh (Solcast, Forecast.Solar, …)

Installation

HACS (Recommended)

Open your Home Assistant instance and add a custom repository in HACS.

Search for "Marstek Venus Energy Manager", install, and restart Home Assistant.

Manual

Download the release zip, extract the marstek_venus_energy_manager folder, copy it to your Home Assistant custom_components directory, and restart.

Testbed Configuration

  • Batteries: 2× Marstek Venus E v2 and 2× v3.
  • Connectivity: Elfin-EW11 Modbus to WiFi converter.
  • Metering: Shelly Pro 3EM Energy Meter.

Acknowledgements

Special thanks to ViperRNMC/marstek_venus_modbus for the Modbus register documentation that made this integration possible.

Similar Projects

Discover other similar projects and AI models.

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
Zara-Toorox/Solar-Forecast-ML

SFML is the first fully local AI solar forecast for Home Assistant, powered by a local Attention Transformer. No external AI — such as ChatGPT, Gemini, or Grok — required. Runs entirely on your device for complete privacy.

318
Nov 27, 2026
RepositoryPython
XiaoMi/ha_xiaomi_home

Xiaomi Home Integration for Home Assistant

22.4k
Sep 28, 2026
RepositoryPython
homeassistant-ai/ha-mcp

Configure and automate Home Assistant with Claude, ChatGPT, and other AI assistants.

8.2k
Nov 29, 2026
RepositoryPython
hacs/integration

HACS gives you a powerful UI to handle downloads of all your custom needs.

7.9k
Nov 30, 2026
RepositoryPython
home-assistant/operating-system

:beginner: Home Assistant Operating System

7.7k
Dec 1, 2026
RepositoryPython
al-one/hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成

6.3k
Nov 18, 2026
RepositoryPython
AlexxIT/SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant

3.4k
Nov 17, 2026
RepositoryPython
AlexxIT/XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN

2.8k
Oct 15, 2026