ahoy/tools/esp8266
lumapu 539d4f73c1 * added config.h for general configuration
* added option to compile WiFi SSID + PWD to firmware
* added option to configure WiFi access point name and password
* added feature to retry connect to station WiFi (configurable timeouts)
* updated index.html
* added option for factory reset
* added info about project on index.html
* moved "update" and "home" to footer
* fixed #23 HM1200 yield day unit
* fixed DNS name of ESP after setup (some commits before)
2022-05-03 21:03:03 +02:00
..
html * added config.h for general configuration 2022-05-03 21:03:03 +02:00
test/hmClassTest * version 0.3.0 2022-04-30 02:13:38 +02:00
app.cpp * added config.h for general configuration 2022-05-03 21:03:03 +02:00
app.h * added config.h for general configuration 2022-05-03 21:03:03 +02:00
CircularBuffer.h * new structure 2022-04-24 01:00:06 +02:00
config.h * added config.h for general configuration 2022-05-03 21:03:03 +02:00
crc.cpp * renamed .ino (must be identical to parent folder name) 2022-04-20 08:58:23 +02:00
crc.h * renamed .ino (must be identical to parent folder name) 2022-04-20 08:58:23 +02:00
debug.h * fixed issues (found during unit test) 2022-04-30 02:02:41 +02:00
defines.h * added config.h for general configuration 2022-05-03 21:03:03 +02:00
eep.h * preliminary state, compiles good not tested on hardware 2022-04-27 23:03:37 +02:00
esp8266.ino * added config.h for general configuration 2022-05-03 21:03:03 +02:00
hmDefines.h * added config.h for general configuration 2022-05-03 21:03:03 +02:00
hmInverter.h * fixed issues (found during unit test) 2022-04-30 02:02:41 +02:00
hmRadio.h Fix in live view, larger boxes in CSS, SPI-Speed define 2022-05-02 19:06:10 +02:00
hmSystem.h * fixed issues (found during unit test) 2022-04-30 02:02:41 +02:00
main.cpp * added config.h for general configuration 2022-05-03 21:03:03 +02:00
main.h * added config.h for general configuration 2022-05-03 21:03:03 +02:00
mqtt.h * preliminary state, compiles good not tested on hardware 2022-04-27 23:03:37 +02:00
README.md * added HM800 defines 2022-04-29 20:33:15 +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 Arduino. The settings were:

  • Board: Generic ESP8266 Module
  • Flash-Size: 1MB (FS: none, OTA: 502kB)

Optional Configuration before compilation

  • number of supported inverters (set to 3 by default) defines.h
  • enable channel hopping hmRadio.h
  • DTU radio id hmRadio.h
  • unformated list in webbrowser /livedata defines.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:

  • HM400
  • HM600
  • HM800
  • HM1200

USED LIBRARIES

  • Time
  • RF24
  • PubSubClient