Pruning/deleting event logs

Is there a way to prune/delete events from a device? I have a device that is sending data to HE every 3 seconds. I know this is a lot, and it's contrary to the recommendation of @ogiewon. But, I wanted fast response, and figured I'd try it.

It doesn't seem to slow the hub down at all, except when I go to view the events for the device, it takes a long time to load. Can I delete event logs with a rule or prune them somehow? In reality, I only need to keep the last few mins of events.

Pruning is done automatically by the system. You can eliminate half of the events for that device though...:wink:

Just comment out the sendEvent() call for the "lastUpdatedTime" attribute in the Child Sound Pressure Level driver code's parse() routine.

I'll do that. In doing some reading, it looks like pruning is done every morning to get it down to 1000 events per device. However, it's just after 10am here, and here's what I have for this one:

Doing the math, it must have pruned at around 2am.

Change the polling frequency to ~30 seconds and make the other change I mentioned above and the number of events will be dramatically reduced.

We can try moving the threshold logic into the Arduino code to dramatically reduce sending these events. That will take some more tweaking. For now, do your hub a favor and change that 3 seconds to 30 seconds in the Arduino Sketch.

1 Like