ahoy/tools/esp8266
2022-08-18 22:06:02 +02:00
..
html complete rework of release workflow add CHANGES.md 2022-08-18 22:06:02 +02:00
include * debug moved to another location 2022-07-06 21:47:08 +02:00
scripts complete rework of release workflow add CHANGES.md 2022-08-18 22:06:02 +02:00
WemosD1_NRF24_Case 3D-Model for a case for Wemos D1 2022-05-26 00:18:26 +02:00
.gitignore * compiles with PlatformIO 2022-06-30 22:28:54 +02:00
app.cpp write to dtu eeprom if pwr limit is persistent 2022-08-17 16:16:45 +02:00
app.h Merge branch 'main' into esp32-adjustments 2022-08-17 09:54:33 +02:00
CircularBuffer.h * added rx channel switching 2022-05-09 20:47:05 +02:00
config.h button on index to get FW-Version 2022-08-17 11:30:18 +02:00
crc.cpp first changes to prepare code for esp32 2022-08-15 22:42:08 +02:00
crc.h first changes to prepare code for esp32 2022-08-15 22:42:08 +02:00
defines.h complete rework of release workflow add CHANGES.md 2022-08-18 22:06:02 +02:00
eep.h * improved read / save to eep 2022-08-13 23:16:33 +02:00
favicon.h Janitorial: Trailing whitespace tweaks 2022-06-27 00:42:51 +02:00
hmDefines.h 0.5.14 Bug fix mqtt payload & get FWVersion 2022-08-17 09:01:25 +02:00
hmInverter.h Merge branch 'main' into esp32-adjustments 2022-08-17 09:54:33 +02:00
hmRadio.h Merge branch 'main' into esp32-adjustments 2022-08-17 09:54:33 +02:00
hmSystem.h button on index to get FW-Version 2022-08-17 11:30:18 +02:00
main.cpp * first refactored version which is accessible through web interface 2022-08-14 01:40:55 +02:00
mqtt.h * improved mqtt settings 2022-08-13 03:07:09 +02:00
platformio.ini d1_mini and nodemcu env merged, debug option added 2022-08-12 14:14:31 +02:00
README.md complete rework of release workflow add CHANGES.md 2022-08-18 22:06:02 +02:00
User_Manual.md Merge branch 'development' into dev_private 2022-08-18 13:06:59 +02:00
web.cpp possible fix ref issue #162 2022-08-18 08:01:24 +02:00
web.h * webinterface refactored completely 2022-08-14 02:18:53 +02:00
wifi.cpp * moved wifi related stuff to extra class 2022-08-14 03:00:04 +02:00
wifi.h * moved wifi related stuff to extra class 2022-08-14 03:00:04 +02:00

OVERVIEW

This code is intended to run on a Wemos D1mini or similar. The code is based on 'Hubi's code, which can be found here: https://www.mikrocontroller.net/topic/525778?page=3#7033371

The NRF24L01+ radio module is connected to the standard SPI pins. Additional there are 3 pins, which can be set individual: CS, CE and IRQ These pins can be changed from the /setup URL

Compile

This code can be compiled using Visual Studio Code and PlatformIO Addon. The settings were:

  • Board: Generic ESP8266 Module
  • Flash-Size: 1MB (FS: none, OTA: 502kB)
  • Install libraries (not included in the Arduino IDE 1.8.19):
    • Time Arduino Time library (TimeLib.h)
    • RF24 Optimized high speed nRF24L01+ driver class documentation
    • PubSubClient A client library for MQTT messaging. By Nick O'Leary
    • ArduinoJson Arduino Json library

Optional Configuration before compilation

  • number of supported inverters (set to 3 by default) defines.h
  • DTU radio id hmRadio.h
  • unformated list in webbrowser /livedata config.h, LIVEDATA_VISUALIZED

Flash ESP with firmware

  1. flash the ESP with the compiled firmware using the UART pins or any preinstalled firmware with OTA capabilities
  2. repower the ESP
  3. the ESP will start as access point (AP) if there is no network config stored in its eeprom
  4. connect to the AP, you will be forwarded to the setup page
  5. configure your WiFi settings, save, repower
  6. check your router or serial console for the IP address of the module. You can try ping the configured device name as well.

Usage

Connect the ESP to power and to your serial console (optional). The webinterface has the following abilities:

  • OTA Update (over the air update)
  • Configuration (Wifi, inverter(s), Pinout, MQTT)
  • visual display of the connected inverters / modules
  • some statistics about communication (debug)

The serial console will print the converted values which were read out of the inverter(s)

Compatiblity

For now the following inverters should work out of the box:

  • HM350
  • HM400
  • HM600
  • HM700
  • HM800
  • HM1200
  • HM1500

USED LIBRARIES

  • ESP8266WiFi 1.0
  • DNSServer 1.1.0
  • Ticker 1.0
  • ESP8266HTTPUpdateServer 1.0
  • Time 1.6.1
  • RF24 1.4.5
  • PubSubClient 2.8
  • ArduinoJson 6.19.4