I changed it a little bit so my little brain can comprehend what it's doing
[
{
"id": "4c07223a.0f98ec",
"type": "debug",
"z": "f24596d3.51bf08",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1310,
"y": 360,
"wires": []
},
{
"id": "9d2fcacc.6a106",
"type": "join",
"z": "f24596d3.51bf08",
"name": "",
"mode": "auto",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 490,
"y": 520,
"wires": [
[
"cbd3a2d2.3aba2"
]
]
},
{
"id": "92c6d458.d8f84",
"type": "change",
"z": "f24596d3.51bf08",
"name": "move results back to payload with room and device",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "payload.available",
"tot": "msg"
},
{
"t": "move",
"p": "hold.room",
"pt": "msg",
"to": "payload.room",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 230,
"y": 520,
"wires": [
[
"9d2fcacc.6a106"
]
]
},
{
"id": "2739ec7d.bfd2b4",
"type": "change",
"z": "f24596d3.51bf08",
"name": "move payload so iobroker will not overwrite",
"rules": [
{
"t": "set",
"p": "hold",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "payload.zigbee",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 210,
"y": 480,
"wires": [
[
"6ee130a6.16a46"
]
]
},
{
"id": "99b156a7.45dfb",
"type": "delay",
"z": "f24596d3.51bf08",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "50",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 520,
"y": 360,
"wires": [
[
"2739ec7d.bfd2b4"
]
]
},
{
"id": "d5417dd4.b4564",
"type": "split",
"z": "f24596d3.51bf08",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 350,
"y": 360,
"wires": [
[
"99b156a7.45dfb"
]
]
},
{
"id": "7cc939cb.a18c28",
"type": "inject",
"z": "f24596d3.51bf08",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "[{\"room\":\"kitchen\",\"device\":11111},{\"room\":\"bedroom\",\"device\":22222}]",
"payloadType": "json",
"x": 90,
"y": 360,
"wires": [
[
"60a78611.947278"
]
]
},
{
"id": "60a78611.947278",
"type": "function",
"z": "f24596d3.51bf08",
"name": "",
"func": "var array = [\n {room: \"Büro\", zigbee: \"zigbee.0.00158d000410e87b.available\"},\n {room: \"Büro Heizung\", zigbee: \"zigbee.0.00158d000774f35a.available\"},\n {room: \"Eingang\", zigbee: \"zigbee.0.00158d00073c0c65.available\"},\n {room: \"Esszimmer\", zigbee: \"zigbee.0.00158d000411103a.available\"},\n {room: \"Esszimmer Heizung\", zigbee: \"zigbee.0.00158d00077dce53.available\"},\n {room: \"Flur 1\", zigbee: \"zigbee.0.00158d00041d8697.available\"},\n {room: \"Flur 2\", zigbee: \"zigbee.0.00158d000774f2cb.available\"},\n {room: \"Gästezimmer\", zigbee: \"zigbee.0.00158d000282eec7.available\"},\n {room: \"Großes Bad\", zigbee: \"zigbee.0.00158d000283e64e.available\"},\n {room: \"Kleines Bad\", zigbee: \"zigbee.0.00158d000283e67b.available\"},\n {room: \"Küche\", zigbee: \"zigbee.0.00158d000163f2bc.available\"},\n {room: \"Loggia\", zigbee: \"zigbee.0.00158d000412fc1e.available\"},\n {room: \"Schlafzimmer\", zigbee: \"zigbee.0.00158d000309a45a.available\"},\n {room: \"Schlafzimmer Heizung\", zigbee: \"zigbee.0.00158d000774f34a.available\"},\n {room: \"Waschküche\", zigbee: \"zigbee.0.00158d00075f6607.available\"},\n {room: \"Waschküche Heizung\", zigbee: \"zigbee.0.00158d000774f2c9.available\"},\n {room: \"Wohnzimmer\", zigbee: \"zigbee.0.00158d000410e8ca.available\"},\n {room: \"Wohnzimmer Heizung\", zigbee: \"zigbee.0.00158d00076565a1.available\"}\n]\nmsg.payload = array;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 220,
"y": 360,
"wires": [
[
"d5417dd4.b4564"
]
]
},
{
"id": "6ee130a6.16a46",
"type": "ioBroker get",
"z": "f24596d3.51bf08",
"name": "",
"topic": "",
"attrname": "payload",
"payloadType": "value",
"x": 480,
"y": 480,
"wires": [
[
"92c6d458.d8f84"
]
]
},
{
"id": "cbd3a2d2.3aba2",
"type": "split",
"z": "f24596d3.51bf08",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 610,
"y": 520,
"wires": [
[
"9d900d8a.59341"
]
]
},
{
"id": "9d900d8a.59341",
"type": "switch",
"z": "f24596d3.51bf08",
"name": "",
"property": "payload.available",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "true",
"vt": "str"
},
{
"t": "eq",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 760,
"y": 520,
"wires": [
[
"19d6e5c6.599b9a"
],
[
"1b8a5223.d67ace"
]
]
},
{
"id": "19d6e5c6.599b9a",
"type": "function",
"z": "f24596d3.51bf08",
"name": "",
"func": "msg.payload = msg.payload.room + \": online\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 920,
"y": 500,
"wires": [
[
"4c07223a.0f98ec"
]
]
},
{
"id": "1b8a5223.d67ace",
"type": "function",
"z": "f24596d3.51bf08",
"name": "",
"func": "msg.payload = msg.payload.room + \": offline\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 920,
"y": 540,
"wires": [
[
"4c07223a.0f98ec"
]
]
}
]
How exactly is the limit to 50 msg per second delaying it? With 18 values in the array, it would be only 18 messages anyways, right?