[solved] Deploying - function node change the status (even the condition ist not true)

hi, every time I redeploy (full), this "function node" sends me a "true" for a short time, even if the condition is not true. How can I prevent this?

[{"id":"ec8d8697.cb8028","type":"function","z":"df764457.a3c8e8","name":"Date/Time mail","func":"var D1 = msg.header.date.valueOf();     //email epoch\nvar now = Date.now();                   //now epoch\nvar diff = Math.abs(D1 - now) / 1000;   //get difference in seconds\nmsg.payload = (diff < 130);              //true if < 130s otherwise false.\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":720,"y":660,"wires":[["23e8c96b.4c4856","491da051.da7fa"]]}]

The function node will not sending anything without a msg being fired into it - so it is responding to whatever you feed into it.

If you have an inject set to run at start up. Either disable it or set its topic so you can determine when the msg is a startup msg.

Thanks a lot!

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