From 035557269248f192fa0c20458cb83132c1dc71b8 Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 1 Sep 2022 07:25:30 +0200 Subject: [PATCH 01/11] corrected most of the review comments, except "maxlength" --- tools/esp8266/README.md | 11 ++--------- tools/esp8266/app.cpp | 14 +++++--------- tools/esp8266/app.h | 2 -- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/tools/esp8266/README.md b/tools/esp8266/README.md index fdebe916..41fb0bb0 100644 --- a/tools/esp8266/README.md +++ b/tools/esp8266/README.md @@ -36,6 +36,7 @@ For now the following inverters should work out of the box: - HM600 - HM700 - HM800 +- HM1000? - HM1200 - HM1500 @@ -48,15 +49,7 @@ These pins can be changed in the http:///setup URL or with a click on ## Compile -This code can be compiled using Visual Studio Code and **PlatformIO** Addon. The settings were: - -- Board: Generic ESP8266 Module -- Flash-Size: 4MB -- Install libraries (not included in the Arduino IDE 1.8.19): - - `Time` 1.6.1 - - `RF24` 1.4.5 - - `PubSubClient` 2.8 - - `ArduinoJson` 6.19.4 +This code can be compiled using Visual Studio Code and **PlatformIO** Addon. ## Used Libraries diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index be78d6a5..1394876c 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -52,13 +52,11 @@ void app::loop(void) { bool apActive = mWifi->loop(); mWebInst->loop(); - if(checkTicker(&mUptimeTicker, mUptimeInterval)) { - if(millis() - mPrevMillis >= 1000) { - mPrevMillis += 1000; - mUptimeSecs++; - if(0 != mTimestamp) - mTimestamp++; - } + if(millis() - mPrevMillis >= 1000) { + mPrevMillis += 1000; + mUptimeSecs++; + if(0 != mTimestamp) + mTimestamp++; } if(checkTicker(&mNtpRefreshTicker, mNtpRefreshInterval)) { @@ -658,8 +656,6 @@ const char* app::getFieldStateClass(uint8_t fieldId) { //----------------------------------------------------------------------------- void app::resetSystem(void) { mUptimeSecs = 0; - mUptimeTicker = 0xffffffff; - mUptimeInterval = 500; // [ms] mPrevMillis = 0; mNtpRefreshTicker = 0; diff --git a/tools/esp8266/app.h b/tools/esp8266/app.h index b7fd462b..4accf7d0 100644 --- a/tools/esp8266/app.h +++ b/tools/esp8266/app.h @@ -221,8 +221,6 @@ class app { } - uint32_t mUptimeTicker; - uint16_t mUptimeInterval; uint32_t mUptimeSecs; uint32_t mPrevMillis; uint8_t mHeapStatCnt; From d657d63b87d1bdcf38d11001de93ddae715da66e Mon Sep 17 00:00:00 2001 From: thfcm <112399896+thfcm@users.noreply.github.com> Date: Sat, 3 Sep 2022 13:43:18 +0200 Subject: [PATCH 02/11] Update User_Manual.md Added my TSOL TSUN-350 inverter --- tools/esp8266/User_Manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/esp8266/User_Manual.md b/tools/esp8266/User_Manual.md index 47879889..cf81dd7f 100644 --- a/tools/esp8266/User_Manual.md +++ b/tools/esp8266/User_Manual.md @@ -177,7 +177,7 @@ Gather user inverter information here to understand what differs between some in | eeprom23 | HM-1200 | 0.1.0 | 1.0.18 | 2021 | 12-24 | 269619201 | 18:21:00 | HWRev 256 | | eeprom23 | HM-1200 2t | 0.1.0 | 1.0.16 | 2021 | 10-12 | 269619207 | 17:06:00 | HWRev 256 | | fila612 | HM-700 | | 1.0.10 | 2021 | 11-01 | 104 | | | -| | | | | | | | | | +| tfhcm | TSUN-350 | | 1.0.14 | 2021 | 12-09 | 102 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 365da355342ab0baad7b06df84e2603d1177dfc8 Mon Sep 17 00:00:00 2001 From: thfcm <112399896+thfcm@users.noreply.github.com> Date: Sat, 3 Sep 2022 22:16:57 +0200 Subject: [PATCH 03/11] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Überarbeitete Readme.md - Umstrukturierung der Themen - Aktualisierte Inhaltsliste - Ergänzungen --- tools/esp8266/README.md | 226 ++++++++++++++++++++++++++-------------- 1 file changed, 150 insertions(+), 76 deletions(-) diff --git a/tools/esp8266/README.md b/tools/esp8266/README.md index 41fb0bb0..a4871a6e 100644 --- a/tools/esp8266/README.md +++ b/tools/esp8266/README.md @@ -1,35 +1,34 @@ ## Table of Contents - [Overview](#overview) -- [Compile](#compile) - * [Optional Configuration before compilation](#optional-configuration-before-compilation) -- [Flash ESP with Firmware](#flash-esp-with-firmware) -- [Usage](#usage) - [Compatiblity](#compatiblity) +- [Things needed](#things-needed) +- [Wiring things up](#wiring-things-up) + + [ESP8266 wiring example](#esp8266-wiring-example) +- [Flash the Firmware on your Ahoy DTU Hardware](#flash-the-firmware-on-your-ahoy-dtu-hardware) + + [Compiling your own Version (the geek way)](#compiling-your-own-version) + - [Optional Configuration before compilation](#optional-configuration-before-compilation) + + [Using a ready-to-flash binary using nodemcu-pyflasher (the easy way)](#using-a-ready-to-flash-binary-using-nodemcu-pyflasher) +- [Connect to your Ahoy DTU](#connect-to-your-ahoy-dtu) + + [Your Ahoy DTO is very verbose using the Serial Console](#your-ahoy-dto-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) + - [HTTP based Pages](#http-based-pages) +- [MQTT command to set the DTU without webinterface](#mqtt-command-to-set-the-dtu-without-webinterface) - [Used Libraries](#used-libraries) - [Contact](#contact) +- [ToDo's - remove when done](#todo) *** ## Overview -This page describes how the module of a Wemos D1 mini and ESP8266 is wired to the radio module, flashed and how the further steps are to communicate with the WR HM series. +This page describes how the module of a Wemos D1 mini and ESP8266 is wired to the radio module and is flashed with the latest Firmware.
+Further information will help you to communicate to the compatible converters. -The NRF24L01+ radio module is connected to the -standard SPI pins: -- SCLK (Signal Clock), -- MISO (Master In Slave Out) and -- MOSI (Master Out Slave In) - -Additional there are 3 pins, which can be set individual: -- CS (Chip Select), -- CE (Chip Enable) and -- IRQ (Interrupt) - -These pins can be changed from the /setup URL +## Compatiblity +For now the following Inverters should work out of the box: -#### Compatiblity -For now the following inverters should work out of the box: +Hoymiles Inverters - HM300 - HM350 - HM400 @@ -40,29 +39,58 @@ For now the following inverters should work out of the box: - HM1200 - HM1500 -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 in the http:///setup URL or with a click on the Setup link. +TSun Inverters: +- TSOL-350 +- TSOL-400 +- othery may work as well (need to be veryfied). + + +## Things needed +In order to build your own Ahoy DTU, you will need some things.
+This list is not closing as the Maker Community offers more Boards than we could cover in this Readme.

+ +We suggest to use a WEMOS D1 mini Board as well as a NRF24L01+ Breakout Board.
+Make sure it has the "+" in its name as we depend on some features provided with the plus-variant.
+Any other ESP8266 Board with at least 4MBytes of ROM could work as well, depending on your skills. + + +## Wiring things up + +The NRF24L01+ radio module is connected to the +standard SPI pins: +- 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: +- CS (Chip Select), +- CE (Chip Enable) and +- IRQ (Interrupt) + +*These pins can be changed from the /setup URL.* -## ESP8266 electr. associate +#### ESP8266 wiring example +ToDo: (this one needs to be reworked - also a generified one would be helpful) -## Compile -This code can be compiled using Visual Studio Code and **PlatformIO** Addon. - -## 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 -### Optional Configuration before compilation +## Flash the Firmware on your Ahoy DTU Hardware +Once your Hardware is ready to run, you need to flash the Ahoy DTU Firmware to your Board. +You can either build your own using your own configuration or use one or our pre-compiled generic builds. + + +#### Compiling your own Version +This information suits you if you want to configure and build your own firmware. + +This code comes to you as a **PlatformIO** project and can be compiled using the **PlatformIO** Addon.
+Visual Studio Code, AtomIDE and other IDE's support the PlatformIO Addon.
+If you do not want to compile your own build, you can use one of our ready-to-flash binaries. + +##### Optional Configuration before compilation - number of supported inverters (set to 3 by default) `config.h` - DTU radio id `config.h` (default = 1234567801) @@ -71,54 +99,105 @@ This code can be compiled using Visual Studio Code and **PlatformIO** Addon. Alternativly, instead of modifying `config.h`, `config_override_example.h` can be copied to `config_override.h` and customized. config_override.h is excluded from version control and stays local. -## Flash ESP with Firmware -#### nodemcu-pyflasher (easy way) +#### Using a ready-to-flash binary using nodemcu-pyflasher +This information suits you if you just want to use an easy way. + 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) -3. connect the target device with your pc. +3. open flash-tool and connect the target device with your pc. 4. Set the correct serial port and select the correct *.bin file -5. click now on "Flash NodeMCU" - -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. 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 +9. connect to the AP, you will be forwarded to the setup page +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. + + +Once your Ahoy DTU is running, you can use the Over The Air (OTA) capabilities to update ypur firmware. -X. configure your WiFi settings, save, repower -Y. check your router or serial console for the IP address of the module. You can try ping the configured device name as well. ! ATTENTION: If you update from a very low version to the newest, please make sure to wipe all flash data! -## pages -| page | output | -| ---- | ------ | -| /uptime | 0 Days, 01:37:34; now: 2022-08-21 11:13:53 | -| /reboot | reboot dtu device | -| /erase | | -| /factory | | -| /setup | | -| /save | open the setup site | -| /cmdstat | show stat from the home site | -| /visualization | | -| /livedata | | -| /json | json output from the livedata | -| /api | | - -## Usage - -The webinterface has the following abilities: -- OTA Update (over the air update) + + + + + +## Connect to your Ahoy DTU +When everything is wired up and the firmware is flashed, it is time to connect to your Ahoy DTU. + + +#### Your Ahoy DTO is very verbose using the Serial Console + When connected to your computer, you can open a Serial Console to obtain additional information. + This might be useful in case of any troubles that might occur as well as to simply obtain information about the converted values which were read out of the inverter(s). + + +#### Connect to the Ahoy DTU Webinterface using your Browser + After you have sucessfully flashed and powered your Ahoy DTU, you can access it via your Browser. + If your Ahoy DTU was able to log into the configured WiFi Network, it will try to obtain an IP-Adress from your local DHCP Server (in most cases thats your Router). + In case it could not connect to your configured Network, it will provide its own WiFi Network that you can connect to for furter configuration. The WiFi SSID ("Name") and Passwort is configured in the config.h and defaults to the SSID "AHOY-DTU" with the Passwort "esp_8266". + The Ahox DTU will keep that Network open for a certain amount of time (also configurable in the config.h and defaults to 60secs). If nothing connects to it and that time runs up, it will retry to connect to the configured network an so on. + + If yonnected to your local Network, you just have to find out the used IP Address. In must 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 192.168.0.1. + Just open the IP-Address in your browser. + + The webinterface has the following abilities: +- OTA Update (Over The Air Update) - Configuration (Wifi, inverter(s), NTP Server, Pinout, MQTT, Amplifier Power Level, Debug) - 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) - -### MQTT command to set the DTU without webinterface + + +##### HTTP based Pages + To take control of your Ahoy DTU, you can directly call one of the following sub-pages (e.g. http://192.168.0.1/setup ). + +| page | use | output | +| ---- | ------ | ------ | +| /uptime | displays the uptime uf your Ahoy DTU | 0 Days, 01:37:34; now: 2022-08-21 11:13:53 | +| /reboot | reboots the Ahoy DTU | | +| /erase | erases the EEPROM | | +| /factory | resets to the factory defaults configured in config.h | | +| /setup | opens the setup page | | +| /save | | | +| /cmdstat | show stat from the home page | | +| /visualization | displays the information from your converter | | +| /livedata | displays the live data | | +| /json | gets live-data in JSON format | json output from the livedata | +| /api | | | + + + +## MQTT command to set the DTU without webinterface [Read here](https://github.com/grindylow/ahoy/blob/development02/tools/esp8266/User_Manual.md) - ## Todo's [See this post](https://github.com/grindylow/ahoy/issues/142) + + +## 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 + + +## Contact +We run a Discord Server that can be used to get in touch with the Developers and Users. + +https://discord.gg/WzhxEY62mB + + + +## ToDo + +[See this post](https://github.com/grindylow/ahoy/issues/142) - [ ] Wechsel zu AsyncWebServer und ElegantOTA für Stabilität - [x] klarer Scheduler / Task manager, der ggf. den Receive Task priorisieren kann @@ -135,8 +214,3 @@ The serial console will print the converted values which were read out of the in - [ ] Debug Level im Setup änderbar -auch Livedata Visualisierung abschalten ? - [ ] MQTT Discovery (HomeAssistant) im Setup optional machen - [x] MQTT Subscribe nur beim Reconnect [Das subscribe in der Reconnect Procedure sollte doch nur nach einem conect ausgeführt werden und nicht bei jedem Duchlauf #139](https://github.com/grindylow/ahoy/issues/139) - -## Contact -We run a Discord Server that can be used to get in touch with the Developers and Users. - -https://discord.gg/WzhxEY62mB From 904c2fa43cc9d4e24c60dd6de3516b3e9a2c0f40 Mon Sep 17 00:00:00 2001 From: thfcm <112399896+thfcm@users.noreply.github.com> Date: Sun, 4 Sep 2022 08:49:11 +0200 Subject: [PATCH 04/11] Update README.md Implemented Change Request --- tools/esp8266/README.md | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/tools/esp8266/README.md b/tools/esp8266/README.md index a4871a6e..ddb94a36 100644 --- a/tools/esp8266/README.md +++ b/tools/esp8266/README.md @@ -23,7 +23,7 @@ ## Overview This page describes how the module of a Wemos D1 mini and ESP8266 is wired to the radio module and is flashed with the latest Firmware.
-Further information will help you to communicate to the compatible converters. +Further information will help you to communicate to the compatible inverters. ## Compatiblity For now the following Inverters should work out of the box: @@ -105,7 +105,7 @@ This information suits you if you just want to use an easy way. 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) -3. open flash-tool and connect the target device with your pc. +3. open flash-tool and connect the target device to your computer. 4. Set the correct serial port and select the correct *.bin file 5. click on "Flash NodeMCU" 6. flash the ESP with the compiled firmware using the UART pins or @@ -116,7 +116,7 @@ This information suits you if you just want to use an easy way. 11. check your router or serial console for the IP address of the module. You can try ping the configured device name as well. -Once your Ahoy DTU is running, you can use the Over The Air (OTA) capabilities to update ypur firmware. +Once your Ahoy DTU is running, you can use the Over The Air (OTA) capabilities to update your firmware. ! ATTENTION: If you update from a very low version to the newest, please make sure to wipe all flash data! @@ -130,19 +130,19 @@ Once your Ahoy DTU is running, you can use the Over The Air (OTA) capabilities t When everything is wired up and the firmware is flashed, it is time to connect to your Ahoy DTU. -#### Your Ahoy DTO is very verbose using the Serial Console +#### Your Ahoy DTU is very verbose using the Serial Console When connected to your computer, you can open a Serial Console to obtain additional information. This might be useful in case of any troubles that might occur as well as to simply obtain information about the converted values which were read out of the inverter(s). #### Connect to the Ahoy DTU Webinterface using your Browser After you have sucessfully flashed and powered your Ahoy DTU, you can access it via your Browser. - If your Ahoy DTU was able to log into the configured WiFi Network, it will try to obtain an IP-Adress from your local DHCP Server (in most cases thats your Router). - In case it could not connect to your configured Network, it will provide its own WiFi Network that you can connect to for furter configuration. The WiFi SSID ("Name") and Passwort is configured in the config.h and defaults to the SSID "AHOY-DTU" with the Passwort "esp_8266". - The Ahox DTU will keep that Network open for a certain amount of time (also configurable in the config.h and defaults to 60secs). If nothing connects to it and that time runs up, it will retry to connect to the configured network an so on. + If your Ahoy DTU was able to log into the configured WiFi Network, it will try to obtain an IP-Address from your local DHCP Server (in most cases thats your Router). + In case it could not connect to your configured Network, it will provide its own WiFi Network that you can connect to for furter configuration. The WiFi SSID *(the WiFi Name)* and Passwort is configured in the config.h and defaults to the SSID "AHOY-DTU" with the Passwort "esp_8266". + The Ahoy DTU will keep that Network open for a certain amount of time (also configurable in the config.h and defaults to 60secs). If nothing connects to it and that time runs up, it will retry to connect to the configured network an so on. - If yonnected to your local Network, you just have to find out the used IP Address. In must 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 192.168.0.1. + If connected to your local Network, you just have to find out the used IP Address. 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 192.168.1.1. Just open the IP-Address in your browser. The webinterface has the following abilities: @@ -153,7 +153,7 @@ When everything is wired up and the firmware is flashed, it is time to connect t ##### HTTP based Pages - To take control of your Ahoy DTU, you can directly call one of the following sub-pages (e.g. http://192.168.0.1/setup ). + To take control of your Ahoy DTU, you can directly call one of the following sub-pages (e.g. http://192.168.1.1/setup ). | page | use | output | | ---- | ------ | ------ | @@ -198,19 +198,3 @@ https://discord.gg/WzhxEY62mB ## ToDo [See this post](https://github.com/grindylow/ahoy/issues/142) - -- [ ] Wechsel zu AsyncWebServer und ElegantOTA für Stabilität -- [x] klarer Scheduler / Task manager, der ggf. den Receive Task priorisieren kann -- [x] Device Info Kommandos (Firmware Version, etc.) über das Dashboard anzeigen [Device Information ( `0x15` `REQ_ARW_DAT_ALL` ) SubCmd Kommandos #145](https://github.com/grindylow/ahoy/issues/145) -- [ ] AlarmData & AlarmUpdate Parsen und auf eigener Seite darstellen ------------------- SWIM LANE --------------------------- -- [ ] Device Control Kommandos aus dem Setup ermöglichen (TurnOn, TurnOff, Restart, ActivePower Limit, ReactivePower Limit, SetPowerFactor, etc.) -- [ ] Settings exportieren / importieren (API/UI) -- [ ] Settings in settings.ini speichern (LittleFS statt EEPROM) [Settings in settings.ini speichern (LittleFS statt EEPROM) #164](https://github.com/grindylow/ahoy/issues/164) -- [ ] Homepage aufräumen nur ein Status (aktuell drei AJAX Calls /uptime, /time, /cmdstat) -- [ ] app.cpp aufräumen und in hmRadio / hmProtokollGen3 auslagern -- [ ] MI Wechselrichter unterstützen (miSystem, miInverter, miDefines, miProtokollGen2 etc.) -- [ ] nRF24 Interrupt Handling sinnvoll oder warum macht die nRF24 Bibliothek ständig `0x07` Statusabfragen [NRF24 polling trotz aktiviertem IRQ #83](https://github.com/grindylow/ahoy/issues/83) -- [ ] Debug Level im Setup änderbar -auch Livedata Visualisierung abschalten ? -- [ ] MQTT Discovery (HomeAssistant) im Setup optional machen -- [x] MQTT Subscribe nur beim Reconnect [Das subscribe in der Reconnect Procedure sollte doch nur nach einem conect ausgeführt werden und nicht bei jedem Duchlauf #139](https://github.com/grindylow/ahoy/issues/139) From 8b6185b02f7fe98b7a36f409584c0b35134a76eb Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sun, 4 Sep 2022 12:18:37 +0200 Subject: [PATCH 05/11] Update Changes for release 0.5.16 --- tools/esp8266/CHANGES.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/esp8266/CHANGES.md b/tools/esp8266/CHANGES.md index 3e0714be..5b047ae9 100644 --- a/tools/esp8266/CHANGES.md +++ b/tools/esp8266/CHANGES.md @@ -1,5 +1,14 @@ # Changelog +- v0.5.16 + * Add alarm messages dictonary in the hminverter class + * show last alarm message in the overview after receiving the message id from the AlarmData command + * Added No-PowerLimit function/setting (thx @lumapu) + * Bug fix #195 trailing and leading spaces in setup parameters (thx @lumapu) + * Added parametric CAD model for a case (thx @cubinet-code) + * Code styling improvements (eg. dynamic creation of html code) (thx @stefan123t, @lumapu) + * Mqtt publish action is now after successful parse a payload, no own ticker + * Fixes/improvements #183, #184, #216, #213, #196, #176, #171 - v0.5.15 * Bug fix: mqtt payload handling (thx @klahus1, silverserver) * Bug fix: eeprom alignment fixed (thx @klahus1) From bbae504e614935be9d41bc4e7ad432f22b46f60b Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sun, 4 Sep 2022 15:04:48 +0200 Subject: [PATCH 06/11] add yield total/day to overview for 1ch --- tools/esp8266/hmDefines.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/esp8266/hmDefines.h b/tools/esp8266/hmDefines.h index 6330db98..28615ed7 100644 --- a/tools/esp8266/hmDefines.h +++ b/tools/esp8266/hmDefines.h @@ -126,6 +126,8 @@ const byteAssign_t hm1chAssignment[] = { { FLD_F, UNIT_HZ, CH0, 16, 2, 100 }, { FLD_T, UNIT_C, CH0, 26, 2, 10 }, { FLD_ALARM_MES_ID, UNIT_NONE, CH0, 28, 2, 1 }, + { FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC }, + { FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC }, { FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC }, { FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC } }; From b1311e797c0431fa72c89295b8acb5f17f627d43 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sun, 4 Sep 2022 15:07:18 +0200 Subject: [PATCH 07/11] fix in dev compile action --- .github/workflows/compile_development.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile_development.yml b/.github/workflows/compile_development.yml index 838293b4..64c05bfd 100644 --- a/.github/workflows/compile_development.yml +++ b/.github/workflows/compile_development.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: development02 + ref: development03 - uses: benjlevesque/short-sha@v1.2 id: short-sha with: From 84ed32a05ac2b1b9fb6c77606dd13f5b8820f8d8 Mon Sep 17 00:00:00 2001 From: thfcm Date: Sun, 4 Sep 2022 21:47:40 +0200 Subject: [PATCH 08/11] Added some additional hints --- tools/esp8266/config.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/esp8266/config.h b/tools/esp8266/config.h index ab633f9a..25d8769d 100644 --- a/tools/esp8266/config.h +++ b/tools/esp8266/config.h @@ -6,21 +6,30 @@ #ifndef __CONFIG_H__ #define __CONFIG_H__ -// fallback WiFi info + +//------------------------------------- +// WIFI CONFIGURATION +//------------------------------------- + +// Fallback WiFi Info #define FB_WIFI_SSID "YOUR_WIFI_SSID" #define FB_WIFI_PWD "YOUR_WIFI_PWD" -// access point info +// Access Point Info +// In case there is no WiFi Network or Ahoy can not connect to it, it will act as an Access Point + #define WIFI_AP_SSID "AHOY-DTU" #define WIFI_AP_PWD "esp_8266" -// stay in access point mode all the time + +// If the next line is uncommented, Ahoy will stay in access point mode all the time //#define AP_ONLY //------------------------------------- // CONFIGURATION - COMPILE TIME //------------------------------------- + // time in seconds how long the station info (ssid + pwd) will be tried #define WIFI_TRY_CONNECT_TIME 30 @@ -31,7 +40,7 @@ // default device name #define DEF_DEVICE_NAME "AHOY-DTU" -// default pinout +// default pinout (GPIO Number) #define DEF_RF24_CS_PIN 15 #define DEF_RF24_CE_PIN 2 #define DEF_RF24_IRQ_PIN 0 From 77b706a1ce936787f61d6d93bf7995be622cc0ec Mon Sep 17 00:00:00 2001 From: thfcm Date: Sun, 4 Sep 2022 21:51:46 +0200 Subject: [PATCH 09/11] Set default NTP Port to 123 --- tools/esp8266/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/esp8266/config.h b/tools/esp8266/config.h index 25d8769d..bfbfeb86 100644 --- a/tools/esp8266/config.h +++ b/tools/esp8266/config.h @@ -85,7 +85,7 @@ #define DEF_NTP_SERVER_NAME "pool.ntp.org" // default NTP server port -#define DEF_NTP_PORT 8888 +#define DEF_NTP_PORT 123 // NTP refresh interval in ms (default 12h) #define NTP_REFRESH_INTERVAL 12 * 3600 * 1000 From 03a6b87cc1d889d6082c0b4e088d530f8990f914 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Mon, 5 Sep 2022 08:53:41 +0200 Subject: [PATCH 10/11] fix in parser for 1CH inverters --- tools/esp8266/hmDefines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/esp8266/hmDefines.h b/tools/esp8266/hmDefines.h index 28615ed7..baec0f75 100644 --- a/tools/esp8266/hmDefines.h +++ b/tools/esp8266/hmDefines.h @@ -125,7 +125,7 @@ const byteAssign_t hm1chAssignment[] = { { FLD_PRA, UNIT_VA, CH0, 20, 2, 10 }, { FLD_F, UNIT_HZ, CH0, 16, 2, 100 }, { FLD_T, UNIT_C, CH0, 26, 2, 10 }, - { FLD_ALARM_MES_ID, UNIT_NONE, CH0, 28, 2, 1 }, + { FLD_ALARM_MES_ID, UNIT_NONE, CH0, 24, 2, 1 }, { FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC }, { FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC }, { FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC }, From 0ae56efb2f2b8dade6c1d3f062aa3c697ace8847 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Mon, 5 Sep 2022 09:01:38 +0200 Subject: [PATCH 11/11] Build Dev-Version 0.5.17 --- tools/esp8266/defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index 33732ff5..210604a5 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 5 -#define VERSION_PATCH 16 +#define VERSION_PATCH 17 //-------------------------------------