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

Hello !

I’ve got a setup with 18 panels at the moment.
Main feature request are Switch ON/OFF, Change effects and dim brightness panel.
Maybe a Color Channel to set the whole panel color.

I will be happy to help if I can !

Oh, nice. I’d love to see the “controllerInfo” call output from your setup. Can you run a curl call or use postman? If so, could you send me (via PM) the output of:

curl --location --request GET "http://192.168.x.x:16021/api/v1/...your-token-here..."

You might want to replace the “serialNo” attribute with some dummy text if you want :smile:

I bought two starter packs and combined most of the panels under one controller. Still looking for a use for the remaining panels and controller.

The only features I can see myself using would be

  • On/Off
  • Adjust Brightness
  • Adjust color
  • Change the preset/ effect
1 Like

I have a set still in the box…can’t wait to see what happens here.

I own a combo of one starter pack and one extension pack of three panels, for a total of 12 triangles. Currently a rule turns them on at a given time (cron-style rule) or by beginning of dawn (defined by astro binding). So my current usage is quite limited. The features I can see myself using would be

  • On/Off
  • Adjust Brightness
  • Adjust color
  • Select predefined presets
  • Change the preset/ effect

Hope that helps.
Greetings Kai

Sorry for the delay, this is the command output :

{"name":"Nanoleaf Light Panels 52:4e:92","serialNo":"#######","manufacturer":"Nanoleaf","firmwareVersion":"3.0.5","model":"NL22","state":{"on":{"value":false},"brightness":{"value":64,"max":100,"min":0},"hue":{"value":40,"max":360,"min":0},"sat":{"value":36,"max":100,"min":0},"ct":{"value":4000,"max":6500,"min":1200},"colorMode":"effects"},"effects":{"select":"Ocean","effectsList":["Color Burst","Flames","Forest","France Fifa","Inner Peace","Juicey Juice","Mint","Nemo","Northern Lights","Ocean","Pride Rainbow","Rain","Romantic","Snowfall","Triluminox Energy Crystal","Vibrant Sunrise","Vintage Modern","moonlight"]},"panelLayout":{"layout":{"numPanels":18,"sideLength":150,"positionData":[{"panelId":94,"x":74,"y":303,"o":300},{"panelId":207,"x":-224,"y":562,"o":60},{"panelId":87,"x":74,"y":562,"o":300},{"panelId":85,"x":0,"y":433,"o":180},{"panelId":53,"x":0,"y":519,"o":120},{"panelId":51,"x":149,"y":519,"o":120},{"panelId":167,"x":-149,"y":519,"o":0},{"panelId":114,"x":-74,"y":562,"o":60},{"panelId":183,"x":74,"y":389,"o":0},{"panelId":45,"x":0,"y":259,"o":120},{"panelId":34,"x":0,"y":173,"o":180},{"panelId":24,"x":-74,"y":129,"o":120},{"panelId":39,"x":-74,"y":43,"o":180},{"panelId":130,"x":74,"y":649,"o":240},{"panelId":1,"x":149,"y":692,"o":300},{"panelId":171,"x":-224,"y":649,"o":240},{"panelId":153,"x":149,"y":779,"o":240},{"panelId":122,"x":224,"y":822,"o":60}]},"globalOrientation":{"value":0,"max":360,"min":0}},"rhythm":{"rhythmConnected":false,"rhythmActive":null,"rhythmId":null,"hardwareVersion":null,"firmwareVersion":null,"auxAvailable":null,"rhythmMode":null,"rhythmPos":null}}

Best regards

I am interested in this binding as I intend to integrate nanoleaf canvas in my new home.
One very nice feature (if feasible) would be to trigger other actions when touching one of the canvas panels, as they are touch sensitive.
It would be great to use them as „buttons“ maybe even dependent on the color they actually show acting as different virtual switches.

So lets say in the entrance area of my home some of the panels are used to e.g.

a) activate alarm system (changing color when alarm system activates or blinking during armament)
b) emergency button (if you are threatened at the door) when touched, triggering a pre-alert warning
c) checkout of inhabitants (each kid has its own panel to press when leaving home/coming home)

That would allow so many things if the API provides such kind of functionality.

What do you think?

BR

Uwe

You’ve got some great ideas there…

Almost enough to get me to buy some canvas panels…

But not quite enough to convince me to get the kids to go with them…

Training the kids will be the hard part (however if there is benefit for them when they check out/check in they might be supportive :wink:

I signed in to the dev forum of nanoleaf and found out that the API indeed supports to receive event notifications (per panel) for one tap or double tap. So in principle my idea should work with openHAB even without a binding but having this all available in a binding would be superb and the price of the panels now becoming also switches seems then ok to me.

Also for disabled or elder people I guess that illuminared/colored panels providing visible information/feedback and easy touch actions would be helpful.

1 Like

That is actually a great idea. I have to keep that in mind for my grandmother.

I can’t thank you enough! It works flawlessly! I love it!
Improvemts:

  • strange behaviour when setting a colour with Colorpicker in sitemap
  • just installed it. maybe I’ll add things later but currently I am happy af!

Thanks!

Thank you Felix for your feedback! Please note that the most current version of the binding can be found here. Curious to see if you still see the strange behaviour with the Colorpicker with this version.

I have also a development version which fixes a bug when there is no Rhythm module connected to the Nanoleaf Light Panels, and adds experimental support for the Nanoleaf Canvas device.

Still waiting for @terriblefox (Binding Request: Nanoleaf Aurora (LED Design Triangle) to test it with his device ;-), to prepare a new pull request.

1 Like

Hey there=)

I just spent some more time with the binding and I love it!

This doesn’t happen anymore. I think it was just glitched once. works perfectly on pc and mobile.

It works flawlessly on my Nanoleaf Aurora, I can’t think of any improvements^^
Great work there!:heart_eyes:

Thank you for developing this!

I just installed the 2.5.0-SNAPSHOT jar and basic control works right out of the box. The addon site mentions that I can also add the single panels as things via auto discovery once the auth token was entered. I’d love to do that, since I want to use a few selected panels for notifications :slight_smile:

However when I hit discovery, no panels are found. I could probably enter them manually, but how do I get the ids?

I’m on openhab 2.4 stable

PS: I’m also confused … why is the power button a drop down box in paper ui->control? Usually they are those little left-right flip switches. The thing looks the same as my other power switches.

This would be so cool😍

I can control it with homebridge just fine. But I’d love to have it in openhab for the more advanced stuff. Think a weather forecast in the morning with the next days or ours color coded on the panels :slight_smile:

Hi Daniel,

with a successfully paired controller, the individual panels should be correctly discovered by starting another scan for the Nanoleaf binding.

If this does not work for you, can you check your openhab log file for any error messages? You may also want to set the log level to INFO with

log:set DEBUG org.openhab.binding.nanoleaf

to see more details.

Thanks and regards
Martin

I checked the logfile yesterday, but there was nothing. Now, with loglevel debug it has only this:

2019-04-23 22:20:49.061 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-04-23 22:20:49.065 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf found: 192.168.0.40 16021
2019-04-23 22:20:49.068 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf lightpanels to inbox: 62D0E39E8239 at 192.168.0.40
2019-04-23 22:20:49.070 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22

There is an older error in the logfile, but it’s from the time when I was still playing around with the items/control.

2019-04-22 21:21:24.165 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHa                                                ndler.handleCommand()' on 'org.openhab.binding.nanoleaf.internal.handler.NanoleafHandler@1b836fd': Unhandled command typ                                                e
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.GeneratedMethodAccessor39.invoke(Unknown Source) ~[?:?]
        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.j                                                ava:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
        at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:o                                                rg.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(SystemDefaultProfil                                                e.java:49) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]
        at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) ~[?:?]
        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.j                                                ava: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.cor                                                e: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) [?:?]

But I doubt that it has an effect here?

Just to be sure, I restarted the openhab service. After it was back online, I tested whether the binding works and then tried the scan again, three times. The first time nothing happened (maybe openhab still starting up?) the two other times are in the log.

2019-04-23 22:26:51.901 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Received channel: nanoleaf:lightpanels:62D0E39E8239:power, command: OFF
2019-04-23 22:26:52.136 [DEBUG] [eaf.internal.handler.NanoleafHandler] - API response code: 204
2019-04-23 22:26:54.745 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Received channel: nanoleaf:lightpanels:62D0E39E8239:power, command: ON
2019-04-23 22:26:55.004 [DEBUG] [eaf.internal.handler.NanoleafHandler] - API response code: 204
2019-04-23 22:27:15.001 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Update channels for light panels nanoleaf:lightpanels:62D0E39E8239
2019-04-23 22:27:15.024 [DEBUG] [eaf.internal.handler.NanoleafHandler] - API response code: 200
2019-04-23 22:27:38.713 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-04-23 22:27:38.719 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf found: 192.168.0.40 16021
2019-04-23 22:27:38.722 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf light panels to inbox: 62D0E39E8239 at 192.168.0.40
2019-04-23 22:27:38.726 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-04-23 22:27:53.920 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-04-23 22:27:53.925 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf found: 192.168.0.40 16021
2019-04-23 22:27:53.929 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Adding Nanoleaf light panels to inbox: 62D0E39E8239 at 192.168.0.40
2019-04-23 22:27:53.932 [DEBUG] [ery.NanoleafMDNSDiscoveryParticipant] - Nanoleaf Type: NL22
2019-04-23 22:28:15.051 [DEBUG] [eaf.internal.handler.NanoleafHandler] - Update channels for light panels nanoleaf:lightpanels:62D0E39E8239
2019-04-23 22:28:15.071 [DEBUG] [eaf.internal.handler.NanoleafHandler] - API response code: 200

Can I manually look for the IDs? I found another thread with an URL where you supposedly see them, but that just returns a blank page in my browser (yes, I changed the ip from the example).

To add the panels manually, you could follow these steps:

  • Get the controller auth token by calling the openhab REST API with http(s)://<your_openhab-ip:port>/rest/things
  • Search in the response for the string authToken which will give you the Nanoleaf controller thing auth token
  • In a browser/REST client, call http://<your-nanoleaf-ip:port>/api/v1/<auth_token>/
  • You will get back a JSON-formatted response which contains an array of all your panels, something like

... "panelLayout":{"layout":{"numPanels":14,"sideLength":150,"positionData":[{"panelId":135,"x":0,"y":173,"o":300,"shapeType":0}, ...

  • panelId (135 in the example above) refers to the id you have to specify as the id attribute of the lightpanel thing(s) in your Thing file

I will also check the pairing of panels again with my device to see if I run into the same issues…

Best regards
Martin