Home Battery Control is an open-source solution for the community to control home batteries and electric vehicles using Home Assistant and Node-RED. Control your batteries exactly how you want, all in one place without vendor lock-ins.
This project is designed for hobbyists who want full control over their home battery systems. It provides ready-to-use flows and configuration examples, including a PID controller for advanced battery management. Use at your own discretion.
- Node-RED Control Flows: Easy to import and use control flows for battery charge/discharge (node-red/)
- Home Assistant Integration: Example configuration for seamless smart home integration (home assistant/)
- Customizable: Adapt the flows and configuration to your specific battery hardware and automation needs
- Multiple Strategies: Self-consumption (use your own energy), Timed, Dynamic (price-based), Charge, Charge PV (solar-only), Full Stop. Easily add your own. See all strategies.
- Easy Updates: Grab the latest control flow without losing your personal configurations
📃 Release Notes and 📚 Documentation (GitHub Pages)
Video instructions (English text and subs, Dutch spoken)
- Connect your batteries to HA - e.g. use ESPhome or LilyGo to connect batteries to Home Assistant (see Modbus setup guide)
- Install Node-RED - Install in Home Assistant
- Clone this repository -
git clone https://github.com/gitcodebob/marstek-venus-rs485-node-red.git - Configure Home Assistant - Import YAML files from
home assistant/folder - Import Node-RED flows - Import control flows from
node-red/folder - Set up strategies - Choose and configure your preferred control strategy
📖 Complete Getting Started Guide
Disclaimer: You are responsible for configuring and operating your system safely. Monitor carefully. Be prepared to switch off battery control or disengage physically.
- The P1 value is expected in Watt (W). If your meter supplies kW, multiply the P1 input × 1000
- Test your first setup in 800W mode
- Set appropriate Max. Charge and Max. Discharge values for each battery via the dashboard
- Always consult a professional electrician when going above 800W
📚 View Full Documentation (GitHub Pages)
- Installation Guide - Complete step-by-step installation
- Modbus Setup - Connect batteries to Home Assistant via Modbus
- All Strategies Overview - When to use each strategy and how they work
- Self-Consumption Setup - PID controller configuration and tuning
- Dynamic Strategy Setup - Automated price-based control
- Advanced Features - EV trigger, multi-battery, 3-phase, performance optimizations
- Troubleshooting - Common issues and solutions
Check the release notes to see which files have changed. In most cases your Battery Start flow stays unchanged (contains your custom settings). Copy the other files and import Node-RED flows as per installation guide.
The Node-RED + HA control schema is based on the approach by Ruald Ordelman. And the easy to use Modbus to HA boards by Fonske. Many thanks for sharing your work and ideas with the community!
For major changes, please open an issue first to discuss what you would like to change.
For questions or suggestions, open an issue on GitHub or join our Marstek RS485/Node-Red besturing Discord.
Keywords: Open Home Battery Control, Marstek Venus Home Assistant, Marstek Venus aansturen met Homeassistant, Thuisaccu besturen met Home Assistant, thuis batterij aansturen met Home Assistant, Marstek en Home Assistant, battery management, zonnepanelen energiebeheer, solar energy storage, dynamic pricing optimization, dynamisch energie tarief en Home Assistant, open source energy management, Marstek control, ESPHome battery, electric vehicle charging integration, modbus rs485
