Coud someone can help me create chart which will show the exact data.
I have OpenHAB2 with InfluxDB persistance. I want to log some device status which is represented by numbers 1 to 8 depending on it’s status.
When I create standard query like:
SELECT mean("value")
FROM "SE7k_I_Status"
WHERE $timeFilter
GROUP BY time($__interval) fill(previous)
with mean() aggregation, values are “average” not exact - but I need exacly the same values stores in DB. When I remove mean() aggregation, there is no data to display.
Second question, is there a possibility to make Y axis to show values as strings (eg. 1=Not working, 2=Night mode, 3=Production etc)
If you zoom in on the data does it show correctly?
If so then you have to decide what you want to show when one pixel on the screen covers a time period containing data with multiple values. You could use max or min for example rather than mean.
I want this chart to look like that chart (with mean() aggregarion) - points connected by nearly 90 degrees, but the values are not exacly the same as values stored in DB - values are diffrent and time also
To get rid of the sloping lines select Staircase mode in the Visualisation tab. Then if you still see a problem zoom right in on an area that is wrong, post a screenshot and tell us exactly what the data in the database is over the time range shown.
If there is a possibility to fill missing values (before and after - becouse they are far away) it will be nice. If it is not possible, I can store more values, not only when value has changed.
And what about question with string represetentation of Y axis values?
Well I didn’t know how to do this, but since I would find it useful too I looked into what to do about it. See the post below. It requires rebuilding grafana to use it though.