From 24a69607492298be256ff00719ad3377d0d0a8fe Mon Sep 17 00:00:00 2001 From: arendst Date: Sat, 30 Dec 2017 12:47:19 +0100 Subject: [PATCH] v5.10.0g - Alexa 2nd Gen support 5.10.0g * Add 2nd Gen Alexa support to Wemo emulation discovery (#1357, #1450) --- README.md | 2 +- sonoff/_releasenotes.ino | 5 +- sonoff/sonoff.ino | 4 +- sonoff/xdrv_wemohue.ino | 104 +++++++-------------------------------- 4 files changed, 25 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index e15875409..74dedf6ae 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.10.0f** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information. +Current version is **5.10.0g** - 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 4824ab3de..f8bde43a0 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,4 +1,7 @@ -/* 5.10.0f +/* 5.10.0g + * Add 2nd Gen Alexa support to Wemo emulation discovery (#1357, #1450) + * + * 5.10.0f * Differentiate between JSON text defines and other text defines to allow for English JSON while using different locale (#1449) * Fix display of build date and time in non-english locale (#1465) * Add define for additional number of WS2812 schemes (#1463) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 31277e155..bfefb52cf 100644 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -25,8 +25,8 @@ - Select IDE Tools - Flash Size: "1M (no SPIFFS)" ====================================================*/ -#define VERSION 0x050A0006 -#define VERSION_STRING "5.10.0f" // Would be great to have a macro that fills this from VERSION ... +#define VERSION 0x050A0007 +#define VERSION_STRING "5.10.0g" // Would be great to have a macro that fills this from VERSION ... // Location specific includes #include "sonoff.h" // Enumaration used in user_config.h diff --git a/sonoff/xdrv_wemohue.ino b/sonoff/xdrv_wemohue.ino index 2bd7c3100..907ee3c95 100755 --- a/sonoff/xdrv_wemohue.ino +++ b/sonoff/xdrv_wemohue.ino @@ -220,14 +220,18 @@ void PollUdp() // AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR("UDP: M-SEARCH Packet received")); // AddLog_P(LOG_LEVEL_DEBUG_MORE, request.c_str()); - if ((EMUL_WEMO == Settings.flag2.emulation) && (request.indexOf(F("urn:belkin:device:**")) > 0)) { + if ((EMUL_WEMO == Settings.flag2.emulation) && + ((request.indexOf(F("urn:belkin:device:**")) > 0) || + (request.indexOf(F("upnp:rootdevice")) > 0) || // Needed by 2nd generation Echo + (request.indexOf(F("ssdpsearch:all")) > 0) || + (request.indexOf(F("ssdp:all")) > 0))) { WemoRespondToMSearch(); } else if ((EMUL_HUE == Settings.flag2.emulation) && - ((request.indexOf(F("st:urn:schemas-upnp-org:device:basic:1")) > 0) || - (request.indexOf(F("st:upnp:rootdevice")) > 0) || - (request.indexOf(F("st:ssdpsearch:all")) > 0) || - (request.indexOf(F("st:ssdp:all")) > 0))) { + ((request.indexOf(F("urn:schemas-upnp-org:device:basic:1")) > 0) || + (request.indexOf(F("upnp:rootdevice")) > 0) || + (request.indexOf(F("ssdpsearch:all")) > 0) || + (request.indexOf(F("ssdp:all")) > 0))) { HueRespondToMSearch(); } } @@ -241,48 +245,13 @@ void PollUdp() \*********************************************************************************************/ const char WEMO_EVENTSERVICE_XML[] PROGMEM = -/* - // Original - "" - "" - "" - "SetBinaryState" - "" - "" - "" - "BinaryState" - "BinaryState" - "in" - "" - "" - "" - "" - "BinaryState" - "Boolean" - "0" - "" - "" - "level" - "string" - "0" - "" - "" - "" - "\r\n" - "\r\n"; -*/ - -/* - // XosePerez version 20171108 - v2.3.0 - "" "" - "10" "" "" "SetBinaryState" "" "" - "" + "" "BinaryState" "BinaryState" "in" @@ -307,48 +276,12 @@ const char WEMO_EVENTSERVICE_XML[] PROGMEM = "Boolean" "0" "" + "" + "level" + "string" + "0" + "" "" - ""; -*/ - - // Reloxx13 from #1357 - "" - "" - "" - "SetBinaryState" - "" - "" - "" - "BinaryState" - "BinaryState" - "in" - "" - "" - "" - "" - "BinaryState" - "Boolean" - "0" - "" - "" - "level" - "string" - "0" - "" - "" - "" - "" - "GetBinaryState" - "" - "" - "" - "BinaryState" - "BinaryState" - "out" - "" - "" - "" - "" "\r\n" "\r\n"; @@ -360,8 +293,7 @@ const char WEMO_RESPONSE_STATE_SOAP[] PROGMEM = "{x1" "" "" - "\r\n" - "\r\n"; + "\r\n"; const char WEMO_SETUP_XML[] PROGMEM = "" @@ -370,7 +302,7 @@ const char WEMO_SETUP_XML[] PROGMEM = "urn:Belkin:device:controllee:1" "{x1" "Belkin International Inc." - "Sonoff Socket" + "Socket" "3.1415" "uuid:{x2" "{x3" @@ -385,7 +317,7 @@ const char WEMO_SETUP_XML[] PROGMEM = "" "" "" - ""; + "\r\n"; /********************************************************************************************/