From 4609c0b5833aad34a6072480ca35fe1b99d0ed56 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 24 Jul 2019 17:44:47 -0700 Subject: [PATCH] change search function to honor ssdp:all and the proper urn --- fauxmo/fauxmo.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fauxmo/fauxmo.py b/fauxmo/fauxmo.py index a946770..45ac887 100755 --- a/fauxmo/fauxmo.py +++ b/fauxmo/fauxmo.py @@ -359,7 +359,12 @@ class upnp_broadcast_responder(object): def do_read(self, fileno): data, sender = self.recvfrom(1024) if data: - if data.find('M-SEARCH') == 0 and data.find('urn:Belkin:device:**') != -1: + if data.find('M-SEARCH') == 0 and ( + data.find('urn:Belkin:device:**') != -1 or + data.find('ssdp:all') != -1 or + data.find('urn:Belkin:device:controllee:1') != -1 + ): + for device in self.devices: time.sleep(0.1) device.respond_to_search(sender, 'urn:Belkin:device:**')