Graph with data and timestamp

I have data what come with two values at two timestamps at the same time with Influx.
for example:

select * from lvdt
name: lvdt
time value

1562338801876448637 0.149145
1562338801878670398 0.149145
In graph, I cannot draw data because time used is now. Can someone help me to draw graph with data and time send by influx?

I don’t understand what you mean. Please explain more what is the problem. You showed us an example but have not explained what you expect to see. I cannot see anything wrong with the data in the example.

my sensor makes a measurement every 30 minutes, but sends two data simultaneously every hour.
With InfluxDB, I place first data with datastamps = (now-30mn) and second data with timestamps = now.
My problem is that grafana doesn’t draw to the fist point but only the second one. If i select distinct() after field(value), I have 2 points with the same date.
I can not get two points expelled from 30mn


Why does it send two values at the same time? How can the sensor have two values at the same instant? Which one is the ‘correct’ one?

If they come from two readings one after the other you could take the average and put that into influx rather than putting both in.

sensor send 2 datas at the same time to save power, but measurements are done every 30mn and datas sent every hours.

Oh, so the first sample is for 30 minutes ago, and the second one is for now. In that case when you put it into influx you must give it the correct timestamp. How are you putting it into influx?

Ok, I calculate the timestamp with a Json script in node-red. his timestamp is used to draw graphs in node-red and the dates are correct. I still have to check if the format is compatible with InflusDB.
I will do it on Monday.

You haven’t said how you put it into influx. If you use the influxdb batch node you can specify the timestamps.

1 Like

My problem come from bad timestamps. All is Ok now.
Thank you very mutch.