Hello Guys,
9 devices get at the same time the command to tell the IP adress, than they get another Command to tell the Devie name.
I get 9 answers, all with the own device topic, nice. But now i would like to join them in a single output.
The clue: The same toppic should merge. At the moment i get a joint output only on differant topics.
I was thinking thame topic and join the right massage to the right topic is easy... nope not for me
Please give me a hint.
here is my flow:
Summary
[{"id":"e5180013.13f2d","type":"inject","z":"9bfe4864.e10be8","name":"Wirldcard Tasmotas","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":130,"y":540,"wires":[["d10c98ad.49aad8","72fe515caf7b0d91"]]},{"id":"4d9defb2.722a","type":"debug","z":"9bfe4864.e10be8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":910,"y":680,"wires":[]},{"id":"7d26f7a8.87b978","type":"mqtt in","z":"9bfe4864.e10be8","name":"","topic":"stat/+/RESULT","qos":"2","datatype":"json","broker":"ceba0b4b.cd64b8","nl":false,"rap":true,"rh":0,"x":120,"y":680,"wires":[["21fcada9.b53fa2","572541bf4fe4e87d"]]},{"id":"d10c98ad.49aad8","type":"mqtt out","z":"9bfe4864.e10be8","name":"","topic":"cmnd/tasmotas/ipaddress1","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ceba0b4b.cd64b8","x":400,"y":540,"wires":[]},{"id":"97381e1.589b5e","type":"join","z":"9bfe4864.e10be8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"2","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":570,"y":660,"wires":[["98d906b107a48a06"]]},{"id":"21fcada9.b53fa2","type":"switch","z":"9bfe4864.e10be8","name":"","property":"payload.IPAddress1","propertyType":"jsonata","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":270,"y":680,"wires":[["97381e1.589b5e"]]},{"id":"72fe515caf7b0d91","type":"mqtt out","z":"9bfe4864.e10be8","name":"","topic":"cmnd/tasmotas/Devicename","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ceba0b4b.cd64b8","x":400,"y":600,"wires":[]},{"id":"572541bf4fe4e87d","type":"switch","z":"9bfe4864.e10be8","name":"","property":"payload.DeviceName","propertyType":"jsonata","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":270,"y":720,"wires":[["78bb2f56a80ec410"]]},{"id":"78bb2f56a80ec410","type":"join","z":"9bfe4864.e10be8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"2","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":570,"y":720,"wires":[["98d906b107a48a06"]]},{"id":"98d906b107a48a06","type":"join","z":"9bfe4864.e10be8","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"2","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":730,"y":680,"wires":[["4d9defb2.722a"]]},{"id":"ceba0b4b.cd64b8","type":"mqtt-broker","name":"local broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]
that is the output:
Summary
[{"stat/tasmota_FA2EA2/RESULT":{"IPAddress1":"192.168.178.62 192.168.178.62"},"stat/tasmota_14B9AD/RESULT":{"IPAddress1":"192.168.178.71 (192.168.178.71)"},"stat/tasmota_116C9B/RESULT":{"IPAddress1":"192.168.178.67 (192.168.178.67)"},"stat/tasmota_FACD72/RESULT":{"IPAddress1":"192.168.178.64 (192.168.178.64)"},"stat/tasmota_106257/RESULT":{"IPAddress1":"192.168.178.65 (192.168.178.65)"},"stat/tasmota_D41743/RESULT":{"IPAddress1":"0.0.0.0 (192.168.178.23)"},"stat/tasmota_150017/RESULT":{"IPAddress1":"192.168.178.72 (192.168.178.72)"},"stat/tasmota_663943/RESULT":{"IPAddress1":"192.168.178.75 (192.168.178.75)"},"stat/tasmota_107217/RESULT":{"IPAddress1":"192.168.178.66 (192.168.178.66)"}},{"stat/tasmota_FA2EA2/RESULT":{"DeviceName":"Christopher Stehleuchte"},"stat/tasmota_14B9AD/RESULT":{"DeviceName":"Steckdose Christopher"},"stat/tasmota_116C9B/RESULT":{"DeviceName":"Küche Licht"},"stat/tasmota_FACD72/RESULT":{"DeviceName":"Stube Ecklampe"},"stat/tasmota_106257/RESULT":{"DeviceName":"Stube Esstisch"},"stat/tasmota_D41743/RESULT":{"DeviceName":"Stube Temp"},"stat/tasmota_150017/RESULT":{"DeviceName":"Steckdose Stube"},"stat/tasmota_663943/RESULT":{"DeviceName":"PC LED"},"stat/tasmota_107217/RESULT":{"DeviceName":"Draußen Licht"}}]
how can i join the same topic massage?