andig / homebridge-fritz

Homebridge platform for Fritz!Box router and supported DECT devices
MIT License
74 stars 21 forks source link

How to disable "Updating guest WLAN" log? #118

Open genfersee opened 4 years ago

genfersee commented 4 years ago

Hi all,

How can I disable this kind of log:

[2020-2-23 8:37:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:38:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:39:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:40:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:41:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:42:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:43:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:44:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:45:33 PM] [FritzBox] Updating guest WLAN [2020-2-23 8:46:33 PM] [FritzBox] Updating guest WLAN

I am not running Homebridge in debug mode... Thanks in advance!

andig commented 4 years ago

It's the same logging we're using everywhere else. Are you saying this is the only kind of FritzAPI logging you're seeing?

genfersee commented 4 years ago

Hi @andig , yes, I can only see those logs from this plugin. Also when activating/deactivating guest wlan. Is there a way not to show those « Updating guest WLAN » logs? I would like to see logs only when I activate or desactivate guest WLAN. :-)

andig commented 4 years ago

Did you check the readme for deactivating guest? As for switching that‘s not helpful as it might have been changed in between on the FB.

I‘m confused why you see these but no other fritz plugin log statements...

genfersee commented 4 years ago

The Guest WLAN switch is indeed working well. I am using login/passord authentication on my FB 3490. But I would like to get rid of these WLAN Guest update logs.

Plugin config is as follow:

    {
        "platform": "Fritz!Box",
        "name": "FritzBox",
        "username": "admin",
        "password": "xxxxx",
        "url": "http://192.168.xx.xx",
        "interval": 60,
        "concurrent": true,
        "devices": {
            "wifi": {
                "name": "Public",
                "display": true
            }
        },
        "options": {
            "strictSSL": false
        }
    },

During homebridge initialization, I indeed have those init logs from the plugin, here they are from start:

[2020-2-24 7:13:58 AM] Loaded config.json with 0 accessories and 5 platforms. [2020-2-24 7:13:58 AM] --- [2020-2-24 7:13:58 AM] Loaded plugin: homebridge-config-ui-x [2020-2-24 7:13:58 AM] Registering platform 'homebridge-config-ui-x.config' [2020-2-24 7:13:58 AM] --- [2020-2-24 7:13:58 AM] Loaded plugin: homebridge-fritz [2020-2-24 7:13:59 AM] Registering platform 'homebridge-fritz.Fritz!Box' [2020-2-24 7:13:59 AM] ---

[2020-2-24 7:14:01 AM] [FritzBox Bern] Initializing Fritz!Box platform... [2020-2-24 7:14:01 AM] [Config] Initializing config platform... [2020-2-24 7:14:01 AM] [Config] Spawning homebridge-config-ui-x with PID 7138 [2020-2-24 7:14:01 AM] Loading 0 accessories...

[2020-2-24 7:14:02 AM] [FritzBox Bern] Fritz!Box platform login successful [2020-2-24 7:14:02 AM] [FritzBox Bern] Discovering accessories [2020-2-24 7:14:02 AM] [FritzBox Bern] Using tr64 api for guest Wifi [2020-2-24 7:14:05 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:14:07 AM] [Config] Homebridge Config UI X v4.10.3 is listening on :: port 8080 [2020-2-24 7:14:08 AM] [FritzBox Bern] Alarm sensors found: none [2020-2-24 7:14:08 AM] [FritzBox Bern] Buttons found: none [2020-2-24 7:14:09 AM] [FritzBox Bern] Outlets found: none [2020-2-24 7:14:09 AM] [FritzBox Bern] Thermostats found: none [2020-2-24 7:14:09 AM] [FritzBox Bern] Sensors found: none [2020-2-24 7:14:09 AM] [FritzBox Bern] Initializing platform accessory 'Public'... Setup Payload: X-HM://XXX Scan this code with your HomeKit app on your iOS device to pair with Homebridge: XXX
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ XXX-XX-XXX │     
└────────────┘     

[2020-2-24 7:14:09 AM] Homebridge is running on port 51824. [2020-2-24 7:15:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:16:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:17:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:18:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:19:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:20:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:21:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:22:02 AM] [FritzBox Bern] Updating guest WLAN [2020-2-24 7:23:02 AM] [FritzBox Bern] Updating guest WLAN ...

genfersee commented 4 years ago

@andig , do you think it would be possible to add an option to be able to disable the "Updating guest WLAN" logs?

genfersee commented 4 years ago

Hello, When setting the polling interval to to get only 1 refresh per 24h: "interval": 86400,

I still get regularly the update log:

[2020-5-1 15:41:16] [Config] Homebridge Config UI X v4.17.1 is listening on :: port 8080 [2020-5-1 15:41:46] [FritzBox Bern] Getting guest WLAN state [2020-5-1 15:43:06] [FritzBox Bern] Getting guest WLAN state [2020-5-1 15:43:42] [FritzBox Bern] Getting guest WLAN state [2020-5-1 15:50:16] [FritzBox Bern] Getting guest WLAN state [2020-5-1 15:50:17] [FritzBox Bern] Getting guest WLAN state

Kompass02 commented 4 years ago

It would be very nice, if you can create an option to disable this kind of logs. That are to much information, so I can't use my log anymore to see Problems from the Day! My Log.... 19.5.2020, 09:09:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:09:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:09:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:09:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:09:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:10:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:10:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:10:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:10:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:10:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:11:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:11:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:11:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:11:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:11:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:12:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:12:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:12:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:12:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:12:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:13:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:13:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:13:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:13:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:13:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:14:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:14:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:14:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:14:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:14:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:15:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:15:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:15:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:15:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:15:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:16:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:16:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:16:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:16:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:16:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:17:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:17:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:17:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:17:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:17:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:18:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:18:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:18:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:18:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:18:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:19:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting guest WLAN state 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570131018 state 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570131018 temperature 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570218872 state 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570218872 temperature 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570218887 state 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570218887 temperature 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570152256 state 19.5.2020, 09:19:44 [FRITZ!Box 7590] Getting outlet 116570152256 temperature 19.5.2020, 09:19:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:19:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:19:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:19:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:20:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:20:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:20:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:20:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:20:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:21:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:21:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:21:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:21:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:21:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:22:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:22:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:22:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:22:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:22:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:23:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:23:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:23:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:23:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:23:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:24:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:24:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:24:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:24:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:24:46 [FRITZ!Box 7590] Updating outlet 116570152256 19.5.2020, 09:25:43 [FRITZ!Box 7590] Updating guest WLAN 19.5.2020, 09:25:46 [FRITZ!Box 7590] Updating outlet 116570131018 19.5.2020, 09:25:46 [FRITZ!Box 7590] Updating outlet 116570218872 19.5.2020, 09:25:46 [FRITZ!Box 7590] Updating outlet 116570218887 19.5.2020, 09:25:46 [FRITZ!Box 7590] Updating outlet 116570152256

ronny332 commented 4 years ago

In my case the "Updating outlet" entries where flooding the log so that nobody could find any other entries any longer, what's not the design of a normal log file.

The fast and easy action was to comment out the log entry at line 147 at the file outlet.js. It doesn't look like there is any kind of specializes log handling, everything runs through the normal (referenced) log path. So, this is quick and dirty, but it works for now.

genfersee commented 4 years ago

Dear @andig , would it be possible to have an option to disable such log? Thanks in advance :-)

andig commented 4 years ago

Dear @andig , would it be possible to have an option to disable such log? Thanks in advance :-)

I would be happy to accept a PR, unfortunately I have very little time right now.

genfersee commented 4 years ago

Thanks, this is not urgent at all but it is great if you could add this to your back log :-)