BiancoRoyal / node-red-contrib-iiot-opcua

deprecated - very new developed by PLUS for Node-RED - https://plus4nodered.com
https://www.npmjs.com/package/node-red-contrib-iiot-opcua
BSD 3-Clause "New" or "Revised" License
34 stars 9 forks source link

How To send a dynamic value to a node connector? #12

Closed deminngi closed 6 years ago

deminngi commented 6 years ago

I want to set the value in the node connector dynamically, which output structure should I fill to populate the node data value from an input msg.payload.d.value field?

deminngi commented 6 years ago

To clarify more I want extract a previous computed or received msg item value (e.g. 80) and inject it into any IIOT nodes that can handling data values (node, ...). If you provide hooks like msg.value or something similar, the user can pass dynamic data to a placeholder without taking care where to fill the data in your node.

Can you implement this for all values that can be changed programmatically?

Can you provide something for node that I can test?

biancode commented 6 years ago

Please, use the structure as it is. From my point it is all there to send dynamic data. All work of the inject could be done by the event message. It is not clearly to see, what you are missing or searching for.

deminngi commented 6 years ago

Should I use nodesTowrite.value.value.value for injecting the value? It is not so clear explained how to inject a dynamic value.

biancode commented 6 years ago

nodesToWrite is to fill as an Array of values and objects ... why do you think you have to use nodesTowrite.value.value.value?

deminngi commented 6 years ago

Looking into the debug node I could see a value object that is nested into another value object and at least the value item with the data in it.

biancode commented 6 years ago

I am sorry, but maybe you are at the wrong place to debug?!

image

biancode commented 6 years ago

please reopen if you need more ...