Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
nope
Did you follow any online instructions? If so, what is the URL?
Well, I try to find inspiration from here, but I’m not using prometheus but influxDB, nor using grafana cloud, therefore I will have to build my dashboard from scratch (I guess?)
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.
I’ve advanced a bit and I’ve added all my switches and lights in a “real time” dashboard. I switched to 10s.
Looks “ok” so far, as I can see the Watt values been updated when I start to use electrical devices.
now, I started building another dashboard where I’d like to get the daily consumption of all these switches and lights, here is how it looks when I do pick “last 24h” in grafana :
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 ?