From 619c5431d77cd898d46886beae94d0ce5a7ff182 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Thu, 17 Nov 2022 17:54:42 +0100
Subject: [PATCH] Add Wemo SSDP presentationURL
Add Wemo SSDP presentationURL for easy access using Windows Networks Other Device device double click (#17084)
As implemented only works when USE_UNISHOX_COMPRESSION is disabled.
---
tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino | 4 ++++
tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino
index 0d433fbdf..3dab180f5 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino
@@ -240,6 +240,7 @@ const char WEMO_SETUP_XML[] PROGMEM =
"3.1415"
"uuid:{x2"
"{x3"
+ "http://{x4:80/"
"0"
""
""
@@ -335,6 +336,9 @@ void HandleUpnpSetupWemo(void)
setup_xml.replace("{x1", SettingsText(SET_FRIENDLYNAME1));
setup_xml.replace("{x2", WemoUuid());
setup_xml.replace("{x3", WemoSerialnumber());
+
+ setup_xml.replace("{x4", WiFi.localIP().toString());
+
WSSend(200, CT_XML, setup_xml);
}
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino
index 5ceb84ac9..8ef0e3be1 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino
@@ -203,6 +203,7 @@ const char WEMO_SETUP_XML[] PROGMEM =
"3.1415"
"uuid:{x2"
"{x3"
+ "http://{x4:80/"
"0"
""
""
@@ -396,6 +397,9 @@ private:
setup_xml.replace("{x1", SettingsText(SET_FRIENDLYNAME1 + (_deviceId - 1)));
setup_xml.replace("{x2", WemoUuid());
setup_xml.replace("{x3", WemoSerialnumber());
+
+ setup_xml.replace("{x4", WiFi.localIP().toString());
+
InternalWSSend(200, CT_XML, setup_xml);
#ifdef USE_EMULATION_WEMO_DEBUG
AddLog(LOG_LEVEL_DEBUG, PSTR("WMO: Sending device #%d: %s"), _deviceId, setup_xml.c_str());