I have message A and message B
[{"id":"c43227adbb509818","type":"inject","z":"9d6232bd.2dfe7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"A","payloadType":"str","x":230,"y":700,"wires":[["6df3d2f427122156"]]},{"id":"3066e820da6819c0","type":"inject","z":"9d6232bd.2dfe7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"B","payloadType":"str","x":230,"y":740,"wires":[["6df3d2f427122156"]]},{"id":"6df3d2f427122156","type":"trigger","z":"9d6232bd.2dfe7","name":"","op1":"","op2":"","op1type":"pay","op2type":"payl","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":380,"y":720,"wires":[["e2d17a022de5299b"]]},{"id":"e2d17a022de5299b","type":"rbe","z":"9d6232bd.2dfe7","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":510,"y":720,"wires":[["290eb6f2152c6087"]]},{"id":"290eb6f2152c6087","type":"debug","z":"9d6232bd.2dfe7","name":"debug 60","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":720,"wires":[]}]
This is the behaviour I want to achieve.
Every time the first message is sent, meaning by first that there wasn’t any message for 5 seconds, send it immediately and don’t send nothing else for 5 seconds. After those 5 seconds only sent a message if first message is different from last message.
This should work with chained messages. The example I put above does work for the first two messages, but when a third message comes up it won’t wait the 5 seconds, it’ll do:
A > 5 secs > B > before 5 seconds have passed > A
I need it to behave like this
A > 5 secs > B > 5 secs > A > 5 secs > B > 5 secs > A etc… only if during those 5 seconds the last received message is different from the message sent before the start of the last 5 seconds break.
I hope I made myself clear :).