Ended up with this:
if (msg.payload.status == "connect") {
node.send([null,null,null,null,null,null,{rcr:"recover1"}]);
// curcuit 1
if (global.get("pRel1Sta","persist") === true) {
msg = {payload:{v:true}}
node.send([msg,null,null,null,null,null,null]);
}
// curcuit 2
if (global.get("pRel2Sta","persist") === true) {
msg = {payload:{v:true}}
node.send([null,msg,null,null,null,null,null]);
}
// curcuit 3
if (global.get("pRel3Sta","persist") === true) {
msg = {payload:{v:true}}
node.send([null,null,msg,null,null,null,null]);
}
// curcuit 4
if (global.get("pRel4Sta","persist") === true) {
msg = {payload:{v:true}}
node.send([null,null,null,msg,null,null,null]);
}
// curcuit 5
if (global.get("pRel5Sta","persist") === true) {
msg = {payload:{v:true}}
node.send([null,null,null,null,msg,null,null]);
}
// curcuit 6
if (global.get("pRel6Sta","persist") === true) {
msg = {payload:{v:true}}
node.send([null,null,null,null,null,msg,null]);
}
}
return null;
Guess I could just put the {...} in the node.send line and not have the second line. Nuff for tonight , I am going to sleep