Closed wimleers closed 1 year ago
So it seems that the plan is to offer a single platform-wide log level?
Yes, the Log Level of the platform and of the other accessories are linked to that on the Electricity accessory.
I could do a separate Log Level per accessory, but there's only one interface to the P1 port. I still haven't figured out how to expose a Log Level for the cross-accessory functions of the plugin (for debug messages on the P1 telegrams) vs a Log Level for an accessory (for the log messages on HomeKit changes and debug messages on changes to the corresponding device).
[2/23/2023, 6:09:58 PM] [P1] Gas: Total Consumption: set to 553.963 m³ (from 553.896 m³)
These are regular log messages (level 1); set Log Level to 0 to suppress them.
These are regular log messages (level 1); set Log Level to 0 to suppress them.
That's what I did. The Electricity
Log Level is set to 0
, but Gas
and Electricity Delivered
continue to log as if it's still at 1
!
Yes, the Log Level of the platform and of the other accessories are linked to that on the Electricity accessory.
That is, they were originally, but it seems that's broken.
Fixed in v1.3.4.
🥳
The Log Level characteristic on
Electricity
is super handy! 🤩But unfortunately I cannot do the same for
Gas
, which is why I have entries like this:… I'd rather not have those.
I first thought that this sole log level affected all accessories, but that appears to not be the case. I'm running Homebridge with debug mode off (no
-D
), so that can't be the reason for the above either.A quick search in the codebase suggests this is why it's happening:
combined with this code in
homebridge-lib
:→ https://github.com/ebaauw/homebridge-lib/blob/v6.3.10/lib/AccessoryDelegate.js#L304-L323
So it seems that the plan is to offer a single platform-wide log level? I'd be fine with individual toggles too — and in fact, that may even be preferable! Perhaps one would be observing
Gas
consumption closely but notElectricity
, or vice versa!