Some help needed Influx DB

Hello all.

Just created an Influx database called "test" and I want to do some tests from a simple flow. I'm new with Influx so I wonder if someone can guide me how to write the value "123" to the database. As far as I know Infux adds a timestamp. Copied from the debug frame the path is "payload" and the value is "123". Below the flow export and the relevant part of the screen.

[{"id":"c42bf290.cdbc1","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"bdc59a12.a6afb8","type":"inject","z":"c42bf290.cdbc1","name":"","topic":"","payload":"123","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":790,"y":120,"wires":[["bb2566cc.032158"]]},{"id":"bb2566cc.032158","type":"debug","z":"c42bf290.cdbc1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":990,"y":120,"wires":[]}]

Your code snippet isn't importable. please re-paste and wrap it in ``` at the start and end. Also, so far as the influx input node goes, be sure you're specifying a measurement in the node config.

Hope the code below is okay now, I have added it with the preformatted text button </> from the forum which adds ``` automatic.

The value "123" in my test will later be replaced with the value of the measurement which is an integer between 100 and 500. Do you have enough info?

[{"id":"c42bf290.cdbc1","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"bdc59a12.a6afb8","type":"inject","z":"c42bf290.cdbc1","name":"","topic":"","payload":"123","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":790,"y":120,"wires":[["bb2566cc.032158"]]},{"id":"bb2566cc.032158","type":"debug","z":"c42bf290.cdbc1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":990,"y":120,"wires":[]}]

You can use node-red-contrib-influxdb.

I know Colin, but no idea how to fill in the fields (except the database) :roll_eyes:

Possibly you could have said that in the original question.
Do you understand about Measurements, Tags and Fields in Influx? If not then start here:

Thanks Colin.

If you can work out the line syntax, you can simply use the http-request node to send the data. The InfluxDB node simply tries to let you send a more structured object whereas using the request node means you have to form the query string yourself - not at all hard and in some ways easier than using the node.

Have a look at this You tube video

2 Likes