I want to write to my data to InfluxDB through http (has to be in CLI code example: measurement, Tagkey=Tagvalue FieldKey=FieldValue Timestamp). The connection works and i can send the data to InfluxDB.
But i'm using the Siemens PLC 'plcindustry' S7 nodes. And i want to read all my variables at once and make in a function node from this data the CLI code. In the picture below you can see that it works but the msg.payload is transmitted as a string.
Can i unstringify my msg.payload? Is the easiest way!
2.Can i write from in a function node every line to a txt.file like i can do with the file nodes? (but i can't leave the function node to call the file node, or can i?)
3.A better way to approach this problem?
I know there are the InfluxDB Nodes but later i want to use Telegraf and i want to use the telegraf http listener input plugin.
Is that debug coming out of your function node or what you are feeding into it?
Edit - if that is what is coming out then what do you want to see there and what is going in?
To answer point 2, yes, if you send the lines one at a time you can send that to a file out node, or you could build up the complete text and send that in one message to the file node.
With CLI i mean influx line protocol. Thought they called it that. (I could be wrong )
The debug come out of the function node. What i want is what you see in the debug, but like you can see the /n (for new line)is written and not executed. And i think that's the problem the http can't send it to influx. I can give you the error log from the http node (forgot to send that one) tomorrow.
Are you using the http POST method for writing to the db?
Yes, show us the error. Is the debug o output you showed going straight into the http node? How have you configured it?