Problem setting up deconz integration

Hi im trying to integrate econz with openhab but i think im missing something.

I have set up deconz on a docler container using a ready image. Everything looks fine there. I can find my switches and lights. In openhab i intall the decon binding an the hue bridge binding. After entering the ip and port in the deconz binding it shows status online. The hue bridge itself discovered the deconz instance and i add it. The hue bridge first shows a communication error until I allow api access, ut then it only shows status offline.

I guess the fact that hue shows offline is the problem.

The log shows java.net.ConnectException: Connection refused (Connection refused)

None of my lights and switches show up on dicovery in openhab paperui.

Can it be that the hue tries a different port?

Any ideas?

1 Like

I have gotten closer to the goal. The hue bridge now connects after changing the deconz instance to port 80. Lights are discovered through the hue bridge.

The deconz binding shows as online but is not discovering any switches. I get the following error message in the debug logs

23:39:47.870 [WARN ] [etty.util.component.AbstractLifeCycle] - FAILED WebSocketClient@7eb91995[httpClient=org.eclipse.jetty.client.HttpClient@7a06fb79,openSessions.size=0]: java.lang.IllegalStateException: Destroyed container cannot be restarted

java.lang.IllegalStateException: Destroyed container cannot be restarted

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:93) ~[?:?]
at org.eclipse.jetty.websocket.client.WebSocketClient.doStart(WebSocketClient.java:409) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[?:?]
at org.openhab.binding.deconz.internal.netutils.WebSocketConnection.start(WebSocketConnection.java:59) ~[?:?]
at org.openhab.binding.deconz.internal.handler.DeconzBridgeHandler.startWebsocket(DeconzBridgeHandler.java:224) ~[?:?]
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) [?:?]
23:39:47.882 [WARN ] [e.core.thing.binding.BaseThingHandler] - Handler DeconzBridgeHandler tried updating the thing status although the handler was already disposed.

Any ideas?

I get the same error after generating apikey via REST client, and putting it in the things file.

checking the thing status for karaf console, i get this message

UID: deconz:deconz:homeserver
Type: deconz:deconz
Label: Deconz
Status: OFFLINE (COMMUNICATION_ERROR): Destroyed container cannot be restarted

Properties:
ipaddress : 172.17.0.2
fwversion : 0x26330500
zigbeechannel : 15
apiversion : 1.16.0
swversion : 2.5.64

Still haven’t figured out what went wrong.

I have the same issue. Did you solve it?

I have the same problem. Any idea?

It looks like @FreAkY found a solution - at least for his setup:

1 Like

Maybe it can help:
http://gsf.diphda.uberspace.de/smarthome/2019/01/18/openhab2-spass-mit-zigbee/
After that if the Hue bridge added to OH, I added manually with deConz binding the deconz bridge:

  1. Write the ip address of RBPi and :80 as a port.
  2. Go to Phoscon app and in advanced menu allow the 3rd part app…
  3. The apy key will be written automatically in the OH (in the deConz setup).
  4. If deConz bridge is online you will see in the inbox all tools (sensor, lights, switches) which you have already added to Phoscon app before.

In my case I run both Openhab and Deconz in two seperate containers, and I end up solving it with this setting:
Deconz container> bridge host port 8083 (or whichever port suitabale) to container port 80
In Openhab container> specifying the Deconz thing configuration to use 172.17.0.1(host):8083 to connect to deconz, then it works.
I guess what happened before was that docker container network gave a different dynamic fictional IP each time and when I restart containers, it broke the thing setting.