The data I’m querying is located on an “old” influxDB 1.8 I’m running in a home assistant addon.
Therefore it is influxQL.
My goal is to migrate everything to a newly installed 2.x dockerized version (already running on my unraid server).
I forgot to mention that I’ve already included the meross plugs in my HA dashboard, and that the calculation of the costs also is an issue, as you can see it is reset every day at midnight, here is how it looks like :
anyway, I plan to totally skip calculations inside HA, it’s simply not there yet. I want to keep the on/off switch capability, of course, but will move all my nice and fancy graphs to grafana. This is the reason why I’m making my first post here
I made some advancement, and finally figure out that influxdb is not feeding grafana as much as I’d like. But now I have another issue. I have devices, that are clearly in my queries list, that disapears from my dash !
Hi @raph1 I noticed in your queries that you are grouping by 1s. Is that necessary? How often is your plug / sensor data being collected? If it is, say every 1 minute, then change the grouping to 1m and see if that helps.
My understanding acc. to this is that basic GROUP BY time() queries rely on the time_interval and on the InfluxDB database’s preset time boundaries to determine the raw data included in each time interval and the timestamps returned by the query. If you set it to 1s, it creates 10 times more intervals than you have.
problem is, I definitely can see the problem here. The unraid server I’m using consumes an average of 150W 24/7.
As comparison, the “pacman” lamp uses 18W.
As you can see, for the same period (24h), the pacman lamp reports 7.78W and the unraid server, only 2.03W.
the reason is what I listed above. The unraid server runs on a meross plug that do reset its KwH values every day at midnight, while the tuya plug actually reports the total kWh usage since I plugged it.
What is the magic trick to make sure the values reported by my meross plugs are not reset every day ? Somewhere, I should have a way to “take yesterday value” and sum it to the next day right ?