Receive boolean data from firestore

Hi everyone, I'm new on node-red.
I'm using google firestore + raspberry for node red and PLC system.
I would like to receive boolean data from google firestore to node-red and want to save to PLC.

My code is like this;

if(msg.dryingStatus ==='dryingStatus'){
if(msg.dryingStatus == true){
msg.payload = 1;
}else{
msg.payload = 0;
}
}
return msg;

Any suggestion for me? Many thanks.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.