I am trying to get data from two nodes to debug nodes, by a function.
If I add a debug node to the two nodes (zigbee nodes) I get this data.
I am then trying to get the payload data by a function and if the:
contact is "false" then it need to send the payload data to one debug node
occupancy is "true" it need to send the payload data to another debug node
But I get no data from the function.
My function code is (on message):
node.status({fill:"green",shape:"ring",text:"done"});
var contact = msg.payload.contact;
var occupancy = msg.payload.occupancy;
if (contact == "false"){
return [msg,null];
}
if (occupancy == "true"){
return [msg,null];
}
...the function node is sometimes the best solution.
Ok atm. it use the same output (top) to one debug node, for contact and occupancy, the occupancy is not using the other debug node.. hmm