Hi,
Has anyone attempted to migrate sensor data stored in an InfluxDB database to the HomeAssistant Long Term Statistics (LTS) database?
Way back in the day, before HA had an LTS database, I deployed the InfluxDB add-on and started collecting sensor data for long term storage there. At the time, the HA database could only handle a few weeks data in the recorder database, so it was pretty much the only game in town. I used Grafana to produce analytics for long term trends and so on.
These days, the HA LTS database is very capable and plug-ins like ApexCharts provide more than enough options for charting data. Meanwhile, InfluxDB remains obscure, its query language fiddly, database clients rare and I find Grafana a faff.
But before I can give InfluxDB the boot, I would really like to import the older historical data in my InfluxDB database to the HA LTS database - there is a good few years of useful data there.
Theoretically, it can’t be too hard. The HA LTS database schema is well documented - a script wizard could generate MySQL import statements based on a bunch of InfluxDB queries. If I had any time, I might have a go myself…
…so I’m hoping someone else might have attempted this?