Home Assistant release with the issue:
0.75.3
Last working Home Assistant release (if known):
N/A
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io via script install on Debian (Raspberry Pi 3)
Component/platform:
https://www.home-assistant.io/components/switch.wemo/
Description of problem:
I believe there may be a problem with the Wemo component when a Wemo device receives a new IP address via DHCP. I have two Wemo devices that appear as "Unavailable" in Home Assistant, but they work in the Wemo iOS app. Also, the log entries below reflect a different IP than I see in the Wemo iOS app. Current IP for Dawns Lamp is 192.168.0.65. Current IP for Southwest Floodlights is 192.168.0.49. I can setup static DHCP if necessary, but was hoping to avoid doing so.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
wemo:
Traceback (if applicable):
Error communicating with Dawns Lamp, retry 0
7:54 PM components/switch/wemo.py (WARNING)
Error communicating with Southwest Floodlights, retry 2
7:54 PM components/switch/wemo.py (WARNING)
Unable to re-probe wemo at 192.168.0.53
7:54 PM components/switch/wemo.py (ERROR)
Error communicating with Dawns Lamp. Giving up
7:54 PM components/switch/wemo.py (ERROR)
Unable to re-probe wemo at 192.168.0.44
7:54 PM components/switch/wemo.py (ERROR)
Error communicating with Southwest Floodlights, retry 1
7:54 PM components/switch/wemo.py (WARNING)
Unable to re-probe wemo at 192.168.0.44
7:54 PM /usr/local/lib/python3.6/site-packages/pywemo/ouimeaux_device/__init__.py (ERROR)
Unable to re-probe wemo at 192.168.0.53
7:53 PM components/switch/wemo.py (ERROR)
Error communicating with Dawns Lamp, retry 2
7:53 PM components/switch/wemo.py (WARNING)
Unable to re-probe wemo at 192.168.0.44
7:53 PM components/switch/wemo.py (ERROR)
Additional information:
Please let me know if you need any additional information. I greatly appreciate the help!
I thought perhaps the Discovery rescan every 5 mins would fix this, but it never did. A restart of HASS did indeed fix the issue. I'll likely assign static DHCP for now unless there happens to be an easy fix for this.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
Hello. I just upgraded to 0.80.3 today, but this was still an issue up until 0.79.3. For now, I've assigned static IP addresses which works around the issue, but I still believe that it would be ideal/correct to have HA handle this more elegantly.
Hi, @dereitz. It's definitely recommended to use static IP addresses with your wemo devices, and that would certainly solve this issue for you. With that said, I'll take a look at the discovery logic and see if I can make it update the existing device's IP address when it detects it being changed. Right now, discovery should find the device following an IP change, but will discard it as an existing known device when it matches the serial number to a device it already discovered.
It looks like this is an issue with how Home Assistant is using pywemo to discover wemo devices. If Home Assistant doesn't tell pywemo the device mac address during discovery, then pywemo never attempts to discover it on its own. If it doesn't know the device mac, then it can't find that same device (mac is how it knows it found the same device all over again) during a full rediscovery cycle (scans the network to find devices all over again), and therefore just tries to probe the wemo at the old location/IP, which will always fail in the event of an IP address change.
@dereitz, I'm doing some testing to confirm that the updated version of pywemo resolves this issue, but I need to know what kind of WeMo devices you're using so I can test them out. Are these the WeMo switch (the older style controllable plug), the WeMo Insight Switch (the controllable plug with power usage information), the WeMo Mini (the newer/rectangular controllable plug), the WeMo Link/LED lights, the WeMo smart dimmer (wall-mounted dimable switch), or the WeMo light switch (wall mounted toggle switch)?
Hello Adam,
That’s great news!! Thank you for taking the time to research this and get back to me!
I have the several original wemo switches, several wemo minis, and several wemo light switches. Sorry I haven’t been responsive as I just returned from a trip.
Thanks again!
-David
Get Outlook for iOShttps://aka.ms/o0ukef
From: Adam Belebczuk notifications@github.com
Sent: Monday, November 5, 2018 7:30 PM
To: home-assistant/home-assistant
Cc: dereitz; Mention
Subject: Re: [home-assistant/home-assistant] Wemo - DHCP IP address change results in "Unavailable" Wemo devices (#16010)
@dereitzhttps://github.com/dereitz, I'm doing some testing to confirm that the updated version of pywemo resolves this issue, but I need to know what kind of WeMo devices you're using so I can test them out. Are these the WeMo switch (the older style controllable plug), the WeMo Insight Switch (the controllable plug with power usage information), the WeMo Mini (the newer/rectangular controllable plug), the WeMo Link/LED lights, the WeMo smart dimmer (wall-mounted dimable switch), or the WeMo light switch (wall mounted toggle switch)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/home-assistant/issues/16010#issuecomment-436087213, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABABjaIUZhlCA513-T0f2YzwN_pmB756ks5usNgVgaJpZM4WAxCA.
Thanks, David. I have each of those devices to test with. So far, I'm having some mixed results with devices being automatically rediscovered following an IP address change. I'm not sure whether it's due to my network setup, something in the code, or a bit of each, so I'll continue testing this week and weekend and let you know what I find out.
Hi David, I've been doing some more testing, and I'm still having some mixed results. However, I can usually get the device to be rediscovered the first time it changes IP. After that, I usually have issues rediscovering the device on a second IP change. I'd still very much recommend using DHCP reservations so your devices don't change their IP addresses. I've made a few more changes to the pywemo library, which will get added to Home Assistant in https://github.com/home-assistant/home-assistant/pull/18388, so discovery should hopefully work a bit better after that (probably in version 0.83 of Home Assistant).
Awesome! Thank you so much for taking the time to look into this! Agreed,
I've found that most things in HA seem to expect that you're using DHCP
reservations for your devices, so that does seem like a best practice.
Unfortunately, it seems that DHCP reservations (something that seems very
simple at face value) causes my router (Netgear R7000) to go wonky anytime
I change the DHCP configuration and basically requires a reboot, so I had
been avoiding it historically. When I logged this issue, I was relatively
new to HA and thought it might be something others would run into in the
future, so wanted to at least bring attention to it. Anyway, thanks again
and cheers!
On Sun, Nov 11, 2018 at 7:14 PM Adam Belebczuk notifications@github.com
wrote:
Hi David, I've been doing some more testing, and I'm still having some
mixed results. However, I can usually get the device to be rediscovered the
first time it changes IP. After that, I usually have issues rediscovering
the device on a second IP change. I'd still very much recommend using DHCP
reservations so your devices don't change their IP addresses. I've made a
few more changes to the pywemo library, which will get added to Home
Assistant in #18388
https://github.com/home-assistant/home-assistant/pull/18388, so
discovery should hopefully work a bit better after that (probably in
version 0.83 of Home Assistant).—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/16010#issuecomment-437719028,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABABjWyOJBvt4HBylWrM8aURlhmKUq5dks5uuL1JgaJpZM4WAxCA
.
Hi Adam @sqldiablo I can confirm I have the same warnings showing up in the log in HASSIO.
I use WeMo Switches, Sensors and one Insight.
I have a MAC reservation for each device on my router.
I have manually added each IP address on HASSIO.
Hassio V: 0.84.3
These are the warnings showing up:
Lost connection to Veggie Sprinklers
5:34 PM components/switch/wemo.py (WARNING)
Updating wemo switch took longer than the scheduled update interval 0:00:10
5:07 PM helpers/entity_platform.py (WARNING)
Error communicating with Back House Sprinklers, retry 0
5:04 PM components/switch/wemo.py (WARNING)
Setup of wemo is taking over 10 seconds.
4:57 PM util/async_.py (WARNING)
It seems as the ones in the log are all WeMo Switches. The Insight or the sensors don't seem to have an issue.
Thanks for the info, @dashony. I'm still working on this and a larger change to how rediscovery of WeMo devices works. I'm hoping I can finish it up next week after I get back home from the holiday.
No rush there Adam, enjoy your holidays, we all have thing to do and prioritize, just thought I'd add my feedback here. I appreciate for even considering helping out at some point. Enjoy the holidays!
Most helpful comment
No rush there Adam, enjoy your holidays, we all have thing to do and prioritize, just thought I'd add my feedback here. I appreciate for even considering helping out at some point. Enjoy the holidays!