I have a simulation server (Prosys Simulation Server) and I want to save the data in MySQL database. I have already setup a local database.
I am using Node-RED for this task because node-red can be connected with Prosys Simulation Server and with MySQL database as well.
The problem I am facing is the inter-connection between the OPC UA client node and MySQL node.
so you can get your data into Node-RED?
If so you will need to create your SQL INSERT query either in a function node or the change node.
So which bit are you struggling with?
How can I do that?
I am struggling with the function/change node.I don't know how to do that. Can you please help me?
Suppose I want to send the msg.payload with the current time to MySQL. How can I do that?
msg.payload, Now()
I found a solution. I have done it like this. It's working.
This is the text in template:
INSERT INTO test.prosys_table(Counter, Time) VALUES ('{{payload}}',Now());