I started using Hubitat back in the beginning of May of this year.
I noticed that the hub is keeping event logs of every device since it was installed, close to four months now. Every contact sensor, every temperature change, every motion event, etc....
This all came to my attention when I was looking at the log for my weather device. The log has over 32,000 entries and when I clicked on "Events" from the device page it took about 50 seconds for the log page (listed below) to display. During that time the hub was seemingly locked up. Everything stopped until this gargantuan log came up. Each click through the log takes almost a minute dragging the hub down to a stop.
So the question is; What are the procedures for pruning these logs? Could some of the slowdowns happening be attributed to this?
Currently on v2.1.4.128 but I have been through many version upgrades, I assume that logs are maintained by the core operating system but maybe I'm wrong on that account. I checked several devices and the logs go back to the date they were installed.
yes, every day at 2AM if memory serves system event logs are pruned.
Pruning consists of removing all but the most recent 1000 events per device.
An event consists of a distinct name value pair, switch:on and switch:off are two separate event pairs.
We've discussed having an option to change the limits of this, but it's not a high priority at the moment.
it's done for all of them, it figures out what all of them are, then leaves behind 1000.
there is no matching a preset list or anything if that's what you mean
if you have 5000 entries for a custom attribute named "yada" with a value of "putz" on each of 5 different devices, after pruning is complete there will only be the most recent 1000 for each of those 5 devices...
Given the amount of overhead involved in the above, this is one reason I'm not an advocate of creating events for the sake of simply displaying them in the current states of the driver details...
Current states is not an adhoc display area where one can just poke in random data for the sake of visibility.
If the event serves no purpose, meaning there isn't currently, nor will there in any probably ever be an app that subscribes to it, then it shouldn't be an event...
Yes, we realise, but it's superflous. It records every track ever played on Sonos. 7 speakers around the house. it records the weather in 5 minute increments. I'd love to turn off the ability to record these events, in the device event page.
well you didn't show the entire event screen, nor the driver current states, but lets assume that device produces 10 types of events with a possible 5 values each, 10 * 5 * 1000 = 50000, I can't think of any other way of explaining this.
Please post a screen shot of that drivers current state...
But to your point, sure the more events in your system the bigger your database is going to be, that's where they're stored after all, and why I keep telling people not to create worthless events...
Yup, that's it.
And honestly of the 15 attributes listed only the last 4 are relevent to automations...
So if you don't want 50k events for that device day after day, then modify the driver, then delete and reinstall the device.