kiwi-cam / 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
300 stars 95 forks source link

Turn off logging levels for temperature/humidity updates #603

Open mkizzle2906 opened 1 year ago

mkizzle2906 commented 1 year ago

The new update add "Adjusted logging levels for temperature/humidity updates" and it show full of my homebridge logs. How can I turn the logging off for temperature/humidity sensor ?

kiwi-cam commented 1 year ago

Just adjust (or set) the logLevel on the accessory: https://broadlink.kiwicam.nz/#common-accessory-options

The temperature queries are logged at info, so adjust it to warn to avoid them.

murtazabasrai commented 1 year ago

Hi @kiwi-cam, I adjusted the logLevel to "warning" yet the logs are being printed after restarting homebridge server: Accessory config:

"accessories": [
                {
                    "name": "Study Temperature",
                    "type": "temperatureSensor",
                    "host": "192.168.1.xx",
                    "logLevel": "warning"
                }
]

Logs:

[21/06/2023, 19:17:43] [BroadlinkRM] [INFO] Study Air Conditioner onTemperature (29.02)
[21/06/2023, 19:17:43] [BroadlinkRM] [INFO] Study Air Conditioner onHumidity (53.08)
[21/06/2023, 19:17:46] [BroadlinkRM] [INFO] Study Air Conditioner onTemperature (29.02)
[21/06/2023, 19:17:46] [BroadlinkRM] [INFO] Study Air Conditioner onHumidity (53.08)
[21/06/2023, 19:17:46] [BroadlinkRM] [INFO] Study Air Conditioner onTemperature (29.02)
[21/06/2023, 19:17:46] [BroadlinkRM] [INFO] Study Air Conditioner onHumidity (53.08)

Let me know if I am missing something? Thanks!

murtazabasrai commented 1 year ago

Update: The "info" logs about temperature and humidity stopped displaying when I added the "logLevel": "warning" in the airconditioner accessory too.

Ref:


"accessories": [
    {
        "name": "Study Temperature",
        "type": "temperatureSensor",
        "host": "192.168.1.xx",
        "logLevel": "warning"
    },
    {
        "name": "Study Humidity",
        "type": "humiditySensor",
        "host": "192.168.1.xx"
        "logLevel": "warning"
    },
    {
        "name": "Study Air Conditioner",
        "type": "air-conditioner",
        "host": "192.168.1.xx",
        "minTemperature": 17,
        "maxTemperature": 30,
        "defaultCoolTemperature": 26,
        "defaultHeatTemperature": 29,
        "replaceAutoMode": "cool",
        "ignoreTemperatureWhenOff": true,
        "tempStepSize": 1,
        "logLevel": "warning",
        "data": {}
    }
]
rfcarv commented 1 year ago

@murtazabasrai

Thank you. Your solution works!

PS: Same problem as #594 CC: @kiwi-cam

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Movieaholic commented 5 months ago

I did this and there was no change to the amount of info warnings about temperature and humidity. Tried setting log level warning for the whole plugin didn't work tried setting on the accessory level didn't work either

{ "name": "Bedroom Temperature", "type": "temperatureSensor", "host": "", "loglevel": "warning" },

[2/26/2024, 12:11:43 AM] [Broadlink RM] [INFO] Lounge Heat Pump onTemperature (20.1) [2/26/2024, 12:11:43 AM] [Broadlink RM] [INFO] Lounge Heat Pump onHumidity (54.1) [2/26/2024, 12:11:43 AM] [Broadlink RM] [INFO] Hallway Heat Pump onTemperature (22.8) [2/26/2024, 12:11:43 AM] [Broadlink RM] [INFO] Hallway Heat Pump onHumidity (58.3) [2/26/2024, 12:11:45 AM] [Broadlink RM] [INFO] Lounge Heat Pump onTemperature (20.1) [2/26/2024, 12:11:45 AM] [Broadlink RM] [INFO] Lounge Heat Pump onHumidity (54.1) [2/26/2024, 12:11:45 AM] [Broadlink RM] [INFO] Hallway Heat Pump onTemperature (22.8) [2/26/2024, 12:11:45 AM] [Broadlink RM] [INFO] Hallway Heat Pump onHumidity (58.3) [2/26/2024, 12:11:46 AM] [Broadlink RM] [INFO] Bedroom Temperature onTemperature (22.36) [2/26/2024, 12:11:46 AM] [Broadlink RM] [INFO] Bedroom Temperature onHumidity (57.19) [2/26/2024, 12:11:56 AM] [Broadlink RM] [INFO] Bedroom Temperature onTemperature (22.36)

mitchplze commented 5 months ago

Just adjust (or set) the logLevel on the accessory: https://broadlink.kiwicam.nz/#common-accessory-options

The temperature queries are logged at info, so adjust it to warn to avoid them.

I have no air-conditioners, and setting warning on the accessory worked for me. 👍

No logs are certainly better than every 10 seconds * 4 devices.

@Movieaholic maybe case sensitivity on loglevel vs logLevel?

image

@kiwi-cam It would be great if this could be added as a definable accessory property, similar to how it's being done on air-conditioners with temperatureUpdateFrequency and maybe something like humidityUpdateFrequency.

Cheers

kard8 commented 1 month ago

@Movieaholic maybe case sensitivity on loglevel vs logLevel?

Thank you so much for the clarification.