Omnibattery

Custom integration to monitor and control Marstek Venus and Zendure batteries in Home Assistant.

Internet of Things (IoT)PythonGPL-3.0

Abstract

Omnibattery is an open-source Internet of Things (IoT) project. Custom integration to monitor and control Marstek Venus and Zendure batteries in Home Assistant. It is built using Python. Key capabilities include: Mix and match different battery brands: Marstek, Zendure, Anker Solix, Huawei, Sessy, Hoymiles MQTT and more to come!; Zero Export/Import PD Controller: Keeps grid exchange near zero using a Proportional-Derivative algorithm; Integrated dashboard: All the controls and adjustments from a single place. Graphs and power flow diagram included!. The complete source code is publicly available on GitHub under the GNU General Public License v3.0, making it a useful reference for students building an Internet of Things (IoT) mini project or final-year project.

1. Introduction

Custom integration to monitor and control Marstek Venus and Zendure batteries in Home Assistant.

2. Objective

Custom integration to monitor and control Marstek Venus and Zendure batteries in Home Assistant.

This project demonstrates how Python can be applied to a real-world Internet of Things (IoT) problem.

3. Key Features / Modules

  • Mix and match different battery brands: Marstek, Zendure, Anker Solix, Huawei, Sessy, Hoymiles MQTT and more to come!
  • Zero Export/Import PD Controller: Keeps grid exchange near zero using a Proportional-Derivative algorithm.
  • Integrated dashboard: All the controls and adjustments from a single place. Graphs and power flow diagram included!
  • 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 10 batteries with intelligent load sharing and SOC-based priority.
  • Negative-price opportunistic charging: Optional Dynamic Pricing-only charging fills each battery to its configured maximum SOC during negative import-price slots, even without solar panels or a forecast energy deficit.
  • Time Slots: 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.

4. Technology Stack

Python

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Python 3.8 or later
  • pip / virtualenv for dependencies
  • VS Code, PyCharm or Jupyter Notebook
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/ffunes/Omnibattery.git
cd Omnibattery

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Add a mobile dashboard using Blynk or Firebase
  • Store readings in a cloud database for history charts
  • Add alerts via SMS / Telegram when thresholds are crossed

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Which microcontroller / board and sensors are used and why?
  2. How does the device send data (Wi-Fi, MQTT, HTTP, Bluetooth)?
  3. Where is the sensor data stored and visualised?
  4. How is power consumption managed?
  5. How would you secure the device and its communication?

9. Source Code & License

This project is developed by ffunes and published on GitHub under the GNU General Public License v3.0. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on an Internet of Things (IoT) project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Internet of Things (IoT) Internship