Hi all, I’m new to HA. I migrate from Domoticz and for now all working fine. But one feature is really missing. I have esp8266 with espeasy fw and ds18b20 sensor in pool. Communication is done via mqtt - all working.
But domoticz log lifetime temperatures from sensors and show nice daily / monthly / yearly graphs or you can select custom date range.
In HA I found only history tab, where is only 1d / 3d / 1w period and it’s not possible to easily select only one sensor.
Is there any option how to get history graphs for selected sensor?
Thanks, history-graph have max of 80hrs but mini-graph-card looks like to work for example last 30d by days. I will try it
The problem you might run into is that if you want enough historical data you’re going to have to increase the number of days that the recorder stores. Asking HA to save a year of data in its DB may not be practical, depending on what resources you have dedicated. If you’re using the default sqlite DB, or even mysql/postgresql, you will need to be careful about what sensors you are recording, otherwise your DB size could get excessively large.
For reference, I’m saving only 14 days of data with almost no excluded entities on a postgres db on my NAS. My HA, which is on a RPi3, takes 10 seconds to load the logbook or history. The DB is 325MB.
I personally store temperature data in an Influx database and visualize it with Grafana. It works quite well. I have 5 years of data taking very little space. Influx and other time-series DBs are designed for this purpose, HA is really not.
Good point, I run HA on Debian (virtualenv) which is on LXC container on Turris Omnia router. Data is stored on mSata SSD drive. For db nothing changed, default sqlite is used.
Previously on domoticz is sqlite used too and I don’t have performance problem with 1+ year temperature history. Maybe domoticz don’t save full history, but only hour / day average for daily / monthly graph - just guessing, I never checked what data is saved in sqlite.
Influx with Grafana sounds good, thanks for tip. I will look for some tutorials, because this would be hard to start with this from scratch as HA newbie
Yes, if the data were down sampled it would be less of a problem. I don’t think there is currently a way to do such a thing with the HA recorder DB, unless you somehow managed it yourself.
My current influx db is on a hosted VPS with 1 core, 1GB ram. I’ve got about 8 sensors saving temp and humidity measurements. The measurements are taken every few seconds. Obviously that’s a lot of data points, so loading the entire data set can be pretty slow. Some day I’ll get to down sampling it. If you kept the data set smaller, you might be able to get it running reasonably on your router. I’m sure some people run it on RPis.
Router is 2 core, 2GB ram and second option is move to VPS on NAS. But I don’t need “full history”. Data down sampling may be good way to achieve daily/monthly graphs.
Would be nice, if HA recorder can do this automatically…maybe in future
On the other hand, down sampling can be done with influxdb (this could be good starting point).
I’ll try it when I have more time and post here results and info for others.
I have created a feature request.
up vote if you think it would be better as part of home assistant.
I also came from demoticz.
+1 to this
I am also migrating over to HA after 6 years of using domoticz
I guess I’ll have to keep domoticz running purely for the weather/ temp sensors
You’ve got two practical choices:
- Store more data in HA - really only sensible if you’re talking about a small number of weeks and are using a proper database
- Send that data to influxdb and keep it there for as long as you want. Then you can graph it with any compatible tool you want.
As you have said, we have two options.
- Not practical for longer time frames as you mentioned.
- You will need to lean influxbd. From the looks of things getting into SQL in order to reduce the sample size and start averaging over hours or days depending on how old the data is.
This is the reason people as requesting this, it’s not that there is no way of getting it done, just that we have seen it implemented and know the benefits. It would benefit all users to be able to track this information and not everyone is going to have the skill level needed.
I messed around in the Domoticz database once and saw the historic data (older than a week I think) to be aggregated to avg/max/min per day. Probably that’s keeping things quick and responsive, even on a RPi. Would be great to have this in HA as well so I voted for the feature request! (I’m also comming from Domoticz after 5 years and used these history graphs (temperature / power usage / etc.) quite a lot.)
For now I`ll look into Influxdb, thanks for the tips!