Alright, I tested the snapshot binding that you sent. Removed the thing, stopped OH service, copied the jar and started OH again. Waited a bit and then added the thing again.
At first there was quite some action:
2021-03-22 22:07:22.044 [WARN ] [nding.nanoleaf.internal.OpenAPIUtils] - OpenAPI request failed with timeout
java.util.concurrent.TimeoutException: Total timeout 10000 ms elapsed
at org.eclipse.jetty.client.HttpDestination$TimeoutTask.onTimeoutExpired(HttpDestination.java:529) ~[?:?]
at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:282) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
2021-03-22 22:07:22.050 [WARN ] [nding.nanoleaf.internal.OpenAPIUtils] - restarting httpClient
==> /var/log/openhab/events.log <==
2021-03-22 22:07:23.826 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'wled:wled:8fa7313c45' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): ExecutionException: java.util.concurrent.RejectedExecutionException: HttpClient@1f597c3{STOPPING} is stopped
2021-03-22 22:07:24.058 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'wled:wled:ecfabc5f1455' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): ExecutionException: java.util.concurrent.RejectedExecutionException: HttpClient@1f597c3{STOPPING} is stopped
==> /var/log/openhab/openhab.log <==
2021-03-22 22:07:52.066 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[OH-httpClient-common]@9fb5c9{STOPPING,10<=0<=40,i=8,r=-1,q=0}[NO_TRY] Couldn't stop Thread[OH-httpClient-common-136,5,main]
2021-03-22 22:07:52.069 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[OH-httpClient-common]@9fb5c9{STOPPING,10<=0<=40,i=8,r=-1,q=0}[NO_TRY] Couldn't stop Thread[OH-httpClient-common-137,5,main]
2021-03-22 22:07:52.101 [WARN ] [nding.nanoleaf.internal.OpenAPIUtils] - OpenAPI request failed. Couldn't restart httpClient:
org.openhab.binding.nanoleaf.internal.NanoleafException: Failed to send OpenAPI request: Timeout. Restarted httpclient
at org.openhab.binding.nanoleaf.internal.OpenAPIUtils.restartHttpClient(OpenAPIUtils.java:149) [bundleFile:?]
at org.openhab.binding.nanoleaf.internal.OpenAPIUtils.sendOpenAPIRequest(OpenAPIUtils.java:134) [bundleFile:?]
at org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler.receiveControllerInfo(NanoleafControllerHandler.java:628) [bundleFile:?]
at org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler.updateFromControllerInfo(NanoleafControllerHandler.java:542) [bundleFile:?]
at org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler.runUpdate(NanoleafControllerHandler.java:360) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.util.concurrent.TimeoutException: Total timeout 10000 ms elapsed
at org.eclipse.jetty.client.HttpDestination$TimeoutTask.onTimeoutExpired(HttpDestination.java:529) ~[?:?]
at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:282) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
... 3 more
2021-03-22 22:07:52.105 [WARN ] [al.handler.NanoleafControllerHandler] - Status update failed for controller nanoleaf:controller:5B4338595BC9 : Failed to send OpenAPI request: Timeout
==> /var/log/openhab/events.log <==
2021-03-22 22:07:52.107 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:controller:5B4338595BC9' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen.
2021-03-22 22:07:53.900 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'wled:wled:8fa7313c45' changed from OFFLINE (COMMUNICATION_ERROR): ExecutionException: java.util.concurrent.RejectedExecutionException: HttpClient@1f597c3{STOPPING} is stopped to ONLINE
2021-03-22 22:07:54.148 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'wled:wled:ecfabc5f1455' changed from OFFLINE (COMMUNICATION_ERROR): ExecutionException: java.util.concurrent.RejectedExecutionException: HttpClient@1f597c3{STOPPING} is stopped to ONLINE
2021-03-22 22:08:52.520 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:controller:5B4338595BC9' changed from OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen. to ONLINE
Note how it also killed the WLED binding.
However, after that massacre, no further error messages in that regard.
Then I wanted to try to add an individual panel again.
Wanted to choose which one, but
openhab> openhab:nanoleaf layout nanoleaf:controller:5B4338595BC9
35050
only gave me this one ID back (there should be 9 panels)
I started a scan from the inbox and chose the one that was listed there, and another random one (25198). Create an item for the color channel and add it to the model.
Now, first weird thing … although in the ui, it’s configured like the controller color channel, in the model, it doesn’t have the color selector widget per default? I added it through meta data and then it works … at least in the ui. When choosing a color, this happens:
2021-03-22 22:20:20.362 [INFO ] [al.handler.NanoleafControllerHandler] - Received command 140,100,58 for channel nanoleaf:controller:5B4338595BC9:color
==> /var/log/openhab/events.log <==
2021-03-22 22:20:22.315 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Hexagon_Farbe' received command 140,100,56
2021-03-22 22:20:22.317 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Hexagon_Farbe' predicted to become 140,100,56
2021-03-22 22:20:22.324 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Hexagon_Farbe' changed from 140,100,58 to 140,100,56
==> /var/log/openhab/openhab.log <==
2021-03-22 22:20:22.328 [INFO ] [al.handler.NanoleafControllerHandler] - Received command 140,100,56 for channel nanoleaf:controller:5B4338595BC9:color
==> /var/log/openhab/events.log <==
2021-03-22 22:20:22.526 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Hexagon_Farbe' received command 140,100,39
2021-03-22 22:20:22.529 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Hexagon_Farbe' predicted to become 140,100,39
2021-03-22 22:20:22.537 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Hexagon_Farbe' changed from 140,100,56 to 140,100,39
2021-03-22 22:20:24.679 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:topic:dc7c69f665:0f55b4fd9c' changed from OFFLINE to ONLINE
2021-03-22 22:20:27.684 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'LightPanel25198_Farbe' received command 68,100,100
2021-03-22 22:20:27.686 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'LightPanel25198_Farbe' predicted to become 68,100,100
2021-03-22 22:20:27.689 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LightPanel25198_Farbe' changed from 66,100,100 to 68,100,100
2021-03-22 22:20:28.110 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'LightPanel25198_Farbe' received command 76,100,100
2021-03-22 22:20:28.112 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'LightPanel25198_Farbe' predicted to become 76,100,100
2021-03-22 22:20:28.118 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LightPanel25198_Farbe' changed from 68,100,100 to 76,100,100
2021-03-22 22:20:28.904 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'LightPanel25198_Farbe' received command 165,100,100
2021-03-22 22:20:28.907 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'LightPanel25198_Farbe' predicted to become 165,100,100
2021-03-22 22:20:28.914 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LightPanel25198_Farbe' changed from 76,100,100 to 165,100,100
==> /var/log/openhab/openhab.log <==
2021-03-22 22:20:29.372 [INFO ] [nternal.handler.NanoleafPanelHandler] - sending effect command from panel nanoleaf:lightpanel:5B4338595BC9:25198: {"write":{"command":"display","animType":"static","animName":"","palette":[],"colorType":"","animData":"1 25198 1 221 255 0 0 10","loop":false}}
2021-03-22 22:20:29.397 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 68,100,100 for channelUID nanoleaf:lightpanel:5B4338595BC9:25198:color failed: Nanoleaf did not expect this request. HTTP response code 400
==> /var/log/openhab/events.log <==
2021-03-22 22:20:29.412 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:lightpanel:5B4338595BC9:25198' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen.
==> /var/log/openhab/openhab.log <==
2021-03-22 22:20:29.421 [INFO ] [nternal.handler.NanoleafPanelHandler] - sending effect command from panel nanoleaf:lightpanel:5B4338595BC9:25198: {"write":{"command":"display","animType":"static","animName":"","palette":[],"colorType":"","animData":"1 25198 1 186 255 0 0 10","loop":false}}
==> /var/log/openhab/events.log <==
2021-03-22 22:20:29.424 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:lightpanel:5B4338595BC9:25198' changed from OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen. to ONLINE
==> /var/log/openhab/openhab.log <==
2021-03-22 22:20:29.429 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 76,100,100 for channelUID nanoleaf:lightpanel:5B4338595BC9:25198:color failed: Nanoleaf did not expect this request. HTTP response code 400
==> /var/log/openhab/events.log <==
2021-03-22 22:20:29.432 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:lightpanel:5B4338595BC9:25198' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen.
==> /var/log/openhab/openhab.log <==
2021-03-22 22:20:29.453 [INFO ] [nternal.handler.NanoleafPanelHandler] - sending effect command from panel nanoleaf:lightpanel:5B4338595BC9:25198: {"write":{"command":"display","animType":"static","animName":"","palette":[],"colorType":"","animData":"1 25198 1 0 255 191 0 10","loop":false}}
==> /var/log/openhab/events.log <==
2021-03-22 22:20:29.457 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:lightpanel:5B4338595BC9:25198' changed from OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen. to ONLINE
==> /var/log/openhab/openhab.log <==
2021-03-22 22:20:29.460 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 165,100,100 for channelUID nanoleaf:lightpanel:5B4338595BC9:25198:color failed: Nanoleaf did not expect this request. HTTP response code 400
==> /var/log/openhab/events.log <==
2021-03-22 22:20:29.463 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:lightpanel:5B4338595BC9:25198' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen.
2021-03-22 22:20:53.020 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'nanoleaf:lightpanel:5B4338595BC9:25198' changed from OFFLINE (COMMUNICATION_ERROR): Kommunikationsfehler. Konfiguration des Controllers prüfen. to ONLINE
Maybe the api call needs to be different for the shapes panels?
During startup I saw this:
openhab.log:2021-03-22 22:01:08.505 [INFO ] [al.handler.NanoleafControllerHandle
r] - --------------------------- touch job registering on: http://192.168.178.24
:16021/api/v1/246FT0Xs9QUOof6orghXMqjM5WRdghwb/events?id=4
So I thought, touch should work and I created a rule for both panels to test it:
triggers:
- id: "1"
configuration:
thingUID: nanoleaf:lightpanel:5B4338595BC9:35050
channelUID: nanoleaf:lightpanel:5B4338595BC9:35050:tap
event: DOUBLE_PRESSED
type: core.ChannelEventTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
type: application/vnd.openhab.dsl.rule
script: logInfo("nanoleaf", "u touched me")
type: script.ScriptAction
But … nothing. I had my buddy open up the nanoleaf app to see the settings there. he had “gestures” disabled, as the old firmware was detecting “ghost” gestures. but usual tap events were activated all the time. we also enabled gestures for testing purposes, but no difference.
there is a menu where you can set up home kit actions for certain panels, we activated them for all the panels, but didn’t bind a double tap action. didn’t change anything though :-/
But the good thing, after the initial error messages regarding the http threads, I didn’t see any further errors in that regard in the log. Not sure what is going on at startup, but afterwards it seems fine?