InfluxDB is a very good and well-integrated solution to sensor data recording. The current HA InfluxDB component is not yet a working replacement for the history/logbook/recorder components (for a SQL database) so that HA does not need a SQLAlchemy-supported database to drive the HA UI data. In addition, the data that is currently being sent to InfluxDB is incomplete (such as event/triggered data, not just state changes).
I believe there will be a significant performance increase by using InfluxDB as an alternative HA data store. There are the obvious other benefits as well.
There are two paths to add this feature. We could either get SQLAlchemy support for InfluxDB so that most of the features for the existing core components like “history” would be supported, or we could keep the components separate and then add a configuration option to the history component use InfluxDB instead.
What initially needs to be done
- Fix the InfluxDB component to record all data (includes all events - not just main state changes, etc). Also needs to support recording attribute changes even when main state doesn’t change.
- Modify the History component so it can be configured (with the config file) to use InfluxDB instead of the recorder component.
Future tasks
- Integrate InfluxDB directly into the recorder component or SQLAlchemy
- Add more direct UI support for custom data queries (such as grafana integration)