Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
898 views
in Technique[技术] by (71.8m points)

select - Extraing individual field values from an InfluxDB database

My apologies if this is a trivial question. I am capturing data from a BMP280 temperature/pressure sensor and publishing it via MQTT. Using Node Red, I am formatting the data into payloads like "BMP2801 temp=23.57,pres=1013.8" and storing it in an influxdb on Raspberry Pi. The queries shown in the image below seem to indicate that I am storing successfully - though possibly not in the right format for retrieval.

Database content - as stored

My question is how to frame a select statement to retrieve a series of temperature values that can be fed to a chart in the Node Red dashboard. Alternatively, if I am storing the data incorrectly, how should the messages feeding the data to influxdb be formatted? Any tips would be appreciated!

question from:https://stackoverflow.com/questions/66056406/extraing-individual-field-values-from-an-influxdb-database

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

SOLVED: I had to convert the comma-separated values generated by my sensor into an "object" using the CSV node in Node Red ... then all the fields fell into place!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.6k users

...