-
-
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
[iCloud] Fix existing things stopped working and re-appeared as new in the inbox #14661
Conversation
690f6a7
to
4672bb0
Compare
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
addf956
to
fbf7172
Compare
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
@jlaur Without this change the icloud binding stops working after a few days. Maybe we could consider it for 4.0.0. |
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, only two minor suggestions added.
Do you think "Fix things reappearing in inbox" would be an accurate title for the PR (to go into the release notes)?
...cloud/src/main/java/org/openhab/binding/icloud/internal/discovery/ICloudDeviceDiscovery.java
Outdated
Show resolved
Hide resolved
...ng.icloud/src/main/java/org/openhab/binding/icloud/internal/handler/ICloudDeviceHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
Thanks for the review. |
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
@maihacke - for my understanding, why did the binding stop working after a few days? It seems that the "Fix things reappearing in inbox" does not fully cover the actual fix. |
The reason is that the IDs which where used in the binding before that fix where no longer constant. So they changed from time to time in the API results. This lead to Maybe we could use "Existing things stopped working and re-appeared as new in the inbox". |
@maihacke - thanks. |
* Use deviceDiscoveryId instead of id * Use device display name if discovery id is empty Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de> Signed-off-by: Thomas Burri <thomas.burri@alstomgroup.com>
* Use deviceDiscoveryId instead of id * Use device display name if discovery id is empty Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de> Signed-off-by: Matt Myers <mmyers75@icloud.com>
* Use deviceDiscoveryId instead of id * Use device display name if discovery id is empty Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Change handling for device IDs in icloud binding
Lately users discover problems with changes in the device ID in the iCloud API.
See discussion here https://community.openhab.org/t/icloud-binding-communication-error/122131/597
I saved the device data json before and after this change happened.
Each device has three IDs in the json:
id, baUUID, deviceDiscoveryId
Currently we use id to identify devices. This id has changed lately (back and forth and now again, see discussion). That's why openhab identfies these devices as new and put them into the inbox. The other IDs did not change - at least between my two files. So we have some chances that changing the binding to use one of the other IDs this problem could be solved.
This PR changes the binding to use deviceDiscoveryId instead of id. As fallback it uses the device name, since old devices do not have a deviceDiscoveryId.
Should fix #14660