Expaso/hassos-addons

Timeseriesdb missing coluumns

Closed this issue · 1 comments

Describe the bug
I recently migrated from mariadb to postgresdb + timeseries db using this addon. After installation and switching the db_url to point to the timeseriesdb database I noticed that the postgresdb was missing columns in the states table. The issue first appeared when I tried to use the Jupyterlab Addon to query the new timeseriesdb and all the queries were failing because it was looking for the 'domain' column. After closer inspection I realized that the new timeseriesdb was missing the 'domain' and 'created' columns in the states table.

To Reproduce
Steps to reproduce the behavior:

  1. Install Timeseriesdb and pgAdmin by adding repository to hassos addons: https://github.com/Expaso/hassos-addons
  2. Install both addons
  3. Installed the ltss custom addon
  4. started pgAdmin and view columns in state table

Expected behavior
I expect the column Schema to match the HA Database documentation as well the Mariadb.

Screenshots
Mariadb homeassistant db state table columns:
image

Timeseriesdb homeassistant db state table columns:
image

Desktop (please complete the following information):
image

Smartphone (please complete the following information):
N/A

Additional context
Update: I just checked the content of the 'domain' and 'created' columns in my Mariadb homeassistant db that has a couple of weeks data and both of these columns only contain NULL. Must have been some "breaking change' that HA no longer populates these two columns. It would be nice if they updated the documentation. So unless there is something unique about my system then we can close this issue as there is no point adding columns that will not contain any data.

image

Hi @andjones132 !

Thank you for using the addons!
The columns and schema's you see are not under my control.

You can use PostgreSQL to replace the SQL Lite solution, which has all the the short-term datavalues in int (like the past 24 hours),, and you have the LTSS inegration, which provides a far longer timespan of data.

The latter was based on the HA recorder, so the schema's are alike. I think you should contact the author of the LTSS integration to match the schema: https://github.com/freol35241/ltss/issues