I wonder if those using the energy integration, especially if previously you rolled your own, could comment.
I have had a energy monitoring setup for years. I feed data from iotawatt to influxdb, and I have nice fancy dashboards in grafana. This was before real energy handling in HA even started.
I have a fairly large amount of data - 30 days of 1 minute intervals for power, 90 days of one hour intervals for energy and 2 years at daily intervals for energy. I have about 30 or 40 monitors depending on how you count (e.g. power vs energy = 1 thing or two).
I could (I think) feed those into HA as sensors. At least current data, I doubt i can feed in the historical data, though not sure.
What do I gain with the energy integration?
Well, one thing is automated handling (or so I read) of upstream devices. I do that now in convoluted influxdb sql queries, handing unmonitored devices. I am not currently including HA devices (such as shelly) that don’t go into influxdb now. So that would be a significant win.
How bad is dumping a lot of data into home assistant on its database?
I’m actually curious why HA didn’t use Influxdb, since it’s almost by definition a bettery time series database? Is this going to run a lot slower than Influxdb does?
Has anyone gone from the DIY, especially influxdb route and changed to HA?
General advice?
Is there a way to feed historical data from Influx db to HA/s sensors not just current?
I’m aware there is an integration to expose influxdb values as sensors if that is your question.
It’s not obvious I can load historical data since recording a sensor state change is a “now” thing that HA accepts and records at the point done. And I see I can do a scan_interval to control how often it happens.
Or am I missing something?
I can’t run the HA’s built in energy integration from Influxdb, right?
Parts of the documentation makes it sound like the influxdb query is live, i.e. when HA needs it, it runs and pulls history from influxdb.
But when I try it, it seems to be pulling the latest item from influxdb and stashing it in HA.
Here’s an example:
sensor:
- platform: influxdb
queries:
- name: MainTotalIn
where: '"ct" = ''MainTotalIn'' and time > now() - 7d group by time(1m)'
measurement: "Watts"
unit_of_measurement: "W"
database: "HA"
field: "Watts"
When I view that under Setup, Integrations, entities under show more it shows points that were valid at the time it was created, but nothing further back.
So I’m confused… when I define a sensor like this what happens, is the data drawn “now” from it and saved in HA?
Or is data drawn historically from influxdb as needed based on HA’s need?
I’d love to have the latter, but I seem to be getting the former.
Yeah, I read the doc again, and the hints that it does old data were in my head not in the words.
Back to my original question – is there anyone who did their own energy in influxdb long ago, and decided to change to the current built in energy integration? Did it work better, or was it more work changing than it was worth?
The only thing I’ve seen so far that looked really better was the parent/child relationships in sensors. That’s tedious in my current database (really more than tedious, I just don’t use small spot sensors like smart plugs).
I also guess I can just start and build parallel HA sensors from influxdb and not change my back end. But just looking for experiences before I start down a rabbit hole that might have no rabbits at the end.