Hello Guys
I'm stuck probably with a beginner problem.
I want, if the Input "ns=4;s=Arp.Plc.Eclr/M_HS_Node_Red_1" is not equal "1" and the input "ns=4;s=Arp.Plc.Eclr/M_HS_Node_Red_Anf" is "true" then send out "true" else send out "false".
Here is my code:
if ( (msg.topic == "ns=4;s=Arp.Plc.Eclr/M_HS_Node_Red_1", msg.payload !=1) && (msg.topic == "ns=4;s=Arp.Plc.Eclr/M_HS_Node_Red_Anf", msg.payload = true))
{
msg.payload = true;
msg.payload = (msg.payload === "true") ? true : false;
return (msg.topic = "ns=4;s=Arp.Plc.Eclr/M_HS_Node_Red_Anf1", msg.payload);
}
else
{
msg.payload = false;
msg.payload = (msg.payload === "false") ? true : false;
return (msg.topic = "ns=4;s=Arp.Plc.Eclr/M_HS_Node_Red_Anf1", msg.payload);
}
But it doesnt work.
I hope, anybody can help me.
Thanks Dominic