I have a situation where the join node does 90% of what I want, but doesn't do exactly what I want and am hoping someone has a good solution.
As I am showing hear I get Hue, Saturation and Level inputs via 3 separate MQTT topics. I want to send from the join a single message with the 3 readings combined. The exact format doesn't really matter so an array like [85,10,5] or an object {"h":85,"s":10,"l":5} is fine.
configuring the join node like this covers the case where I get all 3 inputs:
My problem is that the source works in an inconsistent way. It only sends an update when the specific setting changes. Thus {"h":85,"s":10,"l":5} to {"h":105,"s":90,"l":15} gets 3 outputs, but {"h":85,"s":100,"l":100} to {"h":205,"s":100,"l":100} only gets a reading from the 116/Hue topic.
I thought my problem might be solved by checking the "and every subsequent message." option. This works for {"h":85,"s":100,"l":100} to {"h":205,"s":100,"l":100}, but for {"h":85,"s":10,"l":5} to {"h":105,"s":90,"l":15}, I get 3 outputs {"h":105,"s":10,"l":5}, {"h":105,"s":10,"l":15}, then {"h":105,"s":90,"l":15},
What I am trying to figure out is how to only get the 3rd in the sequence when there are multiple outputs, but if there are on 1 or 2 get the last in that sequence.
Any approach would be welcome. I want to minimize the delay in getting that item, but think that some delay must be required as it is impossible to know up front how many results will be coming from the join node.