Closed saabirsa closed 4 years ago
Or would it be better to only log when the value changes? Ie delta’s
Yup, that could work also, but perhaps have this adjustable in the config.json
file? (i.e. debug vs logging as it is now vs deltas only)
Any one of the following, or all three, would be great.
1) set min frequency of logs 2) only log deltas 3) only log deltas X% larger than current (I am thinking of temp sensors that read .01 degrees). They always fluctuate by that .0x amount but I don’t need that granularity of data.
Okay, I changed the logging to only log when the value changes aka Delta. And use debug logging when the value doesn't change. This should drop the logging immensely.
Please update to the latest
All working as expected, many thanks!
Although logging has been significantly reduced, I do see the logic in @StumbleNOLA's 3rd suggestion above; my Humidity sensors are reporting fluctuations of 0.1 and this now forms the bulk of the statusUpdate
messages.
In the latest version I changed the logic to only update on whole number changes, so the frequency should be significantly lower now.
This is a great compromise. I can’t think of many HomeKit things where I need granularity beyond 1 unit. Maybe Celsius degrees, where .5 might be desirable, but I work in Fahrenheit.
Would it be possible to consider reducing the number of
statusUpdate
messages being written to the logs? I have roughly 33 messages on the console every minute. I've ensured thatdebug
is set tofalse
.As a backlog enhancement, it would be even better to configure these on a per device basis within Homebridge Config UI X. For example, switching off
statusUpdate
for BME680 devices only.