Icloud binding - General SSLEngine problem

hey @martinvw,
sorry i read though this and in a resent post you said

i have never tried the icloud binding before today.
im using openhabian 4.14.79-v7+ #1159
which is using openhab 2.4.0~20181112034355-1 (Build #1422)
i installed the icloud binding via paperUI
my apple id/pw uses 2fa but never found where to put the code nore did the code ever show up on my devices.

logs are showing

2018-11-24 23:37:32.577 [ERROR] [org.openhab.binding.icloud ] - bundle org.openhab.binding.icloud:2.4.0.201811232341 (253)[org.openhab.binding.icloud.internal.ICloudTlsCertificateProvider(23)] : Could not load implementation object class org.openhab.binding.icloud.internal.ICloudTlsCertificateProvider
java.lang.ClassNotFoundException: org.openhab.binding.icloud.internal.ICloudTlsCertificateProvider cannot be found by org.openhab.binding.icloud_2.4.0.201811232341
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484) ~[?:?]

and it goes on for ages.
i have tried restarting openhabian. i have not tried the fixes that are mentioned in earlier post due to earlier quote.

hope i have given enough info to help solve error

thanks in advance.

You should use your normal password, it should AFAIK just work.

Could you also post a full output of bundle:list.

The class not found sounds suspicious either a mismatching smarthome version or the jar from that day might be corrupt. So you also try to upgrade first :slight_smile:

how do i do that in openhabian?
i logged in via putty and did bundle:list but i get

-bash: bundle:list: command not found

never mind worked out how to get the bundle:list. haven’t logged in the karaf console before

openhab> bundle:list
START LEVEL 100 , List Threshold: 50
ID │ State │ Lvl │ Version │ Name
────┼──────────┼─────┼────────────────────────┼────────────────────────────────
20 │ Active │ 80 │ 5.3.1.201602281253 │ OSGi JAX-RS Connector
21 │ Active │ 80 │ 2.7.0.v20170129-0911 │ Gson: Google Json Library for
23 │ Active │ 80 │ 3.0.0.v201312141243 │ Google Guice (No AOP)
26 │ Active │ 80 │ 3.5.4 │ JmDNS
28 │ Active │ 80 │ 1.0.0 │ Units of Measurement API
30 │ Active │ 80 │ 1.1.0.Final │ Bean Validation API
31 │ Active │ 80 │ 2.0.1 │ javax.ws.rs-api
32 │ Active │ 80 │ 3.2.0.v201101311130 │ ANTLR Runtime
35 │ Active │ 80 │ 3.2.1 │ Commons Collections
36 │ Active │ 80 │ 1.1 │ Commons Exec
37 │ Active │ 80 │ 2.2.0 │ Commons IO
38 │ Active │ 80 │ 2.6 │ Commons Lang
47 │ Active │ 80 │ 4.2.1 │ Apache Karaf :: OSGi Services
63 │ Active │ 80 │ 4.6.0 │ Apache XBean OSGI Bundle Utili
64 │ Active │ 80 │ 4.6.0 │ Apache XBean :: Classpath Reso
65 │ Active │ 80 │ 2.12.0.v20160420-0247 │ EMF Common
66 │ Active │ 80 │ 2.12.0.v20160420-0247 │ EMF Ecore
67 │ Active │ 80 │ 2.11.0.v20160420-0247 │ EMF Change Model
68 │ Active │ 80 │ 2.12.0.v20160420-0247 │ EMF XML/XMI Persistence
69 │ Active │ 80 │ 3.8.0.v20160509-1230 │ Common Eclipse Runtime
70 │ Active │ 80 │ 3.6.100.v20160223-2218 │ Extension Registry Support
80 │ Active │ 80 │ 9.4.11.v20180605 │ Jetty :: Proxy
94 │ Active │ 80 │ 0.4.1.v20180515-1321 │ org.eclipse.lsp4j
95 │ Active │ 80 │ 0.4.1.v20180515-1321 │ org.eclipse.lsp4j.jsonrpc
96 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Config Core
97 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Configuratio
98 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Configuratio
99 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Config Dispa
100 │ Active │ 75 │ 0.10.0.201811100937 │ Eclipse SmartHome Config XML
101 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core
102 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core Audio
103 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core Binding
104 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core ID
105 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core Persist
106 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Scheduler Se
107 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core Semanti
108 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core Thing
109 │ Active │ 75 │ 0.10.0.201811100937 │ Eclipse SmartHome Core Thing X
110 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Transformati
111 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core Voice
112 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Console
113 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Console for
114 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome HTTP Interfa
115 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome JavaSound I/
116 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Monitor
117 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Net I/O Bund
118 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome REST Interfa
119 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Core REST API
120 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome REST mDNS An
121 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome REST Interfa
122 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Sitemap REST
123 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome SSE REST API
124 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Voice REST A
125 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Bonjour/MDS
126 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Web Audio Su
127 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Model Core
128 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Item Model
129 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Item Model I
130 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Item Model R
131 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Language Ser
132 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Persistence
133 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Persistence
134 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Persistence
135 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Rule Model
136 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Rule Model I
137 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Rule Runtime
138 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Script
139 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Script Model
140 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Script Runti
141 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Sitemap Model
142 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Sitemap Mode
143 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Sitemap Runt
144 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Thing Model
145 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Thing Model
146 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Thing Model
147 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Json Storage
148 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome UI
149 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome UI Icons
150 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Classic Icon
151 │ Active │ 80 │ 2.14.0.v20180522-1629 │ Xtend Runtime Library
152 │ Active │ 80 │ 2.14.0.v20180522-1629 │ Xtend Macro Interfaces
153 │ Active │ 80 │ 2.14.0.v20180522-1821 │ Xtext
154 │ Active │ 80 │ 2.14.0.v20180522-1833 │ Xtext Common Types
155 │ Active │ 80 │ 2.14.0.v20180522-1821 │ Xtext IDE Core
156 │ Active │ 80 │ 2.14.0.v20180522-1821 │ Xtext Utility
157 │ Active │ 80 │ 2.14.0.v20180522-1833 │ Xbase Model
158 │ Active │ 80 │ 2.14.0.v20180522-1833 │ Xbase Generic IDE Services
159 │ Active │ 80 │ 2.14.0.v20180522-1629 │ Xbase Runtime Library
174 │ Active │ 80 │ 1.9.6 │ MIME streaming extension
176 │ Active │ 80 │ 6.2.0 │ org.objectweb.asm
177 │ Active │ 80 │ 6.2.0 │ org.objectweb.asm.commons
178 │ Active │ 80 │ 6.2.0 │ org.objectweb.asm.tree
179 │ Active │ 90 │ 2.4.0.201811110923 │ openHAB Core
180 │ Active │ 80 │ 2.4.0.201811110923 │ openHAB Karaf Integration
182 │ Resolved │ 80 │ 2.4.0.201811110923 │ openHAB Sound Support, Hosts:
183 │ Active │ 80 │ 2.4.0.201811110923 │ openHAB Dashboard UI
188 │ Active │ 80 │ 1.0.2 │ Units of Measurement Common Li
189 │ Active │ 80 │ 1.0.8 │ Units of Measurement Implement
190 │ Active │ 80 │ 3.3.0 │ Commons Net
191 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome DMX Binding
193 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Paper UI, Fr
194 │ Active │ 80 │ 2.4.0.201811110923 │ DenonMarantz Binding
198 │ Resolved │ 75 │ 2.4.0.201811110923 │ openHAB Paper UI Theme Fragmen
200 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Astro Binding
201 │ Active │ 80 │ 1.6.0 │ Commons Codec
202 │ Active │ 80 │ 4.2.3 │ Apache HttpClient OSGi bundle
203 │ Active │ 80 │ 4.2.3 │ Apache HttpCore OSGi bundle
204 │ Active │ 80 │ 3.1.0.7 │ Apache ServiceMix :: Bundles :
205 │ Active │ 80 │ 1.13.0.201811120308 │ openHAB TCP-UDP Binding
206 │ Active │ 80 │ 2.4.0.201811110923 │ openHAB 1.x Compatibility Layer
212 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Configuratio
213 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome UPnP Transpo
214 │ Active │ 80 │ 2.4.0 │ JUPnP Library
215 │ Active │ 80 │ 2.4.0.201811110923 │ Kodi Binding
216 │ Active │ 80 │ 1.1.1.201605111122 │ Swagger Provider
217 │ Active │ 80 │ 2.4.5 │ Jackson-annotations
218 │ Active │ 80 │ 2.4.5 │ Jackson-core
219 │ Active │ 80 │ 2.4.5 │ jackson-databind
220 │ Active │ 80 │ 2.4.5 │ Jackson-dataformat-XML
221 │ Active │ 80 │ 2.4.5 │ Jackson-dataformat-YAML
222 │ Active │ 80 │ 2.4.5 │ Jackson-module-JAXB-annotations
223 │ Active │ 80 │ 18.0.0 │ Guava: Google Core Libraries f
224 │ Active │ 80 │ 1.5.8 │ swagger-annotations
225 │ Active │ 80 │ 1.5.8 │ swagger-core
226 │ Active │ 80 │ 1.5.8 │ swagger-jaxrs
227 │ Active │ 80 │ 1.5.8 │ swagger-models
228 │ Active │ 80 │ 3.19.0.GA │ Javassist
229 │ Active │ 80 │ 3.2.1 │ Apache Commons Lang
230 │ Active │ 80 │ 2.4.0.201811110923 │ openHAB REST Documentation
231 │ Active │ 80 │ 0.9.10.v20160429-1435 │ reflections (wrap)
232 │ Active │ 80 │ 3.1.4 │ Stax2 API
233 │ Active │ 80 │ 1.5.8.v20160511-1038 │ swagger-jersey2-jaxrs (wrap)
235 │ Active │ 80 │ 2.4.0.201811110923 │ Exec Binding
237 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome IoT Marketpl
238 │ Active │ 80 │ 2.2.0.201711091019 │ Sony Binding
240 │ Active │ 80 │ 1.13.0.201811150509 │ openHAB GPIO Binding
241 │ Active │ 80 │ 1.13.0.201811150509 │ openHAB GPIO IO Module
245 │ Active │ 75 │ 0.10.0.201811171951 │ Eclipse SmartHome Map Transfor
246 │ Active │ 80 │ 2.4.0.201811221857 │ GlobalCache Binding
251 │ Active │ 80 │ 0.10.0.201811100937 │ Eclipse SmartHome Basic UI, Fr
252 │ Resolved │ 75 │ 2.4.0.201811110923 │ openHAB Basic UI Fragment, Hos
253 │ Active │ 80 │ 2.4.0.201811232341 │ iCloud Binding

i have updated to the unstable version of openhab and the binding is now working.

1 Like

Thank you! Where do I find the newest Version/SNAPSHOT? Can I somehow create it myself from the repository: https://github.com/openhab/openhab2-addons/tree/master/addons/binding
Sorry if this goes to far off topic…

@martinvw managed to build the jar:

jar cvf org.openhab.binding.icloud.jar org.openhab.binding
chmod +x org.openhab.binding.icloud.org.jar

Deposited the file in the addons folder and restarted openHAB (a couple of times). Unfortunately the binding doesn’t seem to start.

It should work but you can maybe better try a real release jar: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/binding/org.openhab.binding.icloud/2.4.0-SNAPSHOT/

Make sure to uninstall the binding first through paperUI and then dropping in the jar. Look at the log to see what is going on.

Great, thank you:

257 │ Active │ 80 │ 2.4.0.201811241129 │ iCloud Binding

Unfortunately in Paper UI all devices show as INITIALIZING or UNINITIALIZED. Restarted openHAB and cleaned cache/tmp, no change. What am I missing?

I would propose to check the logs and maybe there is also a status string next to INITIALIZING or UNINITIALIZED.

Otherwise you should enable logging and make sure to either enable / disable or store a real change.

Enable logging:

log:set DEBUG org.openhab.binding.icloud

Hi Marin,

I just installed the binding, but I get the following error message that I can see in the logs. Do you have any idea what that could be? I installed the latest openhabian image.

2018-12-14 16:43:23.947 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception

java.lang.NoClassDefFoundError: org/eclipse/smarthome/io/net/http/HttpRequestBuilder

at org.openhab.binding.icloud.internal.ICloudConnection.callApi(ICloudConnection.java:70) ~[?:?]

at org.openhab.binding.icloud.internal.ICloudConnection.requestDeviceStatusJSON(ICloudConnection.java:65) ~[?:?]

at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:84) ~[?:?]

at org.eclipse.smarthome.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:81) ~[?:?]

at org.eclipse.smarthome.core.cache.ExpiringCache.getValue(ExpiringCache.java:61) ~[?:?]

at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:141) ~[?:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

at java.lang.Thread.run(Thread.java:748) [?:?]

Caused by: java.lang.ClassNotFoundException: org.eclipse.smarthome.io.net.http.HttpRequestBuilder cannot be found by org.openhab.binding.icloud_2.4.0.201812100737

at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433) ~[?:?]

at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395) ~[?:?]

at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387) ~[?:?]

at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) ~[?:?]

at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?]

... 13 more

Best wishes,
Ben

Hi who can help me please… moved from windows to ubuntu, on windows i was able to use the GUI
here i am kind of lost…

csplit -f cert /tmp/icloud2.crt ‘/^-----BEGIN CERTIFICATE-----/’ {*}

1.do i need to put my certficate here?
2. where do i take it?

Hello!

After this binding stopped working (OH 2.3) I stopped using it but now with my fresh 2.4 installation i wanted to give it another go.
Is there still a certificate problem?
PaperUI finds my devices instantly but after adding them (with a things-file) every device is marked as offline (communication error).

Do i have to follow the steps above to get it working or is there a different problem?

Thank you

Hi!
I did some more work investigating my problems …
I cant get the textual configuration to work … my account shows online and my devices are discovered in paper UI.
when i copy the device-id provided in paperui into my things-file it won’t work.
if i add them via paperui a different channel number is created which i can link my items to …
why does the textual configuration not work?
for backup reasons i like to use textual configuration a lot …

Sorry for the late reply.

After setting:

log:set DEBUG org.openhab.binding.icloud

All I’m getting is:

2018-12-20 10:41:36.448 [hingStatusInfoChangedEvent] - 'icloud:XXX' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING

No more entries concerning the binding. When I remember correctly I had no Handler Error before… strange.

It works now. just took some time. :slight_smile:

No more SSH issues?

Binding is still not working. But I haven’t fiddled with it for some time. Still running openHAB 2.3, so maybe the update will fix my problems.

my entire migration depends on that :grin:

i switched all my stuff to Ubuntu VM, but i was not able to make icloud to work so i am still on my windows

if anyone knows how to make it work with Ubuntu 16.04
i will be really grateful …

Just upgraded to openHAB 2.4 (running on a Diskstation) and installed the iCloud binding: finally everything works fine!