2022-06-16 10:40:26 +02:00
# OpenDTU
## 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 end users
2022-06-24 20:48:57 +02:00
* Uses ESP32 microcontroller and NRF24L01+
2022-06-16 10:40:26 +02:00
* Multi-Inverter support
* MQTT support
2022-06-24 20:48:57 +02:00
* Nice and fancy WebApp with visualization of current data
2022-06-16 14:32:07 +02:00
* Firmware upgrade using the web UI
* Default source supports up to 10 inverters
2022-06-24 20:48:57 +02:00
* Time zone support
2022-06-16 14:32:07 +02:00
2022-06-16 10:40:26 +02:00
## Features for developers
2022-06-24 20:48:57 +02:00
* The microcontroller part
2022-06-16 10:40:26 +02:00
* Build with Arduino PlatformIO Framework for the ESP32
* Uses [ESPAsyncWebserver ](https://github.com/me-no-dev/ESPAsyncWebServer ) and [Async MQTT client ](https://github.com/marvinroger/async-mqtt-client )
* The WebApp part
* Build with [Vue.js ](https://vuejs.org )
2022-06-22 23:10:17 +02:00
* Source is written in TypeScript
## Wiring up
### Schematic

### Symbolic view

2022-06-16 10:40:26 +02:00
2022-06-16 14:32:07 +02:00
## Flashing and starting up
2022-06-22 23:10:17 +02:00
* Install [Visual Studio Code ](https://code.visualstudio.com/download )
* In Visual Studio Code, install the [PlatformIO Extension ](https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide )
* Download or clone this repository
2022-06-24 20:48:57 +02:00
* 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:
2022-06-22 23:10:17 +02:00
* 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.
2022-06-16 14:32:07 +02:00
## First configuration
2022-06-24 20:48:57 +02:00
* After the initial flashing of the microcontroller, a 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 )
2022-06-16 14:32:07 +02:00
* 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
2022-06-16 10:40:26 +02:00
## Building
* Building the WebApp
* The WebApp can be build using yarn
```
$ yarn install
$ yarn build
```
2022-06-25 11:21:02 +02:00
* The updated output is placed in the 'webapp_dist' directory
2022-06-16 10:40:26 +02:00
2022-06-24 20:48:57 +02:00
* Building the microcontroller firmware
2022-06-16 10:40:26 +02:00
* Visual Studio Code with the PlatformIO Extension is required for building