diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
index 2616af48f..bf55e130e 100644
--- a/.github/ISSUE_TEMPLATE/Bug_report.md
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -4,6 +4,9 @@ about: Create a report to help us improve
---
+**IMPORTANT NOTICE**
+If you do not complete the template below it is likely that your issue will not be addressed. When providing information about your issue please be as extensive as possible so that it can be solved by as little as possible responses.
+
**Describe the bug**
_A clear and concise description of what the bug is._
@@ -11,6 +14,7 @@ _A clear and concise description of what the bug is._
_Also, make sure these boxes are checked [x] before submitting your issue - Thank you!_
- [ ] _Searched the problem in issues and in the wiki_
- [ ] _Hardware used_ :
+- [ ] _Development/Compiler/Upload tools used_ :
- [ ] _Provide the output of command_``status 0`` :
```
STATUS 0 OUTPUT HERE
diff --git a/.github/ISSUE_TEMPLATE/Custom.md b/.github/ISSUE_TEMPLATE/Custom.md
index 159549128..77fc7a3e7 100644
--- a/.github/ISSUE_TEMPLATE/Custom.md
+++ b/.github/ISSUE_TEMPLATE/Custom.md
@@ -4,12 +4,16 @@ about: Users Troubleshooting Help
---
+**IMPORTANT NOTICE**
+If you do not complete the template below it is likely that your issue will not be addressed. When providing information about your issue please be as extensive as possible so that it can be solved by as little as possible responses.
+
Make sure these boxes are checked [x] before submitting your issue - Thank you!
- [ ] Searched the problem in issues (https://github.com/arendst/Sonoff-Tasmota/issues)
- [ ] Searched the problem in the wiki (https://github.com/arendst/Sonoff-Tasmota/wiki/Troubleshooting)
- [ ] Searched the problem in the forum (https://groups.google.com/d/forum/sonoffusers)
- [ ] Searched the problem in the chat (https://discord.gg/Ks2Kzd4)
+- [ ] Development/Compiler/Upload tools used :
- [ ] Hardware used :
- [ ] Provide the output of command ``status 0`` :
```
diff --git a/README.md b/README.md
index 3f695f666..498cd2f80 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ See [Community](https://groups.google.com/d/forum/sonoffusers) for forum.
See [Chat](https://discord.gg/Ks2Kzd4) for more user experience.
The following devices are supported:
-- [iTead Sonoff Basic](https://www.itead.cc/smart-home/sonoff-wifi-wireless-switch-1.html)
+- [iTead Sonoff Basic (R2)](https://www.itead.cc/smart-home/sonoff-wifi-wireless-switch-1.html)
- [iTead Sonoff RF](https://www.itead.cc/smart-home/sonoff-rf.html)
- [iTead Sonoff SV](https://www.itead.cc/smart-home/sonoff-sv.html)
- [iTead Sonoff TH10/TH16 with temperature sensor](https://www.itead.cc/smart-home/sonoff-th.html)
@@ -90,10 +90,15 @@ The following devices are supported:
- [MagicHome PWM LED controller](https://github.com/arendst/Sonoff-Tasmota/wiki/MagicHome-LED-strip-controller)
- AriLux AL-LC01, AL-LC06 and AL-LC11 PWM LED controller
- [Supla device - Espablo-inCan mod. for electrical Installation box](https://forum.supla.org/viewtopic.php?f=33&t=2188)
-- [BlitzWolf BW-SHP2 Smart Socket with 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)
+- [BlitzWolf BW-SHP2 Smart Socket with 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)
- [Luani HVIO board](https://luani.de/projekte/esp8266-hvio/)
-- Xiaomi-Phillips Bulbs
-- Wemos D1 mini, NodeMcu and Ledunia
+- [Wemos D1 mini](https://wiki.wemos.cc/products:d1:d1_mini)
+- [HuaFan Smart Socket](HuaFan-Smart-Socket)
+- [Hyleton-313 Smart Plug](Hyleton-313-Smart-Plug)
+- [Allterco Shelly 1](https://shelly.cloud/shelly1-open-source/)
+- [Allterco Shelly 2 with Energy Monitoring](https://shelly.cloud/shelly2/)
+- NodeMcu and Ledunia
+- [KS-602 based switches like GresaTek, Jesiya, NewRice, Lyasi etc](https://ucexperiment.wordpress.com/2017/11/14/reprogramming-a-lyasi-wifi-wall-switch-with-esp8285/)
### Contribute
You can contribute to Sonoff-Tasmota by
diff --git a/platformio.ini b/platformio.ini
index d333fd187..c01485f5a 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -16,6 +16,7 @@ env_default = sonoff
;env_default = sonoff-classic
;env_default = sonoff-knx
;env_default = sonoff-sensors
+;env_default = sonoff-display
;env_default = sonoff-BG
;env_default = sonoff-BR
;env_default = sonoff-CN
@@ -167,6 +168,20 @@ upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
extra_scripts = ${common.extra_scripts}
+[env:sonoff-display]
+platform = ${common.platform}
+framework = ${common.framework}
+board = ${common.board}
+board_build.flash_mode = ${common.board_build.flash_mode}
+board_build.f_cpu = ${common.board_build.f_cpu}
+build_unflags = ${common.build_unflags}
+build_flags = ${common.build_flags} -DUSE_DISPLAYS
+monitor_speed = ${common.monitor_speed}
+upload_port = ${common.upload_port}
+upload_resetmethod = ${common.upload_resetmethod}
+upload_speed = ${common.upload_speed}
+extra_scripts = ${common.extra_scripts}
+
[env:sonoff-BG]
platform = ${common.platform}
framework = ${common.framework}
diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino
index eed6ffcc7..efd0944b7 100644
--- a/sonoff/_changelog.ino
+++ b/sonoff/_changelog.ino
@@ -1,10 +1,53 @@
-/* 6.2.1.3 20180907
+/* 6.2.1.9 20180928
+ * Add Apparent Power and Reactive Power to Energy Monitoring devices (#251)
+ * Add RF Receiver control to module MagicHome to be used on Arilux LC10 (#3792)
+ *
+ * 6.2.1.8 20180926
+ * Change status JSON message providing more switch and retain information
+ * Change pinmode for no-pullup defined switches to pullup when configured as switchmode PUSHBUTTON (=3 and up) (#3896)
+ * Add delay after restart before processing rule sensor data (#3811)
+ * Fix Home Assistant forced light discovery (#3908)
+ * Add rule triggers SWITCH1#BOOT and POWER1#BOOT (#3904, #3910)
+ * Add support for Neo Coolcam Wifi Smart Power Plug
+ *
+ * 6.2.1.7 20180925
+ * Remove restart after ntpserver change and force NTP re-sync (#3890)
+ * Release full Shelly2 support
+ * Released tools/decode-config.py by Norbert Richter to decode configuration data. See file for information
+ * Add define USE_DISPLAYS for selecting image sonoff-display
+ *
+ * 6.2.1.6 20180922
+ * Removed commands PowerCal, VoltageCal and CurrentCal as more functionality is provided by commands PowerSet, VoltageSet and CurrentSet
+ * Allow decimals as input to commands PowerSet, VoltageSet and CurrentSet
+ * Add support for PCA9685 12bit 16pin hardware PWM driver (#3866)
+ * Add power value below 5W to Sonoff Pow R2 and S31 (#3745)
+ * Add force_update to Home Assistant discovery (#3873)
+ * Fix rule trigger POWER1#STATE execution after restart and SetOption0 is 0 (#3856)
+ * Disable serial logging on Shelly2 as serial is being used by energy monitoring (#3878)
+ * Fix Shelly2 wrong FrequencySet calculation and add input range checks (#3882)
+ *
+ * 6.2.1.5 20180921
+ * Add authentication to HTTP web pages
+ * Add energy monitoring to Shelly2 (#2789)
+ * Rewrite TSL2561 driver to fix some issues (#3681)
+ *
+ * 6.2.1.4 20180916
+ * Add command SerialSend5 to send raw serial data like "A5074100545293"
+ * Update MCP230xx driver
+ * Update Czech translation
+ * Update MP3 driver (#3800)
+ * Add userid/password option to decode-status.py (#3796)
+ * Fix syslog when emulation is selected (#2109, #3784)
+ * Fix Pzem2 compilation error (#3766, #3767)
+ * Add uncalibrated energy monitoring to Shelly2 (#2789)
+ *
+ * 6.2.1.3 20180907
* Change web Configure Module GPIO drop down list order for better readability
* Fix showing Period Power in energy threshold messages
* Fix ButtonRetain to not use default topic for clearing retain messages (#3737)
* Add sleep to Nova Fitness SDS01X sensor (#2841, #3724, #3749)
* Add Analog input AD0 enabled to sonoff-sensors.bin (#3756, #3757)
- * Add Support to Xiaomi-Phillips Bulbs
+ * Add Support for Xiaomi-Philips Bulbs (#3787)
*
* 6.2.1.2 20180906
* Fix KNX PA exception. Regression from 6.2.1 buffer overflow caused by subStr() (#3700, #3710)
diff --git a/sonoff/i18n.h b/sonoff/i18n.h
index da47371d8..2090f4793 100644
--- a/sonoff/i18n.h
+++ b/sonoff/i18n.h
@@ -130,8 +130,10 @@
#define D_JSON_TYPE "Type"
#define D_JSON_UPTIME "Uptime"
#define D_JSON_UTC_TIME "UTC"
-#define D_JSON_UVINDEX "UvIndex"
+#define D_JSON_UV_INDEX "UvIndex"
+#define D_JSON_UV_INDEX_TEXT "UvIndexText"
#define D_JSON_UV_LEVEL "UvLevel"
+#define D_JSON_UV_POWER "UvPower"
#define D_JSON_VCC "Vcc"
#define D_JSON_VERSION "Version"
#define D_JSON_VOLTAGE "Voltage"
@@ -174,6 +176,7 @@
#define D_CMND_BLINKTIME "BlinkTime"
#define D_CMND_BLINKCOUNT "BlinkCount"
#define D_CMND_SENSOR "Sensor"
+#define D_CMND_DRIVER "Driver"
#define D_CMND_SAVEDATA "SaveData"
#define D_CMND_SETOPTION "SetOption"
#define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
@@ -286,12 +289,10 @@
#define D_CMND_CURRENTLOW "CurrentLow"
#define D_CMND_CURRENTHIGH "CurrentHigh"
#define D_CMND_ENERGYRESET "EnergyReset"
-#define D_CMND_POWERCAL "PowerCal"
#define D_CMND_POWERSET "PowerSet"
-#define D_CMND_VOLTAGECAL "VoltageCal"
#define D_CMND_VOLTAGESET "VoltageSet"
-#define D_CMND_CURRENTCAL "CurrentCal"
#define D_CMND_CURRENTSET "CurrentSet"
+#define D_CMND_FREQUENCYSET "FrequencySet"
#define D_CMND_MAXPOWER "MaxPower"
#define D_CMND_MAXPOWERHOLD "MaxPowerHold"
#define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
@@ -419,7 +420,8 @@ enum UnitNames {
UNIT_SECTORS,
UNIT_VOLT,
UNIT_WATT,
- UNIT_WATTHOUR };
+ UNIT_WATTHOUR,
+ UNIT_HERTZ };
const char kUnitNames[] PROGMEM =
D_UNIT_AMPERE "|"
D_UNIT_HOUR "|"
@@ -439,7 +441,8 @@ const char kUnitNames[] PROGMEM =
D_UNIT_SECTORS "|"
D_UNIT_VOLT "|"
D_UNIT_WATT "|"
- D_UNIT_WATTHOUR ;
+ D_UNIT_WATTHOUR "|"
+ D_UNIT_HERTZ ;
const char S_JSON_COMMAND_NVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%d %s\"}";
const char S_JSON_COMMAND_LVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%lu %s\"}";
@@ -467,6 +470,9 @@ const char S_JSON_COMMAND_INDEX_NVALUE_ACTIVE_NVALUE[] PROGMEM = "{\"%s%d\":\"%d
const char S_JSON_SENSOR_INDEX_NVALUE[] PROGMEM = "{\"" D_CMND_SENSOR "%d\":%d}";
const char S_JSON_SENSOR_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_SENSOR "%d\":\"%s\"}";
+const char S_JSON_DRIVER_INDEX_NVALUE[] PROGMEM = "{\"" D_CMND_DRIVER "%d\":%d}";
+const char S_JSON_DRIVER_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_DRIVER "%d\":\"%s\"}";
+
const char JSON_SNS_TEMP[] PROGMEM = "%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}";
const char JSON_SNS_TEMPHUM[] PROGMEM = "%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s}";
diff --git a/sonoff/language/bg-BG.h b/sonoff/language/bg-BG.h
index 266714fe4..d79eb5210 100644
--- a/sonoff/language/bg-BG.h
+++ b/sonoff/language/bg-BG.h
@@ -28,7 +28,7 @@
* Use online command StateText to translate ON, OFF, HOLD and TOGGLE.
* Use online command Prefix to translate cmnd, stat and tele.
*
- * Updated until v6.2.0.1
+ * Updated until v6.2.1.8
\*********************************************************************/
//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)
@@ -82,7 +82,7 @@
#define D_DNS_SERVER "DNS Сървър"
#define D_DONE "Изпълнено"
#define D_DST_TIME "DST"
-#define D_ECO2 "eCO2"
+#define D_ECO2 "eCO₂"
#define D_EMULATION "Емулация"
#define D_ENABLED "Активиран"
#define D_ERASE "Изтриване"
@@ -163,7 +163,15 @@
#define D_USER "Потребител"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "UV индекс"
-#define D_UV_LEVEL "Ниво на ултравиолетово излъчване"
+#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 "Изгаряне 1/2 степен"
+#define D_UV_INDEX_6 "Изгаряне 3-та степен"
+#define D_UV_INDEX_7 "Извън обхват"
+#define D_UV_LEVEL "UV ниво"
+#define D_UV_POWER "UV мощност"
#define D_VERSION "Версия"
#define D_VOLTAGE "Напрежение"
#define D_WARMLIGHT "Топла"
@@ -173,8 +181,8 @@
#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 "Системния логинг активиран"
+#define D_SERIAL_LOGGING_DISABLED "Серийният лог изключен"
+#define D_SYSLOG_LOGGING_REENABLED "Системният лог активиран"
#define D_SET_BAUDRATE_TO "Задаване скорост на предаване (Baudrate)"
#define D_RECEIVED_TOPIC "Получен топик"
@@ -186,7 +194,7 @@
#define D_BLOCKED_LOOP "Блокиран цикъл"
#define D_WPS_FAILED_WITH_STATUS "WPS конфигурацията е НЕУСПЕШНА със статус"
#define D_ACTIVE_FOR_3_MINUTES "активно в течение на 3 минути"
-#define D_FAILED_TO_START "неуспешно стартиране"
+#define D_FAILED_TO_START "Неуспешно стартиране"
#define D_PATCH_ISSUE_2186 "Проблем с патч 2186"
#define D_CONNECTING_TO_AP "Свързване към точка за достъп"
#define D_IN_MODE "в режим"
@@ -233,7 +241,7 @@
#define D_CONFIGURE_WIFI "Конфигурация на WiFi"
#define D_CONFIGURE_MQTT "Конфигурация на MQTT"
#define D_CONFIGURE_DOMOTICZ "Конфигурация на Domoticz"
-#define D_CONFIGURE_LOGGING "Конфигурация на логинга"
+#define D_CONFIGURE_LOGGING "Конфигурация на лога"
#define D_CONFIGURE_OTHER "Драги конфигурации"
#define D_CONFIRM_RESET_CONFIGURATION "Потвърдете изчистването"
#define D_RESET_CONFIGURATION "Изчистване на конфигурацията"
@@ -267,7 +275,7 @@
#define D_CLIENT "Клиент"
#define D_FULL_TOPIC "Пълен топик"
-#define D_LOGGING_PARAMETERS "Параметри на логинга"
+#define D_LOGGING_PARAMETERS "Параметри на лога"
#define D_SERIAL_LOG_LEVEL "Степен на серийния лог"
#define D_WEB_LOG_LEVEL "Степен на Уеб лога"
#define D_SYS_LOG_LEVEL "Степен на системния лог"
@@ -371,13 +379,13 @@
#define D_DOMOTICZ_TEMP "Temp"
#define D_DOMOTICZ_TEMP_HUM "Temp,Hum"
#define D_DOMOTICZ_TEMP_HUM_BARO "Temp,Hum,Baro"
- #define D_DOMOTICZ_POWER_ENERGY "Power,Energy"
- #define D_DOMOTICZ_ILLUMINANCE "Illuminance"
- #define D_DOMOTICZ_COUNT "Count/PM1"
- #define D_DOMOTICZ_VOLTAGE "Voltage/PM2,5"
- #define D_DOMOTICZ_CURRENT "Current/PM10"
- #define D_DOMOTICZ_AIRQUALITY "AirQuality"
-#define D_DOMOTICZ_UPDATE_TIMER "Update timer"
+ #define D_DOMOTICZ_POWER_ENERGY "Мощност,Енергия"
+ #define D_DOMOTICZ_ILLUMINANCE "Осветеност"
+ #define D_DOMOTICZ_COUNT "Брояч/PM1"
+ #define D_DOMOTICZ_VOLTAGE "Напрежение/PM2,5"
+ #define D_DOMOTICZ_CURRENT "Ток/PM10"
+ #define D_DOMOTICZ_AIRQUALITY "Качество на въздуха"
+#define D_DOMOTICZ_UPDATE_TIMER "Период на опресняване"
// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "Конфигуриране на таймер"
@@ -456,7 +464,7 @@
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
#define D_SENSOR_WS2812 "WS2812"
-#define D_SENSOR_DFR562 "MP3 Player"
+#define D_SENSOR_DFR562 "MP3 плейър"
#define D_SENSOR_IRSEND "IRsend"
#define D_SENSOR_SWITCH "Ключ" // Suffix "1"
#define D_SENSOR_BUTTON "Бутон" // Suffix "1"
@@ -494,10 +502,11 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "h"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kΩ"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
-#define D_UNIT_MICROGRAM_PER_CUBIC_METER "µg/m3"
+#define D_UNIT_MICROGRAM_PER_CUBIC_METER "µg/m³"
#define D_UNIT_MICROMETER "µm"
#define D_UNIT_MICROSECOND "µs"
#define D_UNIT_MILLIAMPERE "mA"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/cs-CZ.h b/sonoff/language/cs-CZ.h
index e90797725..570cfd4c8 100644
--- a/sonoff/language/cs-CZ.h
+++ b/sonoff/language/cs-CZ.h
@@ -163,7 +163,15 @@
#define D_USER "Uživatel"
#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_7 "OoR"
#define D_UV_LEVEL "úroveň UV"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Verze"
#define D_VOLTAGE "Napětí"
#define D_WARMLIGHT "Teplé světlo"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "hod"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/de-DE.h b/sonoff/language/de-DE.h
index a6e62c557..72f63f9c4 100644
--- a/sonoff/language/de-DE.h
+++ b/sonoff/language/de-DE.h
@@ -163,7 +163,15 @@
#define D_USER "Benutzer"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "UV-Index"
+#define D_UV_INDEX_1 "Niedrig"
+#define D_UV_INDEX_2 "Mittel"
+#define D_UV_INDEX_3 "Hoch"
+#define D_UV_INDEX_4 "Intensiv"
+#define D_UV_INDEX_5 "Gefährlich"
+#define D_UV_INDEX_6 "Schädlich"
+#define D_UV_INDEX_7 "Messwert!"
#define D_UV_LEVEL "UV-Level"
+#define D_UV_POWER "UV Intensität"
#define D_VERSION "Version"
#define D_VOLTAGE "Spannung"
#define D_WARMLIGHT "warm"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "h"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/el-GR.h b/sonoff/language/el-GR.h
index 715b2a7cf..23b5a2705 100644
--- a/sonoff/language/el-GR.h
+++ b/sonoff/language/el-GR.h
@@ -163,7 +163,15 @@
#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_7 "OoR"
#define D_UV_LEVEL "Επίπεδο UV"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Έκδοση"
#define D_VOLTAGE "Τάση"
#define D_WARMLIGHT "Ζεστό"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "Hr"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/en-GB.h b/sonoff/language/en-GB.h
index 9ac6c1fad..21d8edab7 100644
--- a/sonoff/language/en-GB.h
+++ b/sonoff/language/en-GB.h
@@ -163,7 +163,15 @@
#define D_USER "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_7 "OoR"
#define D_UV_LEVEL "UV Level"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Version"
#define D_VOLTAGE "Voltage"
#define D_WARMLIGHT "Warm"
@@ -493,6 +501,7 @@
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HOUR "Hr"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_HERTZ "Hz"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/es-AR.h b/sonoff/language/es-AR.h
index 7d0408080..713e166ab 100644
--- a/sonoff/language/es-AR.h
+++ b/sonoff/language/es-AR.h
@@ -163,7 +163,15 @@
#define D_USER "Usuario"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "Índice UV"
+#define D_UV_INDEX_1 "Bajo"
+#define D_UV_INDEX_2 "Medio"
+#define D_UV_INDEX_3 "Alto"
+#define D_UV_INDEX_4 "Peligroso"
+#define D_UV_INDEX_5 "Quemaduras 1 a 2 grad"
+#define D_UV_INDEX_6 "Quemaduras 3 grad"
+#define D_UV_INDEX_7 "Fuera de Rango"
#define D_UV_LEVEL "Nivel UV"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Versión"
#define D_VOLTAGE "Tensión"
#define D_WARMLIGHT "Cálida"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "Hr"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/fr-FR.h b/sonoff/language/fr-FR.h
index 7e6ea07b9..a7adaea39 100644
--- a/sonoff/language/fr-FR.h
+++ b/sonoff/language/fr-FR.h
@@ -28,7 +28,7 @@
* Use online command StateText to translate ON, OFF, HOLD and TOGGLE.
* Use online command Prefix to translate cmnd, stat and tele.
*
- * Updated until v6.1.1.7
+ * Updated until v6.2.1.7
\*********************************************************************/
#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)
@@ -65,7 +65,7 @@
#define D_BY "par" // Written by me
#define D_BYTES "Bytes"
#define D_CELSIUS "Celsius"
-#define D_CHANNEL "Channel"
+#define D_CHANNEL "Canal"
#define D_CO2 "Dioxyde de carbone"
#define D_CODE "code" // Button code
#define D_COLDLIGHT "Froid"
@@ -163,7 +163,15 @@
#define D_USER "Utilisateur"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "Indice UV"
+#define D_UV_INDEX_1 "Faible"
+#define D_UV_INDEX_2 "Modéré"
+#define D_UV_INDEX_3 "Élevé"
+#define D_UV_INDEX_4 "Très élevé"
+#define D_UV_INDEX_5 "Brûlure niv.1/2"
+#define D_UV_INDEX_6 "Brûlure niv.3"
+#define D_UV_INDEX_7 "Hors échelle"
#define D_UV_LEVEL "Niveau UV"
+#define D_UV_POWER "Puissance UV"
#define D_VERSION "Version"
#define D_VOLTAGE "Tension"
#define D_WARMLIGHT "Chaud"
@@ -176,7 +184,7 @@
#define D_SERIAL_LOGGING_DISABLED "Journalisation série désactivée"
#define D_SYSLOG_LOGGING_REENABLED "Jounalisation syslog réactivée"
-#define D_SET_BAUDRATE_TO "Définir baudrate à"
+#define D_SET_BAUDRATE_TO "Définir le débit à"
#define D_RECEIVED_TOPIC "Topic reçu" // Terme MQTT
#define D_DATA_SIZE "Taille données"
#define D_ANALOG_INPUT "Analogique"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "h"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kΩ"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/hu-HU.h b/sonoff/language/hu-HU.h
index ef2c28f80..ee6b8a66a 100644
--- a/sonoff/language/hu-HU.h
+++ b/sonoff/language/hu-HU.h
@@ -163,7 +163,15 @@
#define D_USER "Felhasználó"
#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_7 "OoR"
#define D_UV_LEVEL "UV Szint"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Verzió"
#define D_VOLTAGE "Feszültség"
#define D_WARMLIGHT "Meleg"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "ó"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/it-IT.h b/sonoff/language/it-IT.h
index ac818a9f2..b0fe0767a 100644
--- a/sonoff/language/it-IT.h
+++ b/sonoff/language/it-IT.h
@@ -163,7 +163,15 @@
#define D_USER "Utente"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "Indice UV"
+#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_7 "OoR"
#define D_UV_LEVEL "Livello UV"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Versione"
#define D_VOLTAGE "Tensione"
#define D_WARMLIGHT "Calda"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "Hr"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/nl-NL.h b/sonoff/language/nl-NL.h
index 273699477..70e55cb87 100644
--- a/sonoff/language/nl-NL.h
+++ b/sonoff/language/nl-NL.h
@@ -163,7 +163,15 @@
#define D_USER "Gebruiker"
#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_7 "OoR"
#define D_UV_LEVEL "UV niveau"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Versie"
#define D_VOLTAGE "Spanning"
#define D_WARMLIGHT "Warm"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "h"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/pl-PL.h b/sonoff/language/pl-PL.h
index 199f7cce9..40383fb53 100644
--- a/sonoff/language/pl-PL.h
+++ b/sonoff/language/pl-PL.h
@@ -163,7 +163,15 @@
#define D_USER "Użytkownik"
#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_7 "OoR"
#define D_UV_LEVEL "Poziom UV"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Wersja"
#define D_VOLTAGE "Napięcie"
#define D_WARMLIGHT "Nagrzanie"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "Godz"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/pt-BR.h b/sonoff/language/pt-BR.h
index 8770b9a4a..49affdf2f 100644
--- a/sonoff/language/pt-BR.h
+++ b/sonoff/language/pt-BR.h
@@ -163,7 +163,15 @@
#define D_USER "Usuário"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "Índice UV"
+#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_7 "OoR"
#define D_UV_LEVEL "Nível UV"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Versão"
#define D_VOLTAGE "Voltagem"
#define D_WARMLIGHT "Luz quente"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "H"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "W/h"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/pt-PT.h b/sonoff/language/pt-PT.h
index 0b7715583..fd2e98451 100644
--- a/sonoff/language/pt-PT.h
+++ b/sonoff/language/pt-PT.h
@@ -163,7 +163,15 @@
#define D_USER "Utilizador"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "Indíce UV"
+#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_7 "OoR"
#define D_UV_LEVEL "Nível UV"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Versão"
#define D_VOLTAGE "Voltagem"
#define D_WARMLIGHT "Luz Quente"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "Hr"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/ru-RU.h b/sonoff/language/ru-RU.h
index e61cbb9c1..9c6266693 100644
--- a/sonoff/language/ru-RU.h
+++ b/sonoff/language/ru-RU.h
@@ -163,7 +163,15 @@
#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_7 "OoR"
#define D_UV_LEVEL "УФ уровень"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Версия"
#define D_VOLTAGE "Напряжение"
#define D_WARMLIGHT "Тепло"
@@ -494,6 +502,7 @@
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
#define D_UNIT_HOUR "Ч"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "кОм"
#define D_UNIT_KILOWATTHOUR "кВт"
#define D_UNIT_LUX "лк"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "В"
#define D_UNIT_WATT "Вт"
#define D_UNIT_WATTHOUR "ВтЧ"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h
index 086c236aa..0c411868e 100755
--- a/sonoff/language/tr-TR.h
+++ b/sonoff/language/tr-TR.h
@@ -163,7 +163,15 @@
#define D_USER "Kullanıcı"
#define D_UTC_TIME "UTC"
#define D_UV_INDEX "UV Indeksi"
+#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_7 "OoR"
#define D_UV_LEVEL "UV Seviyesi"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Versiyon"
#define D_VOLTAGE "Voltaj"
#define D_WARMLIGHT "Sıcak"
@@ -494,6 +502,7 @@
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HOUR "Hr"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "kOhm"
#define D_UNIT_KILOWATTHOUR "kWh"
#define D_UNIT_LUX "lx"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
#define D_UNIT_HERTZ "Hz"
// Log message prefix
diff --git a/sonoff/language/uk-UK.h b/sonoff/language/uk-UK.h
index 19094d574..3a9b44afa 100644
--- a/sonoff/language/uk-UK.h
+++ b/sonoff/language/uk-UK.h
@@ -163,7 +163,15 @@
#define D_USER "Користувач"
#define D_UTC_TIME "UTC"
#define D_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_7 "OoR"
#define D_UV_LEVEL "УФ рівень"
+#define D_UV_POWER "UV Power"
#define D_VERSION "Версія"
#define D_VOLTAGE "Напруга"
#define D_WARMLIGHT "Тепло"
@@ -495,6 +503,7 @@
#define D_UNIT_CENTIMETER "cм"
#define D_UNIT_HERTZ "Гц"
#define D_UNIT_HOUR "Г"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "кОм"
#define D_UNIT_KILOWATTHOUR "кВт"
#define D_UNIT_LUX "лк"
@@ -515,6 +524,7 @@
#define D_UNIT_VOLT "В"
#define D_UNIT_WATT "Вт"
#define D_UNIT_WATTHOUR "ВтГод"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/zh-CN.h b/sonoff/language/zh-CN.h
index ea15b6ccb..59271d201 100644
--- a/sonoff/language/zh-CN.h
+++ b/sonoff/language/zh-CN.h
@@ -163,7 +163,15 @@
#define D_USER "用户名"
#define D_UTC_TIME "UTC"
#define D_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_7 "OoR"
#define D_UV_LEVEL "紫外线水平"
+#define D_UV_POWER "UV Power"
#define D_VERSION "版本"
#define D_VOLTAGE "电压"
#define D_WARMLIGHT "暖"
@@ -493,6 +501,7 @@
#define D_UNIT_AMPERE "安"
#define D_UNIT_CENTIMETER "厘米"
#define D_UNIT_HOUR "时"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_KILOOHM "千欧"
#define D_UNIT_KILOWATTHOUR "千瓦时"
#define D_UNIT_LUX "勒克斯"
@@ -514,6 +523,7 @@
#define D_UNIT_WATT "瓦"
#define D_UNIT_WATTHOUR "瓦时"
#define D_UNIT_HERTZ "赫兹"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/language/zh-TW.h b/sonoff/language/zh-TW.h
index f4f439c8b..5b275b925 100644
--- a/sonoff/language/zh-TW.h
+++ b/sonoff/language/zh-TW.h
@@ -163,7 +163,15 @@
#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_7 "OoR"
#define D_UV_LEVEL "紫外線等級"
+#define D_UV_POWER "UV Power"
#define D_VERSION "版本"
#define D_VOLTAGE "電壓"
#define D_WARMLIGHT "暖"
@@ -493,6 +501,7 @@
#define D_UNIT_AMPERE "安"
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
+#define D_UNIT_INCREMENTS "inc"
#define D_UNIT_HOUR "時"
#define D_UNIT_KILOOHM "千歐"
#define D_UNIT_KILOWATTHOUR "千瓦時"
@@ -514,6 +523,7 @@
#define D_UNIT_VOLT "伏"
#define D_UNIT_WATT "瓦"
#define D_UNIT_WATTHOUR "瓦時"
+#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
diff --git a/sonoff/settings.h b/sonoff/settings.h
index a1fd218ac..bf862dd51 100644
--- a/sonoff/settings.h
+++ b/sonoff/settings.h
@@ -322,9 +322,13 @@ struct SYSCFG {
uint16_t mcp230xx_int_timer; // 718
- byte free_71A[180]; // 71A
+ byte free_71A[174]; // 71A
- char mems[MAX_RULE_MEMS][10]; // 7CE
+ unsigned long energy_frequency_calibration; // 7C8
+
+ byte free_7CC[2]; // 7CC
+
+ char mems[MAX_RULE_MEMS][10]; // 7CE
// 800 Full - no more free locations
char rules[MAX_RULE_SETS][MAX_RULE_SIZE]; // 800 uses 512 bytes in v5.12.0m, 3 x 512 bytes in v5.14.0b
@@ -333,21 +337,21 @@ struct SYSCFG {
} Settings;
struct RTCRBT {
- uint16_t valid; // 000
- uint8_t fast_reboot_count; // 002
- uint8_t free_003[1]; // 003
+ uint16_t valid; // 280 (RTC memory offset 100 - sizeof(RTCRBT))
+ uint8_t fast_reboot_count; // 282
+ uint8_t free_003[1]; // 283
} RtcReboot;
struct RTCMEM {
- uint16_t valid; // 000
- byte oswatch_blocked_loop; // 002
- uint8_t ota_loader; // 003
- unsigned long energy_kWhtoday; // 004
- unsigned long energy_kWhtotal; // 008
- unsigned long pulse_counter[MAX_COUNTERS]; // 00C
- power_t power; // 01C
- uint8_t free_020[60]; // 020
- // 05C next free location (64 (=core) + 100 (=tasmota offset) + 92 (=0x5C RTCMEM struct) = 256 bytes (max = 512))
+ uint16_t valid; // 290 (RTC memory offset 100)
+ byte oswatch_blocked_loop; // 292
+ uint8_t ota_loader; // 293
+ unsigned long energy_kWhtoday; // 294
+ unsigned long energy_kWhtotal; // 298
+ unsigned long pulse_counter[MAX_COUNTERS]; // 29C
+ power_t power; // 2AC
+ uint8_t free_020[60]; // 2B0
+ // 2EC - 2FF free locations
} RtcSettings;
struct TIME_T {
diff --git a/sonoff/settings.ino b/sonoff/settings.ino
index 5626f862b..95e6ce367 100644
--- a/sonoff/settings.ino
+++ b/sonoff/settings.ino
@@ -86,20 +86,12 @@ void RtcSettingsSave()
RtcSettings.valid = RTC_MEM_VALID;
ESP.rtcUserMemoryWrite(100, (uint32_t*)&RtcSettings, sizeof(RTCMEM));
rtc_settings_crc = GetRtcSettingsCrc();
-#ifdef DEBUG_THEO
- AddLog_P(LOG_LEVEL_DEBUG, PSTR("Dump: Save"));
- RtcSettingsDump();
-#endif // DEBUG_THEO
}
}
void RtcSettingsLoad()
{
- ESP.rtcUserMemoryRead(100, (uint32_t*)&RtcSettings, sizeof(RTCMEM));
-#ifdef DEBUG_THEO
- AddLog_P(LOG_LEVEL_DEBUG, PSTR("Dump: Load"));
- RtcSettingsDump();
-#endif // DEBUG_THEO
+ ESP.rtcUserMemoryRead(100, (uint32_t*)&RtcSettings, sizeof(RTCMEM)); // 0x290
if (RtcSettings.valid != RTC_MEM_VALID) {
memset(&RtcSettings, 0, sizeof(RTCMEM));
RtcSettings.valid = RTC_MEM_VALID;
@@ -145,7 +137,7 @@ void RtcRebootSave()
void RtcRebootLoad()
{
- ESP.rtcUserMemoryRead(100 - sizeof(RTCRBT), (uint32_t*)&RtcReboot, sizeof(RTCRBT));
+ ESP.rtcUserMemoryRead(100 - sizeof(RTCRBT), (uint32_t*)&RtcReboot, sizeof(RTCRBT)); // 0x280
if (RtcReboot.valid != RTC_MEM_VALID) {
memset(&RtcReboot, 0, sizeof(RTCRBT));
RtcReboot.valid = RTC_MEM_VALID;
diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino
index a55e896c4..6b354bb24 100755
--- a/sonoff/sonoff.ino
+++ b/sonoff/sonoff.ino
@@ -83,7 +83,7 @@ enum TasmotaCommands {
CMND_LOGHOST, CMND_LOGPORT, CMND_IPADDRESS, CMND_NTPSERVER, CMND_AP, CMND_SSID, CMND_PASSWORD, CMND_HOSTNAME,
CMND_WIFICONFIG, CMND_FRIENDLYNAME, CMND_SWITCHMODE,
CMND_TELEPERIOD, CMND_RESTART, CMND_RESET, CMND_TIMEZONE, CMND_TIMESTD, CMND_TIMEDST, CMND_ALTITUDE, CMND_LEDPOWER, CMND_LEDSTATE,
- CMND_I2CSCAN, CMND_SERIALSEND, CMND_BAUDRATE, CMND_SERIALDELIMITER };
+ CMND_I2CSCAN, CMND_SERIALSEND, CMND_BAUDRATE, CMND_SERIALDELIMITER, CMND_DRIVER };
const char kTasmotaCommands[] PROGMEM =
D_CMND_BACKLOG "|" D_CMND_DELAY "|" D_CMND_POWER "|" D_CMND_FANSPEED "|" D_CMND_STATUS "|" D_CMND_STATE "|" D_CMND_POWERONSTATE "|" D_CMND_PULSETIME "|"
D_CMND_BLINKTIME "|" D_CMND_BLINKCOUNT "|" D_CMND_SENSOR "|" D_CMND_SAVEDATA "|" D_CMND_SETOPTION "|" D_CMND_TEMPERATURE_RESOLUTION "|" D_CMND_HUMIDITY_RESOLUTION "|"
@@ -93,7 +93,7 @@ const char kTasmotaCommands[] PROGMEM =
D_CMND_LOGHOST "|" D_CMND_LOGPORT "|" D_CMND_IPADDRESS "|" D_CMND_NTPSERVER "|" D_CMND_AP "|" D_CMND_SSID "|" D_CMND_PASSWORD "|" D_CMND_HOSTNAME "|"
D_CMND_WIFICONFIG "|" D_CMND_FRIENDLYNAME "|" D_CMND_SWITCHMODE "|"
D_CMND_TELEPERIOD "|" D_CMND_RESTART "|" D_CMND_RESET "|" D_CMND_TIMEZONE "|" D_CMND_TIMESTD "|" D_CMND_TIMEDST "|" D_CMND_ALTITUDE "|" D_CMND_LEDPOWER "|" D_CMND_LEDSTATE "|"
- D_CMND_I2CSCAN "|" D_CMND_SERIALSEND "|" D_CMND_BAUDRATE "|" D_CMND_SERIALDELIMITER;
+ D_CMND_I2CSCAN "|" D_CMND_SERIALSEND "|" D_CMND_BAUDRATE "|" D_CMND_SERIALDELIMITER "|" D_CMND_DRIVER;
const uint8_t kIFan02Speed[4][3] = {{6,6,6}, {7,6,6}, {7,7,6}, {7,6,7}};
@@ -147,6 +147,7 @@ uint16_t blink_counter = 0; // Number of blink cycles
uint16_t seriallog_timer = 0; // Timer to disable Seriallog
uint16_t syslog_timer = 0; // Timer to re-enable syslog_level
uint16_t holdbutton[MAX_KEYS] = { 0 }; // Timer for button hold
+uint16_t switch_no_pullup = 0; // Switch pull-up bitmask flags
int16_t save_data_counter; // Counter and flag for config save to Flash
RulesBitfield rules_flag; // Rule state flags (16 bits)
uint8_t serial_local = 0; // Handle serial locally;
@@ -335,7 +336,8 @@ void SetDevicePower(power_t rpower, int source)
}
}
- XdrvSetPower(rpower);
+ XdrvMailbox.index = rpower;
+ XdrvCall(FUNC_SET_POWER);
if ((SONOFF_DUAL == Settings.module) || (CH4 == Settings.module)) {
Serial.write(0xA0);
@@ -461,10 +463,11 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
grpflg = (strstr(topicBuf, Settings.mqtt_grptopic) != NULL);
fallback_topic_flag = (strstr(topicBuf, mqtt_client) != NULL);
- type = strrchr(topicBuf, '/') +1; // Last part of received topic is always the command (type)
+ type = strrchr(topicBuf, '/'); // Last part of received topic is always the command (type)
index = 1;
if (type != NULL) {
+ type++;
for (i = 0; i < strlen(type); i++) {
type[i] = toupper(type[i]);
}
@@ -679,7 +682,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, (Settings.save_data > 1) ? stemp1 : GetStateText(Settings.save_data));
}
- else if (CMND_SENSOR == command_code) {
+ else if ((CMND_SENSOR == command_code) || (CMND_DRIVER == command_code)) {
XdrvMailbox.index = index;
XdrvMailbox.data_len = data_len;
XdrvMailbox.payload16 = payload16;
@@ -687,8 +690,11 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
XdrvMailbox.grpflg = grpflg;
XdrvMailbox.topic = command;
XdrvMailbox.data = dataBuf;
- XsnsCall(FUNC_COMMAND);
-// if (!XsnsCall(FUNC_COMMAND)) type = NULL;
+ if (CMND_SENSOR == command_code) {
+ XsnsCall(FUNC_COMMAND);
+ } else {
+ XdrvCall(FUNC_COMMAND);
+ }
}
else if ((CMND_SETOPTION == command_code) && (index < 82)) {
byte ptype;
@@ -969,22 +975,25 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.baudrate * 1200);
}
- else if ((CMND_SERIALSEND == command_code) && (index > 0) && (index <= 4)) {
+ else if ((CMND_SERIALSEND == command_code) && (index > 0) && (index <= 5)) {
SetSeriallog(LOG_LEVEL_NONE);
Settings.flag.mqtt_serial = 1;
- Settings.flag.mqtt_serial_raw = (4 == index) ? 1 : 0;
+ Settings.flag.mqtt_serial_raw = (index > 3) ? 1 : 0;
if (data_len > 0) {
if (1 == index) {
- Serial.printf("%s\n", dataBuf);
+ Serial.printf("%s\n", dataBuf); // "Hello Tiger\n"
}
else if (2 == index || 4 == index) {
for (int i = 0; i < data_len; i++) {
- Serial.write(dataBuf[i]);
+ Serial.write(dataBuf[i]); // "Hello Tiger" or "A0"
}
}
else if (3 == index) {
uint16_t dat_len = data_len;
- Serial.printf("%s", Unescape(dataBuf, &dat_len));
+ Serial.printf("%s", Unescape(dataBuf, &dat_len)); // "Hello\f"
+ }
+ else if (5 == index) {
+ SerialSendRaw(dataBuf, data_len); // "AA004566"
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, D_JSON_DONE);
}
@@ -1035,7 +1044,8 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
for (i = 0; i < strlen(Settings.ntp_server[index -1]); i++) {
if (Settings.ntp_server[index -1][i] == ',') Settings.ntp_server[index -1][i] = '.';
}
- restart_flag = 2;
+// restart_flag = 2; // Issue #3890
+ ntp_force_sync = 1;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, Settings.ntp_server[index -1]);
}
@@ -1110,6 +1120,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
else if ((CMND_SWITCHMODE == command_code) && (index > 0) && (index <= MAX_SWITCHES)) {
if ((payload >= 0) && (payload < MAX_SWITCH_OPTION)) {
Settings.switchmode[index -1] = payload;
+ GpioSwitchPinMode(index -1);
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_NVALUE, command, index, Settings.switchmode[index-1]);
}
@@ -1403,6 +1414,7 @@ void PublishStatus(uint8_t payload)
{
uint8_t option = STAT;
char stemp[MAX_FRIENDLYNAMES * (sizeof(Settings.friendlyname[0]) +MAX_FRIENDLYNAMES)];
+ char stemp2[MAX_SWITCHES * 3];
// Workaround MQTT - TCP/IP stack queueing when SUB_PREFIX = PUB_PREFIX
if (!strcmp(Settings.mqtt_prefix[0],Settings.mqtt_prefix[1]) && (!payload)) option++; // TELE
@@ -1417,8 +1429,12 @@ void PublishStatus(uint8_t payload)
for (byte i = 0; i < maxfn; i++) {
snprintf_P(stemp, sizeof(stemp), PSTR("%s%s\"%s\"" ), stemp, (i > 0 ? "," : ""), Settings.friendlyname[i]);
}
- snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS "\":{\"" D_CMND_MODULE "\":%d,\"" D_CMND_FRIENDLYNAME "\":[%s],\"" D_CMND_TOPIC "\":\"%s\",\"" D_CMND_BUTTONTOPIC "\":\"%s\",\"" D_CMND_POWER "\":%d,\"" D_CMND_POWERONSTATE "\":%d,\"" D_CMND_LEDSTATE "\":%d,\"" D_CMND_SAVEDATA "\":%d,\"" D_JSON_SAVESTATE "\":%d,\"" D_CMND_BUTTONRETAIN "\":%d,\"" D_CMND_POWERRETAIN "\":%d}}"),
- Settings.module +1, stemp, mqtt_topic, Settings.button_topic, power, Settings.poweronstate, Settings.ledstate, Settings.save_data, Settings.flag.save_state, Settings.flag.mqtt_button_retain, Settings.flag.mqtt_power_retain);
+ stemp2[0] = '\0';
+ for (byte i = 0; i < MAX_SWITCHES; i++) {
+ snprintf_P(stemp2, sizeof(stemp2), PSTR("%s%s%d" ), stemp2, (i > 0 ? "," : ""), Settings.switchmode[i]);
+ }
+ snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS "\":{\"" D_CMND_MODULE "\":%d,\"" D_CMND_FRIENDLYNAME "\":[%s],\"" D_CMND_TOPIC "\":\"%s\",\"" D_CMND_BUTTONTOPIC "\":\"%s\",\"" D_CMND_POWER "\":%d,\"" D_CMND_POWERONSTATE "\":%d,\"" D_CMND_LEDSTATE "\":%d,\"" D_CMND_SAVEDATA "\":%d,\"" D_JSON_SAVESTATE "\":%d,\"" D_CMND_SWITCHTOPIC "\":\"%s\",\"" D_CMND_SWITCHMODE "\":[%s],\"" D_CMND_BUTTONRETAIN "\":%d,\"" D_CMND_SWITCHRETAIN "\":%d,\"" D_CMND_SENSORRETAIN "\":%d,\"" D_CMND_POWERRETAIN "\":%d}}"),
+ Settings.module +1, stemp, mqtt_topic, Settings.button_topic, power, Settings.poweronstate, Settings.ledstate, Settings.save_data, Settings.flag.save_state, Settings.switch_topic, stemp2, Settings.flag.mqtt_button_retain, Settings.flag.mqtt_switch_retain, Settings.flag.mqtt_sensor_retain, Settings.flag.mqtt_power_retain);
MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS));
}
@@ -2282,11 +2298,23 @@ void SerialInput()
/********************************************************************************************/
+void GpioSwitchPinMode(uint8_t index)
+{
+ if (pin[GPIO_SWT1 +index] < 99) {
+// pinMode(pin[GPIO_SWT1 +index], (16 == pin[GPIO_SWT1 +index]) ? INPUT_PULLDOWN_16 : bitRead(switch_no_pullup, index) ? INPUT : INPUT_PULLUP);
+
+ uint8_t no_pullup = 0;
+ if (bitRead(switch_no_pullup, index)) {
+ no_pullup = (Settings.switchmode[index] < PUSHBUTTON);
+ }
+ pinMode(pin[GPIO_SWT1 +index], (16 == pin[GPIO_SWT1 +index]) ? INPUT_PULLDOWN_16 : (no_pullup) ? INPUT : INPUT_PULLUP);
+ }
+}
+
void GpioInit()
{
uint8_t mpin;
uint8_t key_no_pullup = 0;
- uint16_t switch_no_pullup = 0;
mytmplt def_module;
if (!Settings.module || (Settings.module >= MAXMODULE)) {
@@ -2443,7 +2471,7 @@ void GpioInit()
for (byte i = 0; i < MAX_SWITCHES; i++) {
lastwallswitch[i] = 1; // Init global to virtual switch state;
if (pin[GPIO_SWT1 +i] < 99) {
- pinMode(pin[GPIO_SWT1 +i], (16 == pin[GPIO_SWT1 +i]) ? INPUT_PULLDOWN_16 : bitRead(switch_no_pullup, i) ? INPUT : INPUT_PULLUP);
+ GpioSwitchPinMode(i);
lastwallswitch[i] = digitalRead(pin[GPIO_SWT1 +i]); // Set global now so doesn't change the saved power state on first switch check
}
virtualswitch[i] = lastwallswitch[i];
@@ -2606,7 +2634,6 @@ void setup()
SetPulseTimer(i, Settings.pulse_timer[i]);
}
}
-
blink_powersave = power;
snprintf_P(log_data, sizeof(log_data), PSTR(D_PROJECT " %s %s (" D_CMND_TOPIC " %s, " D_FALLBACK " %s, " D_CMND_GROUPTOPIC " %s) " D_VERSION " %s-" ARDUINO_ESP8266_RELEASE),
diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h
index 8622d0818..423a75f3c 100755
--- a/sonoff/sonoff_post.h
+++ b/sonoff/sonoff_post.h
@@ -51,7 +51,7 @@ void KNX_CB_Action(message_t const &msg, void *arg);
#endif
#define USE_DHT // Default DHT11 sensor needs no external library
-#define USE_ENERGY_SENSOR // Use energy sensors
+#define USE_ENERGY_SENSOR // Use energy sensors (+14k code)
#define USE_HLW8012 // Use energy sensor for Sonoff Pow and WolfBlitz
#define USE_CSE7766 // Use energy sensor for Sonoff S31 and Pow R2
@@ -167,6 +167,30 @@ void KNX_CB_Action(message_t const &msg, void *arg);
#undef USE_EMULATION // Disable Belkin WeMo and Hue Bridge emulation for Alexa (-16k code, -2k mem)
#endif // USE_KNX_NO_EMULATION
+/*********************************************************************************************\
+ * [sonoff-display.bin]
+ * Provide an image with display drivers enabled
+\*********************************************************************************************/
+
+#ifdef USE_DISPLAYS
+
+#undef USE_ENERGY_SENSOR // Disable energy sensors (-14k code)
+#undef USE_EMULATION // Disable Belkin WeMo and Hue Bridge emulation for Alexa (-16k code, -2k mem)
+
+#define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram)
+ #define USE_DISPLAY // Add I2C Display Support (+2k code)
+ #define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0
+ #define USE_DISPLAY_LCD // [DisplayModel 1] Enable Lcd display (I2C addresses 0x27 and 0x3F) (+6k code)
+ #define USE_DISPLAY_SSD1306 // [DisplayModel 2] Enable SSD1306 Oled 128x64 display (I2C addresses 0x3C and 0x3D) (+16k code)
+ #define USE_DISPLAY_MATRIX // [DisplayModel 3] Enable 8x8 Matrix display (I2C adresseses see below) (+11k code)
+
+#define USE_SPI // Hardware SPI using GPIO12(MISO), GPIO13(MOSI) and GPIO14(CLK) in addition to two user selectable GPIOs(CS and DC)
+ #define USE_DISPLAY_ILI9341 // [DisplayModel 4] Enable ILI9341 Tft 480x320 display (+19k code)
+
+#undef USE_ARILUX_RF // Remove support for Arilux RF remote controller (-0k8 code, 252 iram (non 2.3.0))
+#undef USE_RF_FLASH // Remove support for flashing the EFM8BB1 chip on the Sonoff RF Bridge. C2CK must be connected to GPIO4, C2D to GPIO5 on the PCB (-3k code)
+#endif // USE_DISPLAYS
+
/*********************************************************************************************\
* Mandatory define for DS18x20 if changed by above image selections
\*********************************************************************************************/
diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h
index 781b1004d..d083675d3 100644
--- a/sonoff/sonoff_template.h
+++ b/sonoff/sonoff_template.h
@@ -231,6 +231,7 @@ enum SupportedModules {
SHELLY1,
SHELLY2,
PHILIPS,
+ NEO_COOLCAM,
MAXMODULE };
/********************************************************************************************/
@@ -390,6 +391,7 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = {
SHELLY1,
SHELLY2,
BLITZWOLF_BWSHP2,
+ NEO_COOLCAM,
H801,
MAGICHOME,
ARILUX_LC01,
@@ -399,9 +401,9 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = {
HUAFAN_SS,
KMC_70011,
AILIGHT,
- WEMOS,
+ PHILIPS,
WITTY,
- PHILIPS
+ WEMOS
};
// Default module settings
@@ -853,6 +855,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
0, 0, 0, 0, 0, 0, // Flash connection
0, 0, 0, 0, 0
},
+/*
{ "MagicHome", // Magic Home (aka Flux-light) (ESP8266)
// https://www.aliexpress.com/item/Magic-Home-Mini-RGB-RGBW-Wifi-Controller-For-Led-Strip-Panel-light-Timing-Function-16million-colors/32686853650.html
0,
@@ -867,6 +870,22 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
GPIO_PWM1, // GPIO14 RGB LED Red
0, 0, 0
},
+*/
+ { "MagicHome", // Magic Home (aka Flux-light) (ESP8266) and Arilux LC10 (ESP8285)
+ // https://www.aliexpress.com/item/Magic-Home-Mini-RGB-RGBW-Wifi-Controller-For-Led-Strip-Panel-light-Timing-Function-16million-colors/32686853650.html
+ 0,
+ GPIO_USER, // GPIO01 Serial RXD and Optional sensor
+ GPIO_LED1_INV, // GPIO02 Blue onboard LED
+ GPIO_USER, // GPIO03 Serial TXD and Optional sensor
+ GPIO_ARIRFRCV, // GPIO04 IR or RF receiver (optional)
+ GPIO_PWM2, // GPIO05 RGB LED Green
+ 0, 0, 0, 0, 0, 0, // Flash connection
+ GPIO_PWM3, // GPIO12 RGB LED Blue
+ GPIO_USER, // GPIO13 RGBW LED White (optional - set to PWM4 for Cold White or Warm White as used on Arilux LC10)
+ GPIO_PWM1, // GPIO14 RGB LED Red
+ GPIO_LED2_INV, // GPIO15 RF receiver control
+ 0, 0
+ },
{ "Luani HVIO", // ESP8266_HVIO
// https://luani.de/projekte/esp8266-hvio/
0, // GPIO00 Flash jumper
@@ -1054,12 +1073,40 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
0, 0,
GPIO_PWM1, // GPIO15 light intensity
0, 0
+ },
+ { "Neo Coolcam", // Neo Coolcam (ESP8266)
+ // https://www.banggood.com/NEO-COOLCAM-WiFi-Mini-Smart-Plug-APP-Remote-Control-Timing-Smart-Socket-EU-Plug-p-1288562.html?cur_warehouse=CN
+ 0, 0, 0, 0,
+ GPIO_LED1_INV, // GPIO13 Red Led (0 = On, 1 = Off)
+ 0,
+ 0, 0, 0, 0, 0, 0, // Flash connection
+ GPIO_REL1, // GPIO12 Red Led and Relay (0 = Off, 1 = On)
+ GPIO_KEY1, // GPIO13 Button
+ 0, 0, 0, 0
}
};
/*
Optionals
+ { "Arilux LC10", // Arilux LC10 (ESP8285), RGBW + RF
+ // https://github.com/arendst/Sonoff-Tasmota/wiki/MagicHome-with-ESP8285
+ // https://www.aliexpress.com/item/DC5-24V-Wireless-WIFI-LED-RGB-Controller-RGBW-Controller-IR-RF-Remote-Control-IOS-Android-for/32827253255.html
+ // https://www.aliexpress.com/item/Wifi-LED-RGB-Controler-DC12V-MIni-Wifi-RGB-RGBW-LED-Controller-for-RGB-RGBW-LED-Strip/32673444047.html
+ GPIO_USER, // GPIO00 Optional Button
+ GPIO_USER, // GPIO01 Serial RXD and Optional sensor
+ 0,
+ GPIO_USER, // GPIO03 Serial TXD and Optional sensor0
+ GPIO_ARIRFRCV, // GPIO04 RF receiver input
+ GPIO_PWM2, // GPIO05 RGB LED Green
+ 0, 0, 0, 0, 0, 0, // Flash connection
+ GPIO_PWM3, // GPIO12 RGB LED Blue
+ GPIO_PWM4, // GPIO13 RGBW LED White
+ GPIO_PWM1, // GPIO14 RGB LED Red
+ GPIO_LED2_INV, // GPIO15 RF receiver control
+ 0, 0
+ }
+
{ "Xenon 3CH", // Xenon 3CH (ESP8266) - (#1128)
0, 0, 0,
GPIO_KEY2, // GPIO03 Serial TXD and Optional sensor
diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h
index f068473ab..4f2b5c0ec 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 0x06020103
+#define VERSION 0x06020109
#define D_PROGRAMNAME "Sonoff-Tasmota"
#define D_AUTHOR "Theo Arends"
diff --git a/sonoff/support.ino b/sonoff/support.ino
index af93fa148..fc73e726e 100644
--- a/sonoff/support.ino
+++ b/sonoff/support.ino
@@ -494,6 +494,32 @@ double FastPrecisePow(double a, double b)
return r * u.d;
}
+uint32_t SqrtInt(uint32_t num)
+{
+ if (num <= 1) {
+ return num;
+ }
+
+ uint32_t x = num / 2;
+ uint32_t y;
+ do {
+ y = (x + num / x) / 2;
+ if (y >= x) {
+ return x;
+ }
+ x = y;
+ } while (true);
+}
+
+uint32_t RoundSqrtInt(uint32_t num)
+{
+ uint32_t s = SqrtInt(4 * num);
+ if (s & 1) {
+ s++;
+ }
+ return s / 2;
+}
+
char* GetTextIndexed(char* destination, size_t destination_size, uint16_t index, const char* haystack)
{
// Returns empty string if not found
@@ -704,6 +730,21 @@ void ClaimSerial()
Settings.baudrate = baudrate / 1200;
}
+void SerialSendRaw(char *codes, int size)
+{
+ char *p;
+ char stemp[3];
+ uint8_t code;
+
+ while (size > 0) {
+ snprintf(stemp, sizeof(stemp), codes);
+ code = strtol(stemp, &p, 16);
+ Serial.write(code);
+ size -= 2;
+ codes += 2;
+ }
+}
+
uint32_t GetHash(const char *buffer, size_t size)
{
uint32_t hash = 0;
diff --git a/sonoff/user_config.h b/sonoff/user_config.h
index a07c87ec3..eceadc68d 100644
--- a/sonoff/user_config.h
+++ b/sonoff/user_config.h
@@ -282,7 +282,9 @@
#define USE_BMP // Enable BMP085/BMP180/BMP280/BME280 sensor (I2C address 0x76 or 0x77) (+4k code)
// #define USE_BME680 // Enable support for BME680 sensor using Bosch BME680 library (+4k code)
#define USE_BH1750 // Enable BH1750 sensor (I2C address 0x23 or 0x5C) (+0k5 code)
-// #define USE_VEML6070 // Enable VEML6070 sensor (I2C addresses 0x38 and 0x39) (+0k5 code)
+// #define USE_VEML6070 // Enable VEML6070 sensor (I2C addresses 0x38 and 0x39) (+1k5 code)
+ #define USE_VEML6070_RSET 270000 // VEML6070, Rset in Ohm used on PCB board, default 270K = 270000ohm, range for this sensor: 220K ... 1Meg
+ #define USE_VEML6070_SHOW_RAW // VEML6070, shows the raw value of UV-A
// #define USE_ADS1115 // Enable ADS1115 16 bit A/D converter (I2C address 0x48, 0x49, 0x4A or 0x4B) based on Adafruit ADS1x15 library (no library needed) (+0k7 code)
// #define USE_ADS1115_I2CDEV // Enable ADS1115 16 bit A/D converter (I2C address 0x48, 0x49, 0x4A or 0x4B) using library i2cdevlib-Core and i2cdevlib-ADS1115 (+2k code)
// #define USE_INA219 // Enable INA219 (I2C address 0x40, 0x41 0x44 or 0x45) Low voltage and current sensor (+1k code)
@@ -294,9 +296,12 @@
// #define USE_SI1145 // Enable SI1145/46/47 sensor (I2C address 0x60) (+1k code)
#define USE_LM75AD // Enable LM75AD sensor (I2C addresses 0x48 - 0x4F) (+0k5 code)
// #define USE_APDS9960 // Enable APDS9960 Proximity Sensor (I2C address 0x39). Disables SHT and VEML6070 (+4k7 code)
-// #define USE_MCP230xx // Enable MCP23008/MCP23017 for GP INPUT ONLY (I2C addresses 0x20 - 0x27) providing command Sensor29 for configuration (+4k7 code)
+// #define USE_MCP230xx // Enable MCP23008/MCP23017 - Must define I2C Address in #define USE_MCP230xx_ADDR below - range 0x20 - 0x27 (+4k7 code)
+// #define USE_MCP230xx_ADDR 0x20 // Enable MCP23008/MCP23017 I2C Address to use (Must be within range 0x20 through 0x27 - set according to your wired setup)
// #define USE_MCP230xx_OUTPUT // Enable MCP23008/MCP23017 OUTPUT support through sensor29 commands (+1k5 code)
// #define USE_MCP230xx_DISPLAYOUTPUT // Enable MCP23008/MCP23017 to display state of OUTPUT pins on Web UI (+0k2 code)
+// #define USE_PCA9685 // Enable PCA9685 I2C HW PWM Driver - Must define I2C Address in #define USE_PCA9685_ADDR below - range 0x40 - 0x47 (+1k4 code)
+// #define USE_PCA9685_ADDR 0x40 // Enable PCA9685 I2C Address to use (Must be within range 0x40 through 0x47 - set according to your wired setup)
// #define USE_MPR121 // Enable MPR121 controller (I2C addresses 0x5A, 0x5B, 0x5C and 0x5D) in input mode for touch buttons (+1k3 code)
// #define USE_CCS811 // Enable CCS811 sensor (I2C address 0x5A) (+2k2 code)
// #define USE_MPU6050 // Enable MPU6050 sensor (I2C address 0x68 AD0 low or 0x69 AD0 high) (+2k6 code)
@@ -318,7 +323,7 @@
#endif // USE_I2C
// -- SPI sensors ---------------------------------
-//#define USE_SPI // SPI using library TasmotaTFT
+//#define USE_SPI // Hardware SPI using GPIO12(MISO), GPIO13(MOSI) and GPIO14(CLK) in addition to two user selectable GPIOs(CS and DC)
#ifdef USE_SPI
#ifndef USE_DISPLAY
@@ -342,11 +347,12 @@
//#define USE_SDM630 // Add support for Eastron SDM630-Modbus energy meter (+2k code)
#define SDM630_SPEED 9600 // SDM630-Modbus RS485 serial speed (default: 9600 baud)
//#define USE_MP3_PLAYER // Use of the DFPlayer Mini MP3 Player RB-DFR-562 commands: play, volume and stop
-// #define MP3_VOLUME 10 // Set the startup volume on init, the range can be 0..30(max)
+ #define MP3_VOLUME 10 // Set the startup volume on init, the range can be 0..30(max)
// Power monitoring sensors -----------------------
#define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code)
#define USE_PZEM2 // Add support for PZEM003,014,016,017 Energy monitor (+1k1 code)
+#define USE_MCP39F501 // Add support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code)
// -- Low level interface devices -----------------
#define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram)
@@ -380,6 +386,7 @@
//#define USE_CLASSIC // Create sonoff-classic with initial configuration tools WPS, SmartConfig and WifiManager
//#define USE_SENSORS // Create sonoff-sensors with useful sensors enabled
//#define USE_KNX_NO_EMULATION // Create sonoff-knx with KNX but without Emulation
+//#define USE_DISPLAYS // Create sonoff-display with display drivers enabled
//#define BE_MINIMAL // Create sonoff-minimal as intermediate firmware for OTA-MAGIC
/*********************************************************************************************\
diff --git a/sonoff/xdrv_02_webserver.ino b/sonoff/xdrv_02_webserver.ino
index 6cadb952f..5182b7051 100644
--- a/sonoff/xdrv_02_webserver.ino
+++ b/sonoff/xdrv_02_webserver.ino
@@ -29,8 +29,6 @@
uint8_t *efm8bb1_update = NULL;
#endif // USE_RF_FLASH
-#define D_TASMOTA_TOKEN "Tasmota-Token"
-
enum UploadTypes { UPL_TASMOTA, UPL_SETTINGS, UPL_EFM8BB1 };
const char HTTP_HEAD[] PROGMEM =
@@ -58,17 +56,13 @@ const char HTTP_HEAD[] PROGMEM =
"eb('s1').value=l.innerText||l.textContent;"
"eb('p1').focus();"
"}"
- "function lx(){"
- "if(to==1){"
- "if(tp<30){"
- "tp++;"
- "lt=setTimeout(lx,33);" // Wait for token from server
- "}else{"
- "lt=setTimeout(la,1355);" // Discard action and retry
- "}"
- "return;"
+ "function la(p){"
+ "var a='';"
+ "if(la.arguments.length==1){"
+ "a=p;"
+ "clearTimeout(lt);"
"}"
- "if(x!=null){x.abort();}" // Abort if no response within 2 seconds (happens on restart 1)
+ "if(x!=null){x.abort();}" // Abort if no response within 2 seconds (happens on restart 1)
"x=new XMLHttpRequest();"
"x.onreadystatechange=function(){"
"if(x.readyState==4&&x.status==200){"
@@ -76,32 +70,15 @@ const char HTTP_HEAD[] PROGMEM =
"eb('l1').innerHTML=s;"
"}"
"};"
- "x.open('GET','ay'+pc,true);" // Async request
- "x.setRequestHeader('" D_TASMOTA_TOKEN "',to);"
- "x.send();" // Perform command if available and get updated information
- "pc='';"
- "lt=setTimeout(la,2345-(tp*33));"
- "}"
- "function la(p){"
- "if(la.arguments.length==1){"
- "pc='?'+p;"
- "clearTimeout(lt);"
- "}else{pc='';}"
- "to=1;tp=0;"
- "if(x!=null){x.abort();}" // Abort if no response within 2 seconds (happens on restart 1)
- "x=new XMLHttpRequest();"
- "x.onreadystatechange=function(){"
- "if(x.readyState==4&&x.status==200){to=x.getResponseHeader('" D_TASMOTA_TOKEN "');}else{to=1;}"
- "};"
- "x.open('GET','az',true);" // Async request
- "x.send();" // Get token from server
- "lx();"
+ "x.open('GET','ay'+a,true);"
+ "x.send();"
+ "lt=setTimeout(la,2345);"
"}"
"function lb(p){"
- "la('d='+p);"
+ "la('?d='+p);"
"}"
"function lc(p){"
- "la('c='+p);"
+ "la('?t='+p);"
"}";
const char HTTP_HEAD_STYLE[] PROGMEM =
@@ -340,7 +317,7 @@ const char HTTP_END[] PROGMEM =
"