iCloud binding refresh device data failed (again)

Did you already enable debug logging for the binding? They most likely changed something in their api but I don’t know what?

Yes my original Post includes the TRACE log (not much though). Looking into the source, it stops where it should start fetching device data (I think…)

Okay, so nothing is returned at all.

Maybe @patrik_gfeller can find some information from the sources which he used for the original implementation? Just a guess, It seems they might have shutdown this api?

Yes, it really seems like that the only problem is that there is no response from the server.
I’m afraid that they did it (shutdown). I’m fairly a new user (using OH a year ago), does this happened before? (Shutting down a service and need to reverse-engineer/use a new one)

Hello Martin et all,

unfortunately I can confirm that the iCloud binding does not work anymore. It looks like the API is still available, but that the authentication somehow changed. Got this from the logs:

HTTP protocol violation: Authentication challenge without WWW-Authenticate header

I am not familiar with the HTTP authentication schemes; maybe someone else can give some hints how communication needs to be changed to make this work again. I do not have a openHAB dev environment set up atm (new laptop); but once we’ve an idea what needs to be changed I’ll setup an environment and do the required adjustments.

with kind regards,
Patrik

Thanks for your help!
I’m also not familiar in deeps with HTTP auth methods, but it is a good sign that they didn’t changed the whole API (I think…). I will try to give some help as I can, because I heavily rely on this binding…

1 Like

hi,
I have the same issue.
Also had the fault http protocol… on my account but not on my wife’s so i created an new bridge for my account and now it is INITIALIZING. The problem started with the following faults:
2019-03-04 01:39:47.980 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data
java.io.IOException: java.util.concurrent.TimeoutException: Total timeout 10000 ms elapsed
at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:259) ~[?:?]
at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:156) ~[?:?]
at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:131) ~[?:?]
at org.eclipse.smarthome.io.net.http.HttpRequestBuilder.getContentAsString(HttpRequestBuilder.java:135) ~[?:?]
at org.openhab.binding.icloud.internal.ICloudConnection.callApi(ICloudConnection.java:84) ~[?:?]
at org.openhab.binding.icloud.internal.ICloudConnection.requestDeviceStatusJSON(ICloudConnection.java:65) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:84) ~[?:?]
at org.eclipse.smarthome.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:97) ~[?:?]
at org.eclipse.smarthome.core.cache.ExpiringCache.getValue(ExpiringCache.java:68) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:141) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.util.concurrent.TimeoutException: Total timeout 10000 ms elapsed
at org.eclipse.jetty.client.TimeoutCompleteListener.onTimeoutExpired(TimeoutCompleteListener.java:52) ~[?:?]
at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:271) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
… 3 more
and then ;
2019-03-05 02:41:10.936 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:150) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

hope this will help

kind regards

So your wife’s account is still working? Or it just doesn’t produce error, but doesn’t work?

… update; somehow my account was locked - after resetting the password I do now get an empty json response - I’ll try to have a look into this …

with kind regards,
Patrik

Yes, this is what I also get…

Chrome gives a “NET::ERR_CERT_AUTHORITY_INVALID” on https://fmip.icloud.com, maybe that has something to do with it?

And does everyone here have 2FA enabled?

Yes, i do

This will be why I was unable to get the binding working today. I have 2FA enabled and there were no messages to my iphone when I setup the account on the binding.

I am not using 2FA.
Same problem still present.

1 Like

No it doesn’t work and have no error. Only the notification initialising.

Grtz

Maybe it has something to do with Apple is making two factor authentication MANDATORY for Developers. Maybe the “not working” accounts are registered as developers (f.e. to receive beta releases).

Good to know so it does not seem to be limited to people with 2FA enabled… :frowning_face:

I also have it enabled and I can’t disable it. But as we can see that doesnt change anything.

This site is missing a valid, trusted certificate (net::ERR_CERT_AUTHORITY_INVALID).

Did someone do a an update for openhabian? Because I did 8apt updates and maybe that has something to do with it?