My thanks for answering my question. I’m quite familiar with LoRaWAN nodered influxdB and Grafana.
I know basics about dashboarding data from sensors.
At the moment, I get data from a LoRaWAN private networks, decode the Diehl payload and store the decoded data into influxdB. I’m using Home - IOTstack on RPI4.
My question is specifically related to grafana and how to diplays “data from the past” on a dashboard.
I’m processing collected JSON in NodeRed
msg.payload = [{
"Date_Mesure" : data.timestamp,
"Frame" : data.frame,
"Frame_Counter" : data.data.Frame_counter,
"Frame_Type" : data.data.Frame_type,
"Index_pulse" : data.data.Index_pulse,
"Index_liters" : data.data.Index_liters,
"Cumul_positiv" : data.data.Cumul_positiv,
"H" : data.data.H,
"H-1" : data.data["H-1"],
"H-2" : data.data["H-2"],
"H-3" : data.data["H-3"],
"H-4" : data.data["H-4"],
"H-5" : data.data["H-5"],
"H-6" : data.data["H-6"],
"H-7" : data.data["H-7"],
"H-8" : data.data["H-8"],
"H-9" : data.data["H-9"],
"H-10" : data.data["H-10"],
"H-11" : data.data["H-11"],
"H-12" : data.data["H-12"],
"H-13" : data.data["H-13"],
"H-14" : data.data["H-14"],
"H-15" : data.data["H-15"],
"H-16" : data.data["H-16"],
"H-17" : data.data["H-17"],
"H-18" : data.data["H-18"],
"H-19" : data.data["H-19"],
"H-20" : data.data["H-20"],
"H-21" : data.data["H-21"],
"H-22" : data.data["H-22"],
"H-23" : data.data["H-23"]
},
{
“DevEUI” : data.DevEUI,
“GWID” : data.gatewayID
}];
then this msg is stored in influxDB.
In grafana, I can easily manage “index_liters”
SELECT mean(“Index_liters”) FROM “90dffb818724b4f2” WHERE $timeFilter GROUP BY time($__interval)
But I’d like to display hourly consumtion
I recieve last 24H water consumption @ time = TS
I want to display :
H @TS-1H
H-1 @ TS-2H
H-2@ TS-3H
and in a ideal world I’d like to go further : I cannot excactly predict the TS for the recieved message from Diehl Meter. I would be interested in synchronizing data on a standard 24H day :
If I get message from sensors today @ 6pm I’d like to display H to H-17 today and H-18 to H-23 yesterday…It will be the nextstep.
Any idea how to query influxdB in grafana to display data in the past?