I useing Grafan + InfluxDB on a Raspi to check my geo heating.
The temp sensors graph is working fine, now I would like to count how many times the heating is ON and how long it is working, but ignore the higher tempereatures witch is the making the hause hot water.
So the counter would be just a number in the current month, the operating time is in hours also in the current month.
What I wanted to count is the datas signed with the red arrows.
SELECT ((abs(mean("value) - 28 ) / (mean(“value”) - 28) + 1 ) /2) as uptime FROM “device_3”
28 will remove points <28
I don’t completed total time count (don’t need now) but, when complete, I will post.
Please post graph after applay this function. Need find way to remove gaps
Thats a copy&paste error, try to replace the quotation marks after paste into your shell.
You can see the difference if you type a " near your pasted text and compare.
Yes you are right.
I change those, now I got this:
{
"error": "error parsing query: found -28, expected ) at line 1, char 26",
"message": "error parsing query: found -28, expected ) at line 1, char 26"
}
Mattes via Grafana Community grafana@discoursemail.com ezt írta (időpont: 2019. dec. 18., Sze, 13:37):
Sorry for late. I hope you fixed the problem.
This is mathematical function (sgn(x)+1)/2 and give you 0 for x<0, 1 for x>0. or step function.
I found another one solution
SELECT mean(“temp_input”)/mean(“temp_input”) FROM “sensors” WHERE (“feature” = ‘temp1’) AND “temp_input”> 30 AND timeFilter GROUP BY time(1m) fill(null)