this updates the partition scheme for devices with 4 MB of flash memory to have only a single app partition, doubling its size, but sacrificing their OTA update capability. the replacement environment for "generic_esop32" is called "generic_esp32_4mb_no_ota". the new default partition scheme is targeted for devices with at least 8 MB of flash memory. the previous two app partitions are merged into one, and one additional app partition of the same new size is added to the back of the table. the change preserves the littlefs partition (position and size), allowing for upgrades without loosing the configuration. another new environment is added, called "generic_esp32_8mb", which uses the new default partition layout. environment "generic" is removed. it was merely a variant of "generic_esp32" with some pins pre-defined. we want users to install a pin_mapping.json and use the generic firmwares. environments for boards that have no version with at least 8 MB of flash memory are setup using the 4 MB partition layout (no OTA updates). all users must flash the factory.bin for their respective environment using esptool (or compatible software) using the USB port of their board. in other words: updating to the new partition scheme using an OTA update is NOT possible. hint: the ESP32-S3 builds have a smaller code footprint. this means ESP32-S3 boards can be updated using OTA without updating the partition layout on the devices for some unspecified time longer, i.e., until their firmware binary actually becomes too large for the old sketch partition size. the non-factory binary for generic_esp32_4mb_no_ota is NOT collected as an artifact. going forward, users must update using the factory binary and using the USB connection to their boards. |
||
|---|---|---|
| .github | ||
| .vscode | ||
| docs | ||
| include | ||
| lib | ||
| pio-scripts | ||
| src | ||
| test | ||
| webapp | ||
| webapp_dist | ||
| .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 from the Hoymiles project 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 come as close as possible to the goal of zero feed-in.
History of the project
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 recieve the charger data. I decided to fork OpenDTU and extend it with battery charger support and a dynamic power limitter to my own needs. Hoping someone can make use of it.
Highlights of OpenDTU-OnBattery
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.
- 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
- 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
- Pylontech Battery support (via CAN bus interface). Use the SOC for starting/stopping the power output and provide the battery data via MQTT (autodiscovery for home assistant is currently not supported). Pin Mapping is supported (default RX PIN 27, TX PIN 26). Actual no live view support for Pylontech Battery.
- 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 SN65HVD230 interface.
Documentation
Documentation of OpenDTU-OnBattery extensions can be found in the project's wiki.
For documentation of OpenDTU core functionality 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.
Acknowledgment
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.