This is a slightly bigger/better example of what I said:
[
{
"id": "413e2398165b5905",
"type": "mqtt out",
"z": "a531e868a7ed264e",
"name": "",
"topic": "Device1",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "8941f4c3.0f151",
"x": 1930,
"y": 300,
"wires": []
},
{
"id": "f23b540f21caa8d4",
"type": "inject",
"z": "a531e868a7ed264e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1760,
"y": 300,
"wires": [
[
"413e2398165b5905"
]
]
},
{
"id": "d1d6840752c246de",
"type": "inject",
"z": "a531e868a7ed264e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1760,
"y": 420,
"wires": [
[
"44c8feca63b2cedd"
]
]
},
{
"id": "44c8feca63b2cedd",
"type": "mqtt out",
"z": "a531e868a7ed264e",
"name": "",
"topic": "Device2",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "8941f4c3.0f151",
"x": 1930,
"y": 420,
"wires": []
},
{
"id": "794309985d88880c",
"type": "inject",
"z": "a531e868a7ed264e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1760,
"y": 540,
"wires": [
[
"b07fcf1e997024e3"
]
]
},
{
"id": "b07fcf1e997024e3",
"type": "mqtt out",
"z": "a531e868a7ed264e",
"name": "",
"topic": "Device3",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "8941f4c3.0f151",
"x": 1930,
"y": 540,
"wires": []
},
{
"id": "7285b46a64d90c2d",
"type": "mqtt in",
"z": "a531e868a7ed264e",
"name": "",
"topic": "BIRTH",
"qos": "2",
"datatype": "auto-detect",
"broker": "8941f4c3.0f151",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 2180,
"y": 300,
"wires": [
[
"7ae659a8c5755140"
]
]
},
{
"id": "a9738cf2dcc38c34",
"type": "mqtt in",
"z": "a531e868a7ed264e",
"name": "",
"topic": "DEATH",
"qos": "2",
"datatype": "auto-detect",
"broker": "8941f4c3.0f151",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 2180,
"y": 340,
"wires": [
[
"7ae659a8c5755140"
]
]
},
{
"id": "7ae659a8c5755140",
"type": "switch",
"z": "a531e868a7ed264e",
"name": "who?",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "D1",
"vt": "str"
},
{
"t": "cont",
"v": "D2",
"vt": "str"
},
{
"t": "cont",
"v": "D3",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 2350,
"y": 320,
"wires": [
[
"fe15e8a3139d63a8"
],
[
"e73d5c37bb8e7b2f"
],
[
"b9e2bb854b641fc1"
]
]
},
{
"id": "fe15e8a3139d63a8",
"type": "change",
"z": "a531e868a7ed264e",
"name": "Device 1",
"rules": [
{
"t": "set",
"p": "Device1",
"pt": "flow",
"to": "topic",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2520,
"y": 270,
"wires": [
[]
]
},
{
"id": "e73d5c37bb8e7b2f",
"type": "change",
"z": "a531e868a7ed264e",
"name": "Device 2",
"rules": [
{
"t": "set",
"p": "Device2",
"pt": "flow",
"to": "topic",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2520,
"y": 320,
"wires": [
[]
]
},
{
"id": "b9e2bb854b641fc1",
"type": "change",
"z": "a531e868a7ed264e",
"name": "Device 3",
"rules": [
{
"t": "set",
"p": "Device3",
"pt": "flow",
"to": "topic",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2520,
"y": 370,
"wires": [
[]
]
},
{
"id": "2c39e0c814461fac",
"type": "comment",
"z": "a531e868a7ed264e",
"name": "REMOTE DEVICES",
"info": "",
"x": 1870,
"y": 260,
"wires": []
},
{
"id": "33c9171872589ad3",
"type": "comment",
"z": "a531e868a7ed264e",
"name": "REMOTE DEVICES",
"info": "",
"x": 1870,
"y": 380,
"wires": []
},
{
"id": "fcd21dfd7540173e",
"type": "comment",
"z": "a531e868a7ed264e",
"name": "REMOTE DEVICES",
"info": "",
"x": 1870,
"y": 500,
"wires": []
},
{
"id": "8941f4c3.0f151",
"type": "mqtt-broker",
"name": "Local",
"broker": "127.0.0.1",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"compatmode": false,
"protocolVersion": 4,
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "BIRTH",
"birthQos": "0",
"birthPayload": "D1 ONLINE",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "DEATH",
"willQos": "0",
"willPayload": "D1 UNEXPECTED OFFLINE",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
But please understand the parts on the left are all different machines.
I can't show them exactly because they - in this case - are all on the same machine.
I hope you can see what I mean though.