-
Notifications
You must be signed in to change notification settings - Fork 67
Home
This is a fork of the Hoymiles project OpenDTU.
OpenDTU-OnBattery is an extension of the original OpenDTU to support battery chargers, battery management systems (BMS) and power meters on a single ESP32. With the help of a dynamic power limiter, the power production can be adjusted to the actual consumption. In this way, it is possible to come as close as possible to the goal of zero feed-in.
Note: OpenDTU-OnBattery can control inverters with NRF24L01+ or CMT2300A communication modules; It is not compatible with inverters using WiFi. Hoymiles has stopped active selling of the HMT-xxxx (NRF24L01+) series and currently offers HMS-xxx-xT (CMT2300A) and HMS-xxxW-xT (WiFi=Not OpenDTU-OnBattery capable) inverter series (stand 07.06.2024)
The original OpenDTU project was started from this discussion (Mikrocontroller.net). It was the goal to replace the original Hoymiles DTU (Telemetry Gateway) with their cloud access. With a lot of reverse engineering the Hoymiles protocol was decrypted and analyzed.
Summer 2022 I bought my Victron MPPT battery charger, and didn't like the idea to set up a separate ESP32 to receive the charger data. I decided to fork OpenDTU and extend it with battery charger support and a dynamic power limiter to my own needs. Hoping someone can make use of it.
This project is still under development and adds following features:
- Support Victron's VE.Direct protocol on the same chip (cable based serial interface!). Additional information about VE.Direct can be downloaded directly from Victron's website
- Dynamically sets the Hoymiles power limited according to the currently used energy in the household. Needs an HTTP JSON based power meter (e.g. Tasmota), an MQTT based power meter like Shelly 3EM or an SDM power meter or an SMA Home Manager 2.0
- Voltage correction that takes the voltage drop because of the current output load into account (not 100% reliable calculation)
- Can read the current solar panel power from the Victron MPPT and adjust the limiter accordingly to not save energy in the battery (for increased system efficiency). Increases the battery lifespan and reduces energy loses
- Settings can be configured in the UI
- Battery support: Read the voltage from Victron MPPT charge controller or from the Hoymiles DC inputs and starts/stops the power producing based on configurable voltage thresholds (Battery voltage is indicator of the State of Charge (SOC%) percent.)
- Battery support: Read the SOC% for starting/stopping the power output and provide the battery data:
- via CAN bus (SN65HVD230 interface) for Pylontech/Pylontech compatible batteries
- via Victron SmartShunt (using Ve.Direct protocol).
- via Jikong (JK) BMS (using serial connection)
- via MQTT (Broker)
- Huawei R4850G2 power supply unit that can act as AC charger. Supports status shown on the web interface and options to set voltage and current limits on the web interface and via MQTT. Connection is done using CAN bus (needs to be separate from Pylontech CAN bus) via MCP2515/TJA1050 interface.
Note: Huawei R4850G2 control is not currently possible with inverters with CMT2300A communication module
- Since Firmware Version 2024.06.03 it can handle connections from up to three Victron MPPTs simultaneously
Zero feed-in (in German: Nulleinspeisung)
With Battery and DC charging via (up to two/three) Victron MPPT
Note: Due to the limitation of most ESP32 boards, you can only use two out of three Victron units, i.e. two Victron MPPTs or one Victron MPPT and a Victron SmartShunt. You can not use two Victron MPPTs and a Victron SmartShunt at the same time. Using a second MPPT will also conflict with the SDM powermeter.
On ESP32-S3-USB boards you can use up to three Victron MPPTs. If three MPPTs are defined in the pin mapping, you will not be able to use the SmartShunt and JK BMS battery interfaces.
With Battery and DC charging via (up to two) Victron MPPT and (optional) Victron SmartShunt (see conditions mentioned above)
With Pylontech Battery and DC charging via (up to two) Victron MPPT
With Battery and AC charging via Huawei Rectifier
*using the Huawei AC charger in combination with the CMT2300A radio board for for HMT- and HMS-inverters is not supported at the moment; You can not use a for HMT- or HMS-inverter to control the "zero feed-in" (Nulleinspeisung). You can however use a HMT- or HMS -Inverter for the solar power generation (which you will need to monitor using a separate OpenDTU)
Full documentation of OpenDTU-OnBattery extensions can be found on the sub pages of this wiki —
see the pages overview sidebar, on the upper right in desktop view and near the bottom in mobile view.
In particular, the dynamic power limiter and its settings are documented here.
For documentation of OpenDTU core functionality I refer to the original repo and its documentation.
Please note that OpenDTU-OnBattery may change significantly during its development. Bug reports, comments, feature requests and fixes are most welcome!
To find out what's new or improved have a look at the changelog.
A documentation how to install the software on an ESP32 can be found in the Code documentation.
A special Thank to Thomas Basler (tbnobody) the author of the original OpenDTU project. You are doing a great job!
Last but not least, I would like to thank all the contributors. With your ideas and enhancements, you have made OpenDTU-OnBattery much more than I originally had in mind.
- Home
- FAQ
- First-Time Installation
- Device Profiles (Pin Config)
- Upgrade from OpenDTU
- Getting Help
- Hilfe erhalten
- Builds & Examples
- ESP32 Versions and Memory
- Victron MPPT solar charger
- VE.Direct
- Victron Smartshunt
- Victron Smart Battery Sense
- Warning on Victron MPPT 100/20
- Pylontech battery
- Pytes battery
- Huawei AC PSU
- SBS Unipower Battery
- Jikong JK BMS
- HOYMILES
- Einschaltstrombegrenzung für Balkonkraftwerke - Inrush current limiter
- Live View
- Farbe des Wechselrichterfensters
- Power Meter
- Dynamic Power Limiter
- Dynamic Power Limiter ‐ (Full) Solar‐Passthrough
- Dynamic Power Limiter Limitations
- DC Voltage ‐ Load correction factor
- Battery
- Battery-Tipps
- 24V Battery issues with Hoymiles
- Home Assistant
- Grafana Dashboard
- XXL Balkonkraftwerk 1500 Watt und mehr! Worauf Ihr achten solltet!
- Wie gefährlich kann ein Balkonkraftwerk werden (FI‐Schutzschalter)
- Hardware Purchase Tipp
- Fan speed controller ‐ add temperature sensing to any fan
- Cable length(s) between battery and inverter
- Kabellänge(n) zwischen Batterie und Wechselrichter
- Diodes ‐ Bypass vs. Blocking Diodes
- Impact of high start-currents to the inverter
- Making Cables for your HOYMILES‐CAUTION