Hi
I am trying to store my data in influxdb.
I am using Node-RED between TTN and the database, but i am not sure about how to set it up.
I have currently got it to connect, and receives packages from TTN, but it complains about the database.
It say "TypeError: points.forEach is not a function"
But i don’t know what this means.
I should have created the database called ttndb in influx.
Payload looks OK, but there are 2 things I am seeing…
I don’t think you did specify a measurement in the InfluxDB node (otherwise it woudl appear in the label) and you don’t have a measurement element in your payload. You need to specify the measurement somewhere. (but that should not cause the error you have)
I see overall blue dots in your screenshot, which means you have not deployed, or what you show is not what you deployed…
Other than that it should work…
… Or at least you should have the payload in InfluxDB.
Adding a label (dev_id) requires an additional step, but you first need to have the basic stuff working.
I got it working by adding a measurement name. Even though i don’t know what they mean by this measurement.
I used the name ttn.
In grafana i can find the measurement ttn, and the temp and humidity values, but i dont know how to only show the values form a specific node.
Can i see somewhere what is stored in the database?
If you compare to a ‘traditional database’, a measurement is the equivalent of a table.
So you need to tell in which measurement (table) it needs to store the data.
I can’t realy get my CLI for influx working.
I am running it in raspberian Debian, and the command influx does not work. Influxd does, but complains about a port already in use (8088) and then exits.
So i just run influx as a service.
I have access to the admin interface. i run “select * from ttn” and can see the data saved. and it is only time, Rel Hum, and temperature.
So can i just add the dev_id to the payload with a function in Node-RED? Or what is the process of sorting by dev_id?