AlexanderBabel / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
46 stars 11 forks source link

debug Option #68

Open perote2000 opened 4 years ago

perote2000 commented 4 years ago

Hello, I have added debug parameter in my config.. like this...

            {
                "name": "TV Living",
                "type": "tv",
                "host": "77:0f:78:5a:d9:d6",
                "pingIPAddress": "192.168.0.45",
                "pingIPAddressStateOnly": true,
                "debug": false,
                "pingFrequency": 3,
                "pingGrace": 24,

I've added this parameter in order to force plugin to disable constant switch state display... as below...

[1/28/2020, 6:36:24 PM] [Broadlink RM] TV Living getSwitchState: false [1/28/2020, 6:36:24 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/28/2020, 6:36:24 PM] [Broadlink RM] TV Cocina getSwitchState: false [1/28/2020, 6:36:26 PM] [Broadlink RM] TV Living getSwitchState: false [1/28/2020, 6:36:26 PM] [Broadlink RM] TV Cocina getSwitchState: false [1/28/2020, 6:36:26 PM] [Broadlink RM] TV Quincho getSwitchState: false

If I set debug true or false.. always the same behavior... constantly it shows state in log... (I know I've set ping frequency to an small period) but I dont want the plugin to store on log on every ping state. Should this debug option affect this? is a bug o a new feature request?

Thanks in advance

kiwi-cam commented 4 years ago

There is no debug option in the config file. Debug is set at the Homebridge level and is off by default: https://github.com/nfarina/homebridge/wiki/Basic-Troubleshooting.

You can set "disableLogs": true to reduce the noise in your logs.

perote2000 commented 4 years ago

But debug is a documented option available documented in https://lprhodes.github.io/slate/#common-accessory-options just wanted to reduce log noise of these accesories only (due they query very often by pinging).

I will try disableLogs option also available as option.

perote2000 commented 4 years ago

But debug is a documented option available documented in https://lprhodes.github.io/slate/#common-accessory-options just wanted to reduce log noise of these accesories only (due they query very often by pinging).

I will try disableLogs option also available as option.

disableLogs works fine, is a shame due it disables all log for the accesory (did now wanted that), but is enough for now.. If there is a way to repair debug option will be great.

kiwi-cam commented 4 years ago

Sorry, you're right. Debug does appear to be a valid option - just not one I've looked at.

The issue is that debug is false by default so your config setting it to false won't change anything. You can set it to true and get more information in your logs - disableLogs is the way to get less

perote2000 commented 4 years ago

I believe that every ping to request state should not be visible when debug is off (as you said, default value when no present) Also I've tried to enable debug (=true), and I was unable to see more debug data in log when I operate the accessory. That is why I said that debug option does not work.

kiwi-cam commented 4 years ago

What type of device are you seeing every ping logged for? I'll take a look.

Could you also share exactly what you're seeing in the logs?

perote2000 commented 4 years ago

Thisis my current config with disableLogs=true

{ "name": "TV Quincho", "type": "tv", "host": "77:0f:78:5a:d9:d6", "pingIPAddress": "192.168.0.248", "pingIPAddressStateOnly": true, "pingFrequency": 3, "disableLogs": true, "pingGrace": 20, "data": { "on": "2600680000012993141113121311141114111411131213111436141113361436143514361411143514361411141113111411141114111312131114361436133614361435143614361300057100012a4814000c570001294914000c5700012a4814000c570001294914000d05", "off": "2600680000012993141113121311141114111411131213111436141113361436143514361411143514361411141113111411141114111312131114361436133614361435143614361300057100012a4814000c570001294914000c5700012a4814000c570001294914000d05" } }

Before with that parameter set to false. the los I see from that device is....

[1/29/2020, 8:31:22 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:31:23 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:31:28 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:31:29 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:31:34 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:31:35 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:31:38 PM] [Broadlink RM] TV Quincho setSwitchState: 1 [1/29/2020, 8:31:38 PM] [Broadlink RM] TV Quincho sendHex (192.168.0.96; 77:0f:78:5a:d9:d6) 2600680000012993141113121311141114111411131213111436141113361436143514361411143514361411141113111411141114111312131114361436133614361435143614361300057100012a4814000c570001294914000c5700012a4814000c570001294914000d05 [1/29/2020, 8:31:45 PM] [Broadlink RM] TV Quincho setSwitchState: 0 [1/29/2020, 8:31:45 PM] [Broadlink RM] TV Quincho sendHex (192.168.0.96; 77:0f:78:5a:d9:d6) 2600680000012993141113121311141114111411131213111436141113361436143514361411143514361411141113111411141114111312131114361436133614361435143614361300057100012a4814000c570001294914000c5700012a4814000c570001294914000d05 [1/29/2020, 8:31:59 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:04 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:05 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:10 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:11 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:16 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:17 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:22 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:23 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:28 PM] [Broadlink RM] TV Quincho getSwitchState: false [1/29/2020, 8:32:29 PM] [Broadlink RM] TV Quincho getSwitchState: false

(you can see Ive turned on and off . at about 8:31...) the rest of log entries are ping sent to query state of accesory... As I said. with debug off (or not set) shoult not be visible I think....