-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[wemo] Optimize port detection #12651
Conversation
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the optimization!
thanks @jlaur! I'm glad to see that after 2 years the change I wanted to achieve finally made into OpenHab :) Hope that will help to other smart home enthusiasts. I was using my private build to overcome the issue. As of today, I've moved off OpenHab to Home Assistant so I do not have a platform anymore to give it a try. |
I have 32 wemos. I'd be glad to try it once it gets finalized. |
@jaywiseman1971 - it's merged, so it will be included in next snapshot as well as next milestone release. Or you can get the JAR right here: https://drive.google.com/file/d/1BCu--JkVFNh_qfSKzL1NReqd82eMfbWj/view?usp=sharing |
I'm sad to hear that this change was too late, I hope this issue didn't push you in that direction. |
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
I finally tried this WeMo binding after deleting 38 Wemo Devices and uninstalling the original Wemo binding given to me from @hmerk hmerk back in January 2022. After installing the new binding, it discovered all of them quickly BUT Wemo devices are going into communication errors off/on. This was the trait when the many rewrite's of it started earlier this year. 2022-05-08 17:07:23.885 [INFO ] [openhab.event.ThingStatusInfoChangedEvent ] - Thing 'wemo:lightswitch:Lightswitch-1_0-221602K1301B70' changed from OFFLINE (COMMUNICATION_ERROR): URL for the WeMo device cannot be created. to ONLINE My Insight for the washer completely goes OFFLINE and stays that way for a long time with this version. I'm going to roll this binding back to @hmerk version. Best, Jay |
Hi @jaywiseman1971, thanks for reporting this. If you create a new issue with detailed logs (DEBUG should be sufficient), I'll have a look at it. |
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Additional optimization after #12648.
For each request to be made to a WeMo device, up to seven requests are made prior to the actual request in order to determine the correct port. In most cases the port from the descriptor is the right one, so by verifying this one first, we can avoid some unneeded traffic and perform the real call faster.
The port scanning approach origins from #6253 (later revised in #7874) and is left intact as only the port order is changed.