-
What Grafana version and what operating system are you using?
Grafana v10.4.0, Raspberry Pi OS -
What are you trying to achieve?
Convert True/False from ioBroker to “On” and “Off” within Grafana -
How are you trying to achieve it?
Using a Gauge with
“from(bucket: “iobroker”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[”_field"] == “value”)
|> filter(fn: (r) => r[“_measurement”] == “Heizung.Zirkulationspumpe” or r[“_measurement”] == “Heizung.Heizungspumpe” or r[“_measurement”] == “Heizung.Speicherladepumpe”)
|> toInt()" -
What happened?
I only see one gauge with a “1”. -
What did you expect to happen?
I was hoping for a way to state for the three measurements a display like “On” or “Off” -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
And an error stating:
" A
Status: 500. Message: A query returned too many datapoints and the results have been truncated at 11 points to prevent memory issues. At the current graph size, Grafana can only draw 1. Try using the aggregateWindow() function in your query to reduce the number of points returned."
As it says here it drew only 1
What is your grafana date range?
to map your true/false to on/off use map function for flux
Thanks for your answer. As I am a total newbie I am not so much into coding.
I did not set a date range as I just want to see the current status (later a timeline would be great too).
- Where should I set the date range then?
- Could you elaborate a bit more how to use the map function? As said, complete newbie here. I even do not know where to add the map() code
THanks