Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
983 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 Reply

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...