From ac79828eb511700a998e828892749bb63aba3f15 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Tue, 16 Aug 2022 15:19:45 +0200 Subject: [PATCH] 0.5.13 Bug fixes and minor updates - Solves Issue 156, 158, 159 - Uncheck "Reboot after save" by default, It is only madatory if an inverter is added or changed (name,address) - Add "*" to denote mandatory fields in setup - Remove "MQTT Interval read only" in setup - Correct typos in Markdown files --- tools/esp8266/User_Manual.md | 46 +++++++++++++++---------------- tools/esp8266/defines.h | 2 +- tools/esp8266/html/h/setup_html.h | 2 +- tools/esp8266/html/setup.html | 2 -- tools/esp8266/web.cpp | 39 ++++++++++++++------------ 5 files changed, 47 insertions(+), 44 deletions(-) diff --git a/tools/esp8266/User_Manual.md b/tools/esp8266/User_Manual.md index dcdd5cb4..5667aa3e 100644 --- a/tools/esp8266/User_Manual.md +++ b/tools/esp8266/User_Manual.md @@ -1,30 +1,30 @@ # User Manual Ahoy DTU (on ESP8266) -15.08.2022 +16.08.2022 ## Introduction -see the repository [here](https://github.com/grindylow/ahoy/blob/main/tools/esp8266/README.md) +See the repository [here](https://github.com/grindylow/ahoy/blob/main/tools/esp8266/README.md) ## Setup -Assuming you have a running ahoy-dtu and you can access te setup page. -In the initial case or after click "erease settings" the fields for the inverter setup are empty. +Assuming you have a running ahoy-dtu and you can access the setup page. +In the initial case or after click "erase settings" the fields for the inverter setup are empty. Set at least the serial number and a name for each inverter, check the "reboot after save" and click the "Save" button. ## Active Power Limit via Setup Page I you leave the field "Active Power Limit" empty during the setup and reboot the ahoy-dtu a value of 65535 will be filled in. -That is the value you have to fill in case you want to operate the inverter without a active power limit. -If the value is 65535 or -1 after another reboot the value will be seted automatically to "100" and in the drop-down menu "relativ in percent persistent" will be seted. Of course you can do this also by your self. +That is the value you have to fill in case you want to operate the inverter without a active power limit. +If the value is 65535 or -1 after another reboot the value will be set automatically to "100" and in the drop-down menu "relative in percent persistent" will be set. Of course you can do this also by your self. You can change the setting in the following manner. Decide if you want to set -- an absolut value in Watt -- an relativ value in percent based on the maximum Power cababilities of the inverter +- an absolute value in Watt +- an relative value in percent based on the maximum Power capabilities of the inverter and if this settings shall be - persistent - not persistent -after a power cylce of the inverter (P_DC=0 and P_AC=0 for at least 10 seconds) +after a power cycle of the inverter (P_DC=0 and P_AC=0 for at least 10 seconds) -The user has to ensure sensfule settings. Remember that for the inverters of 3rd generation the relative active power limit is in the range of 2% up to 100%. -Also an absolut active power limit below approx. 30Watt is not senseful because of the control capabilities and reactive power load. +The user has to ensure correct settings. Remember that for the inverters of 3rd generation the relative active power limit is in the range of 2% up to 100%. +Also an absolute active power limit below approx. 30Watt is not correct because of the control capabilities and reactive power load. ## Active Power Limit via MQTT The ahoy-dtu subscribes on the topic /devcontrol/# if the mqtt broker is set-up correctly. The default topic is inverter/devcontrol/#. @@ -58,10 +58,10 @@ The implementation allows to set any of the available Commands: Init = 0xff } DevControlCmdType; ``` -The MQTT payload will be seted on first to bytes and DATA2 will be seted on the second two bytes if the corresponding DevControlCmdType supports 4 byte data. +The MQTT payload will be set on first to bytes and DATA2 will be set on the second two bytes if the corresponding DevControlCmdType supports 4 byte data. So as example sending any payload on inverter/devcontrol/0/1 will switch off the inverter. - + ## Active Power Limit via REST API It is also implemented to set the power limit via REST API call. Therefore send a POST request to the endpoint /api. The response will always be a json with {success:true} @@ -76,7 +76,7 @@ The payload shall be a json formated string in the following manner } ``` With the following value ranges - + | Value | range | note | | --------------------------- | ----------- | ------------------------------- | @@ -84,7 +84,7 @@ With the following value ranges | | [0...255] | integer uint8, subcmds eg. 0x0b | | | [0...65535] | uint16 | | | [0...3] | integer uint8 | - + Example to set the active power limit non persistent to 10% ```json { @@ -105,23 +105,23 @@ Example to set the active power limit persistent to 600Watt "payload2": 256 } ``` - + ### Developer Information REST API -In the same approach as for MQTT any other SubCmd can be applied and the respsine payload can be observed in the serial logs. Eg. request the Alarm Data. +In the same approach as for MQTT any other SubCmd can be applied and the response payload can be observed in the serial logs. Eg. request the Alarm Data. + - ## Issues and Debuging for active power limit settings -Turn on the serial debuging in the setup. Try to have find out if the behavior is deterministic. That means can you reproduce the behavior. Be patient and wait on inverter reactions at least some minutes and beware that the DC-Power is sufficient. +Turn on the serial debugging in the setup. Try to have find out if the behavior is deterministic. That means can you reproduce the behavior. Be patient and wait on inverter reactions at least some minutes and beware that the DC-Power is sufficient. In case of issues please report: 1. Version of firmware 2. The output of the serial debug esp. the TX messages starting with "0x51" and the RX messages starting with "0xD1" or "0xF1" 3. Which case you have tried: Setup-Page, MQTT, REST API and at what was shown on the "Visualization Page" at the Location "Limit" -4. The setting means payload, relativ, absolut, persisten, not persisten (see tables above) +4. The setting means payload, relative, absolute, persistent, not persistent (see tables above) + - **Developer Information General for Active Power Limit** ⚡To be verified by field tests and feedback -Internally this values will be seted for the second two bytes for MainCmd: 0x51 SubCmd: 0x0b --> DevControl set ActivePowerLimit +Internally this values will be set for the second two bytes for MainCmd: 0x51 SubCmd: 0x0b --> DevControl set ActivePowerLimit ```C typedef enum { // ToDo: to be verified by field tests AbsolutNonPersistent = 0x0000, // 0 @@ -129,4 +129,4 @@ typedef enum { // ToDo: to be verified by field tests AbsolutPersistent = 0x0100, // 256 RelativPersistent = 0x0101 // 257 } PowerLimitControlType; -``` \ No newline at end of file +``` diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index 59a67c59..8c283e8d 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 12 +#define VERSION_PATCH 13 //------------------------------------- diff --git a/tools/esp8266/html/h/setup_html.h b/tools/esp8266/html/h/setup_html.h index 69dbcd96..c114fdfc 100644 --- a/tools/esp8266/html/h/setup_html.h +++ b/tools/esp8266/html/h/setup_html.h @@ -1,4 +1,4 @@ #ifndef __SETUP_HTML_H__ #define __SETUP_HTML_H__ -const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

ERASE SETTINGS (not WiFi)

Device Host Name

WiFi

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

Inverter{INVERTERS}

General

NTP Server
MQTT
System Config

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

Serial Console



 

"; +const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

ERASE SETTINGS (not WiFi)

Device Host Name

WiFi

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

Inverter{INVERTERS}

General

NTP Server
MQTT
System Config

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

Serial Console



 

"; #endif /*__SETUP_HTML_H__*/ diff --git a/tools/esp8266/html/setup.html b/tools/esp8266/html/setup.html index 72bf2f00..3a970d5e 100644 --- a/tools/esp8266/html/setup.html +++ b/tools/esp8266/html/setup.html @@ -109,8 +109,6 @@ - - diff --git a/tools/esp8266/web.cpp b/tools/esp8266/web.cpp index da229f3f..ce406a86 100644 --- a/tools/esp8266/web.cpp +++ b/tools/esp8266/web.cpp @@ -189,7 +189,7 @@ void web::showSetup(void) { inv += F(""); inv += F("