IgnitionModuleDevelopmentCommunity / IgnitionNode-RED

Adds support for Node-RED
Apache License 2.0
30 stars 7 forks source link

Unable to Write to the Ignition Tag's #26

Closed Grs0918 closed 2 years ago

Grs0918 commented 2 years ago

Hi I am Trying to write to ignition tags using tag write node , The Tag Value and the TagPath are in format of msg.payload & msg.payload.lcc written in function node

var newMsg =    { 
                    payload:    {
                                    tagValue:msg.payload,
                                    tagProvider:'edge',
                                    tagPath:[msg.payload.lcc,

                                    ]
                                } 
                };
return newMsg;

I am not able to write to tag using this function can anyone tell me the right way to do this .

iatraviscox commented 2 years ago

The payload just needs tagPath and tagValue:

{ "tagPath": "[default]mytag", "tagValue": 20 }

Grs0918 commented 2 years ago

Hi Just tried it it but it is not writing the value to the tag attached screenshot below image In debug window the output of the tag Write node in debug 6 Value is empty Is there something I am doing it wrong?

iatraviscox commented 2 years ago

Is msg.payload.values an array?

Grs0918 commented 2 years ago

No it is just single value in msg.payload : Object format

iatraviscox commented 2 years ago

Can you show me the debug output after the function node?

Grs0918 commented 2 years ago

image Yeah The Values are not injecting at once, realized the issue . Thanks for the help !