mirror of https://github.com/lumapu/ahoy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
303 lines
15 KiB
303 lines
15 KiB
1 year ago
|
|
||
2 years ago
|
## Overview
|
||
2 years ago
|
|
||
1 year ago
|
This page contains detailed instructions on building a module and flashing it with the latest firmware. Following these instructions will allow you to communicate with compatible inverters.
|
||
2 years ago
|
|
||
|
You find the full [User_Manual here](User_Manual.md)
|
||
|
|
||
|
## Compatiblity
|
||
|
|
||
1 year ago
|
Currently, the following inverters are supported:
|
||
2 years ago
|
|
||
|
Hoymiles Inverters
|
||
|
|
||
|
| Status | Serie | Model | comment |
|
||
|
| ----- | ----- | ------ | ------- |
|
||
2 years ago
|
| ✔️ | MI | 300, 600, 1000/1200/⚠️ 1500 | 4-Channel is not tested yet |
|
||
2 years ago
|
| ✔️ | HM | 300, 350, 400, 600, 700, 800, 1000?, 1200, 1500 | |
|
||
2 years ago
|
| ✔️ | HMS | 350, 500, 800, 1000, 1600, 1800, 2000 | |
|
||
|
| ✔️ | HMT | 1600, 1800, 2250 | |
|
||
2 years ago
|
| ⚠️ | TSUN | [TSOL-M350](https://www.tsun-ess.com/Micro-Inverter/M350-M400), [TSOL-M400](https://www.tsun-ess.com/Micro-Inverter/M350-M400), [TSOL-M800/TSOL-M800(DE)](https://www.tsun-ess.com/Micro-Inverter/M800) | others may work as well (need to be verified). |
|
||
|
|
||
2 years ago
|
## Table of Contents
|
||
|
|
||
|
- [Overview](#overview)
|
||
|
- [Compatiblity](#compatiblity)
|
||
2 years ago
|
- [Things needed](#things-needed)
|
||
2 years ago
|
- [There are fake NRF24L01+ Modules out there](#there-are-fake-nrf24l01-modules-out-there)
|
||
2 years ago
|
- [Wiring things up](#wiring-things-up)
|
||
2 years ago
|
- [ESP8266 wiring example on WEMOS D1](#esp8266-wiring-example)
|
||
2 years ago
|
- [Schematic](#schematic)
|
||
|
- [Symbolic view](#symbolic-view)
|
||
2 years ago
|
- [ESP8266 wiring example on 30pin Lolin NodeMCU v3](#esp8266-wiring-example-2)
|
||
|
- [Schematic](#schematic-2)
|
||
|
- [Symbolic view](#symbolic-view-2)
|
||
2 years ago
|
- [ESP32 wiring example](#esp32-wiring-example)
|
||
|
- [Schematic](#schematic-1)
|
||
|
- [Symbolic view](#symbolic-view-1)
|
||
|
- [ESP32 GPIO settings](#esp32-gpio-settings)
|
||
2 years ago
|
- [Flash the Firmware on your Ahoy DTU Hardware](#flash-the-firmware-on-your-ahoy-dtu-hardware)
|
||
2 years ago
|
- [Compiling your own Version](#compiling-your-own-version)
|
||
|
- [Using a ready-to-flash binary using nodemcu-pyflasher](#using-a-ready-to-flash-binary-using-nodemcu-pyflasher)
|
||
2 years ago
|
- [Connect to your Ahoy DTU](#connect-to-your-ahoy-dtu)
|
||
2 years ago
|
- [Your Ahoy DTU is very verbose using the Serial Console](#your-ahoy-dtu-is-very-verbose-using-the-serial-console)
|
||
|
- [Connect to the Ahoy DTU Webinterface using your Browser](#connect-to-the-ahoy-dtu-webinterface-using-your-browser)
|
||
2 years ago
|
- [HTTP based Pages](#http-based-pages)
|
||
|
- [MQTT command to set the DTU without webinterface](#mqtt-command-to-set-the-dtu-without-webinterface)
|
||
2 years ago
|
- [Used Libraries](#used-libraries)
|
||
2 years ago
|
- [ToDo](#todo)
|
||
2 years ago
|
|
||
|
***
|
||
|
|
||
2 years ago
|
Solenso Inverters:
|
||
|
|
||
|
- SOL-H350
|
||
|
|
||
2 years ago
|
## Things needed
|
||
2 years ago
|
|
||
1 year ago
|
To build your own AhoyDTU, you only need a few things. Remember that the maker community is always developing new and innovative options that we may not have covered in this readme.
|
||
|
|
||
|
Start with an ESP8266 or ESP32, and combine it with an NRF24L01+ breakout board. Other ESP boards with at least 4MBytes of ROM may also be suitable.
|
||
2 years ago
|
|
||
1 year ago
|
Make sure to choose an NRF24L01+ module that includes the '+' in its name. This is important because we need the 250kbps features that are only available in the plus-variant.
|
||
|
|
||
|
**Attention**: The NRF24L01+ can only communicate with the MI/HM/TSUN inverter. For the HMS/HMT it is needed to use a CMT2300A!
|
||
2 years ago
|
|
||
2 years ago
|
|
||
|
| **Parts** | **Price** |
|
||
|
| --- | --- |
|
||
1 year ago
|
| D1 ESP8266 Mini WLAN Board Microcontroller | 4,40 €|
|
||
|
| *NRF24L01+ SMD Modul 2,4 GHz Wi-Fi Funkmodul (not for HMS/HMT)* | *3,45 €*|
|
||
|
| *CMT2300A 868/915MHz (E49-900M20S)* | *4,59 €* |
|
||
|
| 100µF / 10V Capacitor Kondensator | 0,15 €|
|
||
|
| Jumper Wire Steckbrücken Steckbrett weiblich-weiblich | 2,49 €|
|
||
|
| **Total costs** | **10,34 € / 11,48 €** |
|
||
2 years ago
|
|
||
1 year ago
|
To future-proof your setup and use our sister project OpenDTU, we recommend investing in an ESP32 board with two CPU cores. Additionally, you can use a NRF24L01+ module with an external antenna as a radio for superior performance and compatibility with upcoming developments.
|
||
2 years ago
|
|
||
|
| **Parts** | **Price** |
|
||
|
| --- | --- |
|
||
1 year ago
|
| ESP32 Dev Board NodeMCU WROOM32 WiFi | 7,90 €|
|
||
|
| *NRF24L01+ SMD Modul 2,4 GHz Wi-Fi Funkmodul (not for HMS/HMT)* | *3,45 €*|
|
||
|
| *CMT2300A 868/915MHz (E49-900M20S)* | *4,59 €* |
|
||
|
| 100µF / 10V Capacitor Kondensator | 0,15 €|
|
||
|
| Jumper Wire breadboard female-female | 2,49 €|
|
||
|
| **Total costs** | **13,99 € / 15,13 €** |
|
||
2 years ago
|
|
||
2 years ago
|
#### There are fake NRF24L01+ Modules out there
|
||
1 year ago
|
Beware of fake NRF24L01+ modules that use rebranded NRF24L01 chips (without the +).
|
||
|
An example of this can be found in Issue #230 (https://github.com/lumapu/ahoy/issues/230).
|
||
|
If you have any additional examples of fake chips, please share them with us and we will add the information here.
|
||
2 years ago
|
|
||
1 year ago
|
#### NRF24L01+ improvements
|
||
|
Users have reported improved connections and longer range through walls when using these modules.
|
||
|
The "E01-ML01DP5" module is a 2.4 GHz wireless module that utilizes the nRF24L01+PA+LNA RF module and features an SMA-K antenna connector.
|
||
|
**The product includes an HF cover, but please note that it does not come with an antenna.**
|
||
2 years ago
|
|
||
1 year ago
|
To achieve the best results, stabilize the Vcc power by using a capacitor and do not exceed the 'LOW' Amplifier Power Level.
|
||
|
Users have reported good connections over 10m through walls and ceilings when using the Amplifier Power Level 'MIN'.
|
||
|
It's important to remember that bigger is not always better.
|
||
2 years ago
|
|
||
1 year ago
|
If you are using the NRF24 directly on the ESP board, make sure to set the transmission power to the lowest possible level (this can be adjusted later in the web interface). Using a high transmission power can potentially cause problems.
|
||
|
The ESP board's built-in controller has limited reserves in case both WiFi and nRF are transmitting simultaneously.
|
||
|
If you are using additional interfaces, such as a display, the reserves will be further reduced.
|
||
2 years ago
|
|
||
2 years ago
|
## Wiring things up
|
||
2 years ago
|
|
||
2 years ago
|
The NRF24L01+ radio module is connected to the standard SPI pins:
|
||
2 years ago
|
|
||
2 years ago
|
- SCLK (Signal Clock),
|
||
|
- MISO (Master In Slave Out) and
|
||
|
- MOSI (Master Out Slave In)
|
||
|
|
||
|
*These pins need to be configured in the config.h.*
|
||
|
|
||
|
Additional, there are 3 pins, which can be set individual:
|
||
2 years ago
|
|
||
2 years ago
|
- CS (Chip Select),
|
||
|
- CE (Chip Enable) and
|
||
|
- IRQ (Interrupt)
|
||
|
|
||
|
*These pins can be changed from the /setup URL.*
|
||
3 years ago
|
|
||
2 years ago
|
#### ESP8266 wiring example on WEMOS D1
|
||
1 year ago
|
This is an example wiring using a Wemos D1 mini.
|
||
2 years ago
|
|
||
2 years ago
|
##### Schematic
|
||
2 years ago
|
![Schematic](https://ahoydtu.de/img/fritzing/esp8266_nrf_sch.png)
|
||
3 years ago
|
|
||
2 years ago
|
##### Symbolic view
|
||
2 years ago
|
![Symbolic](https://ahoydtu.de/img/fritzing/esp8266_nrf.png)
|
||
3 years ago
|
|
||
2 years ago
|
#### ESP8266 wiring example on 30pin Lolin NodeMCU v3
|
||
|
|
||
|
This is an example wiring using a NodeMCU V3.<br>
|
||
|
|
||
|
##### Schematic
|
||
|
|
||
|
![Schematic](doc/ESP8266_nRF24L01+_Schaltplan.jpg)
|
||
|
|
||
|
##### Symbolic view
|
||
|
|
||
|
![Symbolic](doc/ESP8266_nRF24L01+_bb.png)
|
||
|
|
||
2 years ago
|
#### ESP32 wiring example
|
||
2 years ago
|
|
||
2 years ago
|
Example wiring for a 38pin ESP32 module
|
||
2 years ago
|
|
||
2 years ago
|
##### Schematic
|
||
2 years ago
|
|
||
2 years ago
|
![Schematic](https://ahoydtu.de/img/fritzing/esp32-38_nrf_sch.png)
|
||
2 years ago
|
|
||
|
##### Symbolic view
|
||
2 years ago
|
|
||
2 years ago
|
![Symbolic](https://ahoydtu.de/img/fritzing/esp32-38_nrf.png)
|
||
2 years ago
|
|
||
|
##### ESP32 GPIO settings
|
||
2 years ago
|
|
||
2 years ago
|
CS, CE, IRQ must be set according to how they are wired up. For the diagram above, set the 3 individual GPIOs under the /setup URL as follows:
|
||
2 years ago
|
|
||
|
```
|
||
|
CS D1 (GPIO5)
|
||
|
CE D2 (GPIO4)
|
||
|
IRQ D0 (GPIO16 - no IRQ!)
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
**IMPORTANT**: Starting from development version 108/release 0.6.0, MISO, MOSI, and SCLK are also included.
|
||
|
For most ESP32 boards, the default settings are correct on new installations.
|
||
|
However, it is not possible to configure these pins for ESP82xx boards, as they cannot be moved elsewhere.
|
||
2 years ago
|
|
||
1 year ago
|
If you are upgrading an existing installation, you may notice that the pins are set to '0' in the web GUI, which will prevent communication with the NRF module.
|
||
|
To resolve this, set MISO=19, MOSI=23, SCLK=18 in the settings.
|
||
|
This is the correct default for most ESP32 boards. For ESP82xx, simply saving the settings without changes should suffice.
|
||
2 years ago
|
Save and reboot.
|
||
2 years ago
|
|
||
|
|
||
2 years ago
|
## Flash the Firmware on your Ahoy DTU Hardware
|
||
|
|
||
1 year ago
|
After preparing your hardware, you must flash the Ahoy DTU Firmware to your board.
|
||
|
You can either create your own firmware using your configuration or use one of our pre-compiled generic builds.
|
||
|
|
||
|
Are you ready to flash? Then go to next Step here.
|
||
2 years ago
|
|
||
2 years ago
|
### Flash from your browser (easy)
|
||
|
|
||
|
The easiest step for you is to flash online. A browser MS Edge or Google Chrome is required.
|
||
|
[Here you go](https://ahoydtu.de/web_install/)
|
||
|
|
||
1 year ago
|
### Compiling your own Version (expert)
|
||
|
This information is for those who wish to configure and build their own firmware.
|
||
3 years ago
|
|
||
1 year ago
|
The code is provided as a PlatformIO project and can be compiled using the PlatformIO Addon.
|
||
|
The PlatformIO Addon is supported by Visual Studio Code, AtomIDE, and other IDEs.
|
||
|
If you do not wish to compile your own build, you can use one of our pre-compiled binaries.
|
||
3 years ago
|
|
||
2 years ago
|
#### Using a ready-to-flash binary using nodemcu-pyflasher
|
||
2 years ago
|
|
||
2 years ago
|
This information suits you if you just want to use an easy way.
|
||
|
|
||
3 years ago
|
1. download the flash-tool [nodemcu-pyflasher](https://github.com/marcelstoer/nodemcu-pyflasher)
|
||
|
2. download latest release bin-file from [ahoy_](https://github.com/grindylow/ahoy/releases)
|
||
2 years ago
|
3. open flash-tool and connect the target device to your computer.
|
||
2 years ago
|
4. Set the correct serial port and select the correct *.bin file
|
||
2 years ago
|
5. click on "Flash NodeMCU"
|
||
|
6. flash the ESP with the compiled firmware using the UART pins or
|
||
|
7. repower the ESP
|
||
|
8. the ESP will start as access point (AP) if there is no network config stored in its eeprom
|
||
2 years ago
|
9. connect to the AP (password: `esp_8266`), you will be forwarded to the setup page
|
||
2 years ago
|
10. configure your WiFi settings, save, repower
|
||
|
11. check your router or serial console for the IP address of the module. You can try ping the configured device name as well.
|
||
|
|
||
2 years ago
|
Once your Ahoy DTU is running, you can use the Over The Air (OTA) capabilities to update your firmware.
|
||
3 years ago
|
|
||
1 year ago
|
**! ATTENTION: If you update from a very low version to the newest, please make sure to wipe all flash data!**
|
||
3 years ago
|
|
||
2 years ago
|
#### Flashing on Linux with `esptool.py` (ESP32)
|
||
|
1. install [esptool.py](https://docs.espressif.com/projects/esptool/en/latest/esp32/) if you haven't already.
|
||
|
2. download and extract the latest release bin-file from [ahoy_](https://github.com/grindylow/ahoy/releases)
|
||
|
3. `cd ahoy_v<XXX> && cp *esp32.bin esp32.bin`
|
||
|
4. Perhaps you need to replace `/dev/ttyUSB0` to match your acual device in the following command. Execute it afterwards: `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 0x10000 esp32.bin`
|
||
|
5. Unplug and replug your device.
|
||
|
6. Open a serial monitor (e.g. Putty) @ 115200 Baud. You should see some messages regarding wifi.
|
||
|
|
||
2 years ago
|
## Connect to your Ahoy DTU
|
||
|
|
||
1 year ago
|
Once everything is wired and the firmware is flashed, it is time to connect to your Ahoy DTU.
|
||
2 years ago
|
|
||
2 years ago
|
#### Your Ahoy DTU is very verbose using the Serial Console
|
||
2 years ago
|
|
||
1 year ago
|
Once connected to your computer, you can open a serial console to get additional information.
|
||
|
This can be useful for troubleshooting, as well as simply to get
|
||
|
information about the converted values read from the inverter(s).
|
||
2 years ago
|
|
||
2 years ago
|
#### Connect to the Ahoy DTU Webinterface using your Browser
|
||
2 years ago
|
|
||
1 year ago
|
After you have successfully flashed and powered up your Ahoy DTU, you can access it from your browser.<br/>
|
||
|
If your Ahoy DTU was able to log on to the configured WiFi network, it will try to obtain an IP address from your local DHCP server (in most cases this is your router).
|
||
|
|
||
|
If it cannot connect to your configured network, it will provide its own WiFi network that you can
|
||
|
to for further configuration.
|
||
|
|
||
|
The WiFi SSID *(the WiFi name)* and password are pre-configured and are set to SSID "`AHOY-DTU`" and password "`esp_8266`" by default.
|
||
|
|
||
|
The Ahoy DTU will keep this network open for a certain amount of time (default is 60sec).
|
||
|
If nothing connects to it and the time expires, it will retry to connect to the configured network, and so on.
|
||
|
|
||
|
If you are connected to your local network, just find out the IP address used or try the default name [http://ahoy-dtu/](http://ahoy-dtu/).
|
||
|
In most cases, your router will give you a hint.
|
||
|
|
||
|
If you connect to the WiFi the Ahoy DTU opens in case it could not connect to any other Network, the IP-Address of your Ahoy DTU is [http://192.168.4.1/](http://192.168.4.1/).
|
||
|
Just open the IP-Address in your browser.
|
||
|
|
||
|
The web interface has the following capabilities:
|
||
|
|
||
|
- Live data (values updated every 5 seconds)
|
||
|
Click on the title/name/alarm for more actions.
|
||
|
- Webserial (Debug)
|
||
|
- Settings (System Config, Network, Protection, Inverter, NTP Server, Sunrise/Sunset, MQTT, Display Config)
|
||
|
- Update (Over The Air Update)
|
||
|
- System (status about the modules)
|
||
2 years ago
|
|
||
2 years ago
|
##### HTTP based Pages
|
||
2 years ago
|
|
||
1 year ago
|
To take control of your Ahoy DTU, you can directly call one of the following sub-pages (e.g. [http://ahoy-dtu/setup](http://ahoy-dtu/setup) or [http://192.168.4.1/setup](http://192.168.4.1/setup) ).
|
||
2 years ago
|
|
||
2 years ago
|
| page | use | output | default availability |
|
||
|
| ---- | ------ | ------ | ------ |
|
||
1 year ago
|
| /logout| logout the user from webinterface | | yes |
|
||
2 years ago
|
| /reboot | reboots the Ahoy DTU | | yes |
|
||
1 year ago
|
| /system| show system inforamtion | | yes |
|
||
|
| /live | displays the live data | | yes |
|
||
|
| /save | | | yes |
|
||
2 years ago
|
| /erase | erases the EEPROM | | yes |
|
||
|
| /factory | resets to the factory defaults configured in config.h | | yes |
|
||
|
| /setup | opens the setup page | | yes |
|
||
|
| /metrics | gets live-data for prometheus | prometheus metrics from the livedata | no - enable via config_override.h |
|
||
2 years ago
|
| /api | gets configuration and live-data in JSON format | json output from the configuration or livedata | yes |
|
||
2 years ago
|
|
||
|
## MQTT command to set the DTU without webinterface
|
||
|
|
||
2 years ago
|
[Read here](User_Manual.md)
|
||
2 years ago
|
|
||
2 years ago
|
## Used Libraries
|
||
2 years ago
|
|
||
2 years ago
|
| Name | version | License |
|
||
|
| --------------------- | ------- | -------- |
|
||
|
| `ESP8266WiFi` | 1.0 | LGPL-2.1 |
|
||
|
| `DNSServer` | 1.1.1 | LGPL-2.1 |
|
||
|
| `SPI` | 1.0 | LGPL-2.1 |
|
||
|
| `Hash` | 1.0 | LGPL-2.1 |
|
||
|
| `EEPROM` | 1.0 | LGPL-2.1 |
|
||
1 year ago
|
| `ESPAsyncWebServer` | 1.2.3 | LGPL-3.0 |
|
||
|
| [ESPAsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP) | 1.2.2 | [LGPL-3.0 license](https://github.com/me-no-dev/ESPAsyncTCP#LGPL-3.0-1-ov-file) |
|
||
|
| [Time](https://github.com/PaulStoffregen/Time) | 1.6.1 | ? |
|
||
|
| [RF24](https://github.com/nRF24/RF24) | 1.4.8 | [GPL-2.0 license](https://github.com/nRF24/RF24#GPL-2.0-1-ov-file) |
|
||
|
| [espMqttClient](https://github.com/bertmelis/espMqttClient) | ? | [MIT license](https://github.com/bertmelis/espMqttClient#MIT-1-ov-file) |
|
||
|
| [ArduinoJson](https://github.com/bblanchon/ArduinoJson) | 6.21.3 | [MIT license](https://github.com/bblanchon/ArduinoJson#MIT-1-ov-file)|
|
||
|
| [GxEPD2](https://github.com/ZinggJM/GxEPD2) | 1.5.2 | [GPL-3.0 license](https://github.com/ZinggJM/GxEPD2#GPL-3.0-1-ov-file)|
|
||
|
| [U8g2_Arduino](https://registry.platformio.org/libraries/olikraus/U8g2) | [2.35.9](https://registry.platformio.org/libraries/olikraus/U8g2/versions) | [BSD-2-Clause](https://spdx.org/licenses/BSD-2-Clause.html) |
|
||
2 years ago
|
|
||
|
## ToDo
|
||
|
|
||
2 years ago
|
[See this post](https://github.com/lumapu/ahoy/issues/142)
|