iCloud device data integration in openHAB

rules
location
iphone
Tags: #<Tag:0x00007f6ce8f15750> #<Tag:0x00007f6ce8f152f0> #<Tag:0x00007f6ce8f14788>

(Tomislav Gudlek) #245

Hey Patrik,

It works just fine!


(Philipp) #246

I can confirm that the textual configuration is working with the last build. But all my devices stays offline regardless of whether I use the textual configuration or the PaperUI. Unfortunately, the log is not very meaningful:

18-Nov-2017 15:53:50.151 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent INSTALLED - org.openhab.binding.icloud
18-Nov-2017 15:54:11.210 [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=150, service.bundleid=10, service.scope=bundle} - org.openhab.binding.icloud
18-Nov-2017 15:54:11.246 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent STARTING - org.openhab.binding.icloud
18-Nov-2017 15:54:11.249 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent STARTED - org.openhab.binding.icloud
18-Nov-2017 15:54:23.149 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge handler initializing ...
18-Nov-2017 15:54:23.153 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge starting handler ...
18-Nov-2017 15:54:23.187 [DEBUG] [org.openhab.binding.icloud                        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=281, service.bundleid=10, service.scope=singleton} - org.openhab.binding.icloud
18-Nov-2017 15:54:23.197 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge handler started.
18-Nov-2017 15:54:23.199 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - lCloud bridge initialized.
18-Nov-2017 15:54:23.202 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge refreshing data ...
18-Nov-2017 15:54:25.208 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - Initializing iCloud device handler.
18-Nov-2017 15:54:25.209 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPad 2]
18-Nov-2017 15:54:25.210 [DEBUG] [org.openhab.binding.icloud.handler.DeviceHandler  ] - initializeThing thing icloud:device:account1:abcd1234 bridge status ONLINE
18-Nov-2017 15:54:25.263 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPhone 7]
18-Nov-2017 15:54:25.266 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPhone 6]
18-Nov-2017 15:54:25.293 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [Apple Watch]
18-Nov-2017 15:54:25.305 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iPad Pro]
18-Nov-2017 15:54:25.334 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook]
18-Nov-2017 15:54:25.340 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [iMac]
18-Nov-2017 15:54:25.346 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook Pro 15"]
18-Nov-2017 15:54:25.352 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud device discovery for [MacBook Pro 15"]
18-Nov-2017 15:54:25.385 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge data refresh complete.
18-Nov-2017 15:54:26.676 [DEBUG] [org.openhab.binding.icloud.handler.BridgeHandler  ] - iCloud bridge refreshing data ...

In addition, I get the following warnings during the bundle installation:

Installation Warnings
18-Nov-2017 15:53:50.151 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent INSTALLED - org.openhab.binding.icloud
18-Nov-2017 15:53:51.247 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: com.google.common.collect

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
18-Nov-2017 15:53:51.589 [WARN ] [org.jline                                         ] - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
18-Nov-2017 15:53:52.590 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: com.google.common.collect

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
18-Nov-2017 15:53:55.939 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: com.google.common.collect

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
18-Nov-2017 15:53:57.192 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
  Unresolved requirement: Import-Package: com.google.gson
    -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
       com.google.gson [23]
  Unresolved requirement: Import-Package: com.google.common.collect
    -> Export-Package: com.google.common.collect; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="com.google.common.base,javax.annotation,com.google.common.primitives,com.google.common.math"
       com.google.guava [24]
         Unresolved requirement: Import-Package: javax.annotation; resolution:="optional"
           -> Export-Package: javax.annotation; bundle-symbolic-name="javax.annotation-api"; bundle-version="1.2.0"; version="1.2.0"
              javax.annotation-api [28]

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
18-Nov-2017 15:53:58.471 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
  Unresolved requirement: Import-Package: com.google.gson
    -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
       com.google.gson [23]
  Unresolved requirement: Import-Package: com.google.common.collect
    -> Export-Package: com.google.common.collect; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="com.google.common.base,javax.annotation,com.google.common.primitives,com.google.common.math"
       com.google.guava [24]
         Unresolved requirement: Import-Package: javax.annotation; resolution:="optional"
           -> Export-Package: javax.annotation; bundle-symbolic-name="javax.annotation-api"; bundle-version="1.2.0"; version="1.2.0"
              javax.annotation-api [28]

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
18-Nov-2017 15:53:59.712 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
  Unresolved requirement: Import-Package: com.google.gson
    -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
       com.google.gson [23]
  Unresolved requirement: Import-Package: com.google.common.collect
    -> Export-Package: com.google.common.collect; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="com.google.common.base,javax.annotation,com.google.common.primitives,com.google.common.math"
       com.google.guava [24]
         Unresolved requirement: Import-Package: javax.annotation; resolution:="optional"
           -> Export-Package: javax.annotation; bundle-symbolic-name="javax.annotation-api"; bundle-version="1.2.0"; version="1.2.0"
              javax.annotation-api [28]

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]

(Patrik Gfeller) #247

Thank you for the report; I´ll refactor the binding that it does not use that anymore. I´ll let you know once a new CI build is available.

with kind regards,
Patrik


(Philipp) #248

Do you think the issue is because of the missing lib? I already recievied this warning with the previous release and I never had issues (excepted the textual config problem). I added the lib manually but with no success. All my devices are staying offline.


(Stephan Kratzer) #249

I sadly got the same issue, but my log looks different (or just maybe i just did the config wrong :frowning: )

2017-11-19 00:04:59.045 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 00:05:00.575 [DEBUG] [binding.icloud.handler.DeviceHandler] - Device: [icloud:device:accountSK:5ef36e42]
2017-11-19 00:05:00.577 [DEBUG] [binding.icloud.handler.DeviceHandler] - Current data element: [icloud:device:deviceSK:36d5a863]
2017-11-19 00:05:00.578 [DEBUG] [binding.icloud.handler.DeviceHandler] - Current data element: [icloud:device:deviceSK:54e989da]
2017-11-19 00:05:00.580 [DEBUG] [binding.icloud.handler.DeviceHandler] - Current data element: [icloud:device:deviceSK:b2ae73da]
2017-11-19 00:05:00.581 [DEBUG] [binding.icloud.handler.DeviceHandler] - Current data element: [icloud:device:deviceSK:5ef36e42]
2017-11-19 00:05:00.582 [DEBUG] [binding.icloud.handler.DeviceHandler] - Unable to find device data.
2017-11-19 00:05:00.584 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 5s]
2017-11-19 00:05:00.590 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad]
2017-11-19 00:05:00.599 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 5s]
2017-11-19 00:05:00.609 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 6]
2017-11-19 00:05:00.611 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.

I notice the matching of the device is not working, as the device has “account” in its name, while the data elements seem to look for “device” …

Related things file:

Bridge icloud:account:accountSK [appleId="abc@xyz.de", password="xxx", refreshTimeInMinutes=5, googleAPIKey="xxx"]
{
    Thing device 5ef36e42 "My iPhone 6 (iPhone 6)" @ "World"
}

I think the issue for me is that i named the bridge with “accountSK”, the following code line also replaces this to “deviceSK” in the function DeviceHandler.java -> getDeviceData

                currentId = currentId.replace(BRIDGE_ID, DEVICE_ID);

Not sure about best resolution, maybe add the colons before and after to both constants to be safe here ?

Thanks for the great work
Stephan


(Philipp) #250

I also noticed issues if you deviate from the default name “account1”. But I was not looking into this issue.


(Paul Miller) #251

I have rebooted (was at 15:30) my openhabian (OH 2.1) raspberry pi install and then grabbed the logs using the filter ‘iCloud’

I do not seem to get all the items refreshed in my sitemap (they were mostly working when I used the scripts).
I cannot see from the logs which values have been returned on the refreshing.
I was also expecting the refresh data to occur every 5 minutes as per the configured value but that is not the case.

Anyhow here is the logs I collected in case it points in a particular direction.

2017-11-19 15:42:17.783 [DEBUG] [org.openhab.binding.icloud          ] - BundleEvent STARTING - org.openhab.binding.icloud
2017-11-19 15:42:17.783 [DEBUG] [org.openhab.binding.icloud          ] - BundleEvent STARTING - org.openhab.binding.icloud
2017-11-19 15:42:17.834 [DEBUG] [org.openhab.binding.icloud          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.icloud.internal.BridgeHandlerFactory, component.id=261, service.id=397, service.bundleid=253, service.scope=bundle} - org.openhab.binding.icloud
2017-11-19 15:42:17.834 [DEBUG] [org.openhab.binding.icloud          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.icloud.internal.BridgeHandlerFactory, component.id=261, service.id=397, service.bundleid=253, service.scope=bundle} - org.openhab.binding.icloud
2017-11-19 15:42:17.834 [DEBUG] [org.openhab.binding.icloud          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.icloud.internal.BridgeHandlerFactory, component.id=261, service.id=397, service.bundleid=253, service.scope=bundle} - org.openhab.binding.icloud
2017-11-19 15:42:17.847 [DEBUG] [org.openhab.binding.icloud          ] - BundleEvent STARTED - org.openhab.binding.icloud
2017-11-19 15:42:17.847 [DEBUG] [org.openhab.binding.icloud          ] - BundleEvent STARTED - org.openhab.binding.icloud
2017-11-19 15:44:47.494 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge handler initializing ...
2017-11-19 15:44:47.494 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge handler initializing ...
2017-11-19 15:44:47.496 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge starting handler ...
2017-11-19 15:44:47.496 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge starting handler ...
2017-11-19 15:44:47.587 [DEBUG] [org.openhab.binding.icloud          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=400, service.bundleid=253, service.scope=singleton} - org.openhab.binding.icloud
2017-11-19 15:44:47.587 [DEBUG] [org.openhab.binding.icloud          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=400, service.bundleid=253, service.scope=singleton} - org.openhab.binding.icloud
2017-11-19 15:44:47.640 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge handler started.
2017-11-19 15:44:47.640 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge handler started.
2017-11-19 15:44:47.645 [DEBUG] [binding.icloud.handler.BridgeHandler] - lCloud bridge initialized.
2017-11-19 15:48:12.751 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 15:48:12.751 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 15:48:15.032 [DEBUG] [binding.icloud.handler.DeviceHandler] - Initializing iCloud device handler.
2017-11-19 15:48:15.032 [DEBUG] [binding.icloud.handler.DeviceHandler] - Initializing iCloud device handler.
2017-11-19 15:48:15.043 [DEBUG] [binding.icloud.handler.DeviceHandler] - initializeThing thing icloud:device:fbab2713:69e7d8f7 bridge status ONLINE
2017-11-19 15:48:15.043 [DEBUG] [binding.icloud.handler.DeviceHandler] - initializeThing thing icloud:device:fbab2713:69e7d8f7 bridge status ONLINE
2017-11-19 15:48:15.061 [DEBUG] [binding.icloud.handler.DeviceHandler] - Initializing iCloud device handler.
2017-11-19 15:48:15.061 [DEBUG] [binding.icloud.handler.DeviceHandler] - Initializing iCloud device handler.
2017-11-19 15:48:15.067 [DEBUG] [binding.icloud.handler.DeviceHandler] - initializeThing thing icloud:device:fbab2713:413c0f36 bridge status ONLINE
2017-11-19 15:48:15.067 [DEBUG] [binding.icloud.handler.DeviceHandler] - initializeThing thing icloud:device:fbab2713:413c0f36 bridge status ONLINE
2017-11-19 15:48:15.165 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 15:48:15.165 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 15:48:15.170 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 15:48:15.170 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 15:48:15.173 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 15:48:15.173 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 15:48:15.176 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 15:48:15.176 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 15:48:15.178 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 15:48:15.178 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 15:48:15.198 [DEBUG] [binding.icloud.handler.DeviceHandler] - Initializing iCloud device handler.
2017-11-19 15:48:15.198 [DEBUG] [binding.icloud.handler.DeviceHandler] - Initializing iCloud device handler.
2017-11-19 15:48:15.199 [DEBUG] [binding.icloud.handler.DeviceHandler] - initializeThing thing icloud:device:fbab2713:faa6ee2a bridge status ONLINE
2017-11-19 15:48:15.199 [DEBUG] [binding.icloud.handler.DeviceHandler] - initializeThing thing icloud:device:fbab2713:faa6ee2a bridge status ONLINE
2017-11-19 15:48:16.963 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 15:48:16.963 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 15:48:16.966 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 15:48:16.966 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 15:48:16.969 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 15:48:16.969 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 15:48:16.972 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 15:48:16.972 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 16:01:05.528 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 16:01:05.528 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 16:01:07.972 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 16:01:07.972 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 16:01:07.979 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 16:01:07.979 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 16:01:07.985 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 16:01:07.985 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 16:01:07.989 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 16:01:07.989 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 16:19:53.868 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 16:19:53.868 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 16:19:56.724 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 16:19:56.724 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 16:19:56.726 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 16:19:56.726 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 16:19:56.729 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 16:19:56.729 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 16:19:56.732 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 16:19:56.732 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 16:46:59.864 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 16:46:59.864 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 16:47:02.573 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 16:47:02.573 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 16:47:02.582 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 16:47:02.582 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 16:47:02.588 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 16:47:02.588 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 16:47:02.591 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 16:47:02.591 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 17:25:43.721 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 17:25:43.721 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 17:25:46.531 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 17:25:46.531 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 17:25:46.535 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 17:25:46.535 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 17:25:46.538 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 17:25:46.538 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 17:25:46.541 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 17:25:46.541 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 18:22:43.011 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 18:22:43.011 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 18:22:45.936 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 18:22:45.936 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 18:22:45.939 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 18:22:45.939 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 18:22:45.942 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 18:22:45.942 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 18:22:45.946 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 18:22:45.946 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 19:46:16.523 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 19:46:16.523 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge refreshing data ...
2017-11-19 19:46:19.420 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 19:46:19.420 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone SE]
2017-11-19 19:46:19.423 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 19:46:19.423 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPhone 4s]
2017-11-19 19:46:19.425 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 19:46:19.425 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud device discovery for [iPad Air 2]
2017-11-19 19:46:19.428 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.
2017-11-19 19:46:19.428 [DEBUG] [binding.icloud.handler.BridgeHandler] - iCloud bridge data refresh complete.


(Patrik Gfeller) #252

Hi Stephan,

your configuration looks ok; defenitely a problem in the way I match id´s in the binding. I´ve changed the code to be more robust:

for (int i = 0; i < content.size(); i++) {
  String currentId = Integer.toHexString(content.get(i).getId().hashCode());

  logger.debug("Current data element: [{}]", currentId);

  if (deviceId.endsWith(currentId)) {
    return content.get(i);
  }
}

Please give it a try once the CI is ready.

with kind regards,
Patrik


(Patrik Gfeller) #253

Hi Paul,

maybe the latest bugfixes in id matching will also help with your issue. But in any case the latest binding version from CI (as per today) will have more logging in the area in question, which should help me to identify the issue.

Can you update to the latest CI (which is currently in progress) to gather logs?

with kind regards,
Patrik


(Patrik Gfeller) #254

Not sure, but the warning could be a problem and the dependency was just there to initialize a set; which I can also do using standard java libraries. So it is probably better to remove it. With the latest version of the binding the warning should be gone.

The textual config problem is another bug; I hope that is sorted out with the change it made today - but I do not have confirmation yet.

with kind regards,
Patrik


(Patrik Gfeller) #255

New CI build ready @ https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.icloud/2.2.0-SNAPSHOT/


(Patrik Gfeller) #256

Hi Dome,

thanks for the feedback; I´ll consider this for a version 2 of the binding; as at the moment we still face some issues with the standard functionality and I would lilke to get the thing merged to OH 2.2 as soon as possible to make it available in the next release.

To realize that functionality I would add a new configuration parameter to define the radius for the geo-fence …

with kind regards,
Patrik


(Stephan Kratzer) #257

Hi Patrik, with the new version i now get most of the expected data from the binding :slight_smile:

For the still UNDEF google API values and distance i will take a look - i assume these are really configuration issues on my side (like not having defined a home location yet…)

Keep up the magnificient work !


(Philipp) #258

First of all, thanks for your fast support. The new build is working for me. All my devices are getting updated after initialization. But I still facing some unresolved requirement issues during startup. Please find attached my logs:

Start-Up Log
19-Nov-2017 12:45:58.394 [DEBUG] [org.openhab.binding.icloud                        ] - BundleEvent INSTALLED - org.openhab.binding.icloud
19-Nov-2017 12:45:59.479 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: com.google.gson

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
19-Nov-2017 12:45:59.833 [WARN ] [org.jline                                         ] - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
19-Nov-2017 12:46:00.593 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: com.google.gson

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
19-Nov-2017 12:46:04.869 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
  Unresolved requirement: Import-Package: com.google.gson
    -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
       com.google.gson [23]

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
19-Nov-2017 12:46:06.149 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
  Unresolved requirement: Import-Package: com.google.gson
    -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
       com.google.gson [23]

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
19-Nov-2017 12:46:07.506 [WARN ] [org.apache.felix.fileinstall                      ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.icloud-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [10]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.core.thing
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery
    -> Export-Package: org.eclipse.smarthome.config.discovery; bundle-symbolic-name="org.eclipse.smarthome.config.discovery"; bundle-version="0.9.0.201711151730"; version="0.0.0"
       org.eclipse.smarthome.config.discovery [94]
         Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
         Unresolved requirement: Import-Package: org.eclipse.smarthome.core.thing
         Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
           -> Export-Package: org.eclipse.smarthome.config.core; bundle-symbolic-name="org.eclipse.smarthome.config.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
              org.eclipse.smarthome.config.core [93]
                Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
                Unresolved requirement: Import-Package: org.osgi.service.component.annotations; resolution:="optional"
                Unresolved requirement: Import-Package: org.eclipse.smarthome.core.common
                  -> Export-Package: org.eclipse.smarthome.core.common; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
                     org.eclipse.smarthome.core [98]
                       Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
                       Unresolved requirement: Import-Package: org.osgi.service.component.annotations; resolution:="optional"
                       Unresolved requirement: Import-Package: com.google.common.collect
                         -> Export-Package: com.google.common.collect; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="com.google.common.base,javax.annotation,com.google.common.primitives,com.google.common.math"
                            com.google.guava [24]
                              Unresolved requirement: Import-Package: javax.annotation; resolution:="optional"
                                -> Export-Package: javax.annotation; bundle-symbolic-name="javax.annotation-api"; bundle-version="1.2.0"; version="1.2.0"
                                   javax.annotation-api [28]
                       Unresolved requirement: Import-Package: org.apache.commons.lang
                         -> Export-Package: org.apache.commons.lang; bundle-symbolic-name="org.apache.commons.lang"; bundle-version="2.6.0"; version="2.6.0"
                            org.apache.commons.lang [38]
                              No resolution report for the bundle.                       Unresolved requirement: Import-Package: com.google.common.base
                         -> Export-Package: com.google.common.base; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="javax.annotation"
                       Unresolved requirement: Import-Package: com.google.gson
                         -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
                            com.google.gson [23]
                       Unresolved requirement: Import-Package: org.osgi.service.component
                         -> Export-Package: org.osgi.service.component; bundle-symbolic-name="org.apache.felix.scr"; bundle-version="2.0.12"; version="1.3.0"; uses:="org.osgi.framework"
                            org.apache.felix.scr [39]
                              Unresolved requirement: Import-Package: org.apache.felix.service.command; version="[0.6.0,1.0.0)"; status="provisional"; resolution:="optional"
                              Unresolved requirement: Import-Package: org.apache.felix.shell; version="[1.0.0,1.1.0)"; resolution:="optional"
                       Unresolved requirement: Import-Package: org.apache.commons.io
                         -> Export-Package: org.apache.commons.io; bundle-symbolic-name="org.apache.commons.io"; bundle-version="2.2.0"; version="2.2.0"
                            org.apache.commons.io [37]
                              No resolution report for the bundle.                Unresolved requirement: Import-Package: com.google.gson
                  -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
                Unresolved requirement: Import-Package: org.osgi.service.component
                  -> Export-Package: org.osgi.service.component; bundle-symbolic-name="org.apache.felix.scr"; bundle-version="2.0.12"; version="1.3.0"; uses:="org.osgi.framework"
                Unresolved requirement: Import-Package: org.eclipse.smarthome.core.common.registry
                  -> Export-Package: org.eclipse.smarthome.core.common.registry; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
                Unresolved requirement: Import-Package: org.eclipse.smarthome.core.net
                  -> Export-Package: org.eclipse.smarthome.core.net; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
                Unresolved requirement: Import-Package: org.eclipse.smarthome.core.i18n
                  -> Export-Package: org.eclipse.smarthome.core.i18n; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
                Unresolved requirement: Import-Package: org.eclipse.smarthome.core.events
                  -> Export-Package: org.eclipse.smarthome.core.events; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"; uses:="org.eclipse.smarthome.core.items,org.osgi.service.event,org.eclipse.smarthome.core.types"
                Unresolved requirement: Import-Package: com.google.common.base
                  -> Export-Package: com.google.common.base; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="javax.annotation"
                Unresolved requirement: Import-Package: org.apache.commons.lang.reflect
                  -> Export-Package: org.apache.commons.lang.reflect; bundle-symbolic-name="org.apache.commons.lang"; bundle-version="2.6.0"; version="2.6.0"
                Unresolved requirement: Import-Package: com.google.common.collect
                  -> Export-Package: com.google.common.collect; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="com.google.common.base,javax.annotation,com.google.common.primitives,com.google.common.math"
                Unresolved requirement: Import-Package: org.eclipse.smarthome.core.common.osgi
                  -> Export-Package: org.eclipse.smarthome.core.common.osgi; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
         Unresolved requirement: Import-Package: com.google.common.base
           -> Export-Package: com.google.common.base; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="javax.annotation"
         Unresolved requirement: Import-Package: com.google.common.collect
           -> Export-Package: com.google.common.collect; bundle-symbolic-name="com.google.guava"; bundle-version="18.0.0"; version="18.0.0"; uses:="com.google.common.base,javax.annotation,com.google.common.primitives,com.google.common.math"
         Unresolved requirement: Import-Package: org.eclipse.smarthome.core.events
           -> Export-Package: org.eclipse.smarthome.core.events; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"; uses:="org.eclipse.smarthome.core.items,org.osgi.service.event,org.eclipse.smarthome.core.types"
         Unresolved requirement: Import-Package: org.eclipse.smarthome.core.i18n
           -> Export-Package: org.eclipse.smarthome.core.i18n; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
         Unresolved requirement: Import-Package: org.eclipse.smarthome.core.common
           -> Export-Package: org.eclipse.smarthome.core.common; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
         Unresolved requirement: Import-Package: org.eclipse.smarthome.core.common.registry
           -> Export-Package: org.eclipse.smarthome.core.common.registry; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
         Unresolved requirement: Import-Package: org.eclipse.smarthome.core.storage
           -> Export-Package: org.eclipse.smarthome.core.storage; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
  Unresolved requirement: Import-Package: com.google.gson
    -> Export-Package: com.google.gson; bundle-symbolic-name="com.google.gson"; bundle-version="2.7.0"; version="2.7.0"; uses:="com.google.gson.reflect,com.google.gson.stream"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
    -> Export-Package: org.eclipse.smarthome.config.core; bundle-symbolic-name="org.eclipse.smarthome.config.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.core.i18n
    -> Export-Package: org.eclipse.smarthome.core.i18n; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.core.library.types
    -> Export-Package: org.eclipse.smarthome.core.library.types; bundle-symbolic-name="org.eclipse.smarthome.core"; bundle-version="0.9.0.201711151730"; version="0.0.0"

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]

In Addition I noticed that not all available icloud devices are recognized. Family devices and EarPods are currently not showing up. Let me know if I should provide some account specific json files for debugging. I just need to know which endpoint are you currently using.

In the past I was using a quick and dirty script to get iCloud device locations. I was using this endpoint:

https://p31-fmipweb.icloud.com/fmipservice/client/web/refreshClient

It’s providing private, family and accessories devices:
(see attributes fmlyShare:true and deviceClass:Accessory)

JSON
{
  "content": [
    {
      "msg": {
        "strobe": false,
        "userText": false,
        "playSound": true,
        "vibrate": true,
        "createTimestamp": 1510155205211,
        "statusCode": "205"
      },
      "canWipeAfterLock": false,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": false,
      "passcodeLength": 100,
      "deviceStatus": "201",
      "deviceColor": "0",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": false,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": false,
        "LKM": false,
        "WMG": false,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": false,
        "REM": true,
        "MCS": true,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": false
      },
      "lowPowerMode": false,
      "rawDeviceModel": "AirPods\n",
      "id": "SECRET",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "Accessory",
      "lostTimestamp": "",
      "batteryLevel": null,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": {
        "createTimestamp": 1510155205211,
        "statusCode": "205"
      },
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": false,
      "wipedTimestamp": null,
      "deviceDisplayName": "Accessory",
      "prsId": null,
      "audioChannels": [
        {
          "name": "left",
          "available": 0,
          "playing": false,
          "muted": false
        },
        {
          "name": "right",
          "available": 0,
          "playing": false,
          "muted": false
        }
      ],
      "locationCapable": true,
      "batteryStatus": null,
      "trackingInfo": null,
      "name": "AirPods von Philipp",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "Accessory",
      "location": null,
      "deviceModel": "AirPods\n",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": false,
        "playSound": true,
        "vibrate": true,
        "createTimestamp": 1511014961542,
        "statusCode": "200"
      },
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 100,
      "deviceStatus": "200",
      "deviceColor": "SECRET",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": true,
      "rawDeviceModel": "iPhone",
      "id": "SECRET",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "iPhone",
      "lostTimestamp": "",
      "batteryLevel": 0.14000000059604645,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": {
        "createTimestamp": 1511014961542,
        "statusCode": "200"
      },
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "iPhone 7",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "NotCharging",
      "trackingInfo": null,
      "name": "iPhone von Philipp",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "iPhone",
      "location": {
        "isOld": false,
        "isInaccurate": false,
        "altitude": 0,
        "positionType": "Wifi",
        "latitude": "SECRET",
        "floorLevel": 0,
        "horizontalAccuracy": 20,
        "locationType": "",
        "timeStamp": 1511097818661,
        "locationFinished": true,
        "verticalAccuracy": 0,
        "longitude": "SECRET"
      },
      "deviceModel": "iphone",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": false,
        "playSound": true,
        "vibrate": true,
        "createTimestamp": 1470143641036,
        "statusCode": "200"
      },
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 6,
      "deviceStatus": "200",
      "deviceColor": "SECRET",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "iPhone",
      "id": "SECRET",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "iPhone",
      "lostTimestamp": "",
      "batteryLevel": 0.6700000166893005,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": {
        "createTimestamp": 1470143641036,
        "statusCode": "200"
      },
      "fmlyShare": true,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "iPhone 6s",
      "prsId": "SECRET ~~",
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "NotCharging",
      "trackingInfo": null,
      "name": "Wife iPhone",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "iPhone",
      "location": {
        "isOld": false,
        "isInaccurate": false,
        "altitude": 0,
        "positionType": "Wifi",
        "latitude": "SECRET",
        "floorLevel": 0,
        "horizontalAccuracy": 65,
        "locationType": "",
        "timeStamp": 1511097864055,
        "locationFinished": true,
        "verticalAccuracy": 0,
        "longitude": "SECRET"
      },
      "deviceModel": "iphone6s-SECRET",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    }
  ]
}

(Patrik Gfeller) #259

Hi Stephan,

by default the address lookup is disabled; you have a switch item on each account thing to enable it for the respective account. Please note that you need to provide a free google API key in the configuration; as otherwise the quota for google api calls from your machine will be used up very quickly and the lookup will cease to work.

with kind regards,
Patrik


(Patrik Gfeller) #260

Hi Philipp,

strange that it works at all; as com.google.json is required to parse the json responses. Maybe someone more into the OH runtime can give me some advice what I need to do to get rid of that warning.

The binding uses the following endpoint:
https://fmipmobile.icloud.com/fmipservice/device/initClient

Do you see the device with this enpoint; else I´ll try “refreshClient” in the binding as well.

with kind regards,
Patrik


(Dome) #261

Sounds good, makes sense. Thanks for all your work!


(Philipp) #262

Hey Patrik,
I did a short test and can see all my devices (private, family & accessories) with the mobile endpoint you mentioned. Please find attached my JSON response. The binding currently recognizes 9 out of 11 entries.

JSON response https://fmipmobile.icloud.com/fmipservice/device/initClient
{
  "userInfo": {
    "accountFormatter": 0,
    "firstName": "Philipp",
    "lastName": "SECRET",
    "membersInfo": {
      "SECRET ~~": {
        "accountFormatter": 0,
        "firstName": "WIFE",
        "lastName": "SECRET",
        "deviceFetchStatus": "LOADING",
        "useAuthWidget": true,
        "isHSA": true,
        "appleId": "SECRET.SECRET@me.com"
      }
    },
    "hasMembers": true
  },
  "serverContext": {
    "minCallbackIntervalInMS": 5000,
    "enable2FAFamilyActions": false,
    "preferredLanguage": "de-de",
    "lastSessionExtensionTime": null,
    "enableMapStats": true,
    "callbackIntervalInMS": 10000,
    "validRegion": true,
    "timezone": {
      "currentOffset": -28800000,
      "previousTransition": 1509872399999,
      "previousOffset": -25200000,
      "tzCurrentName": "-08:00",
      "tzName": "America/Los_Angeles"
    },
    "authToken": "SECRET",
    "maxCallbackIntervalInMS": 60000,
    "classicUser": false,
    "isHSA": true,
    "trackInfoCacheDurationInSecs": 86400,
    "imageBaseUrl": "https://statici.icloud.com",
    "minTrackLocThresholdInMts": 100,
    "maxLocatingTime": 90000,
    "sessionLifespan": 900000,
    "info": "SECRET/SECRET/SECRET",
    "prefsUpdateTime": 1502117299846,
    "useAuthWidget": true,
    "clientId": "SECRET",
    "enable2FAFamilyRemove": false,
    "serverTimestamp": 1511103440857,
    "macCount": 0,
    "deviceLoadStatus": "200",
    "maxDeviceLoadTime": 60000,
    "prsId": "SECRET",
    "showSllNow": false,
    "cloudUser": true,
    "enable2FAErase": false
  },
  "alert": null,
  "userPreferences": {
    "touchPrefs": {}
  },
  "content": [
    {
      "msg": {
        "strobe": false,
        "userText": false,
        "playSound": true,
        "vibrate": true,
        "createTimestamp": 1510155205211,
        "statusCode": "205"
      },
      "canWipeAfterLock": false,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": false,
      "passcodeLength": 6,
      "deviceStatus": "201",
      "deviceColor": "0",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": false,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": false,
        "LKM": false,
        "WMG": false,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": false,
        "REM": true,
        "MCS": true,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": false
      },
      "lowPowerMode": false,
      "rawDeviceModel": "AirPods_8194",
      "id": "SECRET +xK+ SECRET",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "Accessory",
      "lostTimestamp": "",
      "batteryLevel": null,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": {
        "createTimestamp": 1510155205211,
        "statusCode": "205"
      },
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": false,
      "wipedTimestamp": null,
      "deviceDisplayName": "Accessory",
      "prsId": null,
      "audioChannels": [
        {
          "name": "left",
          "available": 0,
          "playing": false,
          "muted": false
        },
        {
          "name": "right",
          "available": 0,
          "playing": false,
          "muted": false
        }
      ],
      "locationCapable": true,
      "batteryStatus": null,
      "trackingInfo": null,
      "name": "AirPods von Philipp",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "Accessory",
      "location": null,
      "deviceModel": "AirPods_8194-0",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": null,
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": "white",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": true,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "iPad2,1",
      "id": "SECRET/SECRET",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "iPad",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "iPad 2",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "Philipps iPad",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "iPad",
      "location": null,
      "deviceModel": "SecondGen-white",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": false,
        "playSound": true,
        "vibrate": true,
        "createTimestamp": 1511100205693,
        "statusCode": "200"
      },
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": "1-1-0",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": true,
      "rawDeviceModel": "iPhone9,3",
      "id": "SECRET",
      "remoteLock": null,
      "isLocating": true,
      "modelDisplayName": "iPhone",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": {
        "createTimestamp": 1511100205693,
        "statusCode": "200"
      },
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "iPhone 7",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "iPhone von Philipp",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "iPhone",
      "location": {
        "isOld": true,
        "isInaccurate": false,
        "altitude": 0,
        "positionType": "Wifi",
        "latitude": SECRET.SECRET,
        "floorLevel": 0,
        "horizontalAccuracy": 65,
        "locationType": "",
        "timeStamp": 1511102202409,
        "locationFinished": false,
        "verticalAccuracy": 0,
        "longitude": SECRET.SECRET
      },
      "deviceModel": "iphone7-1-1-0",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": true,
        "playSound": false,
        "vibrate": false,
        "createTimestamp": 1483953531409,
        "statusCode": "200"
      },
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": "3b3b3c-b4b5b9",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": true,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "iPhone7,2",
      "id": "SECRET+SECRET",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "iPhone",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": {
        "createTimestamp": 1483953531409,
        "statusCode": "200"
      },
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "iPhone 6",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "iPhone von Philipp",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "iPhone",
      "location": null,
      "deviceModel": "iphone6-SECRET-SECRET",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": null,
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 4,
      "deviceStatus": "203",
      "deviceColor": "SStl",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": true,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "Watch1,2",
      "id": "SECRET",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "Apple Watch",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "Apple Watch",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "Apple Watch von Philipp",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "Watch",
      "location": null,
      "deviceModel": "Watch1_2",
      "maxMsgChar": 70,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": null,
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": "1-1-0",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "iPad7,3",
      "id": "SECRET/SECRET",
      "remoteLock": null,
      "isLocating": true,
      "modelDisplayName": "iPad",
      "lostTimestamp": "",
      "batteryLevel": 0.5099999904632568,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "iPad Pro",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "NotCharging",
      "trackingInfo": null,
      "name": "iPad von Philipp",
      "isMac": false,
      "thisDevice": true,
      "deviceClass": "iPad",
      "location": {
        "isOld": false,
        "isInaccurate": false,
        "altitude": 0,
        "positionType": "Wifi",
        "latitude": SECRET.SECRET,
        "floorLevel": 0,
        "horizontalAccuracy": 65,
        "locationType": "",
        "timeStamp": 1511102932582,
        "locationFinished": false,
        "verticalAccuracy": 0,
        "longitude": SECRE.SECRET
      },
      "deviceModel": "NinthGen-1-1-0",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": null,
      "canWipeAfterLock": false,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": false,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": null,
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": false,
        "LMG": true,
        "SND": true,
        "CLT": false,
        "LKL": true,
        "SVP": false,
        "LST": false,
        "LKM": true,
        "WMG": false,
        "SPN": false,
        "XRM": false,
        "PIN": true,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": true,
        "KPD": true,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "MacBook5,1",
      "id": "SECRET/SECRET/SECRET==",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "MacBook",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": false,
      "wipedTimestamp": null,
      "deviceDisplayName": "MacBook",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "SECRET MacBook",
      "isMac": true,
      "thisDevice": false,
      "deviceClass": "MacBook",
      "location": null,
      "deviceModel": "MacBook5_1",
      "maxMsgChar": 500,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": true,
        "playSound": false,
        "vibrate": false,
        "createTimestamp": 1483953531409,
        "statusCode": "200"
      },
      "canWipeAfterLock": false,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": false,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": null,
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": false,
        "LMG": true,
        "SND": true,
        "CLT": false,
        "LKL": true,
        "SVP": false,
        "LST": false,
        "LKM": true,
        "WMG": false,
        "SPN": false,
        "XRM": false,
        "PIN": true,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": true,
        "KPD": true,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "iMac8,1",
      "id": "SECRET+SECRET==",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "iMac",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": {
        "createTimestamp": 1483953531409,
        "statusCode": "200"
      },
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": false,
      "wipedTimestamp": null,
      "deviceDisplayName": "iMac",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "Philipps iMac",
      "isMac": true,
      "thisDevice": false,
      "deviceClass": "iMac",
      "location": null,
      "deviceModel": "iMac8_1",
      "maxMsgChar": 500,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": true,
        "playSound": false,
        "vibrate": false,
        "createTimestamp": 1483953531409,
        "statusCode": "200"
      },
      "canWipeAfterLock": false,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": false,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": null,
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": false,
        "LMG": true,
        "SND": true,
        "CLT": false,
        "LKL": true,
        "SVP": false,
        "LST": false,
        "LKM": true,
        "WMG": false,
        "SPN": false,
        "XRM": false,
        "PIN": true,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": true,
        "KPD": true,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "MacBookPro11,3",
      "id": "SECRET==",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "MacBook Pro",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": {
        "createTimestamp": 1483953531409,
        "statusCode": "200"
      },
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": false,
      "wipedTimestamp": null,
      "deviceDisplayName": "MacBook Pro 15\"",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "Philipps MacBook Pro",
      "isMac": true,
      "thisDevice": false,
      "deviceClass": "MacBookPro",
      "location": null,
      "deviceModel": "MacBookPro11_3",
      "maxMsgChar": 500,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": true,
        "playSound": false,
        "vibrate": false,
        "createTimestamp": 1483953531409,
        "statusCode": "205"
      },
      "canWipeAfterLock": false,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": false,
      "passcodeLength": 4,
      "deviceStatus": "203",
      "deviceColor": null,
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": false,
        "LMG": true,
        "SND": true,
        "CLT": false,
        "LKL": true,
        "SVP": false,
        "LST": false,
        "LKM": true,
        "WMG": false,
        "SPN": false,
        "XRM": false,
        "PIN": true,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": true,
        "KPD": true,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "MacBookPro8,2",
      "id": "SECRET+mEQ+SECRET==",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "MacBook Pro",
      "lostTimestamp": "",
      "batteryLevel": 0,
      "mesg": {
        "createTimestamp": 1483953531409,
        "statusCode": "205"
      },
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": false,
      "lostDevice": null,
      "lostModeCapable": false,
      "wipedTimestamp": null,
      "deviceDisplayName": "MacBook Pro 15\"",
      "prsId": null,
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "Unknown",
      "trackingInfo": null,
      "name": "Philipps MacBook Pro (2)",
      "isMac": true,
      "thisDevice": false,
      "deviceClass": "MacBookPro",
      "location": null,
      "deviceModel": "MacBookPro8_2",
      "maxMsgChar": 500,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": {
        "strobe": false,
        "userText": false,
        "playSound": true,
        "vibrate": true,
        "createTimestamp": 1470143641036,
        "statusCode": "200"
      },
      "canWipeAfterLock": true,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": true,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": "272728-b9b7ba",
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": true,
        "LMG": false,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": true,
        "LKM": false,
        "WMG": true,
        "SPN": false,
        "XRM": false,
        "PIN": false,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": false,
        "KPD": false,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "iPhone8,1",
      "id": "SECRET/SECRET==",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "iPhone",
      "lostTimestamp": "",
      "batteryLevel": 0.4300000071525574,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": {
        "createTimestamp": 1470143641036,
        "statusCode": "200"
      },
      "fmlyShare": true,
      "lostDevice": null,
      "lostModeCapable": true,
      "wipedTimestamp": null,
      "deviceDisplayName": "iPhone 6s",
      "prsId": "SECRET~~",
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "NotCharging",
      "trackingInfo": null,
      "name": "SECRET iPhone",
      "isMac": false,
      "thisDevice": false,
      "deviceClass": "iPhone",
      "location": {
        "isOld": true,
        "isInaccurate": false,
        "altitude": 0,
        "positionType": "Wifi",
        "latitude": SECRET.SECRET,
        "floorLevel": 0,
        "horizontalAccuracy": 65,
        "locationType": "",
        "timeStamp": SECRET,
        "locationFinished": false,
        "verticalAccuracy": 0,
        "longitude": SECRET.SECRET
      },
      "deviceModel": "iphone6s-272728-b9b7ba",
      "maxMsgChar": 160,
      "darkWake": false,
      "remoteWipe": null
    },
    {
      "msg": null,
      "canWipeAfterLock": false,
      "wipeInProgress": false,
      "lostModeEnabled": false,
      "activationLocked": false,
      "passcodeLength": 6,
      "deviceStatus": "203",
      "deviceColor": null,
      "features": {
        "MSG": true,
        "LOC": true,
        "LLC": false,
        "CLK": false,
        "TEU": false,
        "LMG": true,
        "SND": true,
        "CLT": false,
        "LKL": false,
        "SVP": false,
        "LST": false,
        "LKM": true,
        "WMG": false,
        "SPN": false,
        "XRM": false,
        "PIN": true,
        "LCK": true,
        "REM": false,
        "MCS": false,
        "CWP": false,
        "KEY": true,
        "KPD": true,
        "WIP": true
      },
      "lowPowerMode": false,
      "rawDeviceModel": "MacBookPro12,1",
      "id": "SECRET+SECRET/SECRET+SECRET=",
      "remoteLock": null,
      "isLocating": false,
      "modelDisplayName": "MacBook Pro",
      "lostTimestamp": "",
      "batteryLevel": 0.852424,
      "mesg": null,
      "locationEnabled": true,
      "lockedTimestamp": null,
      "locFoundEnabled": false,
      "snd": null,
      "fmlyShare": true,
      "lostDevice": null,
      "lostModeCapable": false,
      "wipedTimestamp": null,
      "deviceDisplayName": "MacBook Pro 13\"",
      "prsId": "SECRET~~",
      "audioChannels": [],
      "locationCapable": true,
      "batteryStatus": "NotCharging",
      "trackingInfo": null,
      "name": "SECRET MacBook Pro",
      "isMac": true,
      "thisDevice": false,
      "deviceClass": "MacBookPro",
      "location": {
        "isOld": true,
        "isInaccurate": false,
        "altitude": 0,
        "positionType": "Wifi",
        "latitude": SECRET.SECRET,
        "floorLevel": 0,
        "horizontalAccuracy": 65,
        "locationType": null,
        "timeStamp": 1511102198765,
        "locationFinished": false,
        "verticalAccuracy": 0,
        "longitude": SECRET.SECRET
      },
      "deviceModel": "MacBookPro12_1",
      "maxMsgChar": 500,
      "darkWake": false,
      "remoteWipe": null
    }
  ],
  "statusCode": "200"
}

(Philipp) #263

Hey Stephan,
I can confirm that the address lockup is working correctly. Please make sure that your *.things file is equal to the example below and you activated the enableAddressLookup switch.

Bridge icloud:account:account1 [appleId="nomail4@me.com", password="SuperSecret", refreshTimeInMinutes=10, googleAPIKey="YOUR-API-KEY"]
{
    Thing device ABC123 "iPhone" @ "WORLD"
}

You can get your personal google api key here:
https://developers.google.com/maps/documentation/javascript/get-api-key?hl=de


(Philipp) #264

One more thing :upside_down_face: :
Currently the default value for icloud:account:account1:enableAddressLookup is FALSE, which is absolute fine. But due to that, it is required to set the the switch manually to TRUE after each restart, if the user like to use this feature. I using a rule for that, but I think it would be more comfortable if the user could activate this feature by, for example, setting the googleApiKey parameter.

Sorry for challenging you :wink: