rnilssoncx / homebridge-pico

Expose Lutron Pico Remotes in Homebridge: https://github.com/nfarina/homebridge
MIT License
63 stars 6 forks source link

Extraneous log messages for keep alive #7

Closed jdberry closed 3 years ago

jdberry commented 3 years ago

Pico seems to be writing log messages about keep alive very frequently. Perhaps these should be turned down or turned off so they don't overwhelm the log? Though of course the fact that a keep alive is being performed is good, it doesn't seem necessary to constantly log when doing so:

[11/13/2020, 9:17:51 AM] [Pico] [192.168.0.49] Writing Keep Alive
[11/13/2020, 9:17:51 AM] [Pico] [192.168.0.49] Bus Data: GNET> 
[11/13/2020, 9:18:51 AM] [Pico] [192.168.0.49] Writing Keep Alive
[11/13/2020, 9:18:51 AM] [Pico] [192.168.0.49] Bus Data: GNET> 
[11/13/2020, 9:19:51 AM] [Pico] [192.168.0.49] Writing Keep Alive
[11/13/2020, 9:19:51 AM] [Pico] [192.168.0.49] Bus Data: GNET> 
[11/13/2020, 9:20:51 AM] [Pico] [192.168.0.49] Writing Keep Alive
[11/13/2020, 9:20:51 AM] [Pico] [192.168.0.49] Bus Data: GNET> 
[11/13/2020, 9:21:51 AM] [Pico] [192.168.0.49] Writing Keep Alive
[11/13/2020, 9:21:51 AM] [Pico] [192.168.0.49] Bus Data: GNET> 
rwgunther commented 3 years ago

I agree. I'd love to see this changed (or have an option) to only report exceptions.

rnilssoncx commented 3 years ago

Do you have quiet set to true in your config?

rwgunther commented 3 years ago

You mean the first option in the config? DOH! 🤦‍♂️ (thanks)

jdberry commented 3 years ago

@rnilssoncx I get your point that one can set quiet mode. I would argue, however, that this isn't the right solution. There is good utility in being able to see the bus activity involving button presses, etc. I would argue, however, that there's not much utility at all in tracking the keepalives.

So I would argue that:

  1. The logging of "Writing Keep Alive" be removed or demoted.
  2. The handling of bus data be changed to log only data that's actually relevant. Whether that means looking for certain characteristics of the lines to log (whitelisting), or by specifically checking for and not logging the lines that result from the keep alive (blacklisting).

My preference, in other words, is to keep quiet mode off, since I like to see the explicit button presses, but to not see keepalives. Perhaps there needs to be another level of logging slightly less verbose than quiet=false, which logs pertinent data.

rwgunther commented 3 years ago

Ahh...yes, yes. I get it. Still see the intentional activity but squelch the keep-alives. Yep. I'd like that, too.

rnilssoncx commented 3 years ago

I'll review this when I am making a few other modifications in the next few weeks.

rnilssoncx commented 3 years ago

The bus logging has been enhanced in v1.0.0. The quiet setting has been deprecated and there is now a buslog setting that will allow you to suppress all bus logging (off), monitor the bus without keep alives (monitor), or see all bus activity and keep alives (full).

The plugin is also now verified. I hope the improvement helps end this crapy year a bit better.

jdberry commented 3 years ago

Thanks!