Binding Request: Nanoleaf Aurora (LED Design Triangle)

Something really wird happend. Pannels just turn on in the night. White and stop responding. Later i find out token changed … Not sure what binding version i have now. But didnt changed to new bridge/pannels one yet. Does this happend to someone? Pannels are on separate wifi without internet access…

The same happens here. After reset the Panels through disconnecting power, all runs okay.
Greetings, Markus

Hi Tom, can you try out the new bridge-enabled binding? I am running my panels now with this version of the binding for two days and haven’t detected any strange behaviour. Could you find any suspicious log entries when your panels turned on?

Greetings
Martin

I think it was more like panels related problem. You know, once u power them on, they get white. I was not even able switch them off (holding power button) or connect over app. Panels connect to wifi, but they was not responding. I did reset them and it works fine from that time. I didnt find any message in OH log.
I will test new version and let you know

Thanks Tom. When you play with the new version, you may give the new feature a try and add the individual panels as things. To do so, just add the controller (e.g. via auto discovery) to your openHAB instance. Next, in paper UI, go to your things list, select the Nanoleaf controller from it, and switch on “Discover Panels” (it is by default off) from its configuration settings. You should see immediately new things listed in your inbox, one for each panel of your Nanoleaf.

Hi, so bit of testing. Something is wrong with briteness channel. When i changing briteness (controller) it say its changing color channel. When changing color channel its fine. Same with single pannel. Can not change briteness (wird I added only color channel but it give me color, briteness, saturation) - I can change only color and saturation of the panel:

2019-01-31 02:11:12.773 [ome.event.ItemCommandEvent] - Item 'TRoomNanoleafColor' received command 42

==> /var/log/openhab2/openhab.log <==

2019-01-31 02:11:12.776 [WARN ] [al.handler.NanoleafControllerHandler] - Unhandled command type: org.eclipse.smarthome.core.library.types.PercentType

==> /var/log/openhab2/events.log <==

2019-01-31 02:11:12.782 [nt.ItemStatePredictedEvent] - TRoomNanoleafColor predicted to become 42

2019-01-31 02:11:12.789 [vent.ItemStateChangedEvent] - TRoomNanoleafColor changed from 236,89,73 to 236,89,42

2019-01-31 02:11:14.939 [ome.event.ItemCommandEvent] - Item 'TRoomNanoleafColor' received command 25

==> /var/log/openhab2/openhab.log <==

2019-01-31 02:11:14.944 [WARN ] [al.handler.NanoleafControllerHandler] - Unhandled command type: org.eclipse.smarthome.core.library.types.PercentType

==> /var/log/openhab2/events.log <==

2019-01-31 02:11:14.946 [nt.ItemStatePredictedEvent] - TRoomNanoleafColor predicted to become 25

2019-01-31 02:11:14.964 [vent.ItemStateChangedEvent] - TRoomNanoleafColor changed from 236,89,42 to 236,89,25


2019-01-31 02:11:31.565 [ome.event.ItemCommandEvent] - Item 'TRoomNanoleafColor' received command 95,89,25

2019-01-31 02:11:31.572 [nt.ItemStatePredictedEvent] - TRoomNanoleafColor predicted to become 95,89,25

2019-01-31 02:11:31.587 [vent.ItemStateChangedEvent] - TRoomNanoleafColor changed from 236,89,25 to 95,89,25

------------------------ PANEL ONLY

2019-01-31 02:17:47.740 [ome.event.ItemCommandEvent] - Item 'PanelColor1' received command 83,64,94
2019-01-31 02:17:47.747 [nt.ItemStatePredictedEvent] - PanelColor1 predicted to become 83,64,94
2019-01-31 02:17:47.758 [vent.ItemStateChangedEvent] - PanelColor1 changed from 83,49,94 to 83,64,94
2019-01-31 02:17:48.998 [ome.event.ItemCommandEvent] - Item 'PanelColor1' received command 83,79,94
2019-01-31 02:17:49.005 [nt.ItemStatePredictedEvent] - PanelColor1 predicted to become 83,79,94
2019-01-31 02:17:49.013 [vent.ItemStateChangedEvent] - PanelColor1 changed from 83,64,94 to 83,79,94
2019-01-31 02:17:51.211 [ome.event.ItemCommandEvent] - Item 'PanelColor1' received command 62
==> /var/log/openhab2/openhab.log <==
2019-01-31 02:17:51.216 [WARN ] [nternal.handler.NanoleafPanelHandler] - Unhandled command type: org.eclipse.smarthome.core.library.types.PercentType
==> /var/log/openhab2/events.log <==
2019-01-31 02:17:51.221 [nt.ItemStatePredictedEvent] - PanelColor1 predicted to become 62

Hi Tom,

thanks again for testing the new version. And yes, sending brightness commands to the color channels of the controller and panels were not handled correctly. I’ve fixed it, so that an item of type Dimmer can be defined for the color and colorPanel channels. For more convenience, I’ve also added a new channel “panelBrightness” to the (light)panel thing. So now we are able to control the color and brightness of each individual panel, or via the controller channels for the whole beauty.

As usual, README & JAR file are updated. Please note that you have to remove your existing Panel things first and let them re-add by the controller to your inbox to make them aware of the new brightness channel.

Enjoy & regards
Martin

I comment out panels from thinks file, save it and uncomment and saved. Still getting this error

Brithness of controller works perfectly now.

Brightness of this single pannel is changing but 100% looks like 40% - compare with other pannels.
When i change color or saturation of single pannel it change rest of the pannels into bright white …

Sad is, that always when u do new discovery of pannels ID of each pannel change. Lucky me I dont have big pannel wall :slight_smile:

2019-02-01 21:02:53.544 [ome.event.ItemCommandEvent] - Item 'PanelColor01' received command 100
2019-02-01 21:02:53.550 [nt.ItemStatePredictedEvent] - PanelColor01 predicted to become 100
2019-02-01 21:02:54.312 [ome.event.ItemCommandEvent] - Item 'PanelColor01' received command 296,100,100
2019-02-01 21:02:54.316 [nt.ItemStatePredictedEvent] - PanelColor01 predicted to become 296,100,100
2019-02-01 21:02:55.323 [ome.event.ItemCommandEvent] - Item 'PanelBrightness01' received command 100
2019-02-01 21:02:55.333 [nt.ItemStatePredictedEvent] - PanelBrightness01 predicted to become 100
==&gt; /var/log/openhab2/openhab.log &lt;==
2019-02-01 21:02:55.360 [WARN ] [nternal.handler.NanoleafPanelHandler] - Channel with id panelBrightness not handled
2019-02-01 21:02:55.425 [WARN ] [nternal.handler.NanoleafPanelHandler] - Channel with id panelBrightness not handled

I comment out panels from thinks file, save it and uncomment and saved. Still getting this error

I found the issue for this error message and fixed it → JAR is updated.

Brithness of controller works perfectly now.

Excellent :smiley:

Brightness of this single pannel is changing but 100% looks like 40%

I noticed this with my panels too. I believe the maximum brightness of an individual panel is always bound to current brightness of the whole panel, i.e. the controller. So if the controller brightness is set to 50%, the brightness of the individual panels - even if set to 100% - can’t be more than 50% total.

Try to set the brightness of an individual panel to 100%, and then set the brightness of the controller to 100% - the panel will shine very bright.

Sad is, that always when u do new discovery of pannels ID of each pannel change

Hmmm… IDs of my 13 panels stayed the same after new discovery. :thinking:

Hmm, mine changed. I didnt saved old version so can not compare but it was different numbers … I have 12 panels. I will try play with it more.
Are you able turn on just one panel or all panels are lighting white when u play with one?

With latest JAR this message keep repeating in logs

2019-02-02 17:41:04.452 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel power although the handler was already disposed.
2019-02-02 17:41:04.456 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel brightness although the handler was already disposed.
2019-02-02 17:41:04.459 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel colorTemperature although the handler was already disposed.
2019-02-02 17:41:04.462 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel hue although the handler was already disposed.
2019-02-02 17:41:04.466 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel saturation although the handler was already disposed.
2019-02-02 17:41:04.469 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel effect although the handler was already disposed.
2019-02-02 17:41:04.472 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel colorMode although the handler was already disposed.
2019-02-02 17:41:04.475 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel rhythmActive although the handler was already disposed.
2019-02-02 17:41:04.479 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel rhythmMode although the handler was already disposed.
2019-02-02 17:41:04.482 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler NanoleafControllerHandler of thing nanoleaf:controller:troomLightpanels12 tried updating channel rhythmState although the handler was already disposed.

Does think format changed? Now wen reedding panels it ask for format

2019-02-02 17:47:11.494 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘nanoleaf.things’, using it anyway:

Provide a thing type ID and a thing ID in this format:

<thingTypeId> <thingId>

Technically, when playing with the individual panels (i.e. items bound to thing type lightpanel) the binding uses a custom effect type for displaying a static color for each panel. Initially, all panels are black, and only those light up that you send an “ON” command, or choose a color. If you switch inbetween to a predefined effect (e.g. “Forrest”) and then return to configure your individual panels, the panels you changed before keep their state.

Yes, I saw that message too when I replaced an old JAR with a new version. The binding continues to work, but the messages won’t go away until I restarted my openhab instance.

Although the thing type definition did not change, now the following format seems to work:

Bridge nanoleaf:controller:ABCDE12345[ address="192.168.0.10", port=16021, authToken="....", refreshInterval=60 ] {
    Thing lightpanel 135 [ id=135 ]
    Thing lightpanel 186 [ id=186 ]
}

I will update the README accordingly!

I am confused now :))

I restart and return bridge/panels definition back to

Bridge nanoleaf:controller:ABCDE12345[ address="192.168.0.10", port=16021, authToken="....", refreshInterval=60 ] {
    Thing nanoleaf:lightpanel:ABCDE12345:135 [ id=135 ]
    Thing nanoleaf:lightpanel:ABCDE12345:186 [ id=186 ]
}

Worked, but now can change only color but not bgihtness of one panel and see error message …
panel stay dark, i can change color or britness, nothing happend … does it worked for you?

2019-02-02 22:15:12.375 [vent.ItemStateChangedEvent] - PanelColor01 changed from 254,0,0 to 331,0,0
==&gt; /var/log/openhab2/openhab.log &lt;==
2019-02-02 22:15:13.009 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/PanelColor01' with an invalid status value '360,0,0'.

Yes it does. May be give it another try following these steps:

  1. Remove your existing files in the following order: items, things
  2. Stop your openhab instance
  3. Start your openhab instance
  4. Add the things file (with the updated format for the Things inside the Bridge as documented here)
  5. Add the items file (there should be no changes required here)

Hope this helps…

Hi Martin.
The link doesn’t work to download your jar.file.
Can you help?
Greetings,
Markus

I have recreated the jar based on the bridge branch today.
@Master79 Download Link: https://smarthome.eluhome.de/owncloud/index.php/s/A8yP4ZzWfoWwsjN

@mraepple I have tested your binding, but at controller initialization I get the following error:

2019-02-10 13:39:00.354 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler@14977840’: Malformed controller firmware version

in source code it checks if firmwareVersion will match \d.\d.\d.
Hardwaredetails:
“manufacturer”: “Nanoleaf”,
“firmwareVersion”: “3.0.6”,
“model”: “NL22”

Therefore it should match the regex pattern…

Hi René, Markus,

thank you for testing the binding. In the meantime I’ve opened a pull request for openHAB2 addons, but I keep the sources in sync in my nanoleaf-binding repository. I’ve uploaded the latest JAR file again.

A few comments what has been improved in the latest version on the bridge branch (mainly driven by the very helpful code reviews on the pull request):

  • Discovery of the individual panels is no longer triggered by the “Discover Panels” switch on the controller configuration. Once the controller/bridge is added as a thing and becomes online (i.e. successfully paired), you can start a new scan (e.g. from the Paper UI) on the Nanoleaf binding, and a few seconds later the panels connected to your controller will appear one by one in the Inbox.
  • @CoolTom: I’ve fixed the issue with the brightness of the individual panels. I found a bug in the code, and now you can control the brightness of the panels across the full spectrum.
  • WARN log messages about the controller channels being updated “although the handler was already disposed”, which appeared when uploading a new version of the JAR to the addons folder, should also no longer appear. However, I recommend to stop the binding bundle first in the Karaf console (bundle:stop <id of nanoleaf binding>), then upload the new JAR to the addons folder, and then start the updated bundle again (bundle:start <id of nanoleaf binding>).
  • @Eluminare: The regular expression to validate the current firmware has also changed and should work now.
  • For more information, the README has been updated as well, inlcuding the full example.

Best regards
Martin

2 Likes

Hi Martin.

I get this error after pairing:

    2019-02-22 12:53:48.855 [WARN ] [al.handler.NanoleafControllerHandler] - Update job failed

java.lang.NullPointerException: null

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

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

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

Can you help?
Greetings,
Markus

Hi Markus,

in the meantime the code has been updated again - mainly from the comments in the code review on the pull request. If you don’t mind, please use this version for further testing.

You can find a new JAR at the usual place.

Please note that this latest version introduces changes on the channels:

  • The controller channels for brightness, hue and saturation no longer exists - all of this is handled by the color channel, following common design rules of other bindings
  • Same for the panel brightness channel: It no longer exists, only the color channel remains
  • The existing colorTemperature channel has been renamed to colorTemperatureAbs, and still accepts total (absolut) values in K(elvin) from 1200 to 6500
  • A new channel colorTemperature has been added for item type Dimmer, which also controls color temperature of the panels, but in percent

The README has been updated accordingly, and enhanced with an example for a simple rule to display a custom effect.

When you update to this new version, I’d suggest the following procedure:

  • Remove the existing things (first controller, then any panels)
  • Stop and uninstall the old version of the binding, e.g. via Karaf (bundle:stop and bundle:uninstall)
  • Delete the old JAR from the addons directory
  • Copy the new JAR in the addons directory
  • Start the new version of the binding (bundle:start)
  • Start discovery with the new binding and add the controller
  • Pair the controller thing
  • Start discovery again for the panels

Hope this helps to resolve the NullPointerException issue you saw in the old binding version. Otherwise please let me know!

Best regards
Martin

Hi Martin.
That’s nice. I will test it today.
Two questions:
Can i use a faster actualisation/refresh rate. For example 20 seconds.
And where can i start a saved scene without a rule like yours? In my old configuration, i send a put request like this:

#!/bin/sh

EFFECT=$(echo “$1” | tr ‘_’ ’ ‘)
DATA=’{“select” : “’$EFFECT’”}’
curl -s -X PUT -H “Content-Type: application/json” -d “$DATA” “http://192.168.x.x:16021/api/v1/token/effects

and:

executeCommandLine("/etc/openhab2/scripts/nanoleaf-effectdata.sh " + “Snowfall”, 1000)

Greetings and thanks for help,
Markus

Yes, sure. I woudn’t expect any performance issues - it is essentially one http request to the controller per refresh cycle.

You could add your scene’s name in your sitemap to the mappings of the item that is linked to the effect channel. In the example given in the README for the binding, this is the NanoleafEffect item. Or you could send from a rule a command to this item like

NanoleafEffect.sendCommand("<my saved scene's name>")

Happy testing and best regards
Martin