Given the message structure is correct:
I am not understanding why I am not seeing the correct output.
// msg.existing is the EXISTING value for the LEDs
// Split the payload.
const check = msg.payload.split(",");
node.warn("Wipe " + msg.wipe);
let msg1 = {};
let led = check[1];
if (led != 0)
{
node.warn("LED " + led);
//node.warn(msg.existing);
let value = msg.existing[led];
node.warn("Value " + value);
let x = led + ',' + value;
node.warn("x is " + x);
msg1 = {"payload":"rgb," + led + ',' + value};
node.warn("msg1 " + msg1);
}
if (msg.wipe == "OLD")
{
return [msg.msg1];
}
else
return [msg,null];
I have a fear I am going to kick myself.
But I'm not too proud to admit I am not seeing the cause.