Beside controlling my lights I mainly use HASS to measure temperature, using different sensors around the house. I have some sensors added to the history_graph component which gives a nice view of the data.
However, i would like to store the readings for a longer time so I can view data from e.g. last summer.
What would be the easiest way of getting some kind of (better) database up and running? Is it InfluxDB and Grafana? I would like to store the data, visualize as graphs and calculate some descriptive statistics (mean, median, max, mini etc.)
I run Hass.io using a RPi3. I’m a bit worried about storing the database on the memory card. I also have a Windows 10 computer available (always on as a HTPC), an Asus RT-AC66U router and Google Wifi. I have NOT used or worked with databases previously so I’m a bit confused about all the options.
Many of the guides setting up InfluxDb and Grafana uses “ordinary” HASS, not Hass.io that doesn’t have access to putty commands in the same way.
You can also set up the database on a different PC than on that where Home Assistant is running.
Just add the IP Adress of the Influx/Grafana Host to your configuration.yaml:
influxdb:
host: 192.168.178.10
If you do not mind storing your log data in the cloud, you can also use an external service.
For example, I use Datadog to record my temperature and consumption data.
Works pretty well and you can also make calculatiosn there:
Influxdb is the most common choice for what you want to do, although Prometheus is a viable alternative.
I had influxdb running on my PiB+ for over a year without problems, but I recently moved it to another Linux computer as it started going through periods where it would take all the Pis resources. Ironically, this may have been fixed in the latest HA release
Backup/Restore from influxdb is quite straightforward, so if you do have problems with an SD card (I never have), then it is quite simple to restore data after switching cards.
I don’t use hassio, but I’m sure there will be an addon for influxdb, so I would suggest starting with that.
You can also use a external Host for the Datadog Agent:
Unfortunately it is not recommended to change your Hass.io host system by SSH.
I use Home Assistant on Debian. Maybe someone else can help you to hass.io here better than I.
But as far as I know, except for official Hass.io addons, you have no way to expand your Hass.io host.