Closed olemr closed 1 year ago
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/how-to-assign-an-issue-on-github-to-me/115559/1
Yep, I am aware of it. Basically this is happening when the binding tries to retrieve the color of a specific panel and a 404 (not found) is returned by the nanoleaf controller device. I was told by Nanoleaf some time ago that the reason is that a color can only be retrieved in case a so called "static" pattern has been chosen by the user (my guess is that dynamic changes on animated patterns change too fast for retrieving colors). The downside is that the color in this case cannot be retrieved which leads to the fact that a user may think the binding is broken as it does return the correct color. Therefore I had added this warning as a hint why the color cannot be retrieved as I haven't found an easy way to check if the mode is static currently at the moment. Anyway, in the meantime I noticed that this more often than wanted floods the logs with this "hint". So, finally I have decided to move that message to the debug" level and add a note to the Readme (which is actually already there), so user will know that color retrieval only works on static mode. The change will be part of the next binding update on OH3 (note that a backport to OH 2.5 is not planned).
Fine. FYI, I've set a static pattern. I only use OH to send power ON/OFF and detect tap-gestures. For other settings I use the Nanoleaf App.
Weird that you are on static mode. Can you set the binding to TRACE for a small amount of time until at least one of the messages appear and provide the HTTP Request and Response (I would expect a 404 response here) just before the warning? Also could you send the following request to the controller?
http://nanoleafipaddress:16021/api/v1/aLtuKzpfdQmJ2xxxxxxzqmjjd4EPvVvHyj7HK7/effects
nanoleafipaddress: replace with the IP of the controlloer aLtuKzpfdQmJ2xxxxxxzqmjjd4EPvVvHyj7HK7 : replace with the secret (I am sure you can see it in the above trace).
This may give us the information if the controller is currently on static which may be an idea to prevent the message at all.
The TRACE is in the log above. There is indeed a 404 in there.
Messages still there:
2021-01-27 12:30:01.639 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:31:01.731 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:32:01.794 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:33:01.891 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:34:01.961 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:35:02.047 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:36:02.115 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:37:02.205 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:38:02.286 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:39:02.362 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:40:02.477 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:41:02.521 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:42:02.595 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:43:02.690 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:44:02.773 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:45:02.845 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:46:02.925 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
2021-01-27 12:47:03.008 [WARN ] [nternal.handler.NanoleafPanelHandler] - Panel data could not be retrieved as no data was returned (static type missing?) : OpenAPI request did not get any result back
My brag:
I get a totally different answer with that request
{ "version": "2.0", "animName": "Static", "animType": "static", "animData": "14 36604 1 255 255 255 0 5 10523 1 255 255 255 0 5 37121 1 255 255 255 0 5 16398 1 255 255 255 0 5 42064 1 255 255 255 0 5 54086 1 255 255 255 0 5 186 1 255 255 255 0 5 60147 1 255 255 255 0 5 33626 1 255 255 255 0 5 45187 1 255 255 255 0 5 39163 1 255 255 255 0 5 3512 1 255 255 255 0 5 61141 1 255 255 255 0 5 19209 1 255 255 255 0 5", "palette": [ { "hue": 0, "saturation": 0, "brightness": 100, "probability": 0.0 } ] }
Strange. You also have the Canvas right?
Yes, I have several devices for the purpose of the binding maintenance. This is the answer of my canvas.
Hm, I tried a non solid effect just now, and the only thing changing was the last Select: entry.
Nice kitchen, @olemr!
FTR, I can confirm and reproduce the issue. Also seeing the warnings even if the mode is static.
Btw, I didn't yet get the tap events to work and also experience a huge CPU load by this binding.
The change will be part of the next binding update on OH3
@stefan-hoehn Do you already have something in the working there? If so, it would be great if you could already push a WIP PR, so that I could potentially also help on analysis and enhancements.
Btw, I didn't yet get the tap events to work and also experience a huge CPU load by this binding.
Tap events from the single panel I have included so far, works fine, with no CPU usage spike noticeable when watching top. (Double taps turns all panels on/off. I have not yet figured out how to turn that off.)
@kaikreuzer , how many panel items have you included? I will try including more panels and see how that goes.
I have only included the panels in my dev environment so far - I have 15 altogether.
OK, just added 101 more panels, and it went well. CPU load was high for 10-15s after the bulk add, but settled. Tap on the linked panel still turns my Z-Wave light on/off through a rule, no CPU spike. Tapping any of the other panels produced a log entry reveling its ID.
But, the WARN log entry is per panel, so I now get 102 of them once a minute.
The change will be part of the next binding update on OH3
@stefan-hoehn Do you already have something in the working there? If so, it would be great if you could already push a WIP PR, so that I could potentially also help on analysis and enhancements.
Yes, the change is basically as simple as moving it to debug level which I did already. I had hoped I could easily detect the "static" mode by requesting the data as seen above but for some strange reason Ole's canvas seems to respond differently. Maybe I will eventually include that request in spite of that which may not make it worse for some people but helps others.
@kaikreuzer Which type of nanoleaf do you have? As mentioned somewhere else I need to detect the type because not all types support touch and I only start the touch handling if I am sure that type supports it. Up to now only NL29 (the first squares and the ones that Ole has) was supported and I will support NL42 (the one that are called "shapes" by Nanoleaf) from now as well.
You can look up the type in the controller's properties like so
The go to the edit mode of the controller and the "nanoleaf device type": it should say "CANVAS" and not "light panel".
Give me the weekend as I would like to do some QA and will push it to my repo and you can help me getting it merged from there.
cheers Stefan
Which type of nanoleaf do you have?
I have the shapes (hexagon). The Thing property is indeed NL42. I'll happily wait until after the weekend for your updates :-)
I assume this has been fixed as many PR’s have merged, can someone confirm and close this issue?
I agree @lsiepel, this is not an issue anymore from what I know. Thanks for detecting the open issue. @olemr if you think this is still the case pls get in touch with me directly.
The WARN entries in the log started as soon as I added the panel item. With only the controller, it was silent.
Expected Behavior
No WARNings logged
Current Behavior
Issue 1: INFO->TRACE @ 22:07:14.883
2 items added by MAIN UI:
Context
These could perhaps be issues caused by 102 panels?
Your Environment
OH3 build 2158 openhab> list | grep -i nano 233 │ Active │ 80 │ 3.1.0.202101210334 │ openHAB Add-ons :: Bundles :: Nanoleaf Binding x64 system running on Ubuntu 18.04LTS