diff --git a/README.md b/README.md index 5392e74d2..d354549bf 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ - [OpenDTU-OnBattery](#opendtu-onbattery) - [What is OpenDTU-OnBattery](#what-is-opendtu-onbattery) - - [History of the project](#history-of-the-project) - - [Highlights of OpenDTU-OnBattery](#highlights-of-opendtu-onbattery) - [Documentation](#documentation) + - [State of the project](#state-of-the-project) + - [History of the project](#history-of-the-project) - [Acknowledgment](#acknowledgment) # OpenDTU-OnBattery -This is a fork from the Hoymiles project [OpenDTU](https://github.com/tbnobody/OpenDTU). +This is a fork of [OpenDTU](https://github.com/tbnobody/OpenDTU). ![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/helgeerbe/68b47cc8c8994d04ab3a4fa9d8aee5e6/raw/openDTUcoreRelease.json) @@ -17,40 +17,47 @@ This is a fork from the Hoymiles project [OpenDTU](https://github.com/tbnobody/O ## 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 +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. -The original OpenDTU project was started from [this](https://www.mikrocontroller.net/topic/525778) 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. +## Documentation -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. +The canonical documentation of OpenDTU-OnBattery is hosted at +[https://opendtu-onbattery.net](https://opendtu-onbattery.net). -## Highlights of OpenDTU-OnBattery +You may find additional helpful information in the project's +community-maintained [Github +Wiki](https://github.com/helgeerbe/OpenDTU-OnBattery/wiki). -This project is still under development and adds following features: +To find out what's new or improved have a look at the changelog of the +[releases](https://github.com/helgeerbe/OpenDTU-OnBattery/releases). -* 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](https://www.victronenergy.com/support-and-downloads/technical-information). -* 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 +## State of the project -Documentation of OpenDTU-OnBattery extensions can be found in [the project's wiki](https://github.com/helgeerbe/OpenDTU-OnBattery/wiki). +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! -For documentation of OpenDTU core functionality refer to the original [repo](https://github.com/tbnobody/OpenDTU) and its [documentation](https://opendtu.solar). +## History of the project -Please note that OpenDTU-OnBattery may change significantly during its development. -Bug reports, comments, feature requests and fixes are most welcome! +The original OpenDTU project was started from [a discussion on +Mikrocontroller.net](https://www.mikrocontroller.net/topic/525778). 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. -To find out what's new or improved have a look at the [changelog](https://github.com/helgeerbe/OpenDTU-OnBattery/releases). +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](https://github.com/tbnobody/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. +@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. diff --git a/README_onBattery.md b/README_onBattery.md index e1489af6f..16cef89e0 100644 --- a/README_onBattery.md +++ b/README_onBattery.md @@ -1,186 +1,3 @@ -# OpenDTU-OnBattery +# Moved -This is a fork from the Hoymiles project [OpenDTU](https://github.com/tbnobody/OpenDTU). This project is still under development but is being used on a day to day basis as well. - -![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/helgeerbe/68b47cc8c8994d04ab3a4fa9d8aee5e6/raw/openDTUcoreRelease.json) - -> **Warning** -> -> In contrast to the original openDTU, with release 2023.05.23.post1 openDTU-OnBattery supports only 5 inverters. Otherwise, there is not enough memory for the liveData view. - -## Features - -* Hoymiles inverter support for live data and display of various inverter internal information. (Partial) support for multiple inverters. -* MQTT support (with TLS) with partial Home Assistant MQTT Auto Discovery -* Automatic inverter power control of a selected Hoymiles inverter to compensate the currently used energy in the household. -* Energy meter support with interface options to HTTP JSON based power meters (e.g. Tasmota), MQTT based power meters (e.g. Shelly 3EM) or SDM power meters. -* Support for Victron MPPT charge controller using Ve.Direct. cf. Ve.direct: https://www.victronenergy.com/support-and-downloads/technical-information. -* Generic voltage based battery support using Victron MPPT charge controller or Hoymiles inverter voltage values to start / stop inverter power output. (with load compensation) -* Pylontech battery support via CAN bus interface. State of Charge reported by BMS is used to start / stop inverter power output. Battery data is exported via MQTT (no support for home assistant auto discovery). -* Support for Huawei R4850G2 power supply unit that can act as AC charging source. [Overview](https://www.beyondlogic.org/review-huawei-r4850g2-power-supply-53-5vdc-3kw/) -* Other features from [OpenDTU](https://github.com/tbnobody/OpenDTU) maintained - -## Hardware - -To get started with this project you will need to assemble a few hardware components that allow interfacing with the desired devices. What is needed depends on the use-case but may consist of: - -* ESP32 board that contains the CPU and WIFI connectivity -* NRF24L01+ or CMT2300A radio board to interface with the inverter. Please check the list of the supported inverters below for the board needed. -* 3.3V / 5V logic level shifter to interface with the Victron MPPT charge controller -* SN65HVD230 CAN bus transceiver to interface with a Pylontech battery -* MCP2515 SPI / CAN bus transceiver to interface with the Huawei AC PSU -* Relais board + 3.3V / 5 V logic level shifter to switch the slot detect on the Huawei AC PSU -* Display [Display](docs/Display.md) - -More detailed information on the hardware can be found in the [Hardware and flashing](docs/hardware_flash.md) document. - -### Currently supported Inverters - -| Model | Required RF Module | DC Inputs | MPP-Tracker | AC Phases | -| --------------------| ------------------ | --------- | ----------- | --------- | -| Hoymiles HM-300 | NRF24L01+ | 1 | 1 | 1 | -| Hoymiles HM-350 | NRF24L01+ | 1 | 1 | 1 | -| Hoymiles HM-400 | NRF24L01+ | 1 | 1 | 1 | -| Hoymiles HM-600 | NRF24L01+ | 2 | 2 | 1 | -| Hoymiles HM-700 | NRF24L01+ | 2 | 2 | 1 | -| Hoymiles HM-800 | NRF24L01+ | 2 | 2 | 1 | -| Hoymiles HM-1000 | NRF24L01+ | 4 | 2 | 1 | -| Hoymiles HM-1200 | NRF24L01+ | 4 | 2 | 1 | -| Hoymiles HM-1500 | NRF24L01+ | 4 | 2 | 1 | -| Hoymiles HMS-300 | CMT2300A | 1 | 1 | 1 | -| Hoymiles HMS-350 | CMT2300A | 1 | 1 | 1 | -| Hoymiles HMS-400 | CMT2300A | 1 | 1 | 1 | -| Hoymiles HMS-450 | CMT2300A | 1 | 1 | 1 | -| Hoymiles HMS-500 | CMT2300A | 1 | 1 | 1 | -| Hoymiles HMS-600 | CMT2300A | 2 | 2 | 1 | -| Hoymiles HMS-700 | CMT2300A | 2 | 2 | 1 | -| Hoymiles HMS-800 | CMT2300A | 2 | 2 | 1 | -| Hoymiles HMS-900 | CMT2300A | 2 | 2 | 1 | -| Hoymiles HMS-1000 | CMT2300A | 2 | 2 | 1 | -| Hoymiles HMS-1600 | CMT2300A | 4 | 4 | 1 | -| Hoymiles HMS-1800 | CMT2300A | 4 | 4 | 1 | -| Hoymiles HMS-2000 | CMT2300A | 4 | 4 | 1 | -| Hoymiles HMT-1800 | CMT2300A | 6 | 3 | 3 | -| Hoymiles HMT-2250 | CMT2300A | 6 | 3 | 3 | -| Solenso SOL-H350 | NRF24L01+ | 1 | 1 | 1 | -| Solenso SOL-H400 | NRF24L01+ | 1 | 1 | 1 | -| Solenso SOL-H800 | NRF24L01+ | 2 | 2 | 1 | -| TSUN TSOL-M350 | NRF24L01+ | 1 | 1 | 1 | -| TSUN TSOL-M800 | NRF24L01+ | 2 | 2 | 1 | -| TSUN TSOL-M1600 | NRF24L01+ | 4 | 2 | 1 | - -**TSUN compatibility remark:** -Compatibility with OpenDTU is most likely related to the serial number of the inverter. Current findings indicate that TSUN inverters with a serial number starting with "11" are supported, whereby inverters with a serial number starting with "10" are not. - - -## Screenshots - -Several screenshots of the frontend can be found here: [Screenshots](docs/screenshots/README.md) - -## Configuration and usage - -### First configuration - -* After the [initial flashing](docs/hardware_flash.md#flashing-and-starting-up) of the microcontroller, an Access Point called "OpenDTU-*" is opened. The default password is "openDTU42". -* Use a web browser to open the address [http://192.168.4.1](http://192.168.4.1) -* Navigate to Settings --> Network Settings and enter your WiFi credentials. The username to access the config menu is "admin" and the password the same as for accessing the Access Point (default: "openDTU42"). -* OpenDTU then simultaneously connects to your WiFi AP with these credentials. Navigate to Info --> Network and look into section "Network Interface (Station)" for the IP address received via DHCP. -* If your WiFi AP uses an allow-list for MAC-addresses, please be aware that the ESP32 has two different MAC addresses for its AP and client modes, they are also listed at Info --> Network. -* When OpenDTU is connected to a configured WiFI AP, the "OpenDTU-*" Access Point is closed after 3 minutes. -* OpenDTU needs access to a working NTP server to get the current date & time. Both are sent to the inverter with each request. Default NTP server is pool.ntp.org. If your network has different requirements please change accordingly (Settings --> NTP Settings). -* Activate Ve.direct, Battery and the AC Charger according to the available hardware -* Configure a Power Meter to provide a data source for the current consumption -* Configure the Dynamic Power Limiter according to the used battery. Documentation about the power limiter interface and states can be found below. -* If desired connect to a home automation system using MQTT or the Webapi. - * A documentation of all available MQTT Topics can be found here: [MQTT Documentation](docs/MQTT_Topics.md) - * A documentation of the Web API can be found here: [Web-API Documentation](docs/Web-API.md) - * Home Assistant auto discovery is supported. [Example image](https://user-images.githubusercontent.com/59169507/217558862-a83846c5-6070-43cd-9a0b-90a8b2e2e8c6.png) - -### Huawei PSU - -The Huawei PSU can be used to charge a battery. This can be be useful if an external (AC) connected solar system shall be utilized or if variable energy prices should be exploited. - -Some points for consideration are: -* Make sure to consider the PSU voltage range when selecting the battery voltage as lower voltages <42V are not supported. -* The PSU runs a noisy fan and it is therefore desireable to switch it off when not being used. Some users have found that switching the slot detect pins with a relay accomplishes this. A GPIO pin is made available from the ESP to turn the PSU on/off - -#### Operation modes - -openDTU-OnBattery supports three operation modes for the Huawei PSU: -1. Fully manual - In this mode the PSU needs to be turned on/off externally using MQTT and voltage and current limits need to be provided. See [MQTT Documentation](docs/MQTT_Topics.md) for details on these commands -2. Manual with auto power on / off - In this mode the PSU is turned on when a current limit > 1A is set. If the current limit is < 1A for some time the PSU is turned off. Current and voltage limits need to be provided externally using MQTT. See [MQTT Documentation](docs/MQTT_Topics.md) for details on these commands. -3. Automatic - In this mode the PSU power is controlled by the Power Meter and information provided in the web-interface. If excess power is present the PSU is turned on. The voltage limit is set as per web-interface and the current limit is set so that the maximum PSU output power equals the Power Meter value. Minium and maximum PSU power levels as configured in the web-interface are respected in this process. The PSU is turned off if the output current is limited and the output power drops below the minium power level. This will disable automatic mode until the battery is discharged below the start voltage level (set in the web-interface). This mode can be enabled using the web-interface and MQTT. See [MQTT Documentation](docs/MQTT_Topics.md) - -## Troubleshooting - -* First: When there is no light on the solar panels, the inverter completely turns off and does not answer to OpenDTU! So if you assembled your OpenDTU in the evening, wait until tomorrow. -* When there is no data received from the inverter(s) - try to reduce the distance between the openDTU and the inverter (e.g. move it to the window towards the roof) -* Under Settings -> DTU Settings you can increase the transmit power "PA level". Default is "minimum". -* The NRF24L01+ needs relatively much current. With bad power supply (and especially bad cables!) a 10 µF capacitor soldered directly to the NRF24L01+ board connector brings more stability (pin 1+2 are the power supply). Note the polarity of the capacitor… -* You can try to use an USB power supply with 1 A or more instead of connecting the ESP32 to the computer. -* Try a different USB cable. Once again, a stable power source is important. Some USB cables are made of much plastic and very little copper inside. -* Double check that you have a radio module NRF24L01+ with a plus sign at the end. NRF24L01 module without the plus are not compatible with this project. -* There is no possibility of auto-discovering the inverters. Double check you have entered the serial numbers of the inverters correctly. -* OpenDTU needs access to a working NTP server to get the current date & time. -* If your problem persists, check the [Issues on Github](https://github.com/tbnobody/OpenDTU/issues). Please inspect not only the open issues, also the closed issues contain useful information. -* Another source of information are the [Discussions](https://github.com/tbnobody/OpenDTU/discussions/) -* When flashing with VSCode Plattform.IO fails and also with ESPRESSIF tool a demo bin file cannot be flashed to the ESP32 with error message "A fatal error occurred: MD5 of file does not match data in flash!" than un-wire/unconnect ESP32 from the NRF24L01+ board. Try to flash again and rewire afterwards. - -## Background - -This project was started from [this](https://www.mikrocontroller.net/topic/525778) 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. - -## Features for developers - -### Status - -[![OpenDTU-OnBattery Build](https://github.com/helgeerbe/OpenDTU-OnBattery/actions/workflows/build.yml/badge.svg)](https://github.com/helgeerbe/OpenDTU-OnBattery/actions/workflows/build.yml) -[![cpplint](https://github.com/helgeerbe/OpenDTU-OnBattery/actions/workflows/cpplint.yml/badge.svg)](https://github.com/helgeerbe/OpenDTU-OnBattery/actions/workflows/cpplint.yml) -[![Yarn Linting](https://github.com/helgeerbe/OpenDTU-OnBattery/actions/workflows/yarnlint.yml/badge.svg)](https://github.com/helgeerbe/OpenDTU-OnBattery/actions/workflows/yarnlint.yml) - -### Core technologies used - -* The microcontroller part - * Build with Arduino PlatformIO Framework for the ESP32 - * Uses a fork of [ESPAsyncWebserver](https://github.com/yubox-node-org/ESPAsyncWebServer) and [espMqttClient](https://github.com/bertmelis/espMqttClient) - -* The WebApp part - * Build with [Vue.js](https://vuejs.org) - * Source is written in TypeScript - -### Breaking changes - -Generated using: `git log --date=short --pretty=format:"* %h%x09%ad%x09%s" | grep BREAKING` - -```code -* 59f43a8 2023-04-17 BREAKING CHANGE: Web API Endpoint /api/devinfo/status requires GET parameter inv= -* 318136d 2023-03-15 BREAKING CHANGE: Updated partition table: Make sure you have a configuration backup and completly reflash the device! -* 3b7aef6 2023-02-13 BREAKING CHANGE: Web API! -* d4c838a 2023-02-06 BREAKING CHANGE: Prometheus API! -* daf847e 2022-11-14 BREAKING CHANGE: Removed deprecated config parsing method -* 69b675b 2022-11-01 BREAKING CHANGE: Structure WebAPI /api/livedata/status changed -* 27ed4e3 2022-10-31 BREAKING: Change power factor from percent value to value between 0 and 1 -``` - -### Building - -* Building the WebApp - * The WebApp can be build using yarn - - ```bash - cd webapp - yarn install - yarn build - ``` - - * The updated output is placed in the 'webapp_dist' directory - * It is only necessary to build the webapp when you made changes to it -* Building the microcontroller firmware - * Visual Studio Code with the PlatformIO Extension is required for building - -## Related Projects - -* [Ahoy](https://github.com/grindylow/ahoy) -* [DTU Simulator](https://github.com/Ziyatoe/DTUsimMI1x00-Hoymiles) -* [OpenDTU extended to talk to Victrons MPPT battery chargers (Ve.Direct)](https://github.com/helgeerbe/OpenDTU_VeDirect) +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net). diff --git a/docs/DeviceProfiles.md b/docs/DeviceProfiles.md index 8976b821d..47a3f3dad 100644 --- a/docs/DeviceProfiles.md +++ b/docs/DeviceProfiles.md @@ -1,3 +1,3 @@ -# Device Profiles +# Moved -This documentation has been [moved to the wiki](https://github.com/helgeerbe/OpenDTU-OnBattery/wiki/Device-Profiles). \ No newline at end of file +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net/firmware/device_profiles/). \ No newline at end of file diff --git a/docs/Display.md b/docs/Display.md index c914e4a8d..956325450 100644 --- a/docs/Display.md +++ b/docs/Display.md @@ -1,3 +1,3 @@ -# Display integration +# Moved -This documentation will has been moved and can be found here: +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net/hardware/display/). diff --git a/docs/MQTT_Topics.md b/docs/MQTT_Topics.md index e9925f874..a333728e3 100644 --- a/docs/MQTT_Topics.md +++ b/docs/MQTT_Topics.md @@ -1,3 +1,3 @@ -# MQTT Topics +# Moved -This documentation will has been moved and can be found here: +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net/firmware/mqtt_topics/). diff --git a/docs/PowerLimiterInverterStates.drawio b/docs/PowerLimiterInverterStates.drawio deleted file mode 100644 index 43b5faf23..000000000 --- a/docs/PowerLimiterInverterStates.drawio +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/PowerLimiterInverterStates.png b/docs/PowerLimiterInverterStates.png deleted file mode 100644 index 47ab7e904..000000000 Binary files a/docs/PowerLimiterInverterStates.png and /dev/null differ diff --git a/docs/README.md b/docs/README.md index b8f38a2e5..877c476f3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,13 +1,3 @@ -# Documents - Table of content +# Moved -More detailed descriptions for some topics can be found here. - -## [Display Documentation](Display.md) - -## [MQTT Topic Documentation](MQTT_Topics.md) - -## [Web API Documentation](Web-API.md) - -## [Device Profile Documentation](DeviceProfiles.md) - -## [Builds](builds/README.md) \ No newline at end of file +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net). \ No newline at end of file diff --git a/docs/UpgradePartition.md b/docs/UpgradePartition.md index 782463f56..308705a13 100644 --- a/docs/UpgradePartition.md +++ b/docs/UpgradePartition.md @@ -1,3 +1,3 @@ -# Upgrade Partition +# Moved -This documentation will has been moved and can be found here: +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net/firmware/howto/upgrade_8mb/). diff --git a/docs/Web-API.md b/docs/Web-API.md index 703d89dea..bc27f188e 100644 --- a/docs/Web-API.md +++ b/docs/Web-API.md @@ -1,44 +1,3 @@ -# Web API +# Moved -This documentation will has been moved and can be found here: - -## List of URLs - -This list may be incomplete - -| GET/POST | Auth required | URL | -| -------- | --- | -- | -| Get | no | /api/vedirectlivedata/status | -| Get | no | /api/vedirect/status | -| Get | no | /api/huawei/status | -| Get | no | /api/huawei/config | -| Get | no | /api/huawei/limit/config | -| Get | no | /api/batterylivedata/status | -| Get | no | /api/battery/status | -| Get | no | /api/powerlimiter/status | - -### Victron REST-API (/api/vedirectlivedata/status): -````JSON -{ -"data_age":0, -"age_critical":false, -"PID":"SmartSolar MPPT 100|30", -"SER":"XXX", -"FW":"159", -"LOAD":"ON", -"CS":"Bulk", -"ERR":"No error", -"OR":"Not off", -"MPPT":"MPP Tracker active", -"HSDS":{"v":46,"u":"Days"}, -"V":{"v":26.36,"u":"V"}, -"I":{"v":3.4,"u":"A"}, -"VPV":{"v":37.13,"u":"V"}, -"PPV":{"v":93,"u":"W"}, -"H19":{"v":83.16,"u":"kWh"}, -"H20":{"v":1.39,"u":"kWh"}, -"H21":{"v":719,"u":"W"}, -"H22":{"v":1.43,"u":"kWh"}, -"H23":{"v":737,"u":"W"} -} -```` \ No newline at end of file +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net/firmware/web_api/). \ No newline at end of file diff --git a/docs/Wiring_ESP32.fzz b/docs/Wiring_ESP32.fzz deleted file mode 100644 index 54cdeb793..000000000 Binary files a/docs/Wiring_ESP32.fzz and /dev/null differ diff --git a/docs/Wiring_ESP32_Schematic.png b/docs/Wiring_ESP32_Schematic.png deleted file mode 100644 index 3df412a4d..000000000 Binary files a/docs/Wiring_ESP32_Schematic.png and /dev/null differ diff --git a/docs/Wiring_ESP32_Symbol.png b/docs/Wiring_ESP32_Symbol.png deleted file mode 100644 index 8ebe5e280..000000000 Binary files a/docs/Wiring_ESP32_Symbol.png and /dev/null differ diff --git a/docs/builds/202654506-8a4ac4ef-c883-490e-8ee1-1e1f7fa34972.jpg b/docs/builds/202654506-8a4ac4ef-c883-490e-8ee1-1e1f7fa34972.jpg deleted file mode 100644 index b3d7843d6..000000000 Binary files a/docs/builds/202654506-8a4ac4ef-c883-490e-8ee1-1e1f7fa34972.jpg and /dev/null differ diff --git a/docs/builds/README.md b/docs/builds/README.md deleted file mode 100644 index ef3f9c9dd..000000000 --- a/docs/builds/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Builds using different boards - -## ESP32 Dev Board - -### Build by @tbnobody, jan and @marove2000 -* Used build environment: generic -* Case: https://www.printables.com/de/model/441037-opendtu-breakoutboard-case -* Soldering Kit: https://shop.blinkyparts.com/en/OpenDTU-Breakoutboard-Your-evaluation-for-your-balcony-solar-system/blink237542 -* Breakout board: https://github.com/marove2000/openDTU_BreakoutBoard -![](opendtu_breakoutboard.jpg) -![](thumbnail.jpg) - -### Build by @Marc-- -* Used build environment: generic -* Case: https://www.thingiverse.com/thing:5435911 -![](large_display_PXL_20220715_145622277.jpg) - -### Build by @cepresso -* Used build environment: generic -* Case: https://www.printables.com/de/model/293003-sol-opendtu-esp32-nrf24l01-case -![](sol.webp) - -## LILYGO® TTGO T-Internet-POE -### Build by @fromCologne -* Used build environment: LilyGO_T_ETH_POE -* Board info: http://www.lilygo.cn/claprod_view.aspx?TypeId=21&Id=1344&FId=t28:21:28 -* Case: https://www.thingiverse.com/thing:5244895 -![](202654506-8a4ac4ef-c883-490e-8ee1-1e1f7fa34972.jpg) \ No newline at end of file diff --git a/docs/builds/large_display_PXL_20220715_145622277.jpg b/docs/builds/large_display_PXL_20220715_145622277.jpg deleted file mode 100644 index 23c57156f..000000000 Binary files a/docs/builds/large_display_PXL_20220715_145622277.jpg and /dev/null differ diff --git a/docs/builds/opendtu_breakoutboard.jpg b/docs/builds/opendtu_breakoutboard.jpg deleted file mode 100644 index 06758bf6d..000000000 Binary files a/docs/builds/opendtu_breakoutboard.jpg and /dev/null differ diff --git a/docs/builds/sol.webp b/docs/builds/sol.webp deleted file mode 100644 index 0faef31a7..000000000 Binary files a/docs/builds/sol.webp and /dev/null differ diff --git a/docs/builds/thumbnail.jpg b/docs/builds/thumbnail.jpg deleted file mode 100644 index 41cf9b18f..000000000 Binary files a/docs/builds/thumbnail.jpg and /dev/null differ diff --git a/docs/components.drawio.svg b/docs/components.drawio.svg deleted file mode 100644 index d318308d2..000000000 --- a/docs/components.drawio.svg +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- Shelly 3em -
- - Grid import -
- - Grid export -
-
-
-
- - Shelly 3em... - -
-
- - - - -
-
-
- Shelly 1PM plus -
- - AC on/off -
- - AC production (W) -
-
-
-
- - Shelly 1PM plus... - -
-
- - - - -
-
-
- Shelly 1PM plus -
- - AC on/off -
- - AC production (W) -
-
-
-
- - Shelly 1PM plus... - -
-
- - - - -
-
-
- HM-600 -
- - just monitored by OpenDTU -
-
-
-
- - HM-600... - -
-
- - - - -
-
-
- Chinese inverter -
- - fixed power production -
-
-
-
- - Chinese inverter... - -
-
- - - - -
-
-
- Victron Battery Charger -
- - monitoring Load (ve.direct) -
- - on 70% -
- - off 10% -
-
-
-
- - Victron Battery Charger... - -
-
- - - - - - - - - - - - - - - -
- - - - - Viewer does not support full SVG 1.1 - - - -
\ No newline at end of file diff --git a/docs/esp32_flash_download_tool.png b/docs/esp32_flash_download_tool.png deleted file mode 100644 index 7114d4c97..000000000 Binary files a/docs/esp32_flash_download_tool.png and /dev/null differ diff --git a/docs/hardware_flash.md b/docs/hardware_flash.md index 2d1db186f..cc53d4291 100644 --- a/docs/hardware_flash.md +++ b/docs/hardware_flash.md @@ -1,183 +1,3 @@ -# Hardware, building and flashing Firmware +# Moved -## Hardware you need - -For a highly integrated board with most peripherals already included, have a -look at the [OpenDTU Fusion](https://shop.allianceapps.io/products/opendtu-fusion-community-edition) -board. There are also [OpenDTU-OnBattery-specific addons](https://github.com/markusdd/OpenDTUFusionDocs/blob/main/CANIso.md). - -Otherwise, read on to assemble your own components. - -### ESP32 board - -For ease of use, buy a "ESP32 DEVKIT DOIT" or "ESP32 NodeMCU Development Board" -with an ESP32-S3 chipset on it, **with at least 8 MB of flash memory**. -Preferrably, the ESP32 should also have some embedded PSRAM. Look out for -labels like "N8R2", "N16R8", where the number after the N is the amount of -flash in Megabytes, and the number after the R is the amount of PSRAM in -Megabytes. - -Sample Picture: - -![NodeMCU-ESP32](nodemcu-esp32.png) - -Also supported: Board with Ethernet-Connector and Power-over-Ethernet (PoE) -(select version with 8 MB of flash memory or more) -[Olimex ESP32-POE](https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware) - -### NRF24L01+ radio board (See inverter table above for supported inverters) - -The PLUS sign is IMPORTANT! There are different variants available, with antenna on the printed circuit board or external antenna. - -Sample picture: - -![nrf24l01plus](nrf24l01plus.png) - -Buy your hardware from a trusted source, at best from a dealer/online shop in your country where you have support and the right to return non-functional hardware. -When you want to buy from Amazon, AliExpress, eBay etc., take note that there is a lot of low-quality or fake hardware offered. Read customer comments and ratings carefully! - -A heavily incomplete list of trusted hardware shops in Germany is: - -* [AZ-Delivery](https://www.az-delivery.de/) -* [Makershop](https://www.makershop.de/) -* [Berrybase](https://www.berrybase.de/) - -This list is for your convenience only, the project is not related to any of these shops. - -### CMT2300A radio board (See inverter table above for supported inverters) - -It is important to get a module which supports SPI communication. The following modules are currently supported: - -* EBYTE E49-900M20S - -The CMT2300A uses 3-Wire half duplex SPI communication. Due to this fact it currently requires a separate SPI bus. If you want to run the CMT2300A module on the same ESP32 as a NRF24L01+ module or a PCD8544 display make sure you get a ESP which supports 2 SPI busses. Currently the SPI bus host is hardcoded to number 2. This may change in future. - -### 3.3V / 5V logic level converter - -The logic level converter is used to interface with the Victron MPPT charge -controller and the relay board. It converts the 3.3V logic level used by the -ESP32 to 5V logic used by the other devices. A commonly used digital isolator -is the ADUM1201. - -### SN65HVD230 CAN bus transceiver - -The SN65HVD230 CAN bus transceiver is used to interface with the Pylontech battery. It leverages the CAN bus controller of the ESP32. This CAN bus operates at 500kbit/s - -### MCP2515 CAN bus module - -Used to connect to the Huawei PSU (AC charger). See [the Wiki](https://github.com/helgeerbe/OpenDTU-OnBattery/wiki/Huawei-AC-PSU) for details. - -### Relay module - -The Huawei PSU can be switched on / off using the slot detect port. This is done by this relay. - -### Power supply - -Use a power supply with 5 V and 1 A. The USB cable connected to your PC/Notebook may be powerful enough or may be not. - -## Wiring up the NRF24L01+ module - -### Schematic - -![Schematic](Wiring_ESP32_Schematic.png) - -### Symbolic view - -![Symbolic](Wiring_ESP32_Symbol.png) - -### Change pin assignment - -It is possible to change all the pins of the NRF24L01+ module, the Display, the LED etc. -The way to change the pin assignment is by creating a custom [device profile](https://github.com/helgeerbe/OpenDTU-OnBattery/wiki/Device-Profiles). - -## Flashing and starting up - -### with Visual Studio Code - -* Install [Visual Studio Code](https://code.visualstudio.com/download) (from now named "vscode") -* In Visual Studio Code, install the [PlatformIO Extension](https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide) -* Install git and enable git in vscode - [git download](https://git-scm.com/downloads/) - [Instructions](https://www.jcchouinard.com/install-git-in-vscode/) -* Clone this repository (you really have to clone it, don't just download the ZIP file. During the build process the git hash gets embedded into the firmware. If you download the ZIP file a build error will occur): Inside vscode open the command palette by pressing `CTRL` + `SHIFT` + `P`. Enter `git clone`, add the repository-URL `https://github.com/tbnobody/OpenDTU`. Next you have to choose (or create) a target directory. -* In vscode, choose File --> Open Folder and select the previously downloaded source code. (You have to select the folder which contains the "platformio.ini" and "platformio_override.ini" file) -* Adjust the COM port in the file "platformio_override.ini" for your USB-to-serial-converter. It occurs twice: - * upload_port - * monitor_port -* Select the arrow button in the blue bottom status bar (PlatformIO: Upload) to compile and upload the firmware. During the compilation, all required libraries are downloaded automatically. -* Under Linux, if the upload fails with error messages "Could not open /dev/ttyUSB0, the port doesn't exist", you can check via ```ls -la /dev/tty*``` to which group your port belongs to, and then add your user this group via ```sudo adduser dialout``` (if you are using ```arch-linux``` use: ```sudo gpasswd -a uucp```, this method requires a logout/login of the affected user). -* There are two videos showing these steps: - * [Git Clone and compilation](https://youtu.be/9cA_esv3zeA) - * [Full installation and compilation](https://youtu.be/xs6TqHn7QWM) - -### on the commandline with PlatformIO Core - -* Install [PlatformIO Core](https://platformio.org/install/cli) -* Clone this repository (you really have to clone it, don't just download the ZIP file. During the build process the git hash gets embedded into the firmware. If you download the ZIP file a build error will occur) -* Adjust the COM port in the file "platformio_override.ini". It occurs twice: - * upload_port - * monitor_port -* build: `platformio run -e generic` -* upload to esp module: `platformio run -e generic -t upload` -* other options: - * clean the sources: `platformio run -e generic -t clean` - * erase flash: `platformio run -e generic -t erase` - -### using the pre-compiled .bin files - -The pre-compiled files can be found on the [github page](https://github.com/tbnobody/OpenDTU) in the tab "Actions" and the sub menu "OpenDTU Build". Just choose the latest build from the master branch (search for "master" in the blue font text but click on the white header text!). You need to be logged in with your github account to download the files. -Use a ESP32 flash tool of your choice (see next chapter) and flash the `.bin` files to the right addresses: - -| Address | File | -| ---------| ---------------------- | -| 0x1000 | bootloader.bin | -| 0x8000 | partitions.bin | -| 0xe000 | boot_app0.bin | -| 0x10000 | opendtu-*.bin | - -For further updates you can just use the web interface and upload the `opendtu-*.bin` file. - -#### Flash with esptool.py (Linux) - -```bash -esptool.py --port /dev/ttyUSB0 --chip esp32 --before default_reset --after hard_reset \ - write_flash --flash_mode dout --flash_freq 40m --flash_size detect \ - 0x1000 bootloader.bin \ - 0x8000 partitions.bin \ - 0xe000 boot_app0.bin \ - 0x10000 opendtu-generic.bin -``` - -#### Flash with Espressif Flash Download Tool (Windows) - -[Download link](https://www.espressif.com/en/support/download/other-tools) - -* On startup, select Chip Type -> "ESP32" / WorkMode -> "Develop" -* Prepare all settings (see picture). Make sure to uncheck the `DoNotChgBin` option. Otherwise you may get errors like "invalid header". -* ![flash tool image](esp32_flash_download_tool.png) -* Press "Erase" button on screen. Look into the terminal window, you should see dots appear. Then press the "Boot" button on the ESP32 board. Wait for "FINISH" to see if flashing/erasing is done. -* To program, press "Start" on screen, then the "Boot" button. -* When flashing is complete (FINISH appears) then press the Reset button on the ESP32 board (or powercycle ) to start the OpenDTU application. - -#### Flash with ESP_Flasher (Windows) - -Users report that [ESP_Flasher](https://github.com/Jason2866/ESP_Flasher/releases/) is suitable for flashing OpenDTU on Windows. - -#### Flash with [ESP_Flasher](https://espressif.github.io/esptool-js/) - web version - -It is also possible to flash it via the web tools which might be more convenient and is platform independent. - -## Flashing an Update using "Over The Air" OTA Update - -Once you have your OpenDTU running and connected to WLAN, you can do further updates through the web interface. -Navigate to Settings --> Firmware upgrade and press the browse button. Select the firmware file from your local computer. - -You'll find the firmware file (after a successful build process) under `.pio/build/generic/firmware.bin`. - -If you downloaded a precompiled zip archive, unpack it and choose `opendtu-generic.bin`. - -After the successful upload, the OpenDTU immediately restarts into the new firmware. - - -## Builds - -Different builds from existing installations can be found here [Builds](builds/README.md) -Like to show your own build? Just send me a Pull Request. +Have a look at the [OpenDTU-OnBattery documentation](https://opendtu-onbattery.net/firmware/). diff --git a/docs/nodemcu-esp32.png b/docs/nodemcu-esp32.png deleted file mode 100644 index 2a45bc568..000000000 Binary files a/docs/nodemcu-esp32.png and /dev/null differ diff --git a/docs/nrf24l01plus.png b/docs/nrf24l01plus.png deleted file mode 100644 index c46643bc4..000000000 Binary files a/docs/nrf24l01plus.png and /dev/null differ diff --git a/docs/screenshots/01_LiveView.png b/docs/screenshots/01_LiveView.png deleted file mode 100644 index b42861b35..000000000 Binary files a/docs/screenshots/01_LiveView.png and /dev/null differ diff --git a/docs/screenshots/02_NetworkAdmin.png b/docs/screenshots/02_NetworkAdmin.png deleted file mode 100644 index 4e1859e20..000000000 Binary files a/docs/screenshots/02_NetworkAdmin.png and /dev/null differ diff --git a/docs/screenshots/03_NtpAdmin.png b/docs/screenshots/03_NtpAdmin.png deleted file mode 100644 index a3f304b00..000000000 Binary files a/docs/screenshots/03_NtpAdmin.png and /dev/null differ diff --git a/docs/screenshots/04_MqttAdmin.png b/docs/screenshots/04_MqttAdmin.png deleted file mode 100644 index 7de7ccd4c..000000000 Binary files a/docs/screenshots/04_MqttAdmin.png and /dev/null differ diff --git a/docs/screenshots/05_InverterAdmin.png b/docs/screenshots/05_InverterAdmin.png deleted file mode 100644 index 43519964a..000000000 Binary files a/docs/screenshots/05_InverterAdmin.png and /dev/null differ diff --git a/docs/screenshots/06_DtuAdmin.png b/docs/screenshots/06_DtuAdmin.png deleted file mode 100644 index ca7403963..000000000 Binary files a/docs/screenshots/06_DtuAdmin.png and /dev/null differ diff --git a/docs/screenshots/07_FirmwareUpgrade.png b/docs/screenshots/07_FirmwareUpgrade.png deleted file mode 100644 index f4df11c76..000000000 Binary files a/docs/screenshots/07_FirmwareUpgrade.png and /dev/null differ diff --git a/docs/screenshots/08_NetworkInfo.png b/docs/screenshots/08_NetworkInfo.png deleted file mode 100644 index aa0063a2c..000000000 Binary files a/docs/screenshots/08_NetworkInfo.png and /dev/null differ diff --git a/docs/screenshots/09_NtpInfo.png b/docs/screenshots/09_NtpInfo.png deleted file mode 100644 index b75d4fa43..000000000 Binary files a/docs/screenshots/09_NtpInfo.png and /dev/null differ diff --git a/docs/screenshots/10_MqttInfo.png b/docs/screenshots/10_MqttInfo.png deleted file mode 100644 index 24dcc64a3..000000000 Binary files a/docs/screenshots/10_MqttInfo.png and /dev/null differ diff --git a/docs/screenshots/11_SystemInfo.png b/docs/screenshots/11_SystemInfo.png deleted file mode 100644 index cb316d0b0..000000000 Binary files a/docs/screenshots/11_SystemInfo.png and /dev/null differ diff --git a/docs/screenshots/12_Eventlog.png b/docs/screenshots/12_Eventlog.png deleted file mode 100644 index 2b34dd75f..000000000 Binary files a/docs/screenshots/12_Eventlog.png and /dev/null differ diff --git a/docs/screenshots/13_InverterSettings.png b/docs/screenshots/13_InverterSettings.png deleted file mode 100644 index a76a32520..000000000 Binary files a/docs/screenshots/13_InverterSettings.png and /dev/null differ diff --git a/docs/screenshots/14_ConfigManagement.png b/docs/screenshots/14_ConfigManagement.png deleted file mode 100644 index f0ab78474..000000000 Binary files a/docs/screenshots/14_ConfigManagement.png and /dev/null differ diff --git a/docs/screenshots/15_LimitSettings.png b/docs/screenshots/15_LimitSettings.png deleted file mode 100644 index 44c6f5954..000000000 Binary files a/docs/screenshots/15_LimitSettings.png and /dev/null differ diff --git a/docs/screenshots/16_PowerSettings.png b/docs/screenshots/16_PowerSettings.png deleted file mode 100644 index ee68fe5dc..000000000 Binary files a/docs/screenshots/16_PowerSettings.png and /dev/null differ diff --git a/docs/screenshots/17_InverterInfo.png b/docs/screenshots/17_InverterInfo.png deleted file mode 100644 index 04d7aa410..000000000 Binary files a/docs/screenshots/17_InverterInfo.png and /dev/null differ diff --git a/docs/screenshots/18_Console.png b/docs/screenshots/18_Console.png deleted file mode 100644 index aae8f9127..000000000 Binary files a/docs/screenshots/18_Console.png and /dev/null differ diff --git a/docs/screenshots/19_Reboot.png b/docs/screenshots/19_Reboot.png deleted file mode 100644 index d38ba0b71..000000000 Binary files a/docs/screenshots/19_Reboot.png and /dev/null differ diff --git a/docs/screenshots/20_DeviceManager_Pin.png b/docs/screenshots/20_DeviceManager_Pin.png deleted file mode 100644 index cb5983f4e..000000000 Binary files a/docs/screenshots/20_DeviceManager_Pin.png and /dev/null differ diff --git a/docs/screenshots/21_DeviceManager_Display.png b/docs/screenshots/21_DeviceManager_Display.png deleted file mode 100644 index cd27a7b08..000000000 Binary files a/docs/screenshots/21_DeviceManager_Display.png and /dev/null differ diff --git a/docs/screenshots/22_Security.png b/docs/screenshots/22_Security.png deleted file mode 100644 index cf844e8f7..000000000 Binary files a/docs/screenshots/22_Security.png and /dev/null differ diff --git a/docs/screenshots/README.md b/docs/screenshots/README.md deleted file mode 100644 index 50e66fadb..000000000 --- a/docs/screenshots/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# OpenDTU Screenshots - -here are some screenshots of OpenDTU's web interface. - -*** - -![Live View](01_LiveView.png) - -*** - -![Limit Settings](15_LimitSettings.png) - -*** - -![Power Settings](16_PowerSettings.png) - -*** - -![Inverter Info](17_InverterInfo.png) - -*** - -![Eventlog](12_Eventlog.png) - -*** - -![Network Admin](02_NetworkAdmin.png) - -*** - -![NTP Admin](03_NtpAdmin.png) - -*** - -![MQTT Admin](04_MqttAdmin.png) - -*** - -![Inverter Admin](05_InverterAdmin.png) - -*** - -![Inverter Settings](13_InverterSettings.png) - -*** - -![Security](22_Security.png) - -*** - -![DTU Admin](06_DtuAdmin.png) - -*** - -![Device Manager Pin](20_DeviceManager_Pin.png) - -*** - -![Device Manager Display](21_DeviceManager_Display.png) - -*** - -![Config Management](14_ConfigManagement.png) - -*** - -![Firmware Upgrade](07_FirmwareUpgrade.png) - -*** - -![Reboot](19_Reboot.png) - -*** - -![System Info](11_SystemInfo.png) - -*** - -![Network Info](08_NetworkInfo.png) - -*** - -![NTP Info](09_NtpInfo.png) - -*** - -![MQTT Info](10_MqttInfo.png) - -*** - -![Console](18_Console.png)