Fauxmo conflicts with pywemo
Closed this issue · 1 comments
I've been getting a HomeAssistant error for a couple months during setup of the Wemo component. It complaints about an error setting up the wemo component, and this (among other stuff) appears in the logs:
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('<scpd xmlns="urn:Belkin:service-1-0"><actionList><action><name>SetBinaryState</name><argumentList><argument><retval/><name>BinaryState</name><relatedStateVariable>BinaryState</relatedStateVariable><direction>in</direction></argument></argumentList></action><action><name>GetBinaryState</name><argumentList><argument><retval/><name>BinaryState</name><relatedStateVariable>BinaryState</relatedStateVariable><direction>out</direction></argument></argumentList></action></actionList><serviceStateTable><stateVariable sendEvents="yes"><name>BinaryState</name><dataType>Boolean</dataType><defaultValue>0</defaultValue></stateVariable><stateVariable sendEvents="yes"><name>level</name><dataType>string</dataType><defaultValue>0</defaultValue></stateVariable></serviceStateTable></scpd>\r\n',))
My current workaround is to disable discovery for belkin_wemo
and just use the IP address.
Trying to hunt down the source of the problem, just yesterday I discovered pywemo/pywemo#45 which references Fauxmo, and made me realize maybe there was a conflict. Sure enough, I shut down Fauxmo, restarted hass, and the error went away. Just to double check, I opened up a repl and provoked the error with pywemo.discover_devices()
with Fauxmo running, shut down Fauxmo and that command worked.
So now I need to figure out what to do about it.
Turning off discovery and using static IP for wemo devices is a reasonable workaround in the meantime.
In the bigger scheme of things, I could either
- have Fauxmo try to recognize a pywemo search and not respond, or
- try to figure out what part of the response isn't working for pywemo and fix it, allowing pywemo to work as a cli for Fauxmo as per the issue referenced
I'm waiting for Travis to support 3.7 before merging to master.