Deconz thing: OFFLINE - COMMUNICATION_ERROR

Hi all,

I cannot make the deconz binding/thing working. Sorry, I already read a lot of postings and descriptions. None is working.

What I did:
I opened the phoscon gateway for 3rd party apps.
I update/save the thing file (content: “Bridge deconz:deconz:homeserver [ host=“194.168.178.64” ]”)

Then the log says the following (see below). It seems, as if I don’t get an api key.

Thanks for any help.
Best regards
Christian

2020-01-27 01:17:19.615 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘deconz.things’

==> /var/log/openhab2/events.log <==

2020-01-27 01:17:19.635 [hingStatusInfoChangedEvent] - ‘deconz:deconz:homeserver’ changed from OFFLINE (COMMUNICATION_ERROR): java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed to OFFLINE (CONFIGURATION_PENDING): Requesting API Key

2020-01-27 01:17:19.637 [me.event.ThingUpdatedEvent] - Thing ‘deconz:deconz:homeserver’ has been updated.

2020-01-27 01:17:21.636 [hingStatusInfoChangedEvent] - ‘deconz:deconz:homeserver’ changed from OFFLINE (CONFIGURATION_PENDING): Requesting API Key to OFFLINE (COMMUNICATION_ERROR): java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed

==> /var/log/openhab2/openhab.log <==

2020-01-27 01:17:21.635 [WARN ] [internal.handler.DeconzBridgeHandler] - Authorisation failed

java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed

at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292) ~[?:1.8.0_222]

at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308) ~[?:1.8.0_222]

at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:647) ~[?:1.8.0_222]

at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632) ~[?:1.8.0_222]

at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) [?:1.8.0_222]

at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) [?:1.8.0_222]

at org.openhab.binding.deconz.internal.netutils.AsyncHttpClient$1.onComplete(AsyncHttpClient.java:109) [bundleFile:?]

at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:198) [bundleFile:9.4.20.v20190813]

at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:190) [bundleFile:9.4.20.v20190813]

at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:269) [bundleFile:9.4.20.v20190813]

at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240) [bundleFile:9.4.20.v20190813]

at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:149) [bundleFile:9.4.20.v20190813]

at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:768) [bundleFile:9.4.20.v20190813]

at org.eclipse.jetty.client.HttpDestination$TimeoutTask.onTimeoutExpired(HttpDestination.java:529) [bundleFile:9.4.20.v20190813]

at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:282) [bundleFile:9.4.20.v20190813]

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

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_222]

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

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

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

Caused by: java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed

... 9 more

2020-01-27 01:17:57.372 [INFO ] [st.core.internal.thing.ThingResource] - Received HTTP PUT request for update configuration at ‘things/deconz:deconz:homeserver/config’ for an unmanaged thing ‘deconz:deconz:homeserver’.

1 Like

The logs tell you there is no API key and per the doc’s:

The API key is an optional value. If a deCONZ API key is available because it has already been created manually, it can also be entered as a configuration value. Otherwise the field can be left empty and the binding will generate the key automatically. For this process the deCONZ bridge must be unlocked in the deCONZ software so that third party applications can register (see deCONZ documentation).

#

Have you unlocked the bridge as described?

Thanks for your help.

Yes, I did open the bridge.

I’ve got some additional information.

When I update the thing (bridge being open) I get a small popup that says “ERROR 409 Conflict”. The status of the thing is “OFFLINE - COMMUNICATION_ERROR java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed”.

Thanks in advance.

This generally means that you have defined the thing in a text file and not through the UI and it must, therefore, be edited in the text file, and not the UI. Have you made a change in both locations? If so you may want to delete the Thing, stop OH and clean the cache. After OH has fully restarted (takes a few minutes after cache clean) then recreate the Thing.

1 Like

Thanks, I will give it a try.

OK, I tried that, without success.

What I did:
I deleted the thing file in the thing folder
I tried to delete the thing in PaperUI, but it did not work (ERROR 409 Conflict).
Stop OpenHAB, cleaning cache.
Restart OpenHAB
The thing disappeared.
I recreated the thing via file in things folder while Phoscon Gateway “unlocked” (“Connect 3rd Party Apps…”).
Still Status: “OFFLINE - COMMUNICATION_ERROR java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed”

Any more hints/tipps? Thanks in advance.

Nothing in the logs about the API Key this time? If not, try rebooting OH once or twice as this has worked in a few other issues I’ve read about.

If rebooting does not help you may want to open an issue or read thru other issues on github at link below.

Indeed, there are entries about the API Key in the log:

2020-02-01 00:19:31.356 [hingStatusInfoChangedEvent] - ‘deconz:deconz:homeserver’ changed from UNINITIALIZED to INITIALIZING
2020-02-01 00:19:31.367 [hingStatusInfoChangedEvent] - ‘deconz:deconz:homeserver’ changed from INITIALIZING to OFFLINE (CONFIGURATION_PENDING): Requesting API Key
2020-02-01 00:19:33.381 [hingStatusInfoChangedEvent] - ‘deconz:deconz:homeserver’ changed from OFFLINE (CONFIGURATION_PENDING): Requesting API Key to OFFLINE (COMMUNICATION_ERROR): java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed

The requesting of the API key results in timeout.

When I do a dummy update in the thing file and save, the log says this:
2020-02-02 21:27:23.420 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘deconz.things’

2020-02-02 21:27:37.928 [INFO ] [st.core.internal.thing.ThingResource] - Received HTTP PUT request for update configuration at ‘things/deconz:deconz:homeserver/config’ for an unmanaged thing ‘deconz:deconz:homeserver’.

Still, when I open the thing in PaperUI and leave, then the “ERROR 409 Conflict” is shown.

Anyone any more ideas? If not then I will follow the advice of H102 and maybe I open a issue on github.

Thanks everyone.

I forgot to mention: I rebooted twice, without success.

When you make or add something to the Thing in PaperUI did you click save afterwards? If so try it again but hit ENTER on your keyboard first then click save.

It did not work. Thanks a lot for your help anyway.

But I fortunately solved it myself:
I followed this deCONZ documentation (https://www.openhab.org/addons/bindings/deconz/). I may have missunderstood, that the thing has to be configured via text file in things folder. So the cause for the “ERROR 409 conflict” was indeed, that there was a thing file and a thing in PaperUI.

I solved it like this:

  • Deleted the thing file.
  • Restart openHAB
  • Thing disappeared.
  • Unlock Phoscon Gateway (connect 3rd Party Apps).
  • Add thing manually via PaperUI (entered IP-Adresse, Save).

Thats it. API-Key was received, Thing is green and online.

Sorry for the confusion.

2 Likes

Thanks a lot, this helped me very much!