Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve Wemo setup speed #19563
Example entry for
@MartinHjelmare I think I misunderstood some things here. I'm still getting used to how asyncio works. My hope was to allow the WeMo component to load quickly at startup by not having to wait for it to do its device discovery. That's why I moved the discovery process to a subroutine that I then called through hass.add_job(). If there's no good way to defer the discovery process until after setup of the component is complete, then we can close this PR. I was trying to eliminate the "taking a long time to load" messages at startup and make HA load faster on initial startup.
I've changed the way this works, per our conversation. This no longer adds an async task to run in the event loop, but rather listens for the start event and then schedules a wemo discovery scan immediately. This is copied from how the discovery component works.
Dec 30, 2018
added a commit
this pull request
Dec 30, 2018
Will this speed up static discovery as well?
My Wemo devices are on another subnet and even though I have mDNS enabled, they're not discovered by HomeAssistant (Google Cast devices are discovered just fine though).
Doing static discovery with the Wemo devices causes home assistant to hang or about 20 seconds before allowing me to log back in.
I think that this change means I now need to change my homekit component to not auto_start.
My wemo lights disappeared and I think it is because the wemo devices are discovered after, even though I have discovery disabled and my wemo devices statically defined.
Is there an event I could setup an automation on to turn on homekit once wemo devices are loaded? This would be helpful.
Please open an issue if you suspect a bug. If you need help please use our help channels:
Merged PRs should not be used for support or bug reports. Thanks!