Nanoleaf Binding spams log if device is offline

Hey there =)

Today I unplugged my Nanoleaf Aurora from the due to some construction around it. I noticed that the binding spams the log if the device is not reachable:

I fixed it with log:set ERROR org.openhab.binding.nanoleaf.internal.handler.NanoleafControllerHandler however it would be nice if the binding would log the tell about the device going offline and not sending a log message every ~15 sec.

Is this something for a github issue ot a another thread where this issue is belongs better?

That’s a great candidate for a defect report.

But presumably, you’d like it to recover when the box is plugged back in?
It really ought to be putting the Thing status through an error cycle.
If it did that, you can manage how you want it to shut up and/or retry yourself, in rules.

In GitHub in the add-ons repo?

Yes for sure.

Do I really want that? None of my other bindings spam out error messages when device goes offline. It looks more like “device changed from online of offline”…“device changed from offline to online”. Then I can work with rules too.

How? Can I set the log level in a rule or what we’re targeting with this?

I’ve no idea. It’s up to the binding author what to do about errors - varying from saying nothing, to logging lots of diagnostics and setting the parent Thing offline.

If it says nothing, you’d have to make your own arrangements to decide if is working and what to do about it.

If it does something to a Thing, you can detect that with rules fairly easily, and do what you want - like sending alerts.
Doing what you want can also include taking charge of recovery yourself. Maybe, let’s not try to recover for a couple of minutes instead of every ten seconds. In your case, maybe lets not try to recover until morning or something.

If it only logs, you might be able to do something similar with a log scanning tool, but it’s not very efficient.

If you do not want to take some control of the recovery/retry process yourself, that’s reasonable. But maybe you’d like to be offered some options by the binding author - how often to retry for an obvious example.

I’m not suggesting any of these things are what you need in your situation - but they should be taken into account in any enhancement solution.

Your particular situation is unusual - it’s not a “fault” as such, you’re deliberately switching a box off for the night, and don’t need it making a fuss about it. That’s fair enough, but is probably going to require some kind of custom work on your side to get to that end. The “ordinary” user is by default going to expect logs and recovery attempts.

No, what I have in mind is manipulating the Thing, which you can do in rules.
For example, you could set the Thing OFFLINE and the binding will not then try to communicate, so no errors.
Your rule can then set the Thing ONLINE an hour later, and the binding will attempt recovery. If that fails, round you go again.
Obviously you need a detection of some kind to trigger the rule - the binding setting Thing OFFLINE - COMMUNICATION ERROR typically, but at the moment it seems this binding doesn’t do that.

Thinks - if this whole thing is a one-off because you are doing building work, have you simply gone into PaperUI and set the relevant Thing offline? And set it back when you’re finished.