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?
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.
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
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.
Thanks!
Hi, Iâve implemented a fix for the issue with the new firmware version 3.1.2. The JAR file can be found here. This version also includes a fix when the Rhythm module is missing. So far Iâve only tested the binding with the latest 2.5.0 snapshot.
Hey there =)
I just downloaded the new binding however it doesnt seem to work:
FrameworkEvent ERROR - org.openhab.binding.nanoleaf
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.nanoleaf [253]
Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
and
Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.nanoleaf-2.5.0-SNAPSHOT%20(1).jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.nanoleaf [253]
Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
I am running OH 2.4 so it seems it wont work there Is there a chance to get it working without upgrading to 2.5?
Hi @mraepple
Seems you might not have seen the current issues over at GitHub
The most pressing matter is the failed minimum firmware revision carried out for Canvas which is currently only at 1.2.1 which fails your check for the Auroras.
Could you look into it please?
I managed to come around it by using a .things file, but it needs tweaking for every OH2 restart.
Thanks.