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)
This commit is contained in:
arendst 2017-09-30 13:32:53 +02:00
parent 74acc90d23
commit 107b746083
10 changed files with 44 additions and 11 deletions

View File

@ -1,7 +1,7 @@
## Sonoff-Tasmota ## 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. 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 ### ATTENTION All versions

View File

@ -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 command FullTopic entry when using serial or console interface
* Fix possible UDP syslog blocking * Fix possible UDP syslog blocking
* Add debug information to MQTT subscribe * Add debug information to MQTT subscribe

View File

@ -243,6 +243,7 @@
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host not found" #define D_SYSLOG_HOST_NOT_FOUND "Syslog Host not found"
// webserver.ino // webserver.ino
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - please upgrade"
#define D_WEBSERVER_ACTIVE_ON "Web server active on" #define D_WEBSERVER_ACTIVE_ON "Web server active on"
#define D_WITH_IP_ADDRESS "with IP address" #define D_WITH_IP_ADDRESS "with IP address"
#define D_WEBSERVER_STOPPED "Web server stopped" #define D_WEBSERVER_STOPPED "Web server stopped"

View File

@ -243,6 +243,7 @@
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host niet gevonden" #define D_SYSLOG_HOST_NOT_FOUND "Syslog Host niet gevonden"
// webserver.ino // webserver.ino
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - opwaarderen"
#define D_WEBSERVER_ACTIVE_ON "Webserver actief op" #define D_WEBSERVER_ACTIVE_ON "Webserver actief op"
#define D_WITH_IP_ADDRESS "met IP adres" #define D_WITH_IP_ADDRESS "met IP adres"
#define D_WEBSERVER_STOPPED "Webserver gestopt" #define D_WEBSERVER_STOPPED "Webserver gestopt"
@ -337,7 +338,7 @@
#define D_ESP_CHIP_ID "ESP Chip Id" #define D_ESP_CHIP_ID "ESP Chip Id"
#define D_FLASH_CHIP_ID "Flash Chip Id" #define D_FLASH_CHIP_ID "Flash Chip Id"
#define D_FLASH_CHIP_SIZE "Flash Grootte" #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_UPGRADE_BY_WEBSERVER "Opwaarderen dmv webserver"
#define D_OTA_URL "OTA Url" #define D_OTA_URL "OTA Url"

View File

@ -17,6 +17,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#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 }; const uint8_t sfb_codeDefault[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };
/*********************************************************************************************\ /*********************************************************************************************\

View File

@ -25,7 +25,7 @@
- Select IDE Tools - Flash Size: "1M (no SPIFFS)" - 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 week_t {Last, First, Second, Third, Fourth};
enum dow_t {Sun=1, Mon, Tue, Wed, Thu, Fri, Sat}; enum dow_t {Sun=1, Mon, Tue, Wed, Thu, Fri, Sat};

View File

@ -159,6 +159,7 @@ enum module_t {
SUPLA1, SUPLA1,
WITTY, WITTY,
YUNSHAN, YUNSHAN,
MAGICHOME,
MAXMODULE }; MAXMODULE };
/********************************************************************************************/ /********************************************************************************************/
@ -204,6 +205,7 @@ const uint8_t nicelist[MAXMODULE] PROGMEM = {
YUNSHAN, YUNSHAN,
WION, WION,
H801, H801,
MAGICHOME,
HUAFAN_SS, HUAFAN_SS,
AILIGHT, AILIGHT,
WEMOS, WEMOS,
@ -650,6 +652,18 @@ const mytmplt modules[MAXMODULE] PROGMEM = {
GPIO_KEY1, // GPIO05 Blue Led and OptoCoupler input - Module Pin 9 GPIO_KEY1, // GPIO05 Blue Led and OptoCoupler input - Module Pin 9
0, 0, 0, 0, 0, 0, // Flash connection 0, 0, 0, 0, 0, 0, // Flash connection
0, 0, 0, 0, 0 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
} }
}; };

View File

@ -105,13 +105,13 @@
#define TELE_PERIOD 300 // [TelePeriod] Telemetry (0 = disable, 10 - 3600 seconds) #define TELE_PERIOD 300 // [TelePeriod] Telemetry (0 = disable, 10 - 3600 seconds)
// -- MQTT - Domoticz ----------------------------- // -- 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_IN_TOPIC "domoticz/in" // Domoticz Input Topic
#define DOMOTICZ_OUT_TOPIC "domoticz/out" // Domoticz Output 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) #define DOMOTICZ_UPDATE_TIMER 0 // [DomoticzUpdateTimer] Send relay status (0 = disable, 1 - 3600 seconds) (Optional)
// -- HTTP ---------------------------------------- // -- 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_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_PORT 80 // Web server Port for User and Admin mode
#define WEB_USERNAME "admin" // Web server Admin mode user name #define WEB_USERNAME "admin" // Web server Admin mode user name

View File

@ -91,6 +91,9 @@ const char HTTP_HEAD[] PROGMEM =
"</head>" "</head>"
"<body>" "<body>"
"<div style='text-align:left;display:inline-block;min-width:340px;'>" "<div style='text-align:left;display:inline-block;min-width:340px;'>"
#ifdef BE_MINIMAL
"<div style='text-align:center;color:red;'><h3>" D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "</h3></div>"
#endif
"<div style='text-align:center;'><h3>{ha} " D_MODULE "</h3><h2>{h}</h2></div>"; "<div style='text-align:center;'><h3>{ha} " D_MODULE "</h3><h2>{h}</h2></div>";
const char HTTP_SCRIPT_CONSOL[] PROGMEM = const char HTTP_SCRIPT_CONSOL[] PROGMEM =
"var sn=0;" // Scroll position "var sn=0;" // Scroll position
@ -150,8 +153,10 @@ const char HTTP_MSG_SLIDER2[] PROGMEM =
const char HTTP_MSG_RSTRT[] PROGMEM = const char HTTP_MSG_RSTRT[] PROGMEM =
"<br/><div style='text-align:center;'>" D_DEVICE_WILL_RESTART "</div><br/>"; "<br/><div style='text-align:center;'>" D_DEVICE_WILL_RESTART "</div><br/>";
const char HTTP_BTN_MENU1[] PROGMEM = const char HTTP_BTN_MENU1[] PROGMEM =
#ifndef BE_MINIMAL
"<br/><form action='cn' method='get'><button>" D_CONFIGURATION "</button></form>" "<br/><form action='cn' method='get'><button>" D_CONFIGURATION "</button></form>"
"<br/><form action='in' method='get'><button>" D_INFORMATION "</button></form>" "<br/><form action='in' method='get'><button>" D_INFORMATION "</button></form>"
#endif
"<br/><form action='up' method='get'><button>" D_FIRMWARE_UPGRADE "</button></form>" "<br/><form action='up' method='get'><button>" D_FIRMWARE_UPGRADE "</button></form>"
"<br/><form action='cs' method='get'><button>" D_CONSOLE "</button></form>"; "<br/><form action='cs' method='get'><button>" D_CONSOLE "</button></form>";
const char HTTP_BTN_RSTRT[] PROGMEM = const char HTTP_BTN_RSTRT[] PROGMEM =
@ -220,15 +225,15 @@ const char HTTP_FORM_OTHER[] PROGMEM =
"<fieldset><legend><b>&nbsp;" D_OTHER_PARAMETERS "&nbsp;</b></legend><form method='get' action='sv'>" "<fieldset><legend><b>&nbsp;" D_OTHER_PARAMETERS "&nbsp;</b></legend><form method='get' action='sv'>"
"<input id='w' name='w' value='5' hidden><input id='r' name='r' value='1' hidden>" "<input id='w' name='w' value='5' hidden><input id='r' name='r' value='1' hidden>"
"<br/><b>" D_WEB_ADMIN_PASSWORD "</b><br/><input id='p1' name='p1' length=32 type='password' placeholder='" WEB_PASSWORD "' value='{p1}'><br/>" "<br/><b>" D_WEB_ADMIN_PASSWORD "</b><br/><input id='p1' name='p1' length=32 type='password' placeholder='" WEB_PASSWORD "' value='{p1}'><br/>"
"<br/><input style='width:10%;float:left' id='b1' name='b1' type='checkbox'{r1}><b>" D_MQTT_ENABLE "</b><br/>"; "<br/><input style='width:10%;' id='b1' name='b1' type='checkbox'{r1}><b>" D_MQTT_ENABLE "</b><br/>";
const char HTTP_FORM_OTHER2[] PROGMEM = const char HTTP_FORM_OTHER2[] PROGMEM =
"<br/><b>" D_FRIENDLY_NAME " {1</b> ({2)<br/><input id='a{1' name='a{1' length=32 placeholder='{2' value='{3'><br/>"; "<br/><b>" D_FRIENDLY_NAME " {1</b> ({2)<br/><input id='a{1' name='a{1' length=32 placeholder='{2' value='{3'><br/>";
#ifdef USE_EMULATION #ifdef USE_EMULATION
const char HTTP_FORM_OTHER3a[] PROGMEM = const char HTTP_FORM_OTHER3a[] PROGMEM =
"<br/><fieldset><legend><b>&nbsp;" D_EMULATION "&nbsp;</b></legend>"; "<br/><fieldset><legend><b>&nbsp;" D_EMULATION "&nbsp;</b></legend>";
const char HTTP_FORM_OTHER3b[] PROGMEM = const char HTTP_FORM_OTHER3b[] PROGMEM =
"<br/><input style='width:10%;float:left' id='b2' name='b2' type='radio' value='{1'{2><b>{3</b>{4"; "<br/><input style='width:10%;' id='b2' name='b2' type='radio' value='{1'{2><b>{3</b>{4";
#endif // USE_EMULATION #endif // USE_EMULATION
const char HTTP_FORM_END[] PROGMEM = const char HTTP_FORM_END[] PROGMEM =
"<br/><button type='submit'>" D_SAVE "</button></form></fieldset>"; "<br/><button type='submit'>" D_SAVE "</button></form></fieldset>";
const char HTTP_FORM_RST[] PROGMEM = const char HTTP_FORM_RST[] PROGMEM =

View File

@ -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 -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, 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); 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 -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 -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); c = strip->GetPixelColor(mod(i, j)); c.R = i1; strip->SetPixelColor(mod(i, j), c);