iCloud Binding Communication Error

Seems to be working on OH 3.3.0 on rpi4/bullseye openhabian. Thx much!

3.4 snapshot working fine here for me too on OH3.3

Just a thought, but is is possible to dynamically code those two inputs into variables that are scraped from wherever you look for the latest versions?

For me, I’ve switched to @Erik_Froijen 's suggestion of pyicloud both because the OH binding seems to go down about every six months and because it allows me to do slightly more complex calculations of where the fam is in python. We’ll see how reliable pyicloud is, but so far it seems to be working nicely.

1 Like

I think the smarter solution would be to change the binding from using the mobile device “FindMyiPhone” API to using the browser-based “iCloud Find (Web)” API. I was looking around at other platform’s iCloud integrations and most use this slightly different approach and they appear to go down with less frequency. Unfortunately, I feel this sort of update is beyond my capability.

I’ve also used pyicloud in the past and it does work well, but still has some occasional disconnect issues. Nothing beats the binding’s ease-of-use though.

2 Likes

I believe, the binding works very great and unless iOS 14 is not supported (in long future I hope), the change will work for a long time :wink:

Thanks to everyone for their work to solve this problem. The snapshot jar file worked for me in 3.3M5.

The fix was merged today, so will be available with the next SNAPSHOT version.

will this fix be available for the stable version soon, too?

Yes with the next Release → 3.4.0

Is the problem back?

I am using the fixed jar:

openhab> bundle:list -s | grep -i "icloud"
333 | Active |  80 | 3.4.0.202207121439     | org.openhab.binding.icloud

2022-07-15 13:45:00.878 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icloud:account:xxx' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): iCloud response invalid: null

Can anyone else check/confirm please?

Here the fix is still running.

Also still running, yesterday the bridge went offline, but disabling and enabling the bridge thing brought it back working.
3.3.0 stable version

1 Like

But it should already be available in the builds?

https://openhab.jfrog.io/ui/native/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.icloud/3.4.0-SNAPSHOT/

I am still on 3.3.0 stable

I just installed the binding from the 3.4.0 builds in my 3.3.0 environment and it´s working:

286 │ Active   │  80 │ 3.4.0.202207141946     │ org.openhab.binding.icloud

I had to disable and enable the bridge in order to get all things online.

3 Likes

Actual Version Debian with openhab 3.3.0

(1) copied org.openhab.binding.icloud-3.4.0-SNAPSHOT.jar to /usr/share/openhab/addons
(2) uninstall the default iCloud-Addon (in Bindings)
(3) restarted openhab server

see, it is working - thanks

1 Like

You need to deinstall iCloud binding before putting jar in addons folder. Otherwise it doesn’t get installed

Just an update. I’ve been using the modified icloud binding jar above with no issues at all. Except that I still see intermittent icloud disconnects in the log. When I say intermittent I’m seeing about once or twice a day disconnects. If I happen to catch it in a down status then toggling the icloud account thing disabled/enabled re-establishes the connection.

In others’ experience with the new binding is this behavior normal?
Cheers

I’ve seen it occasionally. For me, the error reads something like:

org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

When the error occurs and the bridge goes offline, I can often bring it back online by simply issuing a manual location refresh, using the binding. 9 times out of 10, the device will come back online with that. The other ~10% of the time I have to suspend the bridge for 10-15 seconds, then resume it and the account and device will then come back online.

I don’t remember ever seeing this particular error prior to the last change by Apple (and subsequently the most recent version of the binding). I’m not sure what causes it but I notice that it happens on the iCloud bridge associated with my wife’s account much more frequently than on the iCloud bridge for my account. My wife has a different (older) phone than I do but I can’t imagine the phone plays a role in this since I believe the FindMy location request only hits iCloud and not the device directly.

At any rate, I’m testing rolling the device type back a few iterations (to an iPhone 8) to see if that makes any difference. I’ll report back.

I have the same, but I don’t have to investigate manually, 5 minutes later all things come online again.