Add GUI for recorder and history inclusions, exclusions and settings

Hey guys,

I believe that the recorder and history components although very helpful have not gotten any love on the recent GUI changes.

This makes (primarily new) users (including me at some points) ignore or avoid setting them up correctly as it works out of the box and they would rather not fiddle with something they don’t understand.
People just ignore their DBs and they are getting huge (I recently saw one over 50gb full of nothing interesting).
Also the posts of people asking help to understand the component and set it up are everywhere.

This might affect lots of things but I think that the main issue would be failing sd cards. Unless someone spends the time to move their database somewhere else (practically impossible for an entry level user), leaving the recorder recording all the states creates a burden to Hass and subsequently increases the size and number of reads/writes on the card causing them to fail sooner. (right?)
Does it also increase boot times?

I think that a gui with all the domains and entities with tickboxes where one could tick include / exclude each entity or domain would give us total control over the history / recorder components.

A couple of text boxes to set up purge interval or perhaps a !secret box to enter an external dB url would complete the whole project.

I’m thinking of something similar to the entities page, or even the implementation of the tickboxes in the entities page as extra columns.

I recently added a smartweather sensor which created two new dozens of entities all stored on my recorded. I had to copy paste the entities in excel, then back to a coding editor in order to exclude all that useless (for me) information.
That’s how I came up with the idea.

As I’m writing this (with minimal coding experience) it does not sound like something very difficult to implement.

Again I might be wrong. And the whole idea might be stupid, comments welcome :slight_smile:

What are your thoughts? Would something like this be easily implementable?

Lastly, I ve looked around and have not found something like this. Is there something out there already?

You have my vote.

As a point of reference, its worthwhile to have a look at what’s being proposed for the next version of openHAB (no harm in borrowing good ideas). One developer is spearheading the drive to improve the system’s management UI (and several other things). He has posted a mockup of the proposed UI.

This is the Maintenance page.

This is the page for managing Persistence which is the term used for all databases being used to store openHAB’s data. Take note of how you can use regex to fine-tune what you wish to include, or exclude from, the recording process.

+1
Also the ability to use filters/regex makes sense.

This might be of interest, it completely changed how fast logbook works and reduced the size of the database. My database after 10 days and 50 plus sensors is 60k rows and 50MB.

2 Likes

I’m 110% in favor of this. A GUI to be able to re-sort the entities on the History page would also be awesome.

1 Like

Thanks, just added this to my configuration. :slight_smile:

1 Like

bump… sure would be nice to use the UI to include exclude entities from the recorder/history/logbook.

2 Likes

I’m definitely in favor of this as well - just had to delete a 2.3 GB db file which made startup of HA take longer than 20 minutes (shut it down and deleted the file to get it to start).

As a heads up for anyone that comes across this as an issue while using Home Assistant as a VM on Proxmox - it was also impacting my ability to take snapshots of the VM in proxmox prior to installing updates. The behavior seen was that the snapshot would stay in progress for a long period of time (>10 minutes), with the VM locked. After deleting the home-assistant_V2.db, the snapshot took less than a minute, and completed without any other issues. The other alternative was to take the snapshot while the VM was shut down - for some reason that didn’t come across the issue (even without deleting the .db file).

One model to follow could be the Google Assistant Manage Entities configuration model for Nabu Casa. The dialog allows to select individual entities to be exposed or not but also allows with Manage domains to set whole domains for inclusion or exclusion.

That sounds like a similar task to including or excluding entites for recorder and history. Similar tasks should be solved by similar UI patterns to make it easy for the user.

This, plus a filtering/search bar at the top.

Agreed, gui-configuration for the recorder and history is something that should be on the list for 2021, imho.

2 Likes

It would be fantastic if that feature was implemented