Hi, I'm not sure where is best to post this.
The trigger
node set to send the latest msg object is not passing the latest msg object, but the first msg object with only the payload value replaced.
Here's what it looks like:
The trigger
node settings:
I am expecting the debug Passed message
to be equal to Message 2
.
Instead, it is a mix of Message 1
and Message 2
msg-object contents.
The code to reproduce (Node-RED 1.0.3: Maintenance Release):
[{"id":"42c29b08.2b2784","type":"trigger","z":"d8fc40a5.f4ce2","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"5","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":520,"y":180,"wires":[["a954ede4.92d5c"]]},{"id":"a954ede4.92d5c","type":"debug","z":"d8fc40a5.f4ce2","name":"Passed message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":710,"y":180,"wires":[]},{"id":"d04c3e77.e42ea","type":"debug","z":"d8fc40a5.f4ce2","name":"Message 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":530,"y":100,"wires":[]},{"id":"52a161c1.2c784","type":"inject","z":"d8fc40a5.f4ce2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":140,"wires":[["6d25d2f1.25824c","73970088.564fb"]]},{"id":"73970088.564fb","type":"change","z":"d8fc40a5.f4ce2","name":"Set 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"Payload of message 1","tot":"str"},{"t":"set","p":"key1","pt":"msg","to":"Value from message 1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":140,"wires":[["42c29b08.2b2784","d04c3e77.e42ea"]]},{"id":"173de41.89eb21c","type":"change","z":"d8fc40a5.f4ce2","name":"Set 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"Payload of message 2","tot":"str"},{"t":"set","p":"key2","pt":"msg","to":"Value from message 2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":220,"wires":[["42c29b08.2b2784","7116a57.075b05c"]]},{"id":"6d25d2f1.25824c","type":"delay","z":"d8fc40a5.f4ce2","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":200,"y":220,"wires":[["173de41.89eb21c"]]},{"id":"7116a57.075b05c","type":"debug","z":"d8fc40a5.f4ce2","name":"Message 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":530,"y":260,"wires":[]}]
This looks as a bug to me. Am I wrong?