From a6983d52f7a877e5b5c286796dd060f01235557a Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sat, 24 Nov 2018 12:46:32 +0200 Subject: [PATCH 01/20] Increase delays before web ui is refreshed The current 5-second delay before refreshing web ui after settings were changed is not always sufficient as wifi can take up to 10 seconds to re-connect and be available on some wireless networks, depending on the device's RSSI. This change increases the delay from 5 seconds to 10 seconds which have been tested down to RSSI levels of 25 to be sufficient. This change also increases the refresh delay when a local OTA is uploaded to 20 seconds which allows enough time for the cp: process to complete and the device to reconnected to wifi under >= 25 RSSI conditions. --- sonoff/xdrv_01_webserver.ino | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 09df2dd7d..7c7f60718 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -95,7 +95,12 @@ const char HTTP_SCRIPT_WIFI[] PROGMEM = "}"; const char HTTP_SCRIPT_RELOAD[] PROGMEM = - "setTimeout(function(){location.href='.';},5000);" + "setTimeout(function(){location.href='.';},10000);" + ""; + +// Local OTA upgrade requires more time to complete cp: before web ui should be reloaded +const char HTTP_SCRIPT_RELOAD_OTA[] PROGMEM = + "setTimeout(function(){location.href='.';},20000);" ""; const char HTTP_SCRIPT_CONSOL[] PROGMEM = @@ -1463,7 +1468,7 @@ void HandleUploadDone(void) } else { page += F("green'>" D_SUCCESSFUL "
"); page += FPSTR(HTTP_MSG_RSTRT); - page.replace(F(""), FPSTR(HTTP_SCRIPT_RELOAD)); + page.replace(F(""), FPSTR(HTTP_SCRIPT_RELOAD_OTA)); // Refesh main web ui after OTA upgrade ShowWebSource(SRC_WEBGUI); restart_flag = 2; // Always restart to re-enable disabled features during update } From ef4e2b297c9f2da3bdf667214de74400771eaad2 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sat, 24 Nov 2018 13:00:45 +0200 Subject: [PATCH 02/20] Decrease update webui refresh to 5 seconds Decrease update webui refresh to 5 seconds --- sonoff/xdrv_01_webserver.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 7c7f60718..eeebe5861 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -95,7 +95,7 @@ const char HTTP_SCRIPT_WIFI[] PROGMEM = "}"; const char HTTP_SCRIPT_RELOAD[] PROGMEM = - "setTimeout(function(){location.href='.';},10000);" + "setTimeout(function(){location.href='.';},5000);" ""; // Local OTA upgrade requires more time to complete cp: before web ui should be reloaded From 263839a1a05e69a7904ff5b00df8759d3607356c Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 24 Nov 2018 12:01:13 +0100 Subject: [PATCH 03/20] Fix MqttRetry values above 255 Fix MqttRetry values above 255 seconds (#4424) --- sonoff/_changelog.ino | 1 + sonoff/xdrv_02_mqtt.ino | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 91e7ebe9c..3358fd957 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -4,6 +4,7 @@ * Add support for I2C MGC3130 Electric Field Effect sensor by Christian Baars (#3774, #4404) * Add initial support for Hass sensor discovery (#4380) * Fix possible strncat buffer overflows + * Fix MqttRetry values above 255 seconds (#4424) * * 6.3.0.11 20181120 * Add delays removed in 6.3.0.9 (#4233) diff --git a/sonoff/xdrv_02_mqtt.ino b/sonoff/xdrv_02_mqtt.ino index 34025c5fc..2e026c71f 100644 --- a/sonoff/xdrv_02_mqtt.ino +++ b/sonoff/xdrv_02_mqtt.ino @@ -70,7 +70,7 @@ const char kMqttCommands[] PROGMEM = D_CMND_MQTTUSER "|" D_CMND_MQTTPASSWORD "|" D_CMND_FULLTOPIC "|" D_CMND_PREFIX "|" D_CMND_GROUPTOPIC "|" D_CMND_TOPIC "|" D_CMND_PUBLISH "|" D_CMND_BUTTONTOPIC "|" D_CMND_SWITCHTOPIC "|" D_CMND_BUTTONRETAIN "|" D_CMND_SWITCHRETAIN "|" D_CMND_POWERRETAIN "|" D_CMND_SENSORRETAIN ; -uint8_t mqtt_retry_counter = 1; // MQTT connection retry counter +uint16_t mqtt_retry_counter = 1; // MQTT connection retry counter uint8_t mqtt_initial_connection_state = 2; // MQTT connection messages state bool mqtt_connected = false; // MQTT virtual connection status From 9608bfd2e5a36211df4ffc796be30f7ea61887e9 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 24 Nov 2018 12:04:30 +0100 Subject: [PATCH 04/20] Update xdrv_01_webserver.ino --- sonoff/xdrv_01_webserver.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index eeebe5861..a6c2a2a1c 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -95,7 +95,7 @@ const char HTTP_SCRIPT_WIFI[] PROGMEM = "}"; const char HTTP_SCRIPT_RELOAD[] PROGMEM = - "setTimeout(function(){location.href='.';},5000);" + "setTimeout(function(){location.href='.';},9000);" ""; // Local OTA upgrade requires more time to complete cp: before web ui should be reloaded From 01db8fa25b10834ac55b1052d582f6ccc6d497d6 Mon Sep 17 00:00:00 2001 From: andrethomas2 <43345003+andrethomas2@users.noreply.github.com> Date: Sat, 24 Nov 2018 13:28:32 +0200 Subject: [PATCH 05/20] Update _changelog.ino --- sonoff/_changelog.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 3358fd957..312c2855d 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -5,6 +5,7 @@ * Add initial support for Hass sensor discovery (#4380) * Fix possible strncat buffer overflows * Fix MqttRetry values above 255 seconds (#4424) + * Increase webui refresh time delay for Save Settings and local OTA Upload (#4423) * * 6.3.0.11 20181120 * Add delays removed in 6.3.0.9 (#4233) From 4b57bff7282962a830460828217002a21e309bb9 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 24 Nov 2018 16:08:53 +0100 Subject: [PATCH 06/20] Rename Module 45 to Blitzwolf SHP Rename Module 45 to Blitzwolf SHP as it serves both SHP2 and SHP6 (among others) --- RELEASENOTES.md | 2 +- sonoff/sonoff_template.h | 33 ++++++++++++++++++++++----------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 161f03415..254cf32ce 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -66,7 +66,7 @@ Module | Description 42 Zengge WF017 | Zengge WF017 Wifi RGB(W) Led Controller 43 Sonoff Pow R2 | Sonoff Pow R2 Wifi Smart Switch with Energy Monitoring 44 Sonoff iFan02 | Sonoff iFan02 Wifi Smart Ceiling Fan with Light -45 BlitzWolf SHP2 | BlitzWolf BW-SHP2, BW-SHP6, HomeCube SP1, Gosund SP111, Teckin SP22 Wifi Smart Switch with Energy Monitoring +45 BlitzWolf SHP | BlitzWolf BW-SHP2, BW-SHP6, HomeCube SP1, Gosund SP111, Teckin SP22 Wifi Smart Switch with Energy Monitoring 46 Shelly 1 | Shelly 1 Open Source Wifi Relay Module 47 Shelly 2 | Shelly 2 Wifi 2-gang Relay Module with Energy Monitoring 48 Xiaomi Philips | Xiaomi Philips Wifi WW Led Bulb diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 3135dd339..b95e7804e 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -243,7 +243,7 @@ enum SupportedModules { ZENGGE_ZF_WF017, SONOFF_POW_R2, SONOFF_IFAN02, - BLITZWOLF_BWSHP2, + BLITZWOLF_BWSHP, SHELLY1, SHELLY2, PHILIPS, @@ -473,7 +473,7 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = { WION, SHELLY1, SHELLY2, - BLITZWOLF_BWSHP2, // Socket Relay Devices with Energy Monitoring + BLITZWOLF_BWSHP, // Socket Relay Devices with Energy Monitoring TECKIN, APLIC_WDP303075, GOSUND, @@ -1104,10 +1104,11 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_REL4, // GPIO15 WIFI_O3 Relay 4 (0 = Off, 1 = On) controlling the fan 0, 0 }, - { "BlitzWolf SHP2", // BlitzWolf BW-SHP2 (ESP8285 - BL0937 or HJL-01 Energy Monitoring) + { "BlitzWolf SHP", // BlitzWolf BW-SHP2 and BW-SHP6 (ESP8285 - BL0937 or HJL-01 Energy Monitoring) // https://www.banggood.com/BlitzWolf-BW-SHP2-Smart-WIFI-Socket-EU-Plug-220V-16A-Work-with-Amazon-Alexa-Google-Assistant-p-1292899.html // https://www.amazon.de/Steckdose-Homecube-intelligente-Verbrauchsanzeige-funktioniert/dp/B076Q2LKHG/ref=sr_1_fkmr0_1 // https://www.amazon.de/Intelligente-Stromverbrauch-Fernsteurung-Schaltbare-Energieklasse/dp/B076WZQS4S/ref=sr_1_1 + // https://www.aliexpress.com/store/product/BlitzWolf-BW-SHP6-EU-Plug-Metering-Version-WIFI-Smart-Socket-220V-240V-10A-Work-with-Amazon/1965360_32945504669.html GPIO_LED2_INV, // GPIO00 Red Led (1 = On, 0 = Off) GPIO_USER, // GPIO01 Serial RXD and Optional sensor GPIO_LED1_INV, // GPIO02 Blue Led (1 = On, 0 = Off) @@ -1243,25 +1244,25 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { 0, 0, 0 }, { "ARMTR Dimmer", // ARMTRONIX Dimmer, one or two channel (ESP8266 w/ separate MCU dimmer) - // https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-two-triac-board/ - // https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-esp8266-one-triac-board-alexaecho/ - GPIO_USER, - GPIO_TXD, // GPIO01 MCU serial control + // https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-two-triac-board/ + // https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-esp8266-one-triac-board-alexaecho/ GPIO_USER, - GPIO_RXD, // GPIO03 MCU serial control + GPIO_TXD, // GPIO01 MCU serial control + GPIO_USER, + GPIO_RXD, // GPIO03 MCU serial control GPIO_USER, GPIO_USER, 0, 0, 0, 0, 0, 0, // Flash connection GPIO_USER, GPIO_USER, - GPIO_USER, + GPIO_USER, GPIO_USER, GPIO_USER, 0 }, { "SK03 Outdoor", // Outdoor smart plug with power monitoring HLW8012 chip - https://www.amazon.com/gp/product/B07CG7MBPV GPIO_KEY1, // GPIO00 Button - 0, 0, 0, + 0, 0, 0, GPIO_HLW_CF, // GPIO04 HLW8012 CF power GPIO_NRG_CF1, // GPIO05 HLW8012 CF1 current / voltage 0, 0, 0, 0, 0, 0, // Flash connection @@ -1270,7 +1271,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_LED1_INV, // GPIO14 Blue Led (0 = On, 1 = Off) GPIO_REL1, // GPIO15 Relay (0 = Off, 1 = On) 0, 0 - } + } }; /* @@ -1385,6 +1386,16 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_USER, // GPIO16 (D16) 0 // ADC0 Analog input (A0) } + + { "Delock 11826", // Delock 11826 (ESP8285) = Sonoff Basic + GPIO_KEY1, // GPIO00 Button + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_REL1, // GPIO12 Red Led and Relay (0 = Off, 1 = On) + GPIO_LED1_INV, // GPIO13 Green Led (0 = On, 1 = Off) + 0, 0, 0, 0 + } + */ #endif // _SONOFF_TEMPLATE_H_ From f391c0fd651afe2f8037145f36995310df0711c6 Mon Sep 17 00:00:00 2001 From: Joel Stein Date: Sat, 24 Nov 2018 16:32:09 +0100 Subject: [PATCH 07/20] OBI: make UART user configurable --- sonoff/sonoff_template.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 3135dd339..8332e7881 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -1177,7 +1177,9 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { }, { "OBI Socket", // OBI socket (ESP8266) - https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706 GPIO_USER, // GPIO00 - 0,0,0, + GPIO_USER, // GPIO01 Serial RXD + 0, + GPIO_USER, // GPIO03 Serial TXD GPIO_LED1, // GPIO04 Blue LED GPIO_REL1, // GPIO05 (Relay OFF, but used as Relay Switch) 0, 0, 0, 0, 0, 0, // Flash connection From 0e56044eb5049d17fdbc48500c9fb214a435ab89 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sat, 24 Nov 2018 18:12:49 +0200 Subject: [PATCH 08/20] Add main loop load average Add main loop avarage duty cycle measured against setoption36 value to telemetry data as LoadAvg --- sonoff/sonoff.ino | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 96b0519a8..b1a279b47 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -190,6 +190,7 @@ char mqtt_data[MESSZ]; // MQTT publish buffer and web page char log_data[LOGSZ]; // Logging char web_log[WEB_LOG_SIZE] = {'\0'}; // Web log buffer String backlog[MAX_BACKLOG]; // Command backlog +uint32_t loop_load_avg = 0; // Indicative loop load average /********************************************************************************************/ @@ -1575,6 +1576,8 @@ void MqttShowState(void) snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_VCC "\":%s"), mqtt_data, stemp1); #endif + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"LoadAvg\":%u"), mqtt_data, loop_load_avg); + for (byte i = 0; i < devices_present; i++) { if (i == light_device -1) { LightState(1); @@ -2579,6 +2582,15 @@ void GpioInit(void) XdrvCall(FUNC_PRE_INIT); } + +void update_loop_load_avg(uint32_t loop_activity) +{ + uint32_t loops_per_second = 1000 / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; // We need to keep track of this many loops per second + uint32_t this_cycle_ratio = 100 * loop_activity / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; + uint32_t new_load_avg = loop_load_avg-(loop_load_avg/loops_per_second); // Take away one loop average + new_load_avg = new_load_avg + this_cycle_ratio; + loop_load_avg = new_load_avg; +} extern "C" { extern struct rst_info resetInfo; @@ -2785,4 +2797,9 @@ void loop(void) delay(my_activity /2); // If wifi down and my_activity > setoption36 then force loop delay to 1/3 of my_activity period } } + if (my_activity < (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]) { + update_loop_load_avg(my_activity); + } else { + update_loop_load_avg((uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]); // Assume 100% loop cycle ratio + } } From 4700e49d705cdd29da6a05cadfe0fa9ca0fa9f8b Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 24 Nov 2018 17:16:27 +0100 Subject: [PATCH 09/20] Update sonoff.ino --- sonoff/sonoff.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index b1a279b47..f461b6de0 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -125,6 +125,7 @@ int wifi_state_flag = WIFI_RESTART; // Wifi state flag int tele_period = 1; // Tele period timer int blinks = 201; // Number of LED blinks uint32_t uptime = 0; // Counting every second until 4294967295 = 130 year +uint32_t loop_load_avg = 0; // Indicative loop load average uint32_t global_update = 0; // Timestamp of last global temperature and humidity update float global_temperature = 0; // Provide a global temperature to be used by some sensors float global_humidity = 0; // Provide a global humidity to be used by some sensors @@ -190,7 +191,7 @@ char mqtt_data[MESSZ]; // MQTT publish buffer and web page char log_data[LOGSZ]; // Logging char web_log[WEB_LOG_SIZE] = {'\0'}; // Web log buffer String backlog[MAX_BACKLOG]; // Command backlog -uint32_t loop_load_avg = 0; // Indicative loop load average + /********************************************************************************************/ From 164db4e12b4789aea0594303834e3d74d0293519 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 24 Nov 2018 17:22:06 +0100 Subject: [PATCH 10/20] Clean up Clean up --- sonoff/support.ino | 9 --------- sonoff/support_wifi.ino | 8 ++++++++ sonoff/xdrv_interface.ino | 2 +- sonoff/xsns_interface.ino | 4 ++-- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/sonoff/support.ino b/sonoff/support.ino index 234764791..540191855 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -767,15 +767,6 @@ uint8_t ValidGPIO(uint8_t pin, uint8_t gpio) return result; } -void AppDelay(void) -{ - if (APP_BAUDRATE == baudrate) { // When baudrate too low it will fail on Sonoff Pow R2 and S31 serial interface initialization - if (global_state.wifi_down) { - delay(DRIVER_BOOT_DELAY); - } - } -} - /*********************************************************************************************\ * Sleep aware time scheduler functions borrowed from ESPEasy \*********************************************************************************************/ diff --git a/sonoff/support_wifi.ino b/sonoff/support_wifi.ino index 4a7902303..87ff4e21b 100644 --- a/sonoff/support_wifi.ino +++ b/sonoff/support_wifi.ino @@ -584,3 +584,11 @@ void EspRestart(void) } */ +void WifiAddDelayWhenDisconnected(void) +{ + if (APP_BAUDRATE == baudrate) { // When baudrate too low it will fail on Sonoff Pow R2 and S31 serial interface initialization + if (global_state.wifi_down) { + delay(DRIVER_BOOT_DELAY); + } + } +} diff --git a/sonoff/xdrv_interface.ino b/sonoff/xdrv_interface.ino index 12b9e2711..0ec3696d9 100644 --- a/sonoff/xdrv_interface.ino +++ b/sonoff/xdrv_interface.ino @@ -238,7 +238,7 @@ boolean XdrvCall(byte Function) boolean result = false; for (byte x = 0; x < xdrv_present; x++) { -// AppDelay(); +// WifiAddDelayWhenDisconnected(); result = xdrv_func_ptr[x](Function); if (result) break; } diff --git a/sonoff/xsns_interface.ino b/sonoff/xsns_interface.ino index fbe8bf218..d39995be9 100644 --- a/sonoff/xsns_interface.ino +++ b/sonoff/xsns_interface.ino @@ -278,7 +278,7 @@ boolean XsnsNextCall(byte Function, uint8_t &xsns_index) if (xsns_index == xsns_present) { xsns_index = 0; } } #endif -// AppDelay(); +// WifiAddDelayWhenDisconnected(); return xsns_func_ptr[xsns_index](Function); } @@ -298,7 +298,7 @@ boolean XsnsCall(byte Function) #ifdef PROFILE_XSNS_SENSOR_EVERY_SECOND uint32_t profile_start_millis = millis(); #endif // PROFILE_XSNS_SENSOR_EVERY_SECOND -// AppDelay(); +// WifiAddDelayWhenDisconnected(); result = xsns_func_ptr[x](Function); #ifdef PROFILE_XSNS_SENSOR_EVERY_SECOND From 52eeef95f0f4b4a8421871723322ebeb0ed93295 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 24 Nov 2018 17:43:18 +0100 Subject: [PATCH 11/20] Add CPU average load Add CPU average load to state message (#4431) --- sonoff/_changelog.ino | 1 + sonoff/sonoff.ino | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 312c2855d..7e38a6aed 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -6,6 +6,7 @@ * Fix possible strncat buffer overflows * Fix MqttRetry values above 255 seconds (#4424) * Increase webui refresh time delay for Save Settings and local OTA Upload (#4423) + * Add CPU average load to state message (#4431) * * 6.3.0.11 20181120 * Add delays removed in 6.3.0.9 (#4233) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index f461b6de0..8bc6113cb 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2583,14 +2583,13 @@ void GpioInit(void) XdrvCall(FUNC_PRE_INIT); } - -void update_loop_load_avg(uint32_t loop_activity) + +void UpdateLoopLoadAvg(uint32_t loop_activity) { - uint32_t loops_per_second = 1000 / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; // We need to keep track of this many loops per second + uint32_t loops_per_second = 1000 / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; // We need to keep track of this many loops per second uint32_t this_cycle_ratio = 100 * loop_activity / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; - uint32_t new_load_avg = loop_load_avg-(loop_load_avg/loops_per_second); // Take away one loop average - new_load_avg = new_load_avg + this_cycle_ratio; - loop_load_avg = new_load_avg; + uint32_t new_load_avg = loop_load_avg - (loop_load_avg / loops_per_second); // Take away one loop average + loop_load_avg = new_load_avg + this_cycle_ratio;; } extern "C" { @@ -2799,8 +2798,8 @@ void loop(void) } } if (my_activity < (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]) { - update_loop_load_avg(my_activity); + UpdateLoopLoadAvg(my_activity); } else { - update_loop_load_avg((uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]); // Assume 100% loop cycle ratio + UpdateLoopLoadAvg((uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]); // Assume 100% loop cycle ratio } } From c22fcc2a3abe04d8fa395ca81bb7b7e5781b2902 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sat, 24 Nov 2018 19:00:42 +0200 Subject: [PATCH 12/20] Update CPU average load function Remove unnecessary manipulations :) --- sonoff/sonoff.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 8bc6113cb..5045c7af5 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2588,8 +2588,7 @@ void UpdateLoopLoadAvg(uint32_t loop_activity) { uint32_t loops_per_second = 1000 / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; // We need to keep track of this many loops per second uint32_t this_cycle_ratio = 100 * loop_activity / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; - uint32_t new_load_avg = loop_load_avg - (loop_load_avg / loops_per_second); // Take away one loop average - loop_load_avg = new_load_avg + this_cycle_ratio;; + loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + this_cycle_ratio; // Take away one loop average away and add the new one } extern "C" { From 7c84f892fc6403433021f2570fc86a8e9ac557c7 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sun, 25 Nov 2018 14:29:53 +0200 Subject: [PATCH 13/20] Add target loop delay to telemetry --- sonoff/sonoff.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 5045c7af5..deabbd1cf 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -1577,7 +1577,8 @@ void MqttShowState(void) snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_VCC "\":%s"), mqtt_data, stemp1); #endif - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"LoadAvg\":%u"), mqtt_data, loop_load_avg); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"LoopSet\":%u"), mqtt_data, (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]); // Add current loop delay target to telemetry + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"LoadAvg\":%u"), mqtt_data, loop_load_avg); // Add LoadAvg to telemetry data for (byte i = 0; i < devices_present; i++) { if (i == light_device -1) { From 05be1ee21cf5fcec5da2424c6c7290cafd82c907 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 25 Nov 2018 16:41:29 +0100 Subject: [PATCH 14/20] Fix exception due to divide by 0 Fix exception due to divide by 0 --- sonoff/sonoff.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index deabbd1cf..9e32caf0b 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2587,9 +2587,11 @@ void GpioInit(void) void UpdateLoopLoadAvg(uint32_t loop_activity) { - uint32_t loops_per_second = 1000 / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; // We need to keep track of this many loops per second - uint32_t this_cycle_ratio = 100 * loop_activity / (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]; - loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + this_cycle_ratio; // Take away one loop average away and add the new one + uint32_t loop_delay = Settings.param[P_LOOP_SLEEP_DELAY]; + if (!loop_delay) { loop_delay = 1; } // We cannot devide by 0 + uint32_t loops_per_second = 1000 / loop_delay; // We need to keep track of this many loops per second + uint32_t this_cycle_ratio = 100 * loop_activity / loop_delay; + loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + this_cycle_ratio; // Take away one loop average away and add the new one } extern "C" { From 0b14a95082a4c69e21b9a3fbe7e2a936e44c1a79 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Sun, 25 Nov 2018 17:52:07 +0200 Subject: [PATCH 15/20] Remove assumption of 100% to report correctly Remove the assumption of 100% loop duty cycle as we want an accurate loop load average and not a percentage as such - so if it overshoots the value stored for setoption36 this should be known by looking at the load average and not be distorted by reducing it to 100 basis points on the assumption that my_acitivity took as long as setoption36. --- sonoff/sonoff.ino | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 9e32caf0b..43f5d99ad 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2799,9 +2799,5 @@ void loop(void) delay(my_activity /2); // If wifi down and my_activity > setoption36 then force loop delay to 1/3 of my_activity period } } - if (my_activity < (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]) { - UpdateLoopLoadAvg(my_activity); - } else { - UpdateLoopLoadAvg((uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]); // Assume 100% loop cycle ratio - } + UpdateLoopLoadAvg(my_activity); } From 243ec16d80d5040cb647b74ace3cd98b9e19d6aa Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 25 Nov 2018 17:31:53 +0100 Subject: [PATCH 16/20] Fix another calcuation error Fix another calcuation error --- sonoff/sonoff.ino | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 43f5d99ad..c86c91d59 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2585,15 +2585,6 @@ void GpioInit(void) XdrvCall(FUNC_PRE_INIT); } -void UpdateLoopLoadAvg(uint32_t loop_activity) -{ - uint32_t loop_delay = Settings.param[P_LOOP_SLEEP_DELAY]; - if (!loop_delay) { loop_delay = 1; } // We cannot devide by 0 - uint32_t loops_per_second = 1000 / loop_delay; // We need to keep track of this many loops per second - uint32_t this_cycle_ratio = 100 * loop_activity / loop_delay; - loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + this_cycle_ratio; // Take away one loop average away and add the new one -} - extern "C" { extern struct rst_info resetInfo; } @@ -2799,5 +2790,11 @@ void loop(void) delay(my_activity /2); // If wifi down and my_activity > setoption36 then force loop delay to 1/3 of my_activity period } } - UpdateLoopLoadAvg(my_activity); + + if (!my_activity) { my_activity++; } // We cannot divide by 0 + uint32_t loop_delay = Settings.param[P_LOOP_SLEEP_DELAY]; + if (!loop_delay) { loop_delay++; } // We cannot divide by 0 + uint32_t loops_per_second = 1000 / loop_delay; // We need to keep track of this many loops per second + uint32_t this_cycle_ratio = 100 * my_activity / loop_delay; + loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + this_cycle_ratio; // Take away one loop average away and add the new one } From 3af44ab81f0e065cc07868c6756ee9cd97fb8fb6 Mon Sep 17 00:00:00 2001 From: Nick Galfas Date: Sun, 25 Nov 2018 20:19:20 +0200 Subject: [PATCH 17/20] Update el-GR.h Improved Greek translation including the latest versions text fields --- sonoff/language/el-GR.h | 443 ++++++++++++++++++++-------------------- 1 file changed, 221 insertions(+), 222 deletions(-) diff --git a/sonoff/language/el-GR.h b/sonoff/language/el-GR.h index 9287d6961..4a8e84a7a 100644 --- a/sonoff/language/el-GR.h +++ b/sonoff/language/el-GR.h @@ -1,8 +1,7 @@ - /* el-GR.h - localization for Greek - Greece for Sonoff-Tasmota - Copyright (C) 2018 Kan3Nas + Copyright (C) 2018 Theo Arends (translated by Nick Galfas) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,10 +28,10 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v5.12.0n + * Updated until v6.3.0 \*********************************************************************/ -//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) +#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) #define LANGUAGE_LCID 1032 // HTML (ISO 639-1) Language Code @@ -52,218 +51,218 @@ #define D_DECIMAL_SEPARATOR "," // Common -#define D_ADMIN "Admin" -#define D_AIR_QUALITY "Ποιότητα Αέρα" +#define D_ADMIN "Διαχειριστής" +#define D_AIR_QUALITY "Ποιότητα αέρα" #define D_AP "AP" // Access Point -#define D_AS "as" +#define D_AS "ως" #define D_AUTO "ΑΥΤΟΜΑΤΟ" -#define D_BLINK "Αναβοσβήνει" -#define D_BLINKOFF "Δεν αναβοσβήνει" -#define D_BOOT_COUNT "Αριθμός εκκινήσεων" -#define D_BRIGHTLIGHT "Λαμπερό" +#define D_BLINK "Blink" +#define D_BLINKOFF "BlinkOff" +#define D_BOOT_COUNT "Καταμέτρηση εκκινήσεων" +#define D_BRIGHTLIGHT "Φωτεινό" #define D_BSSID "BSSId" -#define D_BUTTON "Κουμπί" +#define D_BUTTON "Πλήκτρο" #define D_BY "από" // Written by me #define D_BYTES "Bytes" #define D_CELSIUS "Κελσίου" -#define D_CHANNEL "Channel" +#define D_CHANNEL "Κανάλι" #define D_CO2 "Διοξείδιο του άνθρακα" #define D_CODE "κώδικας" // Button code -#define D_COLDLIGHT "Ψυχρός" +#define D_COLDLIGHT "Ψυχρό" #define D_COMMAND "Εντολή" #define D_CONNECTED "Συνδεδεμένο" -#define D_COUNT "Μέτρημα" +#define D_COUNT "Μέτρηση" #define D_COUNTER "Μετρητής" -#define D_CURRENT "Τάση ρεύματος" // As in Voltage and Current +#define D_CURRENT "Τάση" // As in Voltage and Current #define D_DATA "Δεδομένα" -#define D_DARKLIGHT "Σκούρο" +#define D_DARKLIGHT "Σκοτεινό" #define D_DEBUG "Debug" -#define D_DISABLED "Απενεργοποιημένο" -#define D_DISTANCE "Distance" +#define D_DISABLED "Ανενεργό" +#define D_DISTANCE "Απόσταση" #define D_DNS_SERVER "Διακομιστής DNS" -#define D_DONE "Εγινε" +#define D_DONE "Ολοκληρώθηκε" #define D_DST_TIME "DST" #define D_ECO2 "eCO2" -#define D_EMULATION "Emulation" +#define D_EMULATION "Εξομoίωση" #define D_ENABLED "Ενεργό" -#define D_ERASE "Σβήσιμο" +#define D_ERASE "Διαγραφή" #define D_ERROR "Σφάλμα" #define D_FAHRENHEIT "Φαρενάιτ" -#define D_FAILED "Αποτυχία" -#define D_FALLBACK "Εφεδρικό" -#define D_FALLBACK_TOPIC "Εφεδρικό θέμα" -#define D_FALSE "Λάθος" +#define D_FAILED "Απέτυχε" +#define D_FALLBACK "Fallback" +#define D_FALLBACK_TOPIC "Fallback Topic" +#define D_FALSE "Ψευδές" #define D_FILE "Αρχείο" -#define D_FREE_MEMORY "Ελεύθερη Μνήμη" -#define D_FREQUENCY "Frequency" -#define D_GAS "Γκάζι" +#define D_FREE_MEMORY "Ελεύθερη μνήμη" +#define D_FREQUENCY "Συχνότητα" +#define D_GAS "Αέριο" #define D_GATEWAY "Πύλη" #define D_GROUP "Ομάδα" #define D_HOST "Host" #define D_HOSTNAME "Hostname" #define D_HUMIDITY "Υγρασία" -#define D_ILLUMINANCE "Illuminance" -#define D_IMMEDIATE "Φωτεινότητα" // Button immediate +#define D_ILLUMINANCE "Φωτεινότητα" +#define D_IMMEDIATE "άμεσο" // Button immediate #define D_INDEX "Κατάλογος" #define D_INFO "Πληροφορίες" -#define D_INFRARED "Infrared" -#define D_INITIALIZED "Αρχικό" -#define D_IP_ADDRESS "IP Address" -#define D_LIGHT "Light" +#define D_INFRARED "Υπέρυθρο" +#define D_INITIALIZED "Αρχικοποιήθηκε" +#define D_IP_ADDRESS "Διεύθυνση IP" +#define D_LIGHT "Φως" #define D_LWT "LWT" -#define D_MODULE "Module" +#define D_MODULE "Μονάδα" #define D_MQTT "MQTT" -#define D_MULTI_PRESS "πολλαπλή πίεση" -#define D_NOISE "θόρυβος" +#define D_MULTI_PRESS "ανίχνευση για πολλαπλά πατήματα" +#define D_NOISE "Θόρυβος" #define D_NONE "Κανένα" -#define D_OFF "Κλειστό" +#define D_OFF "Off" #define D_OFFLINE "Offline" #define D_OK "Ok" -#define D_ON "Ανοιχτό" +#define D_ON "On" #define D_ONLINE "Online" -#define D_PASSWORD "ΚωδικόςPassword" -#define D_PORT "Πόρτα" -#define D_POWER_FACTOR "Παράγοντας ισχύος" -#define D_POWERUSAGE "Ισχύης" -#define D_POWERUSAGE_ACTIVE "Active Power" -#define D_POWERUSAGE_APPARENT "Apparent Power" -#define D_POWERUSAGE_REACTIVE "Reactive Power" +#define D_PASSWORD "Κωδικός" +#define D_PORT "Θύρα" +#define D_POWER_FACTOR "Συντελεστής Ισχύος" +#define D_POWERUSAGE "Ισχύς" +#define D_POWERUSAGE_ACTIVE "Ενεργός ισχύς" +#define D_POWERUSAGE_APPARENT "Φαινόμενη ισχύς" +#define D_POWERUSAGE_REACTIVE "Άεργη ισχύς" #define D_PRESSURE "Πίεση" -#define D_PRESSUREATSEALEVEL "Πίεση στην επιφάνεια της Θάλασσας" -#define D_PROGRAM_FLASH_SIZE "Μέγεθος Προγράμματος Flash" -#define D_PROGRAM_SIZE "Μέγεθος Προγράμματος" +#define D_PRESSUREATSEALEVEL "Πίεση στo επίπεδο θάλασσας" +#define D_PROGRAM_FLASH_SIZE "Μέγεθος προγράμματος στη Flash" +#define D_PROGRAM_SIZE "Μέγεθος προγράμματος" #define D_PROJECT "Έργο" -#define D_RECEIVED "Λήψη" +#define D_RECEIVED "Ελήφθη" #define D_RESTART "Επανεκκίνηση" -#define D_RESTARTING "Επανεκκίνηση" -#define D_RESTART_REASON "Λόγος Επανεκκίνησης" +#define D_RESTARTING "Επανεκκινεί" +#define D_RESTART_REASON "Αιτία επανεκκίνησης" #define D_RESTORE "επαναφορά" -#define D_RETAINED "διατηρούνται" +#define D_RETAINED "διακράτηση" #define D_RULE "Κανόνας" #define D_SAVE "Αποθήκευση" -#define D_SENSOR "Σένσορας" +#define D_SENSOR "Αισθητήρας" #define D_SSID "SSId" -#define D_START "Έναρξη" +#define D_START "Εκκίνηση" #define D_STD_TIME "STD" -#define D_STOP "Στοπ" +#define D_STOP "Τερματισμός" #define D_SUBNET_MASK "Μάσκα υποδικτύου" #define D_SUBSCRIBE_TO "Εγγραφή στο" -#define D_SUCCESSFUL "Επιτυχής" +#define D_SUCCESSFUL "Επιτυχές" #define D_SUNRISE "Σούρουπο" #define D_SUNSET "Ηλιοβασίλεμα" #define D_TEMPERATURE "Θερμοκρασία" -#define D_TO "στο" +#define D_TO "έως" #define D_TOGGLE "Εναλλαγή" -#define D_TOPIC "Θέμα" +#define D_TOPIC "Topic" #define D_TRANSMIT "Μετάδοση" -#define D_TRUE "Σωστό" +#define D_TRUE "Αληθές" #define D_TVOC "TVOC" #define D_UPGRADE "αναβάθμιση" #define D_UPLOAD "Ανέβασμα" -#define D_UPTIME "Uptime" +#define D_UPTIME "Χρόνος λειτουργίας" #define D_USER "Χρήστης" #define D_UTC_TIME "UTC" -#define D_UV_INDEX "UV Index" -#define D_UV_INDEX_1 "Low" -#define D_UV_INDEX_2 "Mid" -#define D_UV_INDEX_3 "High" -#define D_UV_INDEX_4 "Danger" -#define D_UV_INDEX_5 "BurnL1/2" -#define D_UV_INDEX_6 "BurnL3" +#define D_UV_INDEX "Δείκτης UV" +#define D_UV_INDEX_1 "Χαμηλό" +#define D_UV_INDEX_2 "Μέτριο" +#define D_UV_INDEX_3 "Υψηλό" +#define D_UV_INDEX_4 "Κίνδυνος" +#define D_UV_INDEX_5 "Έγκαυμα L1/2" +#define D_UV_INDEX_6 "Έγκαυμα L3" #define D_UV_INDEX_7 "OoR" #define D_UV_LEVEL "Επίπεδο UV" -#define D_UV_POWER "UV Power" +#define D_UV_POWER "Ένταση UV" #define D_VERSION "Έκδοση" #define D_VOLTAGE "Τάση" -#define D_WEIGHT "Weight" -#define D_WARMLIGHT "Ζεστό" -#define D_WEB_SERVER "Web διακομιστής" +#define D_WEIGHT "Βάρος" +#define D_WARMLIGHT "Θερμό" +#define D_WEB_SERVER "Διακομιστής Web" // sonoff.ino #define D_WARNING_MINIMAL_VERSION "ΠΡΟΕΙΔΟΠΟΙΗΣΗ Αυτή η έκδοση δεν αποθηκεύει τις ρυθμίσεις" #define D_LEVEL_10 "επίπεδο 1-0" #define D_LEVEL_01 "επίπεδο 0-1" -#define D_SERIAL_LOGGING_DISABLED "Η σειριακής καταγραφή απενεργοποιήθηκε" -#define D_SYSLOG_LOGGING_REENABLED "Η καταγραφή Syslog είναι ενεργοποιημένη" +#define D_SERIAL_LOGGING_DISABLED "Η καταγραφή σειριακής θύρας είναι απενεργοποιημένη" +#define D_SYSLOG_LOGGING_REENABLED "Η καταγραφή Syslog επαναενεργοποιήθηκε" -#define D_SET_BAUDRATE_TO "Ρύθμιση Baudrate σε" -#define D_RECEIVED_TOPIC "Λήψη θεμάτων" +#define D_SET_BAUDRATE_TO "Ορισμός Baudrate σε" +#define D_RECEIVED_TOPIC "Received Topic" #define D_DATA_SIZE "Μέγεθος δεδομένων" #define D_ANALOG_INPUT "Αναλογικό" // support.ino #define D_OSWATCH "osWatch" #define D_BLOCKED_LOOP "Blocked Loop" -#define D_WPS_FAILED_WITH_STATUS "WPSconfig FAILED with status" -#define D_ACTIVE_FOR_3_MINUTES "active for 3 minutes" -#define D_FAILED_TO_START "failed to start" +#define D_WPS_FAILED_WITH_STATUS "Το WPSconfig ΑΠΕΤΥΧΕ με status" +#define D_ACTIVE_FOR_3_MINUTES "ενεργό για 3 λεπτά" +#define D_FAILED_TO_START "απέτυχε να εκκινήσει" #define D_PATCH_ISSUE_2186 "Patch issue 2186" -#define D_CONNECTING_TO_AP "Connecting to AP" -#define D_IN_MODE "in mode" -#define D_CONNECT_FAILED_NO_IP_ADDRESS "Connect failed as no IP address received" -#define D_CONNECT_FAILED_AP_NOT_REACHED "Connect failed as AP cannot be reached" -#define D_CONNECT_FAILED_WRONG_PASSWORD "Connect failed with AP incorrect password" -#define D_CONNECT_FAILED_AP_TIMEOUT "Connect failed with AP timeout" -#define D_ATTEMPTING_CONNECTION "Attempting connection..." -#define D_CHECKING_CONNECTION "Checking connection..." -#define D_QUERY_DONE "Query done. MQTT services found" -#define D_MQTT_SERVICE_FOUND "MQTT service found on" -#define D_FOUND_AT "found at" -#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host not found" +#define D_CONNECTING_TO_AP "Συνδέεται στο AP" +#define D_IN_MODE "σε mode" +#define D_CONNECT_FAILED_NO_IP_ADDRESS "Αποτυχία σύνδεσης, δεν απονεμήθηκε διεύθυνση IP" +#define D_CONNECT_FAILED_AP_NOT_REACHED "Αποτυχία σύνδεσης, δεν ανταποκρίνεται το AP" +#define D_CONNECT_FAILED_WRONG_PASSWORD "Αποτυχία σύνδεσης, λάθος κωδικός για το AP" +#define D_CONNECT_FAILED_AP_TIMEOUT "Αποτυχία σύνδεσης, λήξη ορίου απόκρισης από το AP" +#define D_ATTEMPTING_CONNECTION "Προσπάθεια για σύνδεση..." +#define D_CHECKING_CONNECTION "Έλεγχος σύνδεσης..." +#define D_QUERY_DONE "Ολοκλήρωση ερωτήματος. Βρέθηκε υπηρεσία MQTT" +#define D_MQTT_SERVICE_FOUND "Βρέθηκε υπηρεσία MQTT στο" +#define D_FOUND_AT "βρέθηκε στο" +#define D_SYSLOG_HOST_NOT_FOUND "Δε βρέθηκε Syslog Host" // settings.ino -#define D_SAVED_TO_FLASH_AT "Εγινε flash στην θέση" -#define D_LOADED_FROM_FLASH_AT "Φορτώθηκε από την flash στην θέση" +#define D_SAVED_TO_FLASH_AT "Αποθηκεύτηκε από τη Flash στο" +#define D_LOADED_FROM_FLASH_AT "Φορτώθηκε από τη Flash στο" #define D_USE_DEFAULTS "Χρήση προεπιλογών" -#define D_ERASED_SECTOR "Διαγραμμένος τομέας" +#define D_ERASED_SECTOR "Διαγραφή τομέα" -// xdrv_02_webserver.ino +// webserver.ino #define D_NOSCRIPT "To use Tasmota, please enable JavaScript" -#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - παρακαλώ αναβαθμήστε" -#define D_WEBSERVER_ACTIVE_ON "Web διακομιστής ενεργός" +#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - παρακαλώ αναβαθμίστε" +#define D_WEBSERVER_ACTIVE_ON "Ενεργός διακομιστής Web στο" #define D_WITH_IP_ADDRESS "με διεύθυνση IP" -#define D_WEBSERVER_STOPPED "Web διακομιστής σταμάτησε" -#define D_FILE_NOT_FOUND "Το αρχείο δεν βρέθηκε" -#define D_REDIRECTED "Ανακατεύθυνση σε captive portal" +#define D_WEBSERVER_STOPPED "Ο διακομιστής Web σταμάτησε" +#define D_FILE_NOT_FOUND "Δε βρέθηκε το αρχείο" +#define D_REDIRECTED "Ανακατεύθυνση στο captive portal" #define D_WIFIMANAGER_SET_ACCESSPOINT_AND_STATION "Wifimanager set AccessPoint and keep Station" #define D_WIFIMANAGER_SET_ACCESSPOINT "Wifimanager set AccessPoint" -#define D_TRYING_TO_CONNECT "Προσπάθεια σύνδεσης της συσκευής στο δίκτυο" +#define D_TRYING_TO_CONNECT "Προσπάθεια σύνδεσης της συσκευής σε ασύρματο δίκτυο" #define D_RESTART_IN "Επανεκκίνηση σε" #define D_SECONDS "δευτερόλεπτα" -#define D_DEVICE_WILL_RESTART "Η συσκευή θα ξεκινήσει ξανά σε λίγα δευτερόλεπτα" +#define D_DEVICE_WILL_RESTART "Η συσκευή θα επανεκκινήσει σε λίγα δευτερόλεπτα" #define D_BUTTON_TOGGLE "Εναλλαγή" -#define D_CONFIGURATION "Ρύθμιση" +#define D_CONFIGURATION "Ρυθμίσεις" #define D_INFORMATION "Πληροφορίες" #define D_FIRMWARE_UPGRADE "Αναβάθμιση Firmware" #define D_CONSOLE "Κονσόλα" -#define D_CONFIRM_RESTART "Επιβεβαίωση Επανεκκίνησης" +#define D_CONFIRM_RESTART "Επιβεβαίωση επανεκκίνησης" -#define D_CONFIGURE_MODULE "Ρύθμιση Module" -#define D_CONFIGURE_WIFI "Ρύθμιση WiFi" -#define D_CONFIGURE_MQTT "Ρύθμιση MQTT" -#define D_CONFIGURE_DOMOTICZ "Ρύθμιση Domoticz" -#define D_CONFIGURE_LOGGING "Ρύθμιση καταγραφής" -#define D_CONFIGURE_OTHER "Άλλες Ρυθμίσεις" -#define D_CONFIRM_RESET_CONFIGURATION "Confirm Reset Configuration" -#define D_RESET_CONFIGURATION "Επαναφορά Ρυθμίσεων" -#define D_BACKUP_CONFIGURATION "Αντίγραφα Ασφαλείας Ρυθμίσεων" -#define D_RESTORE_CONFIGURATION "Επαναφορά Ρυθμίσεων" -#define D_MAIN_MENU "Κεντρικό Μενού" +#define D_CONFIGURE_MODULE "Ρυθμίσεις μονάδας" +#define D_CONFIGURE_WIFI "Ρυθμίσεις WiFi" +#define D_CONFIGURE_MQTT "Ρυθμίσεις MQTT" +#define D_CONFIGURE_DOMOTICZ "Ρυθμίσεις Domoticz" +#define D_CONFIGURE_LOGGING "Ρυθμίσεις καταγραφής" +#define D_CONFIGURE_OTHER "Άλλες ρυθμίσεις" +#define D_CONFIRM_RESET_CONFIGURATION "Επιβεβαίωση αρχικοποίησης στις προεπιλεγμένες ρυθμίσεις" +#define D_RESET_CONFIGURATION "Αρχικοποίηση-reset ρυθμίσεων" +#define D_BACKUP_CONFIGURATION "Αποθήκευση ρυθμίσεων" +#define D_RESTORE_CONFIGURATION "Επαναφορά ρυθμίσεων" +#define D_MAIN_MENU "Κεντρικό μενού" -#define D_MODULE_PARAMETERS "Παράμετροι Module" -#define D_MODULE_TYPE "Είδος Module" +#define D_MODULE_PARAMETERS "Παράμετροι μονάδας" +#define D_MODULE_TYPE "Τύπος μονάδας" #define D_GPIO "GPIO" #define D_SERIAL_IN "Serial In" #define D_SERIAL_OUT "Serial Out" #define D_WIFI_PARAMETERS "Παράμετροι Wifi" -#define D_SCAN_FOR_WIFI_NETWORKS "Σάρωση για δίκτυα wifi" -#define D_SCAN_DONE "Ολοκλήρωση σάρωσης" -#define D_NO_NETWORKS_FOUND "Δεν βρέθηκαν δίκτυα" -#define D_REFRESH_TO_SCAN_AGAIN "Ανανέωση για επανάληψη σάρωσης" -#define D_DUPLICATE_ACCESSPOINT "Duplicate AccessPoint" -#define D_SKIPPING_LOW_QUALITY "Παράλειψη λόγω χαμηλού σήματος" +#define D_SCAN_FOR_WIFI_NETWORKS "Σάρωση για δίκτυα Wifi" +#define D_SCAN_DONE "Η σάρωση ολοκληρώθηκε" +#define D_NO_NETWORKS_FOUND "Δε βρέθηκαν δίκτυα" +#define D_REFRESH_TO_SCAN_AGAIN "Πατήστε ανανέωση για μια νέα σάρωση" +#define D_DUPLICATE_ACCESSPOINT "Διπλότυπο AccessPoint" +#define D_SKIPPING_LOW_QUALITY "Παράκαμψη λόγω χαμηλής ποιότητας" #define D_RSSI "RSSI" #define D_WEP "WEP" #define D_WPA_PSK "WPA PSK" @@ -273,41 +272,41 @@ #define D_AP2_SSID "AP2 SSId" #define D_AP2_PASSWORD "AP2 Κωδικός" -#define D_MQTT_PARAMETERS "MQTT Παράμετροι" +#define D_MQTT_PARAMETERS "Παράμετροι MQTT" #define D_CLIENT "Πελάτης" #define D_FULL_TOPIC "Full Topic" #define D_LOGGING_PARAMETERS "Παράμετροι καταγραφής" -#define D_SERIAL_LOG_LEVEL "Επίπεδο καταγραφής Serial" +#define D_SERIAL_LOG_LEVEL "Επίπεδο καταγραφής Σειριακής" #define D_WEB_LOG_LEVEL "Επίπεδο καταγραφής Web" #define D_SYS_LOG_LEVEL "Επίπεδο καταγραφής Syslog" -#define D_MORE_DEBUG "Επιπλέον debug" -#define D_SYSLOG_HOST "Υπολογιστής Syslog" -#define D_SYSLOG_PORT "Πόρτα Syslog" -#define D_TELEMETRY_PERIOD "Χρόνος τηλεμετρίας" +#define D_MORE_DEBUG "More debug" +#define D_SYSLOG_HOST "Εξυπηρετητής Syslog" +#define D_SYSLOG_PORT "Θύρα Syslog" +#define D_TELEMETRY_PERIOD "Περίοδος τηλεμετρίας" -#define D_OTHER_PARAMETERS "Άλλες Παράμετροι" -#define D_WEB_ADMIN_PASSWORD "Web Admin Κωδικός" -#define D_MQTT_ENABLE "MQTT Ενεργό" -#define D_FRIENDLY_NAME "Φιλικό Όνομα" +#define D_OTHER_PARAMETERS "Άλλες παράμετροι" +#define D_WEB_ADMIN_PASSWORD "Κωδικός διαχειριστή" +#define D_MQTT_ENABLE "Ενεργοποίηση MQTT" +#define D_FRIENDLY_NAME "Φιλική ονομασία" #define D_BELKIN_WEMO "Belkin WeMo" #define D_HUE_BRIDGE "Hue Bridge" #define D_SINGLE_DEVICE "μονή συσκευή" -#define D_MULTI_DEVICE "πολλαπλή συσκευή" +#define D_MULTI_DEVICE "πολλαπλές συσκευές" -#define D_SAVE_CONFIGURATION "Αποθήκευση Ρυθμίσεων" +#define D_SAVE_CONFIGURATION "Αποθήκευση ρυθμίσεων" #define D_CONFIGURATION_SAVED "Οι ρυθμίσεις αποθηκεύτηκαν" #define D_CONFIGURATION_RESET "Επαναφορά ρυθμίσεων" -#define D_PROGRAM_VERSION "Εκδοση προγράμματος" -#define D_BUILD_DATE_AND_TIME "Ημερομηνία και Ώρα Build" -#define D_CORE_AND_SDK_VERSION "Core/SDK Version" -#define D_FLASH_WRITE_COUNT "Μετρητής εγγραφών Flash" +#define D_PROGRAM_VERSION "Έκδοση προγράμματος" +#define D_BUILD_DATE_AND_TIME "Ημερομηνία έκδοσης" +#define D_CORE_AND_SDK_VERSION "Έκδοση Core/SDK" +#define D_FLASH_WRITE_COUNT "Καταμέτρηση εγγραφών στη Flash" #define D_MAC_ADDRESS "MAC Address" -#define D_MQTT_HOST "MQTT Host" -#define D_MQTT_PORT "MQTT Port" -#define D_MQTT_CLIENT "MQTT Client" -#define D_MQTT_USER "MQTT User" +#define D_MQTT_HOST "MQTT Διακομιστής" +#define D_MQTT_PORT "MQTT Θύρα" +#define D_MQTT_CLIENT "MQTT Πελάτης" +#define D_MQTT_USER "MQTT Χρήστης" #define D_MQTT_TOPIC "MQTT Topic" #define D_MQTT_GROUP_TOPIC "MQTT Group Topic" #define D_MQTT_FULL_TOPIC "MQTT Full Topic" @@ -316,47 +315,47 @@ #define D_ESP_CHIP_ID "ESP Chip Id" #define D_FLASH_CHIP_ID "Flash Chip Id" #define D_FLASH_CHIP_SIZE "Μέγεθος Flash" -#define D_FREE_PROGRAM_SPACE "Ελεύθερος Χώρος Προγράμματος" +#define D_FREE_PROGRAM_SPACE "Ελεύθερος χώρος προγράμματος" -#define D_UPGRADE_BY_WEBSERVER "αναβάθμιση από τον διακομιστή web" -#define D_OTA_URL "OTA Url" +#define D_UPGRADE_BY_WEBSERVER "Αναβάθμιση μέσω web server" +#define D_OTA_URL "OTA URL" #define D_START_UPGRADE "Εκκίνηση αναβάθμισης" -#define D_UPGRADE_BY_FILE_UPLOAD "Αναβάθμιση με ανέβασμα αρχείου" -#define D_UPLOAD_STARTED "Το ανέβασμα ξεκίνησε" +#define D_UPGRADE_BY_FILE_UPLOAD "Αναβάθμιση μέσω μεταφόρτωσης αρχείου" +#define D_UPLOAD_STARTED "Η μεταφόρτωση ξεκίνησε" #define D_UPGRADE_STARTED "Η αναβάθμιση ξεκίνησε" -#define D_UPLOAD_DONE "Το ανέβασμα ολοκληρώθηκε" +#define D_UPLOAD_DONE "Η μεταφόρτωση ολοκληρώθηκε" #define D_UPLOAD_ERR_1 "Δεν έχει επιλεγεί αρχείο" -#define D_UPLOAD_ERR_2 "Δεν υπάρχει αρκετός χώρος" -#define D_UPLOAD_ERR_3 "Magic byte δεν είναι 0xE9" -#define D_UPLOAD_ERR_4 "Το μέγεθος του προγράμματος flash είναι μεγαλύτερο από το πραγματικό μέγεθος του flash" +#define D_UPLOAD_ERR_2 "Δεν υπάρχει επαρκής χώρος" +#define D_UPLOAD_ERR_3 "Magic byte is not 0xE9" +#define D_UPLOAD_ERR_4 "Το μέγεθος προγράμματος είναι μεγαλύτερο από την πραγματική μνήμη Flash" #define D_UPLOAD_ERR_5 "Upload buffer miscompare" -#define D_UPLOAD_ERR_6 "Το ανέβασμα απέτυχε. Επιλέξτε επίπεδο καταγραφής 3" -#define D_UPLOAD_ERR_7 "Το ανεβάσμα διακόπηκε" +#define D_UPLOAD_ERR_6 "Η μεταφόρτωση απέτυχε. Επιλέξτε επίπεδο καταγραφής 3" +#define D_UPLOAD_ERR_7 "Η μεταφόρτωση ματαιώθηκε" #define D_UPLOAD_ERR_8 "Μη έγκυρο αρχείο" -#define D_UPLOAD_ERR_9 "Το αρχείο είναι πολύ μεγάλο" -#define D_UPLOAD_ERR_10 "Failed to init RF chip" -#define D_UPLOAD_ERR_11 "Failed to erase RF chip" -#define D_UPLOAD_ERR_12 "Failed to write to RF chip" +#define D_UPLOAD_ERR_9 "Πολύ μεγάλο αρχείο" +#define D_UPLOAD_ERR_10 "Αποτυχία αρχικοποίησης RF chip" +#define D_UPLOAD_ERR_11 "Αποτυχία σβησίματος στο RF chip" +#define D_UPLOAD_ERR_12 "Αποτυχία εγγραφής στο RF chip" #define D_UPLOAD_ERR_13 "Failed to decode RF firmware" -#define D_UPLOAD_ERROR_CODE "Κωδικός λάθους ανεβάσματος" +#define D_UPLOAD_ERROR_CODE "Κωδικός λάθους στη μεταφόρτωση" #define D_ENTER_COMMAND "Εισαγωγή εντολής" -#define D_ENABLE_WEBLOG_FOR_RESPONSE "Ενεργοποιήστε το weblog 2 αν περιμένετε απάντηση" -#define D_NEED_USER_AND_PASSWORD "Χρειάζεστε user=<όνομα χρήστη>&password=<κωδικό χρήστη>" +#define D_ENABLE_WEBLOG_FOR_RESPONSE "Ενεργοποιήστε το weblog 2 εαν περιμένετε απόκριση" +#define D_NEED_USER_AND_PASSWORD "Χρειάζεται user=&password=" // xdrv_01_mqtt.ino -#define D_FINGERPRINT "Επαλήθευση TLS fingerprint..." -#define D_TLS_CONNECT_FAILED_TO "Αποτυχία TLS σύνδεσης" -#define D_RETRY_IN "Επανάληψη σε" -#define D_VERIFIED "Επαλήθευση με Fingerprint" -#define D_INSECURE "Μη ασφαλής σύνδεση λόγο ακατάλληλου Fingerprint" +#define D_FINGERPRINT "Επιβεβαίωση αποτυπώματος TLS..." +#define D_TLS_CONNECT_FAILED_TO "Αποτυχία σύνδεσης TLS στο" +#define D_RETRY_IN "Νέα προσπάθεια σε" +#define D_VERIFIED "Επιβεβαιώθηκε με χρήση αποτυπώματος TLS" +#define D_INSECURE "Επισφαλής σύνδεση λόγω άκυρου αποτυπώματος TLS" #define D_CONNECT_FAILED_TO "Αποτυχία σύνδεσης στο" // xplg_wemohue.ino -#define D_MULTICAST_DISABLED "Multicast απενεργοποιημένο" -#define D_MULTICAST_REJOINED "Multicast επανασύνδεση" +#define D_MULTICAST_DISABLED "Απενεργοποιημένο Multicast" +#define D_MULTICAST_REJOINED "Επανασύνδεση Multicast" #define D_MULTICAST_JOIN_FAILED "Αποτυχία σύνδεσης Multicast" -#define D_FAILED_TO_SEND_RESPONSE "Αποτυχία αποστολής απάντησης" +#define D_FAILED_TO_SEND_RESPONSE "Αποτυχία αποστολής απόκρισης" #define D_WEMO "WeMo" #define D_WEMO_BASIC_EVENT "WeMo βασικό event" @@ -367,13 +366,13 @@ #define D_HUE "Hue" #define D_HUE_BRIDGE_SETUP "Hue ρυθμίσεις" -#define D_HUE_API_NOT_IMPLEMENTED "Hue API δεν έχει υλοποιηθεί" +#define D_HUE_API_NOT_IMPLEMENTED "Δε βρέθηκε εφαρμογή Hue API" #define D_HUE_API "Hue API" #define D_HUE_POST_ARGS "Hue POST args" -#define D_3_RESPONSE_PACKETS_SENT "3πλο πακέτο απάντησεης στάλθηκε" +#define D_3_RESPONSE_PACKETS_SENT "Στάλθηκαν 3 πακέτα απόκρισης" // xdrv_07_domoticz.ino -#define D_DOMOTICZ_PARAMETERS "Domoticz παράμετροι" +#define D_DOMOTICZ_PARAMETERS "Ρυθμίσεις Domoticz" #define D_DOMOTICZ_IDX "Idx" #define D_DOMOTICZ_KEY_IDX "Key idx" #define D_DOMOTICZ_SWITCH_IDX "Switch idx" @@ -386,27 +385,27 @@ #define D_DOMOTICZ_COUNT "Count/PM1" #define D_DOMOTICZ_VOLTAGE "Voltage/PM2.5" #define D_DOMOTICZ_CURRENT "Current/PM10" - #define D_DOMOTICZ_AIRQUALITY "Ποιότητα Αέρα" -#define D_DOMOTICZ_UPDATE_TIMER "Ενημέρωση" + #define D_DOMOTICZ_AIRQUALITY "AirQuality" +#define D_DOMOTICZ_UPDATE_TIMER "Update timer" // xdrv_09_timers.ino -#define D_CONFIGURE_TIMER "Ρυθμίσεις Χρόνου" -#define D_TIMER_PARAMETERS "Χρονικοί παράμετροι" -#define D_TIMER_ENABLE "Ενεργοποιημένο Χρονικοί" -#define D_TIMER_ARM "Arm" -#define D_TIMER_TIME "Ωρα" +#define D_CONFIGURE_TIMER "Ρυθμίσεις Χρονικών" +#define D_TIMER_PARAMETERS "Παράμετροι χρονικών" +#define D_TIMER_ENABLE "Ενεργοποίηση χρονικών" +#define D_TIMER_ARM "Οπλισμένο" +#define D_TIMER_TIME "Ώρα" #define D_TIMER_DAYS "Μέρες" #define D_TIMER_REPEAT "Επανάληψη" -#define D_TIMER_OUTPUT "Αποτέλεσμα" -#define D_TIMER_ACTION "Εντολή" +#define D_TIMER_OUTPUT "Έξοδος" +#define D_TIMER_ACTION "Λειτουργία" // xdrv_10_knx.ino #define D_CONFIGURE_KNX "Ρυθμίσεις KNX" -#define D_KNX_PARAMETERS "KNX Παράμετροι" +#define D_KNX_PARAMETERS "Παράμετροι KNX" #define D_KNX_GENERAL_CONFIG "Γενικά" #define D_KNX_PHYSICAL_ADDRESS "Διεύθυνση Μνήμης" #define D_KNX_PHYSICAL_ADDRESS_NOTE "( Πρέπει να είναι μοναδική στο KNX δίκτυο )" -#define D_KNX_ENABLE "Ενεργοποιημένο KNX" +#define D_KNX_ENABLE "Ενεργοποίηση KNX" #define D_KNX_GROUP_ADDRESS_TO_WRITE "Αποστολή δεδομένων σε Ομάδα Διευθύνσεων" #define D_ADD "Προσθήκη" #define D_DELETE "Διαγραφή" @@ -416,32 +415,32 @@ #define D_RECEIVED_FROM "Στάλθηκε από" #define D_KNX_COMMAND_WRITE "Εγγραφή" #define D_KNX_COMMAND_READ "Ανάγνωση" -#define D_KNX_COMMAND_OTHER "Αλλο" +#define D_KNX_COMMAND_OTHER "Άλλο" #define D_SENT_TO "αποστολή σε" #define D_KNX_WARNING "Η Ομάδα Διευθύνσεων ( 0 / 0 / 0 ) είναι δεσμευμένη και δεν μπορεί να χρησιμοποιηθεί." -#define D_KNX_ENHANCEMENT "Communication Enhancement" +#define D_KNX_ENHANCEMENT "Βελτίωση επικοινωνίας" #define D_KNX_TX_SLOT "KNX TX" #define D_KNX_RX_SLOT "KNX RX" // xdrv_03_energy.ino -#define D_ENERGY_TODAY "Energy Σήμερα" -#define D_ENERGY_YESTERDAY "Energy Χτες" -#define D_ENERGY_TOTAL "Energy Συνολικά" +#define D_ENERGY_TODAY "Ενέργεια σήμερα" +#define D_ENERGY_YESTERDAY "Ενέργεια χθες" +#define D_ENERGY_TOTAL "Ενέργεια συνολικά" // xsns_05_ds18b20.ino -#define D_SENSOR_BUSY "Απασχολημένος Σένσορας" -#define D_SENSOR_CRC_ERROR "CRC λάθος σένσορα" -#define D_SENSORS_FOUND "Βρέθηκε σένσορας" +#define D_SENSOR_BUSY "Ο αισθητήρας είναι απασχολημένος" +#define D_SENSOR_CRC_ERROR "Σφάλμα CRC αισθητήρα" +#define D_SENSORS_FOUND "Βρέθηκαν αισθητήρες" // xsns_06_dht.ino -#define D_TIMEOUT_WAITING_FOR "Timeout περιμένετε για" -#define D_START_SIGNAL_LOW "εκκίνηση με χαμηλό σήμα" -#define D_START_SIGNAL_HIGH "εκκίνηση με υψηλό σήμα" +#define D_TIMEOUT_WAITING_FOR "Αναμονή Timeout για" +#define D_START_SIGNAL_LOW "χαμηλό αρχικό σήμα" +#define D_START_SIGNAL_HIGH "υψηλό αρχικό σήμα" #define D_PULSE "παλμός" #define D_CHECKSUM_FAILURE "Αποτυχία Checksum" // xsns_07_sht1x.ino -#define D_SENSOR_DID_NOT_ACK_COMMAND "Ο σένσορας δεν έλαβε την εντολή ACK" +#define D_SENSOR_DID_NOT_ACK_COMMAND "Ο αισθητήρας δεν έστειλε εντολή ACK" #define D_SHT1X_FOUND "Βρέθηκε SHT1X" // xsns_18_pms5003.ino @@ -458,30 +457,30 @@ #define D_GZ_AXIS "Gyro Z-Axis" // xsns_34_hx711.ino -#define D_HX_CAL_REMOVE "Remove weigth" -#define D_HX_CAL_REFERENCE "Load reference weigth" -#define D_HX_CAL_DONE "Calibrated" -#define D_HX_CAL_FAIL "Calibration failed" -#define D_RESET_HX711 "Reset Scale" -#define D_CONFIGURE_HX711 "Configure Scale" -#define D_HX711_PARAMETERS "Scale parameters" -#define D_ITEM_WEIGHT "Item weight" -#define D_REFERENCE_WEIGHT "Reference weigth" -#define D_CALIBRATE "Calibrate" -#define D_CALIBRATION "Calibration" +#define D_HX_CAL_REMOVE "Απομακρύνετε το βαρίδιο" +#define D_HX_CAL_REFERENCE "Τοποθετήστε το βαρίδιο αναφοράς" +#define D_HX_CAL_DONE "Βαθμονομήθηκε" +#define D_HX_CAL_FAIL "Αποτυχία βαθμονόμησης" +#define D_RESET_HX711 "Αρχικοποίηση ζυγαριάς" +#define D_CONFIGURE_HX711 "Ρύθμιση ζυγαριάς" +#define D_HX711_PARAMETERS "Παράμετροι ζυγαριάς" +#define D_ITEM_WEIGHT "Βάρος αντικειμένου" +#define D_REFERENCE_WEIGHT "Βάρος αναφοράς" +#define D_CALIBRATE "Βαθμονόμησε" +#define D_CALIBRATION "Βαθμονόμηση" //xsns_35_tx20.ino -#define D_TX20_WIND_DIRECTION "Wind Direction" -#define D_TX20_WIND_SPEED "Wind Speed" -#define D_TX20_WIND_SPEED_AVG "Wind Speed Avg" -#define D_TX20_WIND_SPEED_MAX "Wind Speed Max" -#define D_TX20_NORTH "N" -#define D_TX20_EAST "E" -#define D_TX20_SOUTH "S" -#define D_TX20_WEST "W" +#define D_TX20_WIND_DIRECTION "Κατεύθυνση ανέμου" +#define D_TX20_WIND_SPEED "Ταχύτητα ανέμου" +#define D_TX20_WIND_SPEED_AVG "Μέση ταχύτητα ανέμου" +#define D_TX20_WIND_SPEED_MAX "Μέγιστη ταχύτητα ανέμου" +#define D_TX20_NORTH "Β" +#define D_TX20_EAST "Α" +#define D_TX20_SOUTH "Ν" +#define D_TX20_WEST "Δ" // sonoff_template.h -#define D_SENSOR_NONE "Κανένας" +#define D_SENSOR_NONE "Κανένα" #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" @@ -491,11 +490,11 @@ #define D_SENSOR_WS2812 "WS2812" #define D_SENSOR_DFR562 "MP3 Player" #define D_SENSOR_IRSEND "IRsend" -#define D_SENSOR_SWITCH "Διακόπτης" // Suffix "1" -#define D_SENSOR_BUTTON "Κουμπί" // Suffix "1" -#define D_SENSOR_RELAY "Ρελέ" // Suffix "1i" -#define D_SENSOR_LED "Led" // Suffix "1i" -#define D_SENSOR_PWM "PWM" // Suffix "1" +#define D_SENSOR_SWITCH "Διακόπτης" // Suffix "1" +#define D_SENSOR_BUTTON "Κουμπί" // Suffix "1" +#define D_SENSOR_RELAY "Ρελέ" // Suffix "1i" +#define D_SENSOR_LED "Led" // Suffix "1i" +#define D_SENSOR_PWM "PWM" // Suffix "1" #define D_SENSOR_COUNTER "Μετρητής" // Suffix "1" #define D_SENSOR_IRRECV "IRrecv" #define D_SENSOR_MHZ_RX "MHZ Rx" @@ -589,4 +588,4 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi -#endif // _LANGUAGE_EN_GB_H_ +#endif // _LANGUAGE_EL_GR_H_ From eda60b61244cbc9e068bd22be3278f1ca0dc84cb Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 25 Nov 2018 21:27:19 +0100 Subject: [PATCH 18/20] Support sending tele/STATUS as state/RESULT --- sonoff/settings.h | 2 +- sonoff/sonoff.ino | 6 +++++- sonoff/xdrv_12_home_assistant.ino | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sonoff/settings.h b/sonoff/settings.h index 553f9eba3..39642e4a9 100644 --- a/sonoff/settings.h +++ b/sonoff/settings.h @@ -72,7 +72,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t use_wifi_scan : 1; // bit 6 (v6.3.0.10) uint32_t use_wifi_rescan : 1; // bit 7 (v6.3.0.10) uint32_t receive_raw : 1; // bit 8 (v6.3.0.11) - uint32_t spare09 : 1; + uint32_t hass_tele_as_result : 1; // bit 9 uint32_t spare10 : 1; uint32_t spare11 : 1; uint32_t spare12 : 1; diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index c86c91d59..f0439f0a2 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -1681,7 +1681,11 @@ void PerformEverySecond(void) mqtt_data[0] = '\0'; MqttShowState(); - MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), MQTT_TELE_RETAIN); + if (Settings.flag3.hass_tele_as_result) { + MqttPublishPrefixTopic_P(STAT, S_RSLT_RESULT, MQTT_TELE_RETAIN); + } else { + MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), MQTT_TELE_RETAIN); + } mqtt_data[0] = '\0'; if (MqttShowSensor()) { diff --git a/sonoff/xdrv_12_home_assistant.ino b/sonoff/xdrv_12_home_assistant.ino index 4be4377d7..20e03fd99 100644 --- a/sonoff/xdrv_12_home_assistant.ino +++ b/sonoff/xdrv_12_home_assistant.ino @@ -424,8 +424,9 @@ void HAssDiscovery(uint8_t mode) { // Configure Tasmota for default Home Assistant parameters to keep discovery message as short as possible if (Settings.flag.hass_discovery) { - Settings.flag.mqtt_response = 0; // Response always as RESULT and not as uppercase command - Settings.flag.decimal_text = 1; // Respond with decimal color values + Settings.flag.mqtt_response = 0; // Response always as RESULT and not as uppercase command + Settings.flag.decimal_text = 1; // Respond with decimal color values + Settings.flag3.hass_tele_as_result = 1; // send tele/STATE message as stat/RESULT // Settings.light_scheme = 0; // To just control color it needs to be Scheme 0 if (!string_ends_with(Settings.mqtt_fulltopic, "%prefix%/")) strncpy_P(Settings.mqtt_fulltopic, PSTR("%topic%/%prefix%/"), sizeof(Settings.mqtt_fulltopic)); From acdbd39124ee28053e5a02acfb8ac6fc5b1587b6 Mon Sep 17 00:00:00 2001 From: andrethomas Date: Mon, 26 Nov 2018 11:37:15 +0200 Subject: [PATCH 19/20] Fix math in LoadAvg Fix the math in LoadAvg calculation. To keep average we take away one Nth of loops and add one Nth of current cycle ration to the average. Now the math makes more sense... maximum load average on setoption36 0/1 = 999 (as it should be) --- sonoff/sonoff.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index c86c91d59..5aac837c7 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2796,5 +2796,5 @@ void loop(void) if (!loop_delay) { loop_delay++; } // We cannot divide by 0 uint32_t loops_per_second = 1000 / loop_delay; // We need to keep track of this many loops per second uint32_t this_cycle_ratio = 100 * my_activity / loop_delay; - loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + this_cycle_ratio; // Take away one loop average away and add the new one + loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + (this_cycle_ratio / loops_per_second); // Take away one loop average away and add the new one } From b4e2fe0439f2739b146202f5d5bffdd4b09834d5 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 26 Nov 2018 13:01:42 +0100 Subject: [PATCH 20/20] 6.3.0.13 Add command SetOption59 6.3.0.13 20181126 * Add command SetOption59 0/1 to change state topic from tele/STATE to stat/RESULT (#4450) --- sonoff/_changelog.ino | 5 ++++- sonoff/settings.h | 2 +- sonoff/sonoff_version.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 7e38a6aed..f548a76da 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,7 @@ -/* 6.3.0.12 20181122 +/* 6.3.0.13 20181126 + * Add command SetOption59 0/1 to change state topic from tele/STATE to stat/RESULT (#4450) + * + * 6.3.0.12 20181122 * Remove delays introduced in 6.3.0.11 (#4233) * Add additional start-up delay during initial wifi connection * Add support for I2C MGC3130 Electric Field Effect sensor by Christian Baars (#3774, #4404) diff --git a/sonoff/settings.h b/sonoff/settings.h index 39642e4a9..9eb95a64c 100644 --- a/sonoff/settings.h +++ b/sonoff/settings.h @@ -72,7 +72,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t use_wifi_scan : 1; // bit 6 (v6.3.0.10) uint32_t use_wifi_rescan : 1; // bit 7 (v6.3.0.10) uint32_t receive_raw : 1; // bit 8 (v6.3.0.11) - uint32_t hass_tele_as_result : 1; // bit 9 + uint32_t hass_tele_as_result : 1; // bit 9 (v6.3.0.13) uint32_t spare10 : 1; uint32_t spare11 : 1; uint32_t spare12 : 1; diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h index 2648520b4..cd5a77a08 100644 --- a/sonoff/sonoff_version.h +++ b/sonoff/sonoff_version.h @@ -20,7 +20,7 @@ #ifndef _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_ -#define VERSION 0x0603000C +#define VERSION 0x0603000D #define D_PROGRAMNAME "Sonoff-Tasmota" #define D_AUTHOR "Theo Arends"