Hi,
This problem can be very simple for you. But I couldn't.
var gelen = msg.payload;
var son =flow.get('son');
if (gelen == son) {msg.payload = " No Action "} else {msg.payload =" Write DB "}
flow.set('son',gelen);
msg.payload = "G:" + gelen + " S:" + son + " - " + msg.payload;
return msg
The gelen and son value is the same or not. The result does not change.
Output Sample : 1
G:1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 S:1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - Write DB
Output Sample : 2
G:1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 S:1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - Write DB
My expectation was that there was "No Action" in example 1.