ccutrer / balboa_worldwide_app

Ruby library for communication with Balboa Water Group's WiFi module or RS-485
99 stars 27 forks source link

Filtering out #<BWA::Messages::ToggleItem 0> #56

Closed jshank closed 2 years ago

jshank commented 2 years ago

I'm trying to debug bwalink quietly going away after several days of being up.

What's the best way to filter #<BWA::Messages::ToggleItem 0> out of the debug logs? I think the change needs to be in message.rb line 127 but not adept enough at Ruby to filter out ToggleItem type messages with an item of 0.

The issue could be socat or the RS-485 -> IP interface. Debugging is hard because it works fine after I restart the container. I just get a constant stream of these messages in my debug logs preventing me from seeing other behaviors.

D,  read: 7e 07 10 bf 11 00 00 3e 7e
D, from spa: #<BWA::Messages::ToggleItem 0>
ccutrer commented 2 years ago

2.1.0 should filter them out at verbosity 1 or 0. I did a bit of refactoring to make it easier to tweak in the future