Nanoleaf Shapes Triangle - Touch-Support does not work

Hello everbody,

I have implemented my Nanoleaf Shapes (Triangles NL47) in OpenHAB.
Everything works fine, but the TouchSupport.

The SHORT_PRESS or other Events are not triggered to OpenHAB.
If I set the log-level to TRACE, I see the following Log-Entry:

15:00:49.270 [DEBUG] [nal.handler.NanoleafControllerHandler] - NOT starting TouchJob for Controller nanoleaf:controller:xxxxxxxxx because it has wrong device type ‘lightPanels’ vs required ‘canvas’

In the read.me of the Binding, the NL47 (Shapes) are listed to support Touch.

Can someone help me to find the problem ?

Thank You!
Ralph

Yep, sometimes the Controller doesn’t correctly detect that the device is actually touch enabled.

Can you check the setting in the controller?

I would bet it is set to Light Panels. Manually set it to Canvas / Shapes and it should work.

Hope that helps
Stefan

Thank you…I have defined the controller-thing via textual config.
how I can set this setting via text ?

EDIT:
I have found it myself!

See Nanoleaf - Bindings | openHAB

I have never tried that out myself but the parameter is called deviceType and the values are lightPanels or canvas.

So I would try deviceType=“canvas” by adding it to the other params

Bridge nanoleaf:controller:MyLightPanels @ "mylocation" [ address="192.168.1.100", port=16021, authToken="AbcDefGhiJk879LmNopqRstUv1234WxyZ", refreshInterval=60, deviceType="canvas"] {
    Thing lightpanel 135 [ id=135 ]
    Thing lightpanel 158 [ id=158 ]
}

So can you confirm what I wrote above?

Out of curiosity as I am thinking about that topics regarding other devices I am working on (not Nanoleaf): How do you find out all the parameters that were needed in the first please to create the thing without scanning (like the ip address and the auth token)? Being the developer of the binding myself I know that you can send http request to the devices but is that really what you did to find out?

The parameter deviceType=“canvas” is correct.

but it still doesn’t work

I have created a rule like this:

rule "Nanoleaf Panel 1 Pressed"
when 
	Channel "nanoleaf:lightpanel:7cf782e8e4:38994:tap" triggered SHORT_PRESS
then
    logInfo("SESTER", "----------------------TRIGGER-----------------")
    if (DS_Partyraum_Raumlicht.state > 0) {
        DS_Partyraum_Raumlicht.sendCommand(0)
    } else {
        DS_Partyraum_Raumlicht.sendCommand(100)
    }
end

But I happens nothing.

In the log I cannot see, that the touch-trigger was fired.

In the log I see only the following entry every second:

18:10:34.232 [TRACE] [nal.handler.NanoleafControllerHandler] - tj: touch job java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@6d841c5a[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@73f9ae5d[Wrapped task = org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler$$Lambda$2616/0x000001f0d6373948@313bf009]] touch job already running. quitting. -1 controller nanoleaf:controller:7cf782e8e4 with null",

What is wrong now ?

I have stopped using the file way a long time ago. Can you please try to do it this way first?

and put just a log statement in the “execute inline script” for testing.

Can you check if you see something like

Starting TouchJob for Controller

tj: triggering new touch job request

touch detected for controller

in the logs?

if you are on trace you should see a number of “tj:” entries

Can you stop and then start the controller again and see if it appears?

With the test-rule create like your template it does not work too…

now i will check the logs…one moment…

I am maximum confused…after a restart of my complete server now it works.
I saw, that the GUI-Rule works, but my rule does not work.

Now I can see the problem:

In the ReadMe of the binding, there is an error in the rule sample.

In the sample, the triggered event is called SHORT_PRESS
but the correct syntax must be SHORT_PRESSED

same with DOUBLE_PRESS and DOUBLE_PRESSED

this was my original problem, but it clustered the scenario…

I dont know, why my system had struggle before (perhaps because changing deviceType)

I will add some rule tomorrow and will test in the long way :wink:

Thank you very much for your help!!!

Ralph

by the way - is it normal, that my system detects every few seconds the controller again and do some double entries:

18:51:53.729 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf controller Shapes 6297._nanoleafapi._tcp.local. with FW version 9.3.2 found at [fe80:0:0:0:828a:f7ff:fe04:6297]:16021 to inbox
18:51:53.729 [DEBUG] [inding.nanoleaf.internal.OpenAPIUtils] - firmwareVersion: 9.3.2
18:51:53.729 [DEBUG] [inding.nanoleaf.internal.OpenAPIUtils] - firmwareVersion: 1.1.0
18:51:53.729 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL42
18:51:53.757 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL42
18:51:53.757 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Device found: Shapes 6297._nanoleafapi._tcp.local.
18:51:53.758 [TRACE] [very.NanoleafMDNSDiscoveryParticipant] - Discovered nanoleaf host: 192.168.0.56 port: 16021 firmWare: 9.3.2 modelId: NL42 qualifiedName: Shapes 6297._nanoleafapi._tcp.local.
18:51:53.758 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf controller Shapes 6297._nanoleafapi._tcp.local. with FW version 9.3.2 found at 192.168.0.56:16021 to inbox

Why is the firmware 9.3.2 and 1.1.0 ?

I see, that my controller is bouncing between the IPv4 and the IPv6 adress…could it bee that the binding see the controller doubled ?

yes, it is, sigh:

Thank you.

I have now disabled IPv6 in my OpenHAB.

The bouncing is gone now, but the binding still discovers a new controller every refresh-cycle and it detects two different firmwares…

09:49:40.052 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL42
09:49:40.052 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Device found: Shapes 6297._nanoleafapi._tcp.local.
09:49:40.052 [TRACE] [very.NanoleafMDNSDiscoveryParticipant] - Discovered nanoleaf host: 192.168.0.56 port: 16021 firmWare: 9.3.2 modelId: NL42 qualifiedName: Shapes 6297._nanoleafapi._tcp.local.
09:49:40.053 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf controller Shapes 6297._nanoleafapi._tcp.local. with FW version 9.3.2 found at 192.168.0.56:16021 to inbox
09:49:40.053 [DEBUG] [inding.nanoleaf.internal.OpenAPIUtils] - firmwareVersion: 9.3.2
09:49:40.053 [DEBUG] [inding.nanoleaf.internal.OpenAPIUtils] - firmwareVersion: 1.1.0
09:49:40.053 [DEBUG] [very.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL42
09:49:40

the second probem is, that the color-information of my lightpanels are bouncing between black (0,0,0) and the showing color…every refreshcycle…I think this should not be correct…

09:52:15.155 [DEBUG] [inding.nanoleaf.internal.OpenAPIUtils] - API response code: 200
09:52:15.156 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 9739
09:52:15.156 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.157 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 30134
09:52:15.157 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.158 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.158 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 9928
09:52:15.159 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.159 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 5627
09:52:15.160 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.160 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 19394
09:52:15.160 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.160 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 1650
09:52:15.160 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.160 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 56679
09:52:15.160 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.161 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 52133
09:52:15.161 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.161 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 31291
09:52:15.161 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.161 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 1359
09:52:15.161 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.161 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 13361
09:52:15.161 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.161 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 37424
09:52:15.162 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.162 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 46993
09:52:15.162 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.162 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 3685
09:52:15.162 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.162 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 0,0,0 for panel 38994
09:52:15.162 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: false
09:52:15.162 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: true
09:52:15.162 [DEBUG] [f.internal.colors.NanoleafPanelColors] - Setting all panels to color 26,35,0
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 38994
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 30134
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 56679
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 13361
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 37424
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 19394
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 9928
09:52:15.163 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 1359
09:52:15.164 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 31291
09:52:15.164 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 9739
09:52:15.164 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 46993
09:52:15.164 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 3685
09:52:15.164 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 1650
09:52:15.164 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 52133
09:52:15.164 [TRACE] [internal.handler.NanoleafPanelHandler] - updatePanelColorChannel: panelColor: 26,35,0 for panel 5627
09:52:15.164 [TRACE] [nal.handler.NanoleafControllerHandler] - Not updating colors. Update visual layout: true

Do you have some ideas ?

Ralph

The different versions are strange and I currently don’t have an idea here

The bouncing of the different colors is on the individual panels. Look closely to the color and the panel is. It seems that one of the panels is black and the other has a different color. There is no one color for the whole device only in case you setup to a static effect and then send one color to the the item that is linked to the color channel of the controller. This makes all individual panels receive the same color statically.

No, the have all the same color.

Bouncing does not stop no matter what color is set.
Even if all colors are the same and even if all panels are turned off…

In my opinion, there is either an error in the Nanoleaf firmware or in the binding…that can’t be right.

Furthermore, I noticed that the binding for the 15 panels that I have still finds a panel with ID 0. However, in my opinion this has no function. What is that ?

Good news…

Today Nanoleaf Firmware 9.3.3 was released.
After I updated my shapes from 9.3.2. the discovery bouncing hat stopped and the wrong firmware 1.1.0 was not detected anymore…so it seems there were problems from the firmware.

The bouncing colors are only produced, when the shapes are in “solid” mode…when i choose a musc effect or an other dynamic ambiente effect, then there is no color bouncing.

1 Like

Great news. Thanks for sharing!