Hi,
Since I am new to node red and influxDB, I am trying to manipulate those 2 tech in order to be better with my own project.
I have created a simple flow which generate a random number (quiet simple), now that I have it, I'd like to send it my DB with influxDB.
I have created my database inside influxDB and I got this error
Error: A 400 Bad Request error occurred: {"error":"error parsing query: found stations, expected SELECT, DELETE, SHOW, CREATE, DROP, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1"}
Cannot figure out what is wrong...
Thank you for your help
Here is my flow :
[
{
"id": "8ad428d.bf355d8",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "5dcbbf8a.37345",
"type": "inject",
"z": "8ad428d.bf355d8",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "3",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 190,
"y": 140,
"wires": [
[
"5df3b750.729b8"
]
]
},
{
"id": "5df3b750.729b8",
"type": "function",
"z": "8ad428d.bf355d8",
"name": "random number",
"func": "number = Math.random()\nmsg.payload = {\n value : number\n \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 400,
"y": 220,
"wires": [
[
"d565010f.4d7a"
]
]
},
{
"id": "d565010f.4d7a",
"type": "influxdb in",
"z": "8ad428d.bf355d8",
"influxdb": "a5ced9d1.00dc1",
"name": "weather",
"query": "stations",
"rawOutput": false,
"precision": "",
"retentionPolicy": "",
"x": 640,
"y": 300,
"wires": [
]
},
{
"id": "a5ced9d1.00dc1",
"type": "influxdb",
"z": "8ad428d.bf355d8",
"hostname": "127.0.0.1",
"port": "8086",
"protocol": "http",
"database": "ESSAI",
"name": "TEST",
"usetls": false,
"tls": ""
}
]