[SOLVED] Cannot bind IKEA Tradfri Gateway

  • Platform information:
    • Hardware: HUAWEI P8 Lite
    • OS: Ubuntu 16.04 LTS (I’m using Linux Deploy)
    • Java Runtime Environment: Java™ SE Runtime Environment (build 1.8.0_191-b12)
      Java HotSpot™ Client VM (build 25.191-b12, mixed mode)
    • openHAB version: 2.4.0-SNAPSHOT (#1461)
  • Issue of the topic: The Tradfri gateway just doens’t show up. It is online, the official Android app is working, i can control the lights and everything. I can install the binding, but the device doesn’t apper in the inbox. I tried the Manual refresh, nothing. Previously i could bind this gateway successfully, althoug it was a completely different setup.
  • If logs where generated please post these here using code fences:

==> /var/log/openhab2/openhab.log <==
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:104) ~[?:?]
at okhttp3.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:97) ~[?:?]
at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:152) ~[?:?]
at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41) ~[?:?]
at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97) ~[?:?]
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) ~[?:?]
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) ~[?:?]
… 3 more
2018-12-15 21:48:49.071 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 12c9c8f0-b0f5-4d77-9c52-c5c091173ac2, base URL = http://localhost:8080)
2018-12-15 21:49:49.633 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 12c9c8f0-b0f5-4d77-9c52-c5c091173ac2, base URL = http://localhost:8080)

==> /var/log/openhab2/events.log <==
2018-12-15 21:35:36.868 [vent.ItemStateChangedEvent] - mihome_sensor_ht_158d000249acd4_temperature changed from NULL to 22.97 ?C
2018-12-15 21:35:36.870 [vent.ItemStateChangedEvent] - mihome_sensor_ht_158d000249acd4_batteryLevel changed from NULL to 76
2018-12-15 21:35:36.872 [vent.ItemStateChangedEvent] - mihome_sensor_ht_158d000249acd4_lowBattery changed from NULL to OFF
2018-12-15 21:35:36.874 [vent.ItemStateChangedEvent] - mihome_sensor_motion_aq2_158d0002b86d3b_batteryLevel changed from NULL to 86
2018-12-15 21:35:36.876 [vent.ItemStateChangedEvent] - mihome_sensor_motion_aq2_158d0002b86d3b_lowBattery changed from NULL to OFF
2018-12-15 21:35:36.879 [vent.ItemStateChangedEvent] - mihome_gateway_7c49eb1ce9e5_brightness changed from NULL to 0
2018-12-15 21:35:36.883 [vent.ItemStateChangedEvent] - mihome_gateway_7c49eb1ce9e5_color changed from NULL to 0,0,0
2018-12-15 21:35:36.885 [vent.ItemStateChangedEvent] - mihome_gateway_7c49eb1ce9e5_illumination changed from NULL to 1292
2018-12-15 21:35:36.888 [vent.ItemStateChangedEvent] - mihome_sensor_switch_158d00025603cd_batteryLevel changed from NULL to 88
2018-12-15 21:35:36.890 [vent.ItemStateChangedEvent] - mihome_sensor_switch_158d00025603cd_lowBattery changed from NULL to OFF

Thank you!
Peter

Unfortunately i can start openhab only with: sudo openhab-cli start

There i found more logs:

22:02:53.040 [ERROR] [.io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
io.socket.engineio.client.EngineIOException: xhr poll error
at io.socket.engineio.client.Transport.onError(Transport.java:71) [199:org.openhab.io.openhabcloud:2.4.0.201812141755]
at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19) [199:org.openhab.io.openhabcloud:2.4.0.20181214175 5]
at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:124) [199:org.openhab.io.openhabcloud:2.4.0.201812141755]
at io.socket.thread.EventThread$2.run(EventThread.java:80) [199:org.openhab.io.openhabcloud:2.4.0.201812141755]
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.io.IOException: 400
at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:218) ~[?:?]
… 1 more

I don’t think I have seen OH run from a mobile phone before.
The hardware is VERY different from anything else it is normally run on.

:slight_smile: yes, but it doesn’t mean it shouldn’t be working, right? I mean other devices work. Like Xiaomi stuffs. Must be a reason for Tradfri not working and we should be able to fix it.

I could add the gateway manually. Needed the install OH on windows to see the gateway’s hostname first. Works now.