Hello
I’m dummy on Grafana/InfluxDB. I succeed to deploy them to collect data from an energy counter that generates a pulse every [Wh] produced. This number of pulse is recorded in Influx via MQTT.
When I launch the command to display all the data from the 10 last seconds with
select * from ESP_Chaudiere WHERE topic=‘ESP_Chaudiere/Production_Photovoltaique/Count’ and time > now()-10s ORDER BY DESC
I have different outputs, with a number of lines variation I cannot explain:
My objective is to display a value on grafana indicating the real time power production in Watt.
My idea was to sum all the count values the last 10s and multiply by 360 to get in Watt (1 Watt * hour = 3600 J, so on 10s, I have to *3600/10=*360)
How can I create this querry on Grafana ?
Is this correct ?
select sum(“value”)*60 from ESP_Chaudiere WHERE topic=‘ESP_Chaudiere/Production_Photovoltaique/Count’ and time > now()-60s ORDER BY DESC
dmiinc
April 7, 2020, 1:57pm
2
Hello, I have used below link to calculate total home energy consumption from KW information as provided by inverters.
Hi, Wanted to first off say Thanks to all who put in work to make Grafana happen, what an amazing tool. Eternally grateful.
I’m trying to create a dashboard that shows the total power used in kWh. I have the kW demand, as the equipment draws power over time, I see the energy used, but it is not calculated. I’ve searched and found a few power dashboards, but I tried them as well and can’t get it to work.
I’ve tried few things and can’t figure this out. I’m running Grafana 5.0 and influxDB.
[0…
I am thinking it will work for you.
thank you !
Do you know how do I compute the sum of a value from the begining of the ongoing year ?
SELECT sum(“value”) as conso FROM “sensors”.“autogen”.“ESP_Eau” WHERE “topic”=‘ESP_Eau/Compteur_Eau_Pluie/Count’ AND time>(now/y)
does not work but this one works, only for this year as hardcoded…
SELECT sum(“value”) as conso FROM “sensors”.“autogen”.“ESP_Eau” WHERE “topic”=‘ESP_Eau/Compteur_Eau_Pluie/Count’ AND time>=‘2020-01-01T00:00:00Z’
i think that query is correct
SELECT COUNT(“value”)*60
FROM ESP_Chaudiere
WHERE topic=‘ESP_Chaudiere/Production_Photovoltaique/Count’
AND time > now()-60s
ORDER BY DESC
this count number of values the last 60 seconds. My objective was to sum all values from 1/1/ongoing-year
Sorry i was confused
SELECT COUNT("value")*60
FROM ESP_Chaudiere
WHERE topic=‘ESP_Chaudiere/Production_Photovoltaique/Count’
AND $timeFilter
ORDER BY DESC
note “Relative time: 1y/y”