i8beef / node-red-contrib-castv2

MIT License
22 stars 14 forks source link

Stripped out variables #39

Closed ReggieP123 closed 3 years ago

ReggieP123 commented 3 years ago

Hi,

I wonder if it's possible that the node can be less destructive to other variables that I'd like to passthrough.

I understand that it uses msg.payload and it creates msg.platform...probably amoungst others. But, for instance, if I've created a variable called msg.payload2 in a node before castv2, it gets stripped out from the message. Is there anyway these variables can be kept and just passed through?

Reggie

i8beef commented 3 years ago

Sorry, but that doesn't fit with the usage of this node. Though it can appear that you are getting a request/response pattern here, the actual node architecture is built around an async path for messages. Think of it more like a node that has distinct IN / OUT nodes, just combined into one for simplicity of connection management and such. The original msg has no meaning after being sent, and the outgoing msg has no inherent connection to the incoming one.

ReggieP123 commented 3 years ago

No problem. Thank you for your detailed reply. I'll use a flow variable to acheive what I'm looking to do.

Reggie