diff --git a/tools/esp8266/README.md b/tools/esp8266/README.md index 23e63832..b6b300e6 100644 --- a/tools/esp8266/README.md +++ b/tools/esp8266/README.md @@ -74,6 +74,7 @@ For now the following inverters should work out of the box: (*) EEPROM changes require settings to be changed, your settings will be overwritten and need to be set again! +- v0.4.25 added default SERIAL/MQTT/SEND_INTERVAL #100, fixed env:node_mcu_v2 build #101 - v0.4.24 added fixes for #63, #88, #93. revert #36 (*) EEPROM changes - v0.4.23 added workflow, fix index.html to load inverter info immediately, changed timestamp to 1 for stand alone ESP #90, Implement MQTT discovery for Home Assistant - v0.4.22 compiles with PlatformIO diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index 0af62993..38b75e6e 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -15,11 +15,11 @@ app::app() : Main() { DPRINTLN(DBG_VERBOSE, F("app::app():Main")); mSendTicker = 0xffff; - mSendInterval = MIN_SEND_INTERVAL; + mSendInterval = SEND_INTERVAL; mMqttTicker = 0xffff; - mMqttInterval = MIN_MQTT_INTERVAL; + mMqttInterval = MQTT_INTERVAL; mSerialTicker = 0xffff; - mSerialInterval = MIN_SERIAL_INTERVAL; + mSerialInterval = SERIAL_INTERVAL; mMqttActive = false; mTicker = 0; diff --git a/tools/esp8266/config.h b/tools/esp8266/config.h index 3a250b49..9851caef 100644 --- a/tools/esp8266/config.h +++ b/tools/esp8266/config.h @@ -37,14 +37,14 @@ // number of configurable inverters #define MAX_NUM_INVERTERS 3 -// minimum serial interval -#define MIN_SERIAL_INTERVAL 5 +// default serial interval +#define SERIAL_INTERVAL 5 -// minimum send interval -#define MIN_SEND_INTERVAL 30 +// default send interval +#define SEND_INTERVAL 30 -// minimum mqtt interval -#define MIN_MQTT_INTERVAL 60 +// default mqtt interval +#define MQTT_INTERVAL 60 // maximum human readable inverter name length #define MAX_NAME_LENGTH 16 diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index dd763ebf..c746930c 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -21,7 +21,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 4 -#define VERSION_PATCH 24 +#define VERSION_PATCH 25 //------------------------------------- @@ -30,6 +30,14 @@ typedef struct { uint8_t packet[MAX_RF_PAYLOAD_SIZE]; } packet_t; +// minimum serial interval +#define MIN_SERIAL_INTERVAL 5 + +// minimum send interval +#define MIN_SEND_INTERVAL 15 + +// minimum mqtt interval +#define MIN_MQTT_INTERVAL 60 //------------------------------------- // EEPROM diff --git a/tools/esp8266/platformio.ini b/tools/esp8266/platformio.ini index eb31d2e6..0728ec47 100644 --- a/tools/esp8266/platformio.ini +++ b/tools/esp8266/platformio.ini @@ -9,6 +9,19 @@ monitor_speed = 115200 board_build.f_cpu = 80000000L ;build_flags = -DDEBUG_ESP_PORT=Serial +lib_deps = + nrf24/RF24@1.4.2 + paulstoffregen/Time@^1.6.1 + knolleary/PubSubClient@^2.8 + bblanchon/ArduinoJson@^6.19.4 + ;esp8266/DNSServer@1.1.0 + ;esp8266/EEPROM@^1.0 + ;esp8266/ESP8266HTTPUpdateServer@^1.0 + ;esp8266/ESP8266WebServer@^1.0 + ;esp8266/ESP8266WiFi@^1.0 + ;esp8266/SPI@1.0 + ;esp8266/Ticker@^1.0 + [env:node_mcu_v2] platform = espressif8266 framework = arduino @@ -17,9 +30,8 @@ monitor_speed = 115200 board_build.f_cpu = 80000000L upload_port = /dev/ttyUSB0 - lib_deps = nrf24/RF24@1.4.2 - PubSubClient - Time - ArduinoJson + paulstoffregen/Time@^1.6.1 + knolleary/PubSubClient@^2.8 + bblanchon/ArduinoJson@^6.19.4