-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Belkin Wemo integration errors - AttributeError: 'NoneType' object has no attribute 'service' #62259
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
Comments
Hey there @esev, mind taking a look at this issue as it has been labeled with an integration ( wemo documentation |
Thanks for adding the extra debugging. That's real helpful here! In the |
None of those 'devices' appear to be actual Belkin devices. I only have two Belkin WeMo Insight devices online in my home at the moment. The other "device:**" entries all indicate an IP address of 192.168.1.110, which on my network is a NEEO remote control base station. The first one on the list appears to be associated with my PS3 console, according to the setup.xml file available from the link:
So, the remote control hub appears to be responding to the SSDP scan with entries for the device in my entertainment center. |
I don't recall which version of HA was working last, but definitely sometime earlier this year. I went several months without updating HA, so there were a lot of changes. I haven't had time until now to figure out how to actually access the HA container to run the above commands. FYI, I see the 'service' entries for the actual WeMo Insight devices:
I suspect that the XML returned from these 'Fauxmo' devices are not being parsed as expected by pywemo. I have no idea why they are being reported as Belkin devices. It might have just been an implementation shortcut that the remote control devs took to get some integration working. In any case, I'm guessing that pywemo should probably ignore these devices. |
Ah! Mystery solved. Fauxmo (Faux weMo) is a WeMo emulator. It is commonly used to integrate devices with Amazon Alexa. That explains why pyWeMo is trying to parse it. I'm working on a way to get pyWeMo to ignore these, and any other WeMo emulator that it cannot handle. |
Excellent. Let me know when you've got something. Now that I can ssh directly into my HA instance, I'm happy to hack around and replace files to test things out. |
Will do. I'm running tests on my HA instance now. So far so good, all of my devices are still showing up. I usually give changes a day before merging them, just to see if any of the other pyWeMo maintainers have any feedback. Once merged, I'll make a new pyWeMo release. Then you can use pip to update. The PR is here, if you're curious: pywemo/pywemo#302 |
@LorenKeagle I just made a new release of pyWeMo that includes the fix. To try it out, edit your - "requirements": ["pywemo==0.6.7"],
+ "requirements": ["pywemo==0.7.0-beta.1"], Please let me know how that goes. |
Appears to work for me! I no longer see any errors on the integration page, and I can see energy readings on my dashboards again. I do see your new errors in the system logs, however:
Not sure if we're always going to see those at this point, but I would expect these to only be logged at a debug level. |
Good idea about making those debug logs. They'll keep going every few minutes if I don't. Thanks for the feedback and for testing! |
@LorenKeagle version I'll send a PR to get this updated in Home Assistant shortly. Thanks again for your help on this! |
The problem
My logs are filling up with the following errors from the Belkin Wemo integration:
All of the WeMo devices in my dashboards show as 'Unavailable' due to this issue. It appears that this error was reported before and was flagged as fixed in a previous issue, but I've been updating for months now and the issue remains in my setup.
I've followed the instructions from the previous issue to run the pywemo commands directly from a python interactive shell. Here are the results of those commands:
I see several non-Wemo devices showing up in this list. They appear to represent other devices on my network, such as my game consoles, etc. I'm not sure if this is the cause of the error, so please let me know if there is any more information I can gather.
What version of Home Assistant Core has the issue?
2021.12.3
What was the last working version of Home Assistant Core?
No response
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/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
The integration screen indicates that I have 3 WeMo devices, but I only have entities for two of them. The 3rd device has been unplugged for at least a year. I'm not sure if that has anything to do with this issue, but it's another avenue to explore if needed.
The text was updated successfully, but these errors were encountered: