How do I create Measurements for this NodeRED

Hi there,
first time I use Influx and I am stack in creating the Measurements for the four sensors in this NodeRED. I would appreciate some help or direction.

https://ibb.co/8r8BZLJ
Thank you

The image itself doesn’t help a lot…

Can you just tell what do you expect?

Measurements are created automatically, the measurement name is in the data string itself
Have a look at the line protocol tutorial
https://docs.influxdata.com/influxdb/v1.8/write_protocols/line_protocol_tutorial/

Sorry… I just realised that my question wasn’t really clear.
I am not sure how to create a table to store the sensor data. The DB Measurement is empty.

pi@raspberrypi:~ $ influx
Connected to http://localhost:8086 version 1.8.5
InfluxDB shell version: 1.8.5

use homeautomation
Using database homeautomation
show Measurements
.…nothing here…

The output from the sensors will be something like this:

| 0 | 1 | 2 | 3 |

| 179 | 542 | 364 | 1145 |
| 179 | 542 | 364 | 1145 |
| 179 | 542 | 364 | 1145 |

What I am trying to achieve is to have a table to store those sensors output, and limit the storage to few minutes for now.
Thanks for helping

Influxdb is schema free, and even if you can somehow tell that a measurement is the equivalent of a table, the behaviour is just different.
Have a good look at the line protocol docs as that’s what you must send to influxdb.

You will have to define what’s data to store as tags (sort of indexed columns), probably the sensorID in your case, while the metrics are stored as fields.

About the few minutes of data, the retention policy are for that, you can set a RP to even 1min if you want.

1 Like