I have seen this within your description. But my json file format looks like this and is created by MainUI. Can i modify the json in order to do the job?
Where needs an icloud.things (not a .config) file to be stored and how does it come together with my json file? Sorry for this kind of questions but i am a MainUI user type.
Stored the icloud.things file using the same account ID “62ba8ace” as in my old json database file and it does the job using the existing account thing .
Thanks for your work on this and for sharing your progess.
I tried it today (deleted iCloud binding in the UI, downloaded the .jar file to addons folder). It works as expected. I immediately receive a 2FA prompt on my iPhone. I entered the code in the Code field under the iCloud Account Thing in the UI. I’m running openHAB 3.4.0M1 on a Pi4 using openhabian.
I have the same error if I setup another account in openhab, but the first account is fine.
Patrick
2022-11-09 12:29:20.382 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data
java.io.IOException: Cannot authenticate token
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:110) ~[?:?]
at org.openhab.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:101) [bundleFile:?]
at org.openhab.core.cache.ExpiringCache.getValue(ExpiringCache.java:72) [bundleFile:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:188) [bundleFile:?]
at org.openhab.binding.icloud.internal.handler.ICloudDeviceHandler.refreshData(ICloudDeviceHandler.java:126) [bundleFile:?]
at org.openhab.binding.icloud.internal.handler.ICloudDeviceHandler.initialize(ICloudDeviceHandler.java:116) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
2022-11-09 22:37:57.598 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data
java.io.IOException: Cannot authenticate token
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:110) ~[?:?]
at org.openhab.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:101) ~[?:?]
at org.openhab.core.cache.ExpiringCache.getValue(ExpiringCache.java:72) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:188) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
2022-11-09 22:37:57.617 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'icloud:account:6d9c5a675b' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Cannot authenticate token
I created a new release here, which improves many things (mainly code quality and hopefully avoidance of multiple code requests). Release RC-1 · maihacke/openhab-addons · GitHub
I’m not sure if it yet supports multiple iCloud accounts. If you have issues please post debug log.
Was able to try earlier.
Updated to latest version and second account was online straight away. Great work
Only issue I see so far is some localisation strings are incorrect. But thats another story…
Thanks for your work! Do i need a thing config textfile? At the UI i dont see a code field and adding it at the “code tab” at MainUI doesnt let me save it