Problem with Wemo

Hi,

I reloaded the home assistant with the All-in-one raspberry setup. But found those errors on wemo, some of the component did not have the correct state. e.g. switch is turned on but indicate off.

Here are the following partial error from log:
16-08-13 12:12:20 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Kid Toilet Rack”>, will retry in 60s
16-08-13 12:12:21 pywemo.subscribe: Resubscribe error for <WeMo Maker “Garage Door”>, will retry in 60s
16-08-13 12:12:21 pywemo.subscribe: Resubscribe error for <WeMo Motion “Garage Motion”>, will retry in 60s
16-08-13 12:12:21 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Study Light Switch”>, will retry in 60s
16-08-13 12:12:22 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Kids Toilet”>, will retry in 60s
16-08-13 12:12:22 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Toilet Rack”>, will retry in 60s
16-08-13 12:12:23 pywemo.subscribe: Resubscribe error for <WeMo Switch “Steamer”>, will retry in 60s
16-08-13 12:12:26 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Kid Room”>, will retry in 60s
16-08-13 12:12:26 pywemo.subscribe: Resubscribe error for <WeMo Switch “Outdoor Cam”>, will retry in 60s
16-08-13 12:13:20 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Garage Light”>, will retry in 60s
16-08-13 12:13:31 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Kid Toilet Rack”>, will retry in 60s
16-08-13 12:13:31 pywemo.subscribe: Resubscribe error for <WeMo Maker “Garage Door”>, will retry in 60s
16-08-13 12:13:32 pywemo.subscribe: Resubscribe error for <WeMo Motion “Garage Motion”>, will retry in 60s
16-08-13 12:13:32 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Study Light Switch”>, will retry in 60s
16-08-13 12:13:33 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Kids Toilet”>, will retry in 60s
16-08-13 12:13:33 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Toilet Rack”>, will retry in 60s
16-08-13 12:13:34 pywemo.subscribe: Resubscribe error for <WeMo Switch “Steamer”>, will retry in 60s
16-08-13 12:13:37 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Kid Room”>, will retry in 60s
16-08-13 12:13:38 pywemo.subscribe: Resubscribe error for <WeMo Switch “Outdoor Cam”>, will retry in 60s
16-08-13 12:14:31 pywemo.subscribe: Resubscribe error for <WeMo LightSwitch “Garage Light”>, will retry in 60s

The problem is with requests-2.11.0

Downgrade with this to fix:

pip install requests==2.10.0

Hi, I tried that and it was successful. So I reboot it, but still see the same pywemo errors. I tried again with the following errors:

pi@raspberrypi:~ $ pip install requests==2.10.0
Traceback (most recent call last):
File “/usr/bin/pip”, line 9, in
load_entry_point(‘pip==1.5.6’, ‘console_scripts’, ‘pip’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2476, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2190, in load
[‘name’])
File “/usr/lib/python2.7/dist-packages/pip/init.py”, line 74, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File “/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py”, line 9, in
from pip.download import path_to_url
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 25, in
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead

Here is the successful install log.

pi@raspberrypi:/home/hass/.homeassistant/sensors $ sudo pip install requests==2.10.0
Downloading/unpacking requests==2.10.0
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Installing collected packages: requests
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up…

After further use, the only way I was to get it stable again, especially with a WeMo motion sensor is to downgrade to these versions:

pip install requests==2.10.0
pip install pywemo==0.4.3
pip install homeassistant==0.24.1

__

How can I downgrade it?

pi@raspberrypi:~ $ pip install homeassistant==0.24.1
Traceback (most recent call last):
File “/usr/bin/pip”, line 9, in
load_entry_point(‘pip==1.5.6’, ‘console_scripts’, ‘pip’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2476, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2190, in load
[‘name’])
File “/usr/lib/python2.7/dist-packages/pip/init.py”, line 74, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File “/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py”, line 9, in
from pip.download import path_to_url
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 25, in
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead

Run this:

pip install requests==2.10.0
pip install pywemo==0.4.3
pip install homeassistant==0.24.1

Thanks, figured out i need to change user and to the virtual environment

pi@raspberrypi:/home/hass/.homeassistant $ sudo su -s /bin/bash hass
hass@raspberrypi:~/.homeassistant$ source /srv/hass/hass_venv/bin/activate
(hass_venv) hass@raspberrypi:~/.homeassistant$

I’m having the same issue. Is this in the scope for next release @balloob

When someone submits a fix, yes.

Alrighty, here is the issue:

I’ve updated the requirements HA requires running $ pip3 install --upgrade homeassistant
Note: Not HA itself. I think it was requests-2.11.0.

Now I’m getting:
16-08-14 10:13:32 pywemo.subscribe: Resubscribe error for <WeMo Switch "Light Dining Table">, will retry in 60s 16-08-14 10:13:32 pywemo.subscribe: Resubscribe error for <WeMo Motion "Motion Sensor Washbasin">, will retry in 60s

Result: The WEMO component is broken.

The downgrade mentioned above worked for me.

1 Like

Fixed in 26.2

1 Like

Thank you. Confirmed fixed on 26.2

26.2 briefly fixed it for me. I updated last night and all worked fine. I restarted this morning after updating my config for new units tag. Now none of my WeMo devices are auto discoverable. Not getting any errors related to WeMo. Just the usual suspects. Netgear, netdisco and some expected envisalink errors. I’ve had all of them and WeMo working fine. I can see all devices through WeMo App. Will try static. Any other thoughts?

I can no longer control my wemo led lights since updating. HA finds all my wemo devices through discovery including the lights. I can switch both my wemo switch and wemo light switch on/off just not the light bulbs. Here is what the log is telling me

16-08-16 11:37:23 homeassistant.core: BusHandler:Exception doing job
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 852, in job_handler
    func(*args)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 717, in _execute_service
    service(call)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 572, in __call__
    self.func(call)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/light/__init__.py", line 205, in handle_light_service
    getattr(light, service_fun)(**params)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/light/wemo.py", line 129, in turn_off
    self.device.turn_off(transition=transitiontime)
  File "/home/pi/.homeassistant/deps/pywemo/ouimeaux_device/bridge.py", line 236, in turn_off
    return self._queuedevicestatus(onoff=OFF)
  File "/home/pi/.homeassistant/deps/pywemo/ouimeaux_device/bridge.py", line 179, in _queuedevicestatus
    self._setdevicestatus(**self._pending)
  File "/home/pi/.homeassistant/deps/pywemo/ouimeaux_device/bridge.py", line 148, in _setdevicestatus
    isgroup, self.uniqueID, capids, values)
  File "/home/pi/.homeassistant/deps/pywemo/ouimeaux_device/bridge.py", line 81, in bridge_setdevicestatus
    xml_declaration=True)
  File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 778, in write
    short_empty_elements=short_empty_elements)
  File "/usr/lib/python3.4/contextlib.py", line 66, in __exit__
    next(self.gen)
  File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 837, in _get_writer
    yield file.write
  File "/usr/lib/python3.4/contextlib.py", line 336, in __exit__
    raise exc_details[1]
  File "/usr/lib/python3.4/contextlib.py", line 321, in __exit__
    if cb(*exc_details):
  File "/usr/lib/python3.4/contextlib.py", line 267, in _exit_wrapper
    callback(*args, **kwds)
TypeError: string argument expected, got 'bytes'

I’m still having intermittent issues with WeMo. I restart sometimes they are there and sometimes not. Still no errors. Odd. Anyone else experiencing this?

same here, HA can see my wemo lights but can’t set them or do any automation, have to revert back to using the wemo app on my phone :frowning:

I was able to get my wemo lights working again by downgrading to 0.25.2

pip3 install homeassistant==0.25.2

Not a true fix but I’ll take it for now.

Okay. Working for the last 12 hours. Seems to take a long time to discover WeMo devices. Sometimes up to 10 minutes before they appear in frontend or respond to automations. Haven’t tried the static option but will experiment tonight with it. I am on 26.2 and once things appear in frontend they do work as expected.