iCloud device data integration in openHAB

I was just about to suggest the same thing :slight_smile:
Work fine with “System started” rule, but would be nice not having to do it.

Not related to that:

I’ve had no problems using account name different than “account1”.
However, following instructions from https://github.com/pgfeller/openhab2-addons/tree/master/addons/binding/org.openhab.binding.icloud instructed me to use {channel="icloud:bridge:account1:refresh"} that doesn’t work; had to change it to icloud:account:account1:....

Not sure if related to the binding or OH2 or Habpanel, but it seems battery percentage is not rounded down for my iPhone SE when I display it in Habpanel through a Knob. Works fine for a 5S though. Any reason why it might happen?

This is SE’s configuration.

Number   tgudlek_iPhone_BatteryLevel       "Battery Level [%.0f]"          <batterylevel>  { channel="icloud:device:tgudlek:hjh43b4:batteryLevel" }

Hi Philipp,

I´ll add more logging to the device discovery area to find out why it does not find all devices; can you check that every device reports a unique id (which I assume, but to be sure)?

thanks and kind regards,
Patrik

Hi Philipp,

feedback is much appreciated :slight_smile:. I wonder if I should remove the switch and only depend on the API key; or just set the switch to ON during startup if the API key is present. Do you have a preference here?

with kind regards,
Patrik

I´ve updated the binding (CI build ongoing): Now the address lookup will default to ON if a google API key is defined; otherwise it will default to OFF.

with kind regards,
Patrik

1 Like

Hi Philipp,

the next CI build will have more logging in the device discovery section; can you please collect the log information with the new version - I hope to find some hint why it can not see all your devices.

thanks and kind regards,
Patrik
Note: CI build is at the moment ongoing - but should be ready in a few minutes.

You are right. This switch already caused confusion :smile:. Since an API Key is official required, I would go this way.

I will test your last changes and post my results later on.

Cheers,
Philipp

Ok … the current version still has the switch; but defaults to ON if a key is set.

I´ll remove the switch in the next version of the binding; but will wait for your feedback - as I hope to fix the discovery issue as well in the same one.

with kind regards,
Patrik

I am not sure how to update to CI?

can you throw me some guiding words.

Hey Patrik,
the missing devices are not appearing in logs. It’s a shot in the dark but maybe the elements are hidden because of the request parameter. I calling the refreshClient method like this:

{
	"clientContext": {
		"push": true,
		"deviceListVersion": 1,
		"productType": "iPad7,3",
		"geoCountryCode": "DE",
		"fmly": true,
		"osVersion": "11.1",
		"inactiveTime": 18626,
		"deviceUDID": "SECRET",
		"apsToken": "SECRET",
		"location": {
			"verticalAccuracy": 10,
			"course": -1,
			"longitude": SECRET,
			"horizontalAccuracy": 65,
			"speed": -1,
			"floor": null,
			"latitude": SECRET,
			"timestamp": 532810675680
		},
		"lastSllTimestamp": 1501278164518,
		"osBuild": "15B101",
		"appVersion": "7.0",
		"clientTimestamp": 532810693695,
		"showSllCount": 1,
		"notificationAuthStatus": 2
	},
	"serverContext": {
		"callbackIntervalInMS": 10000,
		"prefsUpdateTime": 1502117299846,
		"isHSA": true,
		"enable2FAFamilyActions": false,
		"minTrackLocThresholdInMts": 100,
		"macCount": 0,
		"enableMapStats": true,
		"authToken": "SECRET~",
		"classicUser": false,
		"imageBaseUrl": "https:\/\/statici.icloud.com",
		"maxDeviceLoadTime": 60000,
		"showSllNow": false,
		"deviceLoadStatus": "200",
		"maxCallbackIntervalInMS": 60000,
		"info": "SECRET\/SECRET",
		"validRegion": true,
		"useAuthWidget": true,
		"enable2FAFamilyRemove": false,
		"serverTimestamp": 1511117886393,
		"preferredLanguage": "de-de",
		"timezone": {
			"previousOffset": -25200000,
			"previousTransition": 1509872399999,
			"tzCurrentName": "-08:00",
			"currentOffset": -28800000,
			"tzName": "America\/Los_Angeles"
		},
		"maxLocatingTime": 90000,
		"prsId": SECRET,
		"lastSessionExtensionTime": null,
		"trackInfoCacheDurationInSecs": 86400,
		"minCallbackIntervalInMS": 5000,
		"sessionLifespan": 900000,
		"clientId": "SECRET",
		"cloudUser": true,
		"enable2FAErase": false
	},
	"tapContext": [{
		"serverContext": {
			"tapSendContext": "fmipAppRefresh",
			"tapSendTS": "2017-11-19T18:58:13.426Z"
		}
	}]
}

I guess the parameter “fmly”: true makes the difference.

Here is the log:
19-Nov-2017 18:42:33.348 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent INSTALLED - org.openhab.binding.icloud
19-Nov-2017 18:42:54.444 [DEBUG] [org.openhab.binding.icloud                        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.icloud.internal.BridgeHandlerFactory, component.id=0, service.id=142, service.bundleid=10, service.scope=bundle} - org.openhab.binding.icloud
19-Nov-2017 18:42:54.464 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent STARTING - org.openhab.binding.icloud
19-Nov-2017 18:42:54.477 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent STARTED - org.openhab.binding.icloud
19-Nov-2017 18:43:06.772 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge handler initializing ...
19-Nov-2017 18:43:06.779 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge starting handler ...
19-Nov-2017 18:43:06.852 [DEBUG] [org.openhab.binding.icloud                        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=283, service.bundleid=10, service.scope=singleton} - org.openhab.binding.icloud
19-Nov-2017 18:43:06.867 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge handler started.
19-Nov-2017 18:43:06.869 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - lCloud bridge initialized.
19-Nov-2017 18:43:06.876 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge refreshing data ...
19-Nov-2017 18:43:09.454 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [0]
19-Nov-2017 18:43:09.456 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPad 2]
19-Nov-2017 18:43:09.475 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.475 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.477 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:aaaaaaaa bridge status ONLINE
19-Nov-2017 18:43:09.479 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:eeeeeeee bridge status ONLINE
19-Nov-2017 18:43:09.480 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [cccccccc] found.
19-Nov-2017 18:43:09.500 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.502 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:gggggggg bridge status ONLINE
19-Nov-2017 18:43:09.513 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.515 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:bbbbbbbb bridge status ONLINE
19-Nov-2017 18:43:09.518 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [1]
19-Nov-2017 18:43:09.520 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPhone 7]
19-Nov-2017 18:43:09.528 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [eeeeeeee] found.
19-Nov-2017 18:43:09.529 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [2]
19-Nov-2017 18:43:09.531 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPhone 6]
19-Nov-2017 18:43:09.535 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.535 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.536 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:cccccccc bridge status ONLINE
19-Nov-2017 18:43:09.536 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:hhhhhhhh bridge status ONLINE
19-Nov-2017 18:43:09.538 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:eeeeeeee]
19-Nov-2017 18:43:09.540 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.542 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.551 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.551 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:gggggggg]
19-Nov-2017 18:43:09.552 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:dddddddd bridge status ONLINE
19-Nov-2017 18:43:09.553 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.554 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.554 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.556 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:ffffffff bridge status ONLINE
19-Nov-2017 18:43:09.556 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:09.557 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
19-Nov-2017 18:43:09.559 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:hhhhhhhh]
19-Nov-2017 18:43:09.559 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:iiiiiiii bridge status ONLINE
19-Nov-2017 18:43:09.561 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:aaaaaaaa]
19-Nov-2017 18:43:09.563 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:bbbbbbbb]
19-Nov-2017 18:43:09.564 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:cccccccc]
19-Nov-2017 18:43:09.571 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:dddddddd]
19-Nov-2017 18:43:09.575 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.576 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.577 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.578 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:ffffffff]
19-Nov-2017 18:43:09.580 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.579 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [gggggggg] found.
19-Nov-2017 18:43:09.584 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.585 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.587 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [3]
19-Nov-2017 18:43:09.587 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.589 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [Apple Watch]
19-Nov-2017 18:43:09.589 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:09.590 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.592 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:09.593 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [aaaaaaaa] found.
19-Nov-2017 18:43:09.594 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:09.594 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [4]
19-Nov-2017 18:43:09.595 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:09.596 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPad Pro]
19-Nov-2017 18:43:09.592 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.597 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:iiiiiiii]
19-Nov-2017 18:43:09.598 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:09.598 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:09.599 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:09.600 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:09.601 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.602 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.603 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:09.603 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:09.604 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:09.605 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:09.607 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:09.607 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [bbbbbbbb] found.
19-Nov-2017 18:43:09.609 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [5]
19-Nov-2017 18:43:09.610 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook]
19-Nov-2017 18:43:09.611 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:09.612 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:09.613 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:09.614 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:09.615 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:09.616 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:09.616 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:09.617 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:09.617 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:43:09.618 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:43:09.618 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [dddddddd]
19-Nov-2017 18:43:09.620 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [iiiiiiii]
19-Nov-2017 18:43:09.606 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:09.622 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:09.623 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:43:09.625 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [ffffffff] found.
19-Nov-2017 18:43:09.627 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [6]
19-Nov-2017 18:43:09.628 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iMac]
19-Nov-2017 18:43:09.630 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [hhhhhhhh] found.
19-Nov-2017 18:43:09.631 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [7]
19-Nov-2017 18:43:09.625 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [dddddddd]
19-Nov-2017 18:43:09.639 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook Pro 15"]
19-Nov-2017 18:43:09.640 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [dddddddd] found.
19-Nov-2017 18:43:09.642 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [8]
19-Nov-2017 18:43:09.653 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook Pro 15"]
19-Nov-2017 18:43:09.674 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [iiiiiiii] found.
19-Nov-2017 18:43:09.675 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge data refresh complete.
19-Nov-2017 18:43:11.613 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge refreshing data ...
19-Nov-2017 18:43:13.369 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:aaaaaaaa]
19-Nov-2017 18:43:13.372 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.373 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.375 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:13.377 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:13.381 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:eeeeeeee]
19-Nov-2017 18:43:13.383 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.384 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.390 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:gggggggg]
19-Nov-2017 18:43:13.392 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.393 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.395 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:13.398 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:bbbbbbbb]
19-Nov-2017 18:43:13.400 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.401 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.403 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:13.405 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:13.406 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:13.416 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:hhhhhhhh]
19-Nov-2017 18:43:13.418 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.419 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.421 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:13.423 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:13.424 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:13.426 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:13.428 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:43:13.431 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:cccccccc]
19-Nov-2017 18:43:13.433 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.436 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:dddddddd]
19-Nov-2017 18:43:13.438 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.440 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.441 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:13.443 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:13.444 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:13.446 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:13.448 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:43:13.450 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [dddddddd]
19-Nov-2017 18:43:13.454 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:ffffffff]
19-Nov-2017 18:43:13.456 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.458 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.460 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:13.461 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:13.463 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:13.465 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:13.467 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:iiiiiiii]
19-Nov-2017 18:43:13.469 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:43:13.471 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:43:13.473 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:43:13.475 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:43:13.477 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:43:13.478 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:43:13.480 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:43:13.482 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [dddddddd]
19-Nov-2017 18:43:13.484 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [iiiiiiii]
19-Nov-2017 18:43:13.486 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [0]
19-Nov-2017 18:43:13.488 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPad 2]
19-Nov-2017 18:43:13.490 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [cccccccc] found.
19-Nov-2017 18:43:13.493 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [1]
19-Nov-2017 18:43:13.494 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPhone 7]
19-Nov-2017 18:43:13.496 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [eeeeeeee] found.
19-Nov-2017 18:43:13.498 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [2]
19-Nov-2017 18:43:13.500 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPhone 6]
19-Nov-2017 18:43:13.502 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [gggggggg] found.
19-Nov-2017 18:43:13.504 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [3]
19-Nov-2017 18:43:13.506 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [Apple Watch]
19-Nov-2017 18:43:13.508 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [aaaaaaaa] found.
19-Nov-2017 18:43:13.509 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [4]
19-Nov-2017 18:43:13.511 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPad Pro]
19-Nov-2017 18:43:13.513 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [bbbbbbbb] found.
19-Nov-2017 18:43:13.515 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [5]
19-Nov-2017 18:43:13.517 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook]
19-Nov-2017 18:43:13.518 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [ffffffff] found.
19-Nov-2017 18:43:13.520 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [6]
19-Nov-2017 18:43:13.522 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iMac]
19-Nov-2017 18:43:13.524 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [hhhhhhhh] found.
19-Nov-2017 18:43:13.527 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [7]
19-Nov-2017 18:43:13.529 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook Pro 15"]
19-Nov-2017 18:43:13.532 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [dddddddd] found.
19-Nov-2017 18:43:13.535 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Discovery for index [8]
19-Nov-2017 18:43:13.537 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook Pro 15"]
19-Nov-2017 18:43:13.540 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - Device id [iiiiiiii] found.
19-Nov-2017 18:43:13.543 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge data refresh complete.
19-Nov-2017 18:53:09.678 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge refreshing data ...
19-Nov-2017 18:53:11.334 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:aaaaaaaa]
19-Nov-2017 18:53:11.335 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:53:11.336 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:53:11.337 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:53:11.338 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:53:11.339 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:eeeeeeee]
19-Nov-2017 18:53:11.341 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:53:11.342 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:53:11.356 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:gggggggg]
19-Nov-2017 18:53:11.358 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:53:11.359 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:53:11.360 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:53:11.363 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:bbbbbbbb]
19-Nov-2017 18:53:11.364 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:53:11.365 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:53:11.366 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:53:11.368 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:53:11.369 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:53:11.397 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:hhhhhhhh]
19-Nov-2017 18:53:11.399 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:53:11.400 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:53:11.401 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:53:11.403 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:53:11.404 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:53:11.417 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:53:11.419 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:53:11.422 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:cccccccc]
19-Nov-2017 18:53:11.424 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:53:11.427 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Device: [icloud:device:account1:dddddddd]
19-Nov-2017 18:53:11.428 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [cccccccc]
19-Nov-2017 18:53:11.430 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [eeeeeeee]
19-Nov-2017 18:53:11.431 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [gggggggg]
19-Nov-2017 18:53:11.433 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [aaaaaaaa]
19-Nov-2017 18:53:11.435 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [bbbbbbbb]
19-Nov-2017 18:53:11.436 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [ffffffff]
19-Nov-2017 18:53:11.437 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [hhhhhhhh]
19-Nov-2017 18:53:11.438 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Current data element: [dddddddd]

Cheers
Philipp

Hi Paul,

if you install the binding via marketplace you should get the latest CI version; if you copy-paste it to the add-on folder you can get the latest one from here:

https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.icloud/2.2.0-SNAPSHOT/

with kind regards,
Patrik

I´ve added this to the binding request as well; CI should be ready in a few minutes.

with kind regards,
Patrik

Ok, I saw you updated the build queue. I will wait for your release :sunglasses:.

Thank you!

Nope, still not working. Can you see any major different between your request body and mine?

Mhh … that is the bindings request:

private final String dataRequest = "{\"clientContext\":{\"appName\":\"iCloud Find (Web)\",\"fmly\": true,\"appVersion\":\"2.0\",\"timezone\":\"US/Eastern\",\"inactiveTime\":2255,\"apiVersion\":\"3.0\",\"webStats\":\"0:15\"}}\n";

Maybe you can experiment with it to find what is missing to get all devices (as I can not reproduce the issue here)?

I tried your request body and received all devices. The problem is hidden somewhere else. To be honest I am not a great java developer but I will give a shot this week and try to find the problem locally. Where I can find your development repository? I guess I need an JDK & Maven. Something else? Can you quick tell me the maven build command? :slight_smile:

I did some web search on this - maybe the last comment on this site sheds some light:
http://jdemarks.azurewebsites.net/2013/02/find-an-iphone-with-c-sharp/

@Philipp: which URL/server did you use for your test ?

@StephanKratzer: I am using this endpoints:
https://fmipmobile.icloud.com/fmipservice/device/123451231/initClient
https://fmipmobile.icloud.com/fmipservice/device/123451231/refreshClient

You can find the repository here:

Unfortunately I´m not a java developer either and have only followed the IDE setup and tutorials to create a binding. I do not use maven from the command line; only the IDE. So can´t help you there - sorry :frowning:.

I´ll add some trace log to dump the received json into the logfile to check if we receive the data or not … if we receive it, then probably something with the parsing is not right.

CI should be ready in a few minutes.
You´ll need to change loglevel to TRACE …

@Philipp: are the results identical for both endpoints ? binding is using only “initclient”