Go to file
2022-08-29 22:47:08 +02:00
.github Bump actions/cache from 2 to 3 2022-08-06 01:27:02 +00:00
.vscode Initial commit 2022-04-09 11:05:14 +02:00
docs Updated EventLog Screenshot 2022-07-19 21:22:06 +02:00
include Added small dialog to show inverter info (firmware version etc.) 2022-08-11 16:42:50 +02:00
lib Fix #96 and #95 : Reworked handling of inverter editing 2022-08-24 02:53:34 +02:00
src Fix #92: Expiration time depends on the amount of inverters 2022-08-27 13:07:00 +02:00
test Initial commit 2022-04-09 11:05:14 +02:00
webapp webapp: Remove unused variable 2022-08-29 22:47:08 +02:00
webapp_dist webapp: upgraded dependencies 2022-08-27 11:50:59 +02:00
.gitignore Add support for MQTT TLS 2022-08-06 00:14:44 +02:00
auto_firmware_version.py Added exception handler if the repo was not cloned 2022-08-14 14:50:54 +02:00
COPYING Updated license file to match right phrase 2022-07-15 19:35:08 +02:00
LICENSE Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
partitions_custom.csv Resize partitions 2022-06-15 22:07:39 +02:00
platformio.ini Update required version of RF24 library 2022-08-16 23:24:48 +02:00
README.md README.md: add build instructions for PlatformIO Core 2022-08-16 22:46:45 +02:00

OpenDTU

Background

This 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.

Currently supported Inverters

  • Hoymiles HM-300
  • Hoymiles HM-350
  • Hoymiles HM-400
  • Hoymiles HM-600
  • Hoymiles HM-700
  • Hoymiles HM-800
  • Hoymiles HM-1000
  • Hoymiles HM-1200
  • Hoymiles HM-1500
  • TSUN TSOL-M800 (Maybe depending on firmware on the inverter)

Features for end users

  • Read live data from inverter
  • Show inverters internal event log
  • Show inverter information like firmware version, firmware build date, hardware revision and hardware version
  • Uses ESP32 microcontroller and NRF24L01+
  • Multi-Inverter support
  • MQTT support (with TLS)
  • Home Assistant MQTT Auto Discovery support
  • Nice and fancy WebApp with visualization of current data
  • Firmware upgrade using the web UI
  • Default source supports up to 10 inverters
  • Time zone support

Features for developers

Wiring up

Schematic

Schematic

Symbolic view

Symbolic

Change pin assignment

Its possible to change all the pins of the NRF24L01+ module. This can be achieved by editing the 'platformio.ini' file and add/change one or more of the following lines to the 'build_flags' parameter:

-DHOYMILES_PIN_MISO=19
-DHOYMILES_PIN_MOSI=23
-DHOYMILES_PIN_SCLK=18
-DHOYMILES_PIN_IRQ=16
-DHOYMILES_PIN_CE=4
-DHOYMILES_PIN_CS=5

Flashing and starting up

with Visual Studio Code

  • Install Visual Studio Code
  • In Visual Studio Code, install the PlatformIO Extension
  • 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)
  • In Visual Studio Code, choose File --> Open Folder and select the previously downloaded source code. (You have to select the folder which contains the "platformio.ini" file)
  • Adjust the COM port in the file "platformio.ini". It occurs twice:
    • upload_port
    • monitor_port
  • Select the arrow button in the status bar (PlatformIO: Upload) to compile and upload the firmware. During the compilation, all required libraries are downloaded automatically.

on the commandline with PlatformIO Core

  • Install PlatformIO Core
  • 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.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

First configuration

  • After the initial flashing 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
  • Navigate to Settings --> Network Settings and enter your WiFi credentials
  • Currently you have to look at your router to determine the IP of the newly connected device

Available cases

Building

  • Building the WebApp

    • The WebApp can be build using yarn
    $ 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