[nanoleaf] Nanoleaf Aurora binding (just started development, collecting requirements)

  • Yes, that’s the link and the readme.
  • From an implementation perspective in terms of discovery, nothing really has changed.
  • However I wrote a lot around how you should do the discovery. Please follow exactly the way it is described here.

And no, you should not checkout the new branch (nor any new artifact) there as it is still under development and review - I only provided it as a reference to the Readme.

Discovery works well for both panel types with the official latest version as it has been tested by Martin and me. So if you encounter any issues, please explain in details how you did the discovery (please use autodiscovery) and the log files.

  • Did you pair the controller?
  • Do the logs say that pairing went well?
  • Is the controller online?
  • Can you power on / off the whole nanoleaf via OH with the controller items?
  • Did you run a second discovery?

cheers
Stefan

i cant find the nanoleaf binding !?
( openhabian 2.4 )

You mean in general or the one who supports the canvas touch support? The touch support version is still under review (@mraepple and I are currently finalizing it).

Cheers
Stefan

yes, the general one, for the triangles. no touch
cant find it in PaperUI > Addons > Bindings

If you look at the post above at Jan 11 @mraepple announced it to be on 2.5. So unfortunately you need upgrade to 2.5 to have it.

Stefan

thank you, danke stefan. I’ll wait for the stable version :wink:

If you don’t require touch support the current version is stable. I have been using it myself for many weeks before I started contributing to it to allow touch support. Even though it wasn’t designed specifically for the nanoleaf canvas, it works pretty well as there no specifics that wouldn’t let it run smoothly.

Hi Stefan,

sorry it took me some time to get back to it. So here’s what I did today.

I removed the old nanoleaf thing. Then I noticed there were still some items left. I couldn’t remove them from paper UI. So I tried from habmin:

2019-12-03 21:53:23.795 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP DELETE request at 'items/AuroraWohnzimmer_Brightness' for the unknown item 'AuroraWohnzimmer_Brightness'.

Weird … but I’d guess it’s not a problem. So I restarted the openhab service to get a clean start. The apprently “unknown item” was still present after the restart.

So here the log after the restart and accepting the Nanoleaf Controller from the Inbox with the default name.

2019-12-03 21:58:01.206 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf found: 192.168.0.40 16021
2019-12-03 21:58:01.209 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf light panels to inbox: 62D0E39E8239 at 192.168.0.40
2019-12-03 21:58:01.211 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-12-03 21:58:02.694 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-12-03 21:58:03.898 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'nanoleaf:lightpanels:62D0E39E8239' to inbox.
2019-12-03 21:58:04.773 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.0.199:8080
2019-12-03 21:58:04.777 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.199:8443
2019-12-03 21:58:05.241 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-12-03 21:58:06.503 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-12-03 21:58:06.733 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'localhost' with clientid paho4519767739041426 and file store '/var/lib/openhab2/mqtt/localhost'
2019-12-03 22:00:17.816 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafHandler tried updating the thing status although the handler was already disposed.
2019-12-03 22:00:17.821 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Start pairing job, interval=25 sec
2019-12-03 22:00:17.902 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=10<=40,i=0,q=3}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-92,5,main]
2019-12-03 22:00:17.906 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=10<=40,i=0,q=3}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-93,5,main]
2019-12-03 22:00:18.315 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Auth token response code: 403

This went on for some time, as I got distracted. Then I pressed the power button to allow pairing:

2019-12-03 22:06:59.292 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=20<=40,i=0,q=15}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-93,5,main]
2019-12-03 22:06:59.330 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Auth token response code: 403
2019-12-03 22:06:59.671 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Nanoleaf 62D0E39E8239 updated
2019-12-03 22:06:59.675 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Stop pairing job
2019-12-03 22:06:59.678 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Start initializing light panels
2019-12-03 22:06:59.698 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Start pairing job, interval=25 sec
2019-12-03 22:06:59.731 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=20<=40,i=0,q=7}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-92,5,main]
2019-12-03 22:06:59.735 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=20<=40,i=0,q=7}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-93,5,main]
2019-12-03 22:06:59.913 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Auth token response code: 403
2019-12-03 22:07:24.926 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=17<=40,i=16,q=14}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-92,5,main]
2019-12-03 22:07:24.930 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=17<=40,i=16,q=14}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-526,5,main]
2019-12-03 22:07:24.934 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=17<=40,i=0,q=12}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-525,5,]
2019-12-03 22:07:24.938 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=17<=40,i=0,q=12}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-529,5,]
2019-12-03 22:07:24.941 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[ESH-httpClient-common]@fbab2{STOPPING,10<=17<=40,i=0,q=12}[org.eclipse.jetty.util.thread.TryExecutor$$Lambda$116/8106205@15ee4a5] Couldn't stop Thread[ESH-httpClient-common-93,5,main]
2019-12-03 22:07:25.005 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Auth token response code: 200
2019-12-03 22:07:25.018 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Pairing succeeded.

After that the controller is shown as “online”. The things are created and the channels linked.

I can switch the panels on and off. I cannot change effects (nothing to choose). I can change the overall brightness/color for all panels at once. I can change the audio source for the rhythm (probably … not tested if it has an effect).

At some point while playing with the controls, I got this exception (not sure when exactly it happened though)

2019-12-03 22:11:16.903 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Received channel: nanoleaf:lightpanels:62D0E39E8239:color, command: 70
2019-12-03 22:11:16.906 [ERROR] [eaf.internal.handler.NanoleafHandler] - Unhandled command type: org.eclipse.smarthome.core.library.types.PercentType
2019-12-03 22:11:16.909 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.nanoleaf.internal.handler.NanoleafHandler@8be0d1': Unhandled command type
org.openhab.binding.nanoleaf.internal.NanoleafException: Unhandled command type
        at org.openhab.binding.nanoleaf.internal.handler.NanoleafHandler.sendEffectCommand(NanoleafHandler.java:148) ~[?:?]
        at org.openhab.binding.nanoleaf.internal.handler.NanoleafHandler.handleCommand(NanoleafHandler.java:189) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
        at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
        at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:org.eclipse.smarthome.core:0.10.0.oh240]
        at com.sun.proxy.$Proxy138.handleCommand(Unknown Source) [212:org.openhab.binding.nanoleaf:2.5.0.201901190212]
        at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]
        at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
        at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        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) [?:?]
2019-12-03 22:11:19.683 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Received channel: nanoleaf:lightpanels:62D0E39E8239:color, command: 177,100,70
2019-12-03 22:11:19.989 [DEBUG] [eaf.internal.handler.NanoleafHandler] - API response code: 204

When I look at configuration -> things, I only have the one nanoleaf thing

Light Panels 52:44:31

Nanoleaf Light Panels

nanoleaf:lightpanels:62D0E39E8239

So I go to the Inbox - and it’s empty
I click the scan button on the top right corner and choose the nanoleaf binding … nothing happens. Nothing in the log.
I press the “search for things” button at the bottom of the inbox and choose nanoleaf again.

Now this is in the log:

2019-12-03 22:17:50.067 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-12-03 22:17:50.070 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf found: 192.168.0.40 16021
2019-12-03 22:17:50.072 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf light panels to inbox: 62D0E39E8239 at 192.168.0.40
2019-12-03 22:17:50.075 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-12-03 22:18:03.128 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-12-03 22:18:03.131 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf found: 192.168.0.40 16021
2019-12-03 22:18:03.133 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf light panels to inbox: 62D0E39E8239 at 192.168.0.40
2019-12-03 22:18:03.136 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22

But when I go to the inbox, it’s still empty.
When I go to things … it’s still only the controller.

Not sure what I’m doing wrong … hope the logs help!

[edit]
tried a few more things

  • removed thing, restart service. add thing again from inbox, don’t play with it, so I didn’t get an exception. try scanning … same as above
  • removed thing, restarted service and brought nanoleaf into pairing mode. thing shows up in inbox, I press the ok button and it’s paired (as the log indicates, while adding it, the auth token box was still empty). sadly no changes
  • after the thing was authenticated, i brought the nanoleaf into pairing mode again before starting the second scan from the inbox. no change either.

Thanks for trying. I would say let’s wait around 2 weeks because then 2.5 is supposed to be released. With that we will most likely provide an overhauled version where I have added quite some more debug and trace information. As soon as you have installed that version I promise that we try to track that issue down - please then put the logging to trace as this will provide lots of details.

Thanks
Stefan

The new binding with version 2.5.1/.2 is now available. Please go ahead, and look up the new functions:

New Features

  • Stability
  • Touch support has been implemented for the Canvas
  • The Readme of the binding contains much more information regarding Discovery, Configuration, Hints and the new Canvas touch support.

Enjoy,

Stefan

1 Like

Hi Stefan. Can i download the new version as a jar file. I am still running 2.5.1.2 stable.
Because i have a lot of problems by sending color values to separat nanoleaf panels.
I use it as app notification.
Thanks and greetings,
Markus

Hi Markus,

I am honestly not really familiar how to pinpoint to the exact version that was built by Travis related to the Pull Request I did. If anyone knows, please let me know.

Here is what I can tell you though

Hope that helps
Stefan

Hi Stefan.
Thanks for this. Can i use this snapshot in the addon folder? Or do you know when the next addon update for stable arrives?
Greetings,
Markus

Yes, it is compatible with my 2.5.x. The core will stay on 2.5.1 while there will be new minor versions for the addons around every month with 2.5.2 coming very soon.

Hi Stefan!

Thanks to some unexpected but not unappreciated spare time, I got to look into this again. And after updating my openHab Installation, the Auto Discovery of the individual panels finally is working for me! Thanks so much for all you work with this binding!

1 Like

That’s great to hear. Thanks for coming back to me, @Daniel_O

Youre very welcome!

Question: is there any setting that would allow me to disable the transition? For example when I set a brightness from 0 to 100 it never happens instantly but gradually goes from 0 to 100 in about a second or two.

Second: any idea why it sometimes seems to “eat” a single panel? When I change more than 4 panels at once, sometimes (but not always) it “eats” the command for the 4th-5th panel, the rest is fine though. If I repeat the same sequence of commands again, it usually works then.

Btw - here is what I’m doing with it :slight_smile: current weather and forecast, color-coded on my living room nanoleaf installation

First of WOW. What a cool idea. I am in awe :slight_smile:

re 1) As far as I know, you cannot get rid of the transition but you could ask in the nanolead forum.

re 2) I can only guess here and we would have to analyze it. It could be a timing in that there have been too many requests at once. I am not sure if the code is completely fine in terms of concurrency (many commands at the same time). If you really want to analyze that, I recommend you to switch the log level to TRACE and see which commands are triggered and which requests are sent to the panels. From my experience tracking down such an issue requires a scenario that is reproducable, i.e. you would have to program an “easy” scenerio that produces the same situation every time. As soon as we have that (and I have a some triangles, which I am waiting for to receive), then I am sure we could find the root cause.

cheers
Stefan

Thanks! I had this in my head for some time, but was too lazy to add all the single panels by looking them up through the API. Your binding made this a whole lot easier :slight_smile:

re: transition - wow that developer Forum seems pretty dead. I might just contact nanoleaf support.

re: disappearing commands
I didn’t check everytime, but when it happened the first couple of times I checked the logs because I figured I made a mistake in the rule - and the commands were at least received from open hab.

I’ll try it with trace mode soon.

I asked a few questions in the forum and Ali, one of the supporters always answered.

It makes me happy that I made that possible. When it’s done, send me a photo.

Yeah, trace it and let’s have a look if we can figure it out.

Btw, where are you from?