Nanoleaf Binding OH3 - Stabilization Update

You need to be more specific. Which one of the Nanoleaf models are you using?

Thanks, Ole, for bouncing that up again. My Nanoleaf Canvas says 42V DC with 0.57A on the back of the controller. So you may just look at the back of your controller to find out.

Yes, but the Auroras have at least a different physical panel connector. Unsure of electrical specs as I only have the Canvas. :slight_smile:

@stefan.hoehn I came here today because my touch gestures are not coming through anymore.
Unsure of exactly when it happened. Could have been when I upgraded to 3.3.0 Release:

openhab> |list | grep -i nano
258 │ Active │  80 │ 3.3.0                  │ openHAB Add-ons :: Bundles :: Nanoleaf Binding

Firing up my old pre-binding python script shows the event is registered through REST API:

2022-08-06 17:11:03,160 Listening...
2022-08-06 17:11:16,788 {"events":[{"panelId":42633,"gesture":0}]}

Nothing heard from rule: (used to work)

rule Tile42633
when         
    Channel "nanoleaf:lightpanel:741ADCF0C4B8:42633:tap" triggered SHORT_PRESS
then
    logInfo("canvasPanelTap", "42633")
    SqueezeboxBoomArbeidsbenk_Volume.sendCommand(30)
end

Any ideas? A TRACE log perhaps?
Have tried rebooting Canvas and restarting OH …
ON/OFF control from OH works fine.

I quickly tried it out with one of my old CANVAS Squares with Block. This is what my trigger looks like

and the rule triggers.

Make sure you create the trigger on the individual panel thing.
The thing is created as such:

Hope that helps
Stefan

Hmm. TRACE log shows touch is registered, but DSL rule does not trigger …

2022-08-06 22:06:40.822 [DEBUG] [al.handler.NanoleafControllerHandler] - touch detected for controller nanoleaf:controller:741ADCF0C4B8
2022-08-06 22:06:40.823 [TRACE] [al.handler.NanoleafControllerHandler] - content id: 4
data: {"events":[{"panelId":42633,"gesture":0}]}


2022-08-06 22:06:40.823 [DEBUG] [al.handler.NanoleafControllerHandler] - panel: 42633 gesture id: 0
2022-08-06 22:06:40.824 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -43566- versus event panel -42633-
2022-08-06 22:06:40.825 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -17053- versus event panel -42633-
2022-08-06 22:06:40.825 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -25091- versus event panel -42633-
2022-08-06 22:06:40.826 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -46141- versus event panel -42633-
2022-08-06 22:06:40.826 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -57575- versus event panel -42633-
2022-08-06 22:06:40.826 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -32679- versus event panel -42633-
2022-08-06 22:06:40.827 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -30347- versus event panel -42633-
2022-08-06 22:06:40.827 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -10785- versus event panel -42633-
2022-08-06 22:06:40.828 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -35565- versus event panel -42633-
2022-08-06 22:06:40.828 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -47484- versus event panel -42633-
2022-08-06 22:06:40.828 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -43000- versus event panel -42633-
2022-08-06 22:06:40.829 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -21486- versus event panel -42633-
2022-08-06 22:06:40.829 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -42995- versus event panel -42633-
2022-08-06 22:06:40.829 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -61260- versus event panel -42633-
2022-08-06 22:06:40.830 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -23501- versus event panel -42633-
2022-08-06 22:06:40.830 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -42426- versus event panel -42633-
2022-08-06 22:06:40.830 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -53974- versus event panel -42633-
2022-08-06 22:06:40.831 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -35688- versus event panel -42633-
2022-08-06 22:06:40.831 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -13670- versus event panel -42633-
2022-08-06 22:06:40.831 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -9251- versus event panel -42633-
2022-08-06 22:06:40.831 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -62838- versus event panel -42633-
2022-08-06 22:06:40.832 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -54720- versus event panel -42633-
2022-08-06 22:06:40.832 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -31158- versus event panel -42633-
2022-08-06 22:06:40.832 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -43093- versus event panel -42633-
2022-08-06 22:06:40.832 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -17238- versus event panel -42633-
2022-08-06 22:06:40.832 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -58857- versus event panel -42633-
2022-08-06 22:06:40.832 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -49508- versus event panel -42633-
2022-08-06 22:06:40.832 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -45041- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -41739- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -58698- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -10787- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -21504- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -7856- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -6575- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -41929- versus event panel -42633-
2022-08-06 22:06:40.833 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -40220- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -11875- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -14699- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -56142- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -40625- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -9276- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -4240- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -38037- versus event panel -42633-
2022-08-06 22:06:40.834 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -54642- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -4147- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -6833- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -42490- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -41961- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -60924- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -16813- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -26663- versus event panel -42633-
2022-08-06 22:06:40.835 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -31345- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -54375- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -36187- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -26950- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -37066- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -3654- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -7864- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -15692- versus event panel -42633-
2022-08-06 22:06:40.836 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -1084- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -2881- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -40473- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -55338- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -64602- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -31676- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -40943- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -9959- versus event panel -42633-
2022-08-06 22:06:40.837 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -40192- versus event panel -42633-
2022-08-06 22:06:40.838 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -62884- versus event panel -42633-
2022-08-06 22:06:40.838 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -15141- versus event panel -42633-
2022-08-06 22:06:40.838 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -22092- versus event panel -42633-
2022-08-06 22:06:40.838 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -20017- versus event panel -42633-
2022-08-06 22:06:40.838 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -38949- versus event panel -42633-
2022-08-06 22:06:40.838 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -62611- versus event panel -42633-
2022-08-06 22:06:40.838 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -40391- versus event panel -42633-
2022-08-06 22:06:40.839 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -58786- versus event panel -42633-
2022-08-06 22:06:40.839 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -19268- versus event panel -42633-
2022-08-06 22:06:40.839 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -52542- versus event panel -42633-
2022-08-06 22:06:40.839 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -31010- versus event panel -42633-
2022-08-06 22:06:40.839 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -45556- versus event panel -42633-
2022-08-06 22:06:40.839 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -23072- versus event panel -42633-
2022-08-06 22:06:40.839 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -57126- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -47347- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -34500- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -15535- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -42505- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -63234- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -26217- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -18766- versus event panel -42633-
2022-08-06 22:06:40.840 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -41120- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -46502- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -55692- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -39617- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -11882- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -28885- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -46666- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -36112- versus event panel -42633-
2022-08-06 22:06:40.841 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -62503- versus event panel -42633-
2022-08-06 22:06:40.842 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -12437- versus event panel -42633-
2022-08-06 22:06:40.842 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -42794- versus event panel -42633-
2022-08-06 22:06:40.842 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -37716- versus event panel -42633-
2022-08-06 22:06:40.842 [TRACE] [al.handler.NanoleafControllerHandler] - Checking available panel -42633- versus event panel -42633-
2022-08-06 22:06:40.842 [DEBUG] [al.handler.NanoleafControllerHandler] - Panel 42633 found. Triggering item with gesture 0.
2022-08-06 22:06:40.842 [DEBUG] [al.handler.NanoleafControllerHandler] - leaving touch onContent
2022-08-06 22:06:41.798 [TRACE] [al.handler.NanoleafControllerHandler] - tj: touch job java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@56abfa6[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@6618aa6d[Wrapped task = org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler$$Lambda$1285/0x00000001010f9c40@2beab27]] touch job already running. quitting. 678279411 controller nanoleaf:controller:741ADCF0C4B8 with HttpClient@286db8f3{STARTED}",

Could be an OH thing then perhaps?

Last known log entry of it working was in June, but I don’t press it that often :slight_smile:

/var/log/openhab/openhab.log.16.gz:2022-06-09 07:30:59.597 [INFO ] 
[hab.core.model.script.canvasPanelTap] - 42633

Can you try with a blockly rule like I did?
Which was the last version of OH when it worked?

This JSScript works:


But the DSL rule that used to work a few releases back no longer work:

rule Tile42633
when         
    Channel "nanoleaf:lightpanel:741ADCF0C4B8:42633:tap" triggered SHORT_PRESS
then
    logInfo("canvasPanelTap", "42633")
    SqueezeboxBoomArbeidsbenk_Volume.sendCommand(30)
end

It seems to me then that something may have changed on the Rules DSL side that I am not aware of as I am not so much into rules dsl anymore. Maybe you open a new thread were title states that you have a rules dsl channel trigger issue and someone who is very skilled on that will most likely pick that up. I have to admit that your way is the way how it is documented in the binding documentation and therefore I am sure and confirm it has worked like that before.

for the time being, I’ll ping @rlkoshak who usually has a good idea what the underlying issue might be… Rich, do you mind having a look at that?

Nothing has changed in Rules DSL. If anything changed I’d guess it’s something in the binding or something in core.

However, one difference between the UI based rule and the Rules DSL rule is the UI rule triggers on all events and the Rules DSL only triggers on SHORT_PRESS. Are you certain the binding still reports the event SHORT_PRESS?

You should see the SHORT_PRESS event (or what ever event is being sent) in events.log.

Thanks.
I have never looked into any binding code, but I take it emitting a trigger signal is common regardless of rule language?
If so, it looks like something broke in the rule engine perhaps?
I can raise a GitHub Issue, but under what heading? Core perhaps?

I added SHORT_PRESS after DSL triggering failed.
This don’t work either:

rule Tile42633
when         
    Channel "nanoleaf:lightpanel:741ADCF0C4B8:42633:tap" triggered
then
    logInfo("canvasPanelTap", "42633")
    SqueezeboxBoomArbeidsbenk_Volume.sendCommand(30)
end

All I can say is there is nothing wrong with that rule as written, assuming that the Channel ID is correct (which appears to be) and that volume Item exists. The problem isn’t with the rule. I don’t use this binding so I can’t offer anything beyond to once again look at events.log to verify that the events are occurring as you expect and make sure you’ve not set your logging to WARN or ERROR level which would suppress your logInfo log statement.

If you look in the traces above the binding in fact detects the gesture 0 on that item.

NanoleafControllerHandler.runTouchDetection

logger.debug("Panel {} found. Triggering item with gesture {}.", panelHandler.getPanelID(),
                                event.getGesture());
panelHandler.updatePanelGesture(event.getGesture());

which then calls

NanoleafPanelHandler.

    public void updatePanelGesture(int gesture) {
        switch (gesture) {
            case 0:
                triggerChannel(CHANNEL_PANEL_TAP, CommonTriggerEvents.SHORT_PRESSED);
                break;
            case 1:
                triggerChannel(CHANNEL_PANEL_TAP, CommonTriggerEvents.DOUBLE_PRESSED);
                break;
        }
    }

which then calls

BaseThingHandler:

protected void triggerChannel(String channelID, String event) {
        this.triggerChannel(new ChannelUID(this.getThing().getUID(), channelID), event);
    }

but I don’t see what could be wrong here:

I checked who contributed to that BaseThingHandler-code a lot: @wborn, do you have an idea what could be the problem here?
Or @Kai because you introduced the channel trigger in March 21 in my NanoleafPanelHandler-code?

TIA
Stefan

That’s a great help Stephan, thank you for the info.
Adam