I have a sensor sending me once daily measurements of the depth of oil in my heating oil tank. Data goes through node-red and into influxdb, where it looks like this:
select “time”, “date”, “oildepth” from Oil_level
name: Oil_level
time date oildepth
1632500160626 2021-09-24T16:16:00.627Z 69
1632520669180 2021-09-24T21:57:49.183Z 69
1632537064824 2021-09-25T02:31:04.825Z 69
1632569864567 2021-09-25T11:37:44.568Z 68
1632623226567 2021-09-26T02:27:06.569Z 71
1632709370843 2021-09-27T02:22:50.843Z 69
The time and date fields are added by function nodes in influxdb before storage.
I want to graph oildepth (last column above, 69 etc) vs date, but when I choose measurement/field in the Grafana query editor I get “No data in response”. If I multiply the time stamp field by 1000 I can get a table with three columns: original timestamp translated to dates around 1970, time*1000 which gives me correct dates, and oildepth.
I don’t need to average/sum any data, I just want a simple line graph. So how do I either
a) tell Grafana to put my calculated date field on the x-axis
b) use time on the x-axis but understand that this timestamp is in seconds rather than ms
c) or should I not add timestamps in node-red and let influxdb stamp it when it arrives?
Thanks for your help - simple answers preferred as I am new to Grafana!