iCloud Binding Communication Error

Hi
I have installed org.openhab.binding.icloud-3.4.3-SNAPSHOT.jar and it’s working well for all my devices except for my iPhone 7. I have removed the phone from my iCloud account and added it back in without any change.

Has anyone else had this issue? Appreciate your advice.

My personal guess is, that these changes are happening due to the iOS 16.4 release and the Home platform upgrade Apple has included.
I read that older iOS 15 devices do not support the new Home platform. So maybe that’s why older devices do not show up anymore.

Please see the communication above from a couple of days ago. For me my old iPhone4 and my iPad3 don’t work. For those, Simon implemented the “name” instead of the “deviceDiscoveryId” for identification (old devices have no “deviceDiscoveryId”) but this doesn’t work out for unknown reason using RC2. We have to wait for better ideas regarding “old” Apple devices.

My iPad3 has an UDID instead of an UUID. See the difference explained here:

UUID (Universally Unique Identifier): A sequence of 128 bits that can guarantee uniqueness across space and time, defined by RFC 4122. UDID (Unique Device Identifier): A sequence of 40 hexadecimal characters that uniquely identify an iOS device (the device’s Social Security Number, if you will).

Hey @maihacke

When will you release a binding version for OH 4.0.x?
Your 3.4.x rc2 doesn’t work and binding errors occurs.

Regards
Dave

The binding derives an internal thing uid from an id sent by icloud. iCloud sends data for all devices of an account in one message, so the id is used to identify a device in the icloud data. So this id needs to be constant and unique. As long as the name of an device fulfills these requirements it should work. So if this is not working in RC2. There perhaps is just a bug.

1 Like

@dk8pn It would be help full if you analyze the logs when trying to add/communitcate with the ipad and provide it here. There should be debug statements telling that the device name is used…

1 Like

This is what the log tells in DEBUG mode.

2023-03-29 08:51:40.727 [DEBUG] [internal.handler.ICloudDeviceHandler] - deviceDiscoveryId is empty, using device name for identification.
2023-03-29 08:51:40.727 [DEBUG] [internal.handler.ICloudDeviceHandler] - Current data element: [id = iPad]

I wonder that id = iPad. Shouldn’t it be “kon2bk’s iPad”? Maybe nonsense, but there is only 1 data element visible.

Edit: if i use the release binding, device as well as the 5 data elements contain very long strings.

Device: [xxxxxxxxxxbaD/iADMQHNe4e1RcLbBey95QSBcoyz8s6hBM5s95sUJCilsgzym6JvrJSPvPiCSx5L6yHEw==]
2023-03-29 10:10:39.645 [DEBUG] [internal.handler.ICloudDeviceHandler] - Current data element: [id = xxxxxxxxxx3+g6b/syofIhqR4h6RmVB4Afmj5tIZq9Eap77LHX8q+4foyiHNi72wa4cxsQ==]
2023-03-29 10:10:39.645 [DEBUG] [internal.handler.ICloudDeviceHandler] - Current data element: [id = xxxxxxxxxxajq/tDLcF48gRXeHRdYv6CD7qnBNts6RX5t1HPAU+H+Ovyjd9UQdvmY2vXzQ==]
2023-03-29 10:10:39.646 [DEBUG] [internal.handler.ICloudDeviceHandler] - Current data element: [id = xxxxxxxxxxgzyDxZV4TkAHW9TpQVuSgcVSJZ4v7rrV2KpUBR6R4ZJvoCrAS2bWBe8g==]
2023-03-29 10:10:39.646 [DEBUG] [internal.handler.ICloudDeviceHandler] - Current data element: [id = xxxxxxxxxxURlVIRSRRrAlDAQCnxd4CJEYFS+GcNwg3cCHn1OhBmcgGQXXTBJQN5YWmC62QF6GsenKsfc+HyO9h0nzw==]
2023-03-29 10:10:39.646 [DEBUG] [internal.handler.ICloudDeviceHandler] - Current data element: [id = xxxxxxxxxxv6Nx8+qobaD/iADMQHNe4e1RcLbBey95QSBcoyz8s6hBM5s95sUJCilsgzym6JvrJSPvPiCSx5L6yHEw==]

That is a good hint. ID should be the display name, so “kon2bk’s iPad” not only iPad.
You posted a log entry before showing the empty deviceDiscoveryIds.
Could you please post all attributes from the device here from the log?
For privacy you might remove/anonymize the location elements etc or send the data to me via private message.

The different length of the lists/different ids is ok. The binding iterates thru all devices from the icloud reponse until it finds one with the given id. In the relase this was always device.id, now it matches the deviceDiscoveryId or name, if the deviceDiscoveryId is empty. I asume iPad is the first in the list. But nevertheless it should not only be iPad…

1 Like

I created two new RC

The 4.0.0 is untested, since I have currently no 4.0.0 version running

2 Likes

The 3.4.x RC3 is even working out now for “old” Apple devices like iPhone4 or iPad3. Many thanks for such fast support.

Hello @maihacke

RC3 for OH 4.0.0 works perfectly. Many thanks!!!

Just updated to 3.4.3 and installed the icloud binding from this build. After doing so, my devices keep going offline/comm error. The account is fine. I can bring the devices back online by just disable/enable, but they drop off in short time. If I use the SNAPSHOT binding from March 24 timeframe, I have no issues. Any thoughts on why this may happen. Was there a possible regression in the binding or something with my setup?

The latest fix is not part of the official 3.4.3 release. You have to uninstall the provided binding and manually install the RC version from the thread here.

1 Like

It is also not mentioned in the 3.4.4 release notes …
release notes of openHAB 3.4.4 on GitHub

Sadly not, but it has been merged into 4.0.0.

Dear Colleagues,

my account is gettinf offline time to time asking for the 2FA code. Is it mpossible to extend it somehow
?

Same for me :slightly_frowning_face:

I did not have this problems in the last weeks. If you share your logs, we could try to find out what the reason is.

how do I collect the logs about it?

The logs are normally written to disk depending on your installation, e.g. /var/log/openhab.