Binding Request: Nanoleaf Aurora (LED Design Triangle)

Ill do that tomorrow , i think the rythm Module is already build in the conrtol module. As it reacts to music.

this is the result:
{“name”:“Canvas 9896”,“serialNo”:“S18494C4346”,“manufacturer”:“Nanoleaf”,“firmwareVersion”:“1.1.0”,“model”:“NL29”,“discovery”:{},“effects”:{“effectsList”:[“Black and White”,“Color Burst”,“Energize”,“Falling Whites”,“Fireworks”,“Flames”,“Forest”,“Inner Peace”,“Lavender Fields”,“Magic Strobe”,“Memory”,“Meteor Shower”,“Nature Zen”,“Nemo”,“Netflix And Chill”,“Northern Lights”,“Ocean”,“Paint Splatter”,“Pulse Pop Beats”,“Purple Rain”,“Rain”,“Rhythmic Northern Lights”,“Romantic”,“Scary Night In The Forest”,“Sound Bar”,“Starry Night”,“Stranger Things”,“Streaking Notes”,“Tron Legacy”,“Vintage Modern”,“Whack A Mole”,“moonlight”],“select”:“Shuffle”},“panelLayout”:{“globalOrientation”:{“value”:0,“max”:360,“min”:0},“layout”:{“numPanels”:17,“sideLength”:100,“positionData”:[{“panelId”:3566,“x”:500,“y”:200,“o”:0,“shapeType”:2},{“panelId”:34658,“x”:400,“y”:200,“o”:0,“shapeType”:2},{“panelId”:28371,“x”:300,“y”:200,“o”:270,“shapeType”:2},{“panelId”:52829,“x”:200,“y”:200,“o”:0,“shapeType”:2},{“panelId”:56525,“x”:100,“y”:200,“o”:270,“shapeType”:2},{“panelId”:24505,“x”:100,“y”:100,“o”:180,“shapeType”:2},{“panelId”:9777,“x”:100,“y”:0,“o”:180,“shapeType”:2},{“panelId”:56263,“x”:0,“y”:200,“o”:0,“shapeType”:2},{“panelId”:9148,“x”:0,“y”:100,“o”:0,“shapeType”:2},{“panelId”:30647,“x”:0,“y”:300,“o”:90,“shapeType”:2},{“panelId”:61965,“x”:0,“y”:400,“o”:0,“shapeType”:2},{“panelId”:7154,“x”:0,“y”:500,“o”:90,“shapeType”:2},{“panelId”:31883,“x”:0,“y”:600,“o”:90,“shapeType”:2},{“panelId”:45833,“x”:100,“y”:400,“o”:0,“shapeType”:2},{“panelId”:34158,“x”:100,“y”:300,“o”:90,“shapeType”:2},{“panelId”:45707,“x”:200,“y”:300,“o”:90,“shapeType”:2},{“panelId”:46774,“x”:300,“y”:300,“o”:90,“shapeType”:2}]}},“state”:{“brightness”:{“value”:100,“max”:100,“min”:0},“colorMode”:“effect”,“ct”:{“value”:4000,“max”:6500,“min”:1200},“hue”:{“value”:0,“max”:360,“min”:0},“on”:{“value”:false},“sat”:{“value”:0,“max”:100,“min”:0}}}

Thanks! So there is no rhythm element at all in the response from a Canvas device, which is different from the Light Panels.

I’ve updated the code + JAR to check for this condition.

@terriblefox: Can you give it another try with the updated JAR?

Version in Karaf is now 2.5.0.201903071144

Thanks
Martin

Now it works perfect…

I can turn it on and off
can change color sat and brightness
I can change scenes

I can’t control the separate canvas titles

Thanks a lot for testing!

So discovery of the canvas tiles worked when you run another scan with the paired controller, but when you linked the color channels of the tiles, nothing happend? Did you see any error messages in the log?

Yes discovery works and they are shown as online…

</s:Envelope>
2019-03-11 09:15:27.793 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 179,0,0 for channelUID nanoleaf:lightpanel:3df742e6:9148:panelColor failed: OpenAPI request failed. HTTP response code 400
2019-03-11 09:15:30.003 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 50,86,88 for channelUID nanoleaf:lightpanel:3df742e6:3566:panelColor failed: OpenAPI request failed. HTTP response code 400
2019-03-11 09:15:31.431 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 0,86,88 for channelUID nanoleaf:lightpanel:3df742e6:3566:panelColor failed: OpenAPI request failed. HTTP response code 400
2019-03-11 09:15:33.395 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 171,86,88 for channelUID nanoleaf:lightpanel:3df742e6:3566:panelColor failed: OpenAPI request failed. HTTP response code 400
2019-03-11 09:15:34.737 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 66 for channelUID nanoleaf:lightpanel:3df742e6:9148:panelColor failed: OpenAPI request failed. HTTP response code 400
2019-03-11 09:15:36.205 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 179,80,66 for channelUID nanoleaf:lightpanel:3df742e6:9148:panelColor failed: OpenAPI request failed. HTTP response code 400
2019-03-11 09:15:40.271 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 0 for channelUID nanoleaf:lightpanel:3df742e6:3566:panelColor failed: OpenAPI request failed. HTTP response code 400
2019-03-11 09:15:41.619 [WARN ] [nternal.handler.NanoleafPanelHandler] - Handling command 0 for channelUID nanoleaf:lightpanel:3df742e6:9148:panelColor failed: OpenAPI request failed. HTTP response code 400

I believe this is because the Canvas tiles are controlled with a slightly different message format than the Light Panels. This is where the Nanoleaf API gets inconsistent…

Anyways, I gave it a try with an updated version of the binding which can be found here (JAR). The new version is in Karaf 2.5.0.201903112052

To support the Canvas devices, the controller has new configuration setting: “Device Type” (technical property name: deviceType). By default, it is set to “Light Panels” (lightPanels), but you can change it to “Canvas” (canvas) when you go in PaperUI to the settings of your controller thing.

You may need to remove your existing things and start a new discovery. After that, you can give it a try to control the individual Canvas tiles.

I am flying a bit blind here without a real device for testing and just the API documentation, so I hope you find some time for testing again!

Thanks, Martin

Worked like a charm within 5 mins. Kudos to you @mraepple for developing such a smooth binding.

Hello,

I use openhabian 2.4 stable and I use the nanoleaf binding. I tried it with nanoleaf Aurora and everything works fine. Then I tried it with nanoleaf canvas
and the following error messages came.

In Paper UI: (Nanoleaf device type --> Canvas)
Incompatible controller firmware. Update firmware and add the device again.
–> The Firmware is the newest (1.2.1)

Can someone help me?

Thx

Hi all,
I’m having the same problem in my Installation, I’m using the most current nanoleaf binding (beta stage) with openhab 2.4 in a docker container. Basically Nothing changed from the working state, except for i had to restore my docker-openhab Environment to a state of march due to a system crash. Sinc then i updated the nanoleaf binding giving the same error message as Bernd.
Help, please
Kind regards
Kai

Good evening all,
no need for help on my installation anymore. During the day I took another try and deleted my nanoleaf things file, tried an automatic discovery just to abort the pairing process. I then restored my original nanoleaf things file and to my surprise everything went back to normal. The nanoleaf integration on my openhab installation “automagically” repaired itself. :slightly_smiling_face:
I don’t know how, I don’t know why, but it works now…
Thanks anyway!
Kind regards Kai

Hi @mraepple, I set up the binding as described, it also receives all my panels as Things but the Bridge is always offline:

[WARN ] [al.handler.NanoleafControllerHandler] - Status update failed: OpenAPI request failed. HTTP response code 422

Do you got any idea? I can access the API with Postmaster and use PUT to turn the Nanoleafs On/Off.

Tried both, using auto-discover as well as creating them by myself.

Thanks a lot for any hint

Hi - just a quick guess, but do you have the Rhythm module connected to your panels? If no module is connected, the bridge goes offline after a few seconds. There is a fix available with this JAR. This is still a know open issue I will fix soon in the master branch.

Hope this helps! Otherwise, please let me know of there are any hints in the logs…

Hi @mraepple thanks a lot for the quick response. I got a Rhythm module connected to my Nanoleaf and it’s working so I assume it also gets detected by the Nanoleaf. Please see following all logs that I receive when initializing my Nanoleaf:

2019-05-11 09:32:50.187 [hingStatusInfoChangedEvent] - ‘nanoleaf:controller:xxxxxxxxx’ changed from UNINITIALIZED to INITIALIZING

2019-05-11 09:32:50.211 [hingStatusInfoChangedEvent] - ‘nanoleaf:controller:xxxxxxxxxx’ changed from INITIALIZING to UNKNOWN (BRIDGE_UNINITIALIZED)

2019-05-11 09:32:50.239 [hingStatusInfoChangedEvent] - ‘nanoleaf:controller:xxxxxxxxx’ changed from UNKNOWN (BRIDGE_UNINITIALIZED) to OFFLINE (CONFIGURATION_PENDING): No authorization token found. To start pairing, press the on-off button of the controller for 5-7 seconds until the LED starts flashing in a pattern.

2019-05-11 09:32:50.548 [WARN ] [nding.nanoleaf.internal.OpenAPIUtils] - OpenAPI request unauthorized. Invalid authorization token.

2019-05-11 09:32:50.551 [WARN ] [al.handler.NanoleafControllerHandler] - Panel discovery unauthorized: Invalid authorization token

2019-05-11 09:32:50.560 [hingStatusInfoChangedEvent] - ‘nanoleaf:controller:xxxxxxxxxxx’ changed from OFFLINE (CONFIGURATION_PENDING): No authorization token found. To start pairing, press the on-off button of the controller for 5-7 seconds until the LED starts flashing in a pattern. to OFFLINE (COMMUNICATION_ERROR): Invalid token. Replace with valid token or start pairing again by removing the invalid token from the configuration.

2019-05-11 09:32:50.569 [hingStatusInfoChangedEvent] - ‘nanoleaf:controller:xxxxxxxxx’ changed from OFFLINE (COMMUNICATION_ERROR): Invalid token. Replace with valid token or start pairing again by removing the invalid token from the configuration. to OFFLINE (CONFIGURATION_PENDING): No authorization token found. To start pairing, press the on-off button of the controller for 5-7 seconds until the LED starts flashing in a pattern.

Pressed the button until the light flashes

2019-05-11 09:33:40.417 [me.event.ThingUpdatedEvent] - Thing ‘nanoleaf:controller:xxxxxxxx’ has been updated.

2019-05-11 09:33:40.424 [hingStatusInfoChangedEvent] - ‘nanoleaf:controller:xxxxxxxxx’ changed from OFFLINE (CONFIGURATION_PENDING): No authorization token found. To start pairing, press the on-off button of the controller for 5-7 seconds until the LED starts flashing in a pattern. to ONLINE

2019-05-11 09:33:40.494 [WARN ] [al.handler.NanoleafControllerHandler] - Status update failed: OpenAPI request failed. HTTP response code 422

2019-05-11 09:33:40.502 [hingStatusInfoChangedEvent] - ‘nanoleaf:controller:xxxxxxxxx’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Communication failed. Please check configuration.

It looks like the controller gets online for a very short time, so the token request / pairing seems to work. The online state is immediately switched off because the following status update fails. Can you raise the debug level to DEBUG - then we should see who fails.

Best regards
Martin

Hello,

I have the same problem like Bernd, can someone help me maybe?

I use openhabian 2.4 stable and I use the nanoleaf binding. I tried it with nanoleaf Aurora and everything works fine. Then I tried it with nanoleaf canvas
and the following error messages came.

In Paper UI: (Nanoleaf device type --> Canvas)
Incompatible controller firmware. Update firmware and add the device again.
–> The Firmware is the newest (1.2.1)

I found a solution here.

@mraepple after updating the firmware today from 3.0.8 to 3.1.2 it seems like the discovery is working properly but I get another error - any idea on your side? Thanks for all your support

[WARN ] [al.handler.NanoleafControllerHandler] - Update job failed

com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 374.99594464801847 at line 1 column 1261 path $.rhythm.rhythmPos.x

at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:245) ~[?:?]

at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:235) ~[?:?]

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?]

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?]

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?]

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?]

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?]

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?]

at com.google.gson.Gson.fromJson(Gson.java:887) ~[?:?]

at com.google.gson.Gson.fromJson(Gson.java:852) ~[?:?]

at com.google.gson.Gson.fromJson(Gson.java:801) ~[?:?]

at com.google.gson.Gson.fromJson(Gson.java:773) ~[?:?]

at org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler.receiveControllerInfo(NanoleafControllerHandler.java:500) ~[?:?]

at org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler.updateFromControllerInfo(NanoleafControllerHandler.java:457) ~[?:?]

at org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler.runUpdate(NanoleafControllerHandler.java:341) ~[?:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

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) [?:?]

Caused by: java.lang.NumberFormatException: Expected an int but was 374.99594464801847 at line 1 column 1261 path $.rhythm.rhythmPos.x

at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1196) ~[?:?]

at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:243) ~[?:?]

… 21 more

1 Like

I got the exact same issue

Hi - thank you for testing the binding with the new firmware. I updated my panels today as well to version 3.1.2, and see the same issue: This panels are discovered, but when trying to pair them, the response cannot be parsed correctly.

Obviously with the new firmware the data type of the rhythm module position coordinates changed from int to float values. Here is the response from my device:

{“x”:-74.99562753494169,“y”:389.70558316729446,“o”:120.0}}

The position coordinates for the panels remained int though…

I will try to provide a fix for this the coming days.