diff --git a/README.md b/README.md index 7607d23af..336e2e5ad 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## Sonoff-Tasmota Provide ESP8266 based Sonoff by [iTead Studio](https://www.itead.cc/) and ElectroDragon IoT Relay with Serial, Web and MQTT control allowing 'Over the Air' or OTA firmware updates using Arduino IDE. -Current version is **5.8.0b** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information. +Current version is **5.8.0c** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information. ### ATTENTION All versions diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 9163b9267..c832719ed 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,4 +1,11 @@ -/* 5.8.0b +/* 5.8.0c + * Add warning to webpage when USE_MINIMAL is selected (#929) + * Fix compile error when DOMOTICZ_UPDATE_TIMER is not defined (#930) + * Fix alignment of web page items in some browsers (#935) + * Add smoother movement of hour hand in WS2812 led clock (#936) + * Add support for Magic Home RGBW Led controller (#940) + * + * 5.8.0b * Fix command FullTopic entry when using serial or console interface * Fix possible UDP syslog blocking * Add debug information to MQTT subscribe diff --git a/sonoff/language/en-GB.h b/sonoff/language/en-GB.h index d67a6e346..0857f6639 100644 --- a/sonoff/language/en-GB.h +++ b/sonoff/language/en-GB.h @@ -243,6 +243,7 @@ #define D_SYSLOG_HOST_NOT_FOUND "Syslog Host not found" // webserver.ino +#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - please upgrade" #define D_WEBSERVER_ACTIVE_ON "Web server active on" #define D_WITH_IP_ADDRESS "with IP address" #define D_WEBSERVER_STOPPED "Web server stopped" diff --git a/sonoff/language/nl-NL.h b/sonoff/language/nl-NL.h index 3c7ef9d92..31d6786c0 100644 --- a/sonoff/language/nl-NL.h +++ b/sonoff/language/nl-NL.h @@ -243,6 +243,7 @@ #define D_SYSLOG_HOST_NOT_FOUND "Syslog Host niet gevonden" // webserver.ino +#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - opwaarderen" #define D_WEBSERVER_ACTIVE_ON "Webserver actief op" #define D_WITH_IP_ADDRESS "met IP adres" #define D_WEBSERVER_STOPPED "Webserver gestopt" @@ -337,7 +338,7 @@ #define D_ESP_CHIP_ID "ESP Chip Id" #define D_FLASH_CHIP_ID "Flash Chip Id" #define D_FLASH_CHIP_SIZE "Flash Grootte" -#define D_FREE_PROGRAM_SPACE "Vrij programma ruimte" +#define D_FREE_PROGRAM_SPACE "Programma ruimte over" #define D_UPGRADE_BY_WEBSERVER "Opwaarderen dmv webserver" #define D_OTA_URL "OTA Url" diff --git a/sonoff/settings.ino b/sonoff/settings.ino index 333d2fa3f..c3f607a88 100644 --- a/sonoff/settings.ino +++ b/sonoff/settings.ino @@ -17,6 +17,10 @@ along with this program. If not, see . */ +#ifndef DOMOTICZ_UPDATE_TIMER +#define DOMOTICZ_UPDATE_TIMER 0 // [DomoticzUpdateTimer] Send relay status (0 = disable, 1 - 3600 seconds) (Optional) +#endif + const uint8_t sfb_codeDefault[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 }; /*********************************************************************************************\ diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 9d9d9666d..a57528cc2 100644 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -25,7 +25,7 @@ - Select IDE Tools - Flash Size: "1M (no SPIFFS)" ====================================================*/ -#define VERSION 0x05080002 // 5.8.0b +#define VERSION 0x05080003 // 5.8.0c enum week_t {Last, First, Second, Third, Fourth}; enum dow_t {Sun=1, Mon, Tue, Wed, Thu, Fri, Sat}; diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 8b092b20d..4cc9afe75 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -159,6 +159,7 @@ enum module_t { SUPLA1, WITTY, YUNSHAN, + MAGICHOME, MAXMODULE }; /********************************************************************************************/ @@ -204,6 +205,7 @@ const uint8_t nicelist[MAXMODULE] PROGMEM = { YUNSHAN, WION, H801, + MAGICHOME, HUAFAN_SS, AILIGHT, WEMOS, @@ -650,6 +652,18 @@ const mytmplt modules[MAXMODULE] PROGMEM = { GPIO_KEY1, // GPIO05 Blue Led and OptoCoupler input - Module Pin 9 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, 0, + GPIO_LED1_INV, // GPIO02 Blue onboard LED + 0, + GPIO_USER, // GPIO04 IR receiver (optional) + GPIO_PWM4, // GPIO05 RGB LED Green + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_PWM5, // GPIO12 RGB LED Blue + GPIO_USER, // GPIO13 RGBW LED White (optional - set to PWM1 for Cold White or PWM2 for Warm White) + GPIO_PWM3, // GPIO14 RGB LED Red + 0, 0, 0 } }; diff --git a/sonoff/user_config.h b/sonoff/user_config.h index d614e7593..1df4b42d3 100644 --- a/sonoff/user_config.h +++ b/sonoff/user_config.h @@ -105,13 +105,13 @@ #define TELE_PERIOD 300 // [TelePeriod] Telemetry (0 = disable, 10 - 3600 seconds) // -- MQTT - Domoticz ----------------------------- -#define USE_DOMOTICZ // Enable Domoticz (+7k code, +0.3k mem) - Disable by // +#define USE_DOMOTICZ // Enable Domoticz (+6k code, +0.3k mem) - Disable by // #define DOMOTICZ_IN_TOPIC "domoticz/in" // Domoticz Input Topic #define DOMOTICZ_OUT_TOPIC "domoticz/out" // Domoticz Output Topic #define DOMOTICZ_UPDATE_TIMER 0 // [DomoticzUpdateTimer] Send relay status (0 = disable, 1 - 3600 seconds) (Optional) // -- HTTP ---------------------------------------- -#define USE_WEBSERVER // Enable web server and wifi manager (+62k code, +8k mem) - Disable by // +#define USE_WEBSERVER // Enable web server and wifi manager (+66k code, +8k mem) - Disable by // #define WEB_SERVER 2 // [WebServer] Web server (0 = Off, 1 = Start as User, 2 = Start as Admin) #define WEB_PORT 80 // Web server Port for User and Admin mode #define WEB_USERNAME "admin" // Web server Admin mode user name diff --git a/sonoff/webserver.ino b/sonoff/webserver.ino index 630513dd6..ff40dcd31 100644 --- a/sonoff/webserver.ino +++ b/sonoff/webserver.ino @@ -91,6 +91,9 @@ const char HTTP_HEAD[] PROGMEM = "" "" "
" +#ifdef BE_MINIMAL + "

" D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "

" +#endif "

{ha} " D_MODULE "

{h}

"; const char HTTP_SCRIPT_CONSOL[] PROGMEM = "var sn=0;" // Scroll position @@ -150,8 +153,10 @@ const char HTTP_MSG_SLIDER2[] PROGMEM = const char HTTP_MSG_RSTRT[] PROGMEM = "
" D_DEVICE_WILL_RESTART "

"; const char HTTP_BTN_MENU1[] PROGMEM = +#ifndef BE_MINIMAL "
" "
" +#endif "
" "
"; const char HTTP_BTN_RSTRT[] PROGMEM = @@ -220,15 +225,15 @@ const char HTTP_FORM_OTHER[] PROGMEM = "
 " D_OTHER_PARAMETERS " 
" "" "
" D_WEB_ADMIN_PASSWORD "

" - "
" D_MQTT_ENABLE "
"; -const char HTTP_FORM_OTHER2[] PROGMEM = + "
" D_MQTT_ENABLE "
"; + const char HTTP_FORM_OTHER2[] PROGMEM = "
" D_FRIENDLY_NAME " {1 ({2)

"; #ifdef USE_EMULATION const char HTTP_FORM_OTHER3a[] PROGMEM = "
 " D_EMULATION " "; const char HTTP_FORM_OTHER3b[] PROGMEM = - "
{3{4"; -#endif // USE_EMULATION + "
{3{4"; + #endif // USE_EMULATION const char HTTP_FORM_END[] PROGMEM = "
"; const char HTTP_FORM_RST[] PROGMEM = diff --git a/sonoff/xdrv_ws2812.ino b/sonoff/xdrv_ws2812.ino index ea2d1bba8..5e59f8114 100644 --- a/sonoff/xdrv_ws2812.ino +++ b/sonoff/xdrv_ws2812.ino @@ -135,7 +135,8 @@ void ws2812_clock() c = strip->GetPixelColor(mod(i -1, j)); c.G = i3; strip->SetPixelColor(mod(i -1, j), c); c = strip->GetPixelColor(mod(i, j)); c.G = i1; strip->SetPixelColor(mod(i, j), c); c = strip->GetPixelColor(mod(i +1, j)); c.G = i3; strip->SetPixelColor(mod(i +1, j), c); - i = (rtcTime.Hour % 12) * (50 / clksize); +// i = (rtcTime.Hour % 12) * (50 / clksize); + i = (rtcTime.Hour % 12 * 5 + rtcTime.Minute / 12 ) * 10 / clksize; c = strip->GetPixelColor(mod(i -2, j)); c.R = i3; strip->SetPixelColor(mod(i -2, j), c); c = strip->GetPixelColor(mod(i -1, j)); c.R = i2; strip->SetPixelColor(mod(i -1, j), c); c = strip->GetPixelColor(mod(i, j)); c.R = i1; strip->SetPixelColor(mod(i, j), c);