I noticed that these are missing while looking at dissassembly of the
Pytes implementation of the protocol. I also found Pylontech sample
CAN messages] which match the Pytes implementation [1]:
```
CAN ID – followed by 2 to 8 bytes of data:
0x351 – 14 02 74 0E 74 0E CC 01 – Battery voltage + current limits
^^^^^ discharge cutoff voltage 46.0V
0x355 – 1A 00 64 00 – State of Health (SOH) / State of Charge (SOC)
0x356 – 4e 13 02 03 04 05 – Voltage / Current / Temp
0x359 – 00 00 00 00 0A 50 4E – Protection & Alarm flags
^^^^^ always 0x50 0x59 in Pytes implementation
^^ module count (matches the blog article image)
0x35C – C0 00 – Battery charge request flags
^^ two possible additional flags (bit 3 and bit 4)
0x35E – 50 59 4C 4F 4E 20 20 20 – Manufacturer name (“PYLON “)
^^^^^^^^^^^^^^ Note: Pytes sends a 5-byte message "PYTES" instead
padding with spaces
```
The extra charge request flag is "bit4: SOC low" (Seems to be SoC < 10%
threshold for Pytes), I haven't bothered adding that as it provides
little value.
[1] https://www.setfirelabs.com/green-energy/pylontech-can-reading-can-replication
|
||
|---|---|---|
| .github | ||
| .vscode | ||
| docs | ||
| include | ||
| lib | ||
| pio-scripts | ||
| src | ||
| test | ||
| webapp | ||
| .DS_Store | ||
| .editorconfig | ||
| .gitignore | ||
| COPYING | ||
| LICENSE | ||
| partitions_custom_4mb.csv | ||
| partitions_custom_8mb.csv | ||
| partitions_custom_16mb.csv | ||
| platformio_override.ini | ||
| platformio.ini | ||
| README_onBattery.md | ||
| README.md | ||
OpenDTU-OnBattery
This is a fork of OpenDTU.
What is OpenDTU-OnBattery
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 implement a zero export policy.
Documentation
The canonical documentation of OpenDTU-OnBattery is hosted at https://opendtu-onbattery.net.
You may find additional helpful information in the project's community-maintained Github Wiki.
To find out what's new or improved have a look at the changelog of the releases.
State of the project
OpenDTU-OnBattery is actively maintained. Please note that OpenDTU-OnBattery may change significantly during its development. Bug reports, comments, feature requests and pull requests are welcome!
History of the project
The original OpenDTU project was started from a discussion on Mikrocontroller.net. It was the goal to replace the original Hoymiles DTU (Telemetry Gateway) to avoid using Hoymile's cloud. With a lot of reverse engineering the Hoymiles protocol was decrypted and analyzed.
In the summer of 2022 @helgeerbe bought a Victron MPPT charge cntroller, and didn't like the idea to set up a separate ESP32 to receive the charger's data. He decided to fork OpenDTU and extend it with battery charger support and a Dynamic Power Limiter.
Acknowledgment
A special Thank to Thomas Basler (tbnobody) the author of the original OpenDTU project. You are doing a great job!
@helgeerbe: 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.