Value every day at same time

Hy everyone!
I’m an Influx Beginner using influx only for my Smarthome with iobroker.
For visualisation i’m using Grafana and i want to have a view of the outside temperature on 07:00 am at every day - so i want to build a view over a year where i can see the temperature curve.

Can someone give me pls an example of how i can pickup this values in influxDB?

from(bucket: "iobroker")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "knx.0.Temperatur.TEMPERATUR_AUSSEN.Temperatur_Aussen_Fassade-Nord")
  |> filter(fn: (r) => r["_field"] == "value")
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> yield(name: "mean")

Take a look at this example


If you apply aggregate window on 1h instead of the 1month in the example, that should get you half way there. You should then be able to pipe into filter one last time to extract the datapoint of 7am.

Welcome @Gabs_Werni

I think it may be even easier than what @FixTestRepeat wrote.

Try using the hourSelection function after your aggregateWindow function, like this:

|> hourSelection(start: 7, stop: 7)

1 Like