Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Belkin WeMo Device Unavailable & Then After Uninstalling/Reinstalling Integration, No Entities #75063

Closed
ziptbm opened this issue Jul 12, 2022 · 23 comments

Comments

@ziptbm
Copy link

ziptbm commented Jul 12, 2022

The problem

Belkin WeMo has been configured through the native integration for quite some time. The device became unavailable yesterday in HA and persisted after a reboot and upgrade to 2022.7.3. Removing the integration, rebooting, and the re-adding the integration worked, however there are now no entities. I've also rebooted the device, pulled power and reconneted, and tested it from the WeMo app (that works fine). It's on my network, but HA has not reassigned the entity..

What version of Home Assistant Core has the issue?

2022.7.3

What was the last working version of Home Assistant Core?

2022.7.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Belkin WeMo

Link to integration documentation on our website

https://www.home-assistant.io/integrations/wemo

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: pywemo.subscribe
Source: /usr/local/lib/python3.10/site-packages/pywemo/subscribe.py:369
First occurred: 08:32:03 (10 occurrences)
Last logged: 08:53:06

Received event for unregistered device 10.0.0.111

Additional information

No response

@probot-home-assistant
Copy link

wemo documentation
wemo source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @esev, mind taking a look at this issue as it has been labeled with an integration (wemo) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@agregfontana
Copy link

The exact same issue happened for me as well. For me my Wemo dimmer works but not the Wemo light switch (model WLS040). My switches are showing up as "unavailable."

@jflattery
Copy link

As a workaround, I resolved this by assigning my wemo devices a static IP on my router (DHCP server), I than configured them as static devices in my configuration.yaml. This doesn't solve this issue, but it is at least a workaround to it.

@esev
Copy link
Contributor

esev commented Aug 6, 2022

Does the 2022.8 release resolve this issue?

@EagleDTW
Copy link

EagleDTW commented Nov 3, 2022

This issue still exists into 2022.11.1

@TimeLimitXceeded
Copy link

same exact problem

@TimeLimitXceeded
Copy link

the latest HA update fixed wemo

@TonySherman
Copy link

TonySherman commented Jan 12, 2023

I had this just happen to me. Wemo outlet went offline. I am on HA 2023.1.2

I have wemo configured in configuration.yaml like this:

wemo:
  discovery: false
  static:
    - 192.168.30.13

From my little bit of debugging there seems to be something going on with pywemo.

I can install pywemo locally and set up my wemo device.

>>> import pywemo
>>> url = pywemo.setup_url_for_address("192.168.30.13")
>>> print(url)
http://192.168.30.13:49153/setup.xml
>>> device = pywemo.discovery.device_from_description(url)
>>> device
<WeMo Switch "Patio Lights">

I've tried the same on my instance of HA (as well as the HA dev container) and when I try to print url, it is None

@esev
Copy link
Contributor

esev commented Jan 12, 2023

@TonySherman just a few questions to try to troubleshoot:

  • Which installation method are you using?
  • Is the IP address of Home Assistant on the same network as the WeMo switch (no VLANs or docker bridges)?
  • Are there any messages in the HA logs that contain the IP address of your device (retries/failures/etc)?

@TonySherman
Copy link

@esev I am using the Home Assistant Docker container. I have my network mode set the host. The WeMo switch is actually on a VLAN as well.

Interesting that this just now stopped working. I had success with the static ip method up until now.

I can try opening the port across the VLANs or moving the WeMo to the same network as HA.

@esev
Copy link
Contributor

esev commented Jan 12, 2023

@TonySherman in case it helps, WeMo devices don't always use the same ports. Even the same device may use a different port after a reboot. Here are the ones that PyWemo tries: https://github.com/pywemo/pywemo/blob/c34e74629a67d74b9dbdf2490d70df215989b0bf/pywemo/ouimeaux_device/__init__.py#L38

Just mentioning this in case there are firewall rules that look for only specific ports.

@TonySherman
Copy link

@esev Super helpful. I'll add all of those ports to my firewall rule. If firewall rules don't work, I'll move the WeMo to the same network as my HA instance.

@michaeldn
Copy link

Does anyone have an update? I am on 2022.10.5 Core and recently reinstalled due to some errors I was experiencing after adding HACS. I did make a backup of my old configuration so I may try to restore it. But what is odd is it is discovered, I click Configure and then it errors out.

@tomatac
Copy link

tomatac commented Jun 18, 2023

I have the same issue. All Wemo devices area accessible from the Wemo app.
3 out of 10 Wemo devices are not accessible from Home Assistant.
They all used to work.
They are all set to static IPs and discovery: false.
I tried discovery: true and it did not make a difference.
The error message I am getting is:
Unable to get description url for WeMo at: 10.11.3.52
Unable to get description url for WeMo at: 10.11.3.51
Unable to get description url for WeMo at: 10.11.3.55
Are there any recommendations for troubleshooting?

@esev
Copy link
Contributor

esev commented Jun 18, 2023

Turn off the power to the devices for a few seconds. They usually come back after that. The way the devices communicate with the WeMo app is independent of the way Home Assistant communicates with them. Sometimes they stop responding to Home Assistant but continue communicating with Belkin's cloud. Sometimes it's the opposite.

I'm guessing they're all light switches?

Any chance they're on a different VLAN from Home Assistant?

@tomatac
Copy link

tomatac commented Jun 18, 2023

They are light switches and they are on the same VLAN with Home Assistant.
It worked when I restarted the switches.
Under the switch there is a button and you have to press it for 2 seconds, until the light becomes white (not more than 4 seconds, otherwise you reset the Wifi settings). That effectively powers off/on the device and is more convenient that turning off the power using the house circuit breaker.
The button is narrow, so you have to use your nail or a flat screw driver and press in the middle.
It would be nice if we could reset them thru the Wemo API.

@esev
Copy link
Contributor

esev commented Jul 7, 2023

This issue is a bit difficult to track down. The WeMo devices have different processes for servicing requests from button pushes, from the WeMo app, and from the UPnP local control interface that Home Assistant uses. So it's possible for one of these processes to stop responding without impacting the other two.

I'm not certain if the Dimmer and Wall Switch devices just have a flaw that causes them to be unavailable to the UPnP local control interface, or if the pyWeMo library that Home Assistant uses is somehow causing them to get into a state where they don't respond on the UPnP local control interface (maybe triggering some sort of memory leak bug).

I've been doing a bit of debugging with one of my Dimmers (model F7C059). pyWeMo version 1.1.0 contains some fixes that may help. The logging output from the serial interface on the device, where I've been focused on debugging, is showing that pyWeMo is being recognized properly now as a WeMo device.

I have had a dimmer that gets stuck in the unavailable state about once per week, requiring a press of the reset button. That device's uptime is currently at 3 weeks right now while I've been testing with the pyWeMo 1.1.0 release.
Screenshot 2023-07-06 4 56 04 PM

It would be nice if we could reset them thru the Wemo API.

@tomatac I like this idea. I've been poking around to find a way to reset them through the API, but haven't found one yet. There is a ReSetup action, but it is mainly used for putting the devices back in a mode where the App can reconfigure the WiFi settings. It doesn't reboot the device.

Just in case anyone is interested in poking around more... There is more info on the pyWeMo site on how to show all the API commands (using the explain method). And there is a bit of background on how to unpack the firmware and view it in Ghidra.

@RizzleQ
Copy link

RizzleQ commented Sep 16, 2023

I'll start by kindly asking to point me in the right direction if I'm wrong to post on this old-ish issue.

I'm posting because I'm experiencing the same issue immediately after upgrading to core-2023.9.2 from core-2023.9.1 on 2023-09-12. Naturally, my first move was to restore to the backup of core-2023.9.1 but that didn't fix this issue. I have 14 wemo devices (wall switches mainly, some plug-in outlets) and all but one have completely disappeared as devices from HA. The one that remains is showing as unavailable.

I've rebooted, reset WiFi and factory reset a couple wemo devices to no avail. I have a flat network with no subnets or VLANs to worry about when troubleshooting this. All wemo devices still work perfectly in the Wemo app; it's only local API communication that seems to have stopped.

I'm just wondering where I could start on this. I'm not even sure if the problem lies with HA or Wemo. May I ask for some help to troubleshoot that to at least narrow down if it's a HA issue or something else?

Edit:
After I posted this yesterday, I added one device manually via config file static entry to no avail. Today, in the morning I checked and still only had one Wemo device listed and that one device was still unavailable. Having made zero changes since last night, in the afternoon today I walked by one of my motion sensors that turns on a couple Wemo lights via HA automation (which unsurprisingly failed to work since this issue started) and it worked this time! I checked and now all of my Wemo devices have been re-auto discovered and added back. I have no idea why that is since I still have no idea why they disappeared in the first place.

@cldparisi
Copy link

I have 6/7 Wemo emulated devices, if "Alexa App" searches for devices on the network, it finds them all.
Wemo on HA tries to search for devices but cannot find them. Nobody.
I modified the configuration.yaml file by putting:

wemo:
discovery: false
static:
- 192.168.111.128:11101
- 192.168.111.128:11102
- 192.168.111.128:11103
- 192.168.111.128:11104
- 192.168.111.128:11105
- 192.168.111.128:11106
- 192.168.111.128:11107
- 192.168.111.128:11108

But even in this way I can't see the devices on HA on the Wemo group.

@tippmam
Copy link

tippmam commented Jan 15, 2024

Any News on this Topic regarding the Emulated devices ?

@esev
Copy link
Contributor

esev commented Jan 15, 2024

Any News on this Topic regarding the Emulated devices ?

Best to troubleshoot emulated devices using the instructions from pyWeMo. https://github.com/pywemo/pywemo

@issue-triage-workflows
Copy link

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 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests