How many Switch nodes are way too many?

hi guys

I am new to using node red and am currently in a dilemma on how to proceed with the project.
It is an alarm system focused on the activation of remote panic buttons, the alert system is intended to be used with a number of 100 buttons placed in different locations, therefore I am using a Switch Node for each button for its identification and for the generation of custom alerts depending which button is pressed.

I don't know if this is the best way to filter and generate actions under the reception of a particular button or is there any other method I can use to obtain the same results?

thank you in advance and please find attached my flow and image for reference.

[
    {
        "id": "2e9989f0e16344e8",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Button Pressed",
        "property": "payload.isButtonPressed[0]",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "false",
        "repair": true,
        "outputs": 1,
        "x": 280,
        "y": 600,
        "wires": [
            [
                "e68c2a2d1d9c6709",
                "e4e137e8bf57431d",
                "97342b481a2cc6ba",
                "4f6c9d2dfdfac695",
                "17d460ed2389c2aa",
                "b4ba936917781c5f"
            ]
        ]
    },
    {
        "id": "338aca5ad3b3f537",
        "type": "ui_toast",
        "z": "12fac42ea0b82cc0",
        "position": "dialog",
        "displayTime": "30",
        "highlight": "red",
        "sendall": true,
        "outputs": 1,
        "ok": "Aceptar",
        "cancel": "",
        "raw": true,
        "className": "",
        "topic": "Activación botón de pánico- Latina Seguros",
        "name": "POP-UP",
        "x": 1740,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "0753c292a15b1e66",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n        \"receiverId\": msg.payload.rssiSignature[0].receiverId,\n        \"transmitterId\": msg.payload.transmitterId,\n        \"rssi\": msg.payload.rssiSignature[0].rssi,\n        \"acceleration\": msg.payload.acceleration,\n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1580,
        "y": 80,
        "wires": [
            [
                "89cbd7f864d61992"
            ]
        ]
    },
    {
        "id": "6315cee382b2bc95",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Latina Seguros",
        "property": "payload.transmitterId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabf70",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1100,
        "y": 80,
        "wires": [
            [
                "61dc7cb7db4f032d"
            ]
        ]
    },
    {
        "id": "bd648b1e332d49a7",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n       \n    \n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1580,
        "y": 120,
        "wires": [
            [
                "338aca5ad3b3f537"
            ]
        ]
    },
    {
        "id": "e68c2a2d1d9c6709",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Latina Seguros",
        "property": "payload.deviceId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabf70",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1100,
        "y": 120,
        "wires": [
            [
                "28c5b300118396e2"
            ]
        ]
    },
    {
        "id": "ffa398114cd37a73",
        "type": "pareto-anywhere-socketio",
        "z": "12fac42ea0b82cc0",
        "uri": "http://localhost:3001",
        "x": 100,
        "y": 420,
        "wires": [
            [
                "6315cee382b2bc95",
                "b669c6d9ec4bd1c5",
                "f925deeaf9bd1ed0",
                "f2ce0e8b851839c5",
                "84e87dd998ef0a03",
                "813da07b16080663"
            ],
            [
                "2e9989f0e16344e8"
            ]
        ]
    },
    {
        "id": "89cbd7f864d61992",
        "type": "ui_table",
        "z": "12fac42ea0b82cc0",
        "group": "92c71489b179bb53",
        "name": "Sector ",
        "order": 4,
        "width": 0,
        "height": 0,
        "columns": [
            {
                "field": "transmitterId",
                "title": "Nr. de tarjeta",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "receiverId",
                "title": "Sector",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1730,
        "y": 80,
        "wires": [],
        "icon": "node-red/file.svg"
    },
    {
        "id": "28c5b300118396e2",
        "type": "delay",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1360,
        "y": 120,
        "wires": [
            [
                "bd648b1e332d49a7"
            ]
        ]
    },
    {
        "id": "61dc7cb7db4f032d",
        "type": "change",
        "z": "12fac42ea0b82cc0",
        "name": "Listado Sectores",
        "rules": [
            {
                "t": "change",
                "p": "payload.rssiSignature[0].receiverId",
                "pt": "msg",
                "from": "b827eb534e65",
                "fromt": "str",
                "to": "Oficina LATINA Seguros",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1370,
        "y": 80,
        "wires": [
            [
                "0753c292a15b1e66"
            ]
        ]
    },
    {
        "id": "be1cafa730ac41af",
        "type": "ui_toast",
        "z": "12fac42ea0b82cc0",
        "position": "dialog",
        "displayTime": "30",
        "highlight": "red",
        "sendall": false,
        "outputs": 1,
        "ok": "Aceptar",
        "cancel": "",
        "raw": true,
        "className": "",
        "topic": "Activación botón de pánico- 1700 Digital",
        "name": "POP-UP",
        "x": 1720,
        "y": 260,
        "wires": [
            []
        ]
    },
    {
        "id": "e6ccc95782230349",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n        \"receiverId\": msg.payload.rssiSignature[0].receiverId,\n        \"transmitterId\": msg.payload.transmitterId,\n        \"rssi\": msg.payload.rssiSignature[0].rssi,\n        \"acceleration\": msg.payload.acceleration,\n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 220,
        "wires": [
            [
                "36865d7fd1008906"
            ]
        ]
    },
    {
        "id": "b669c6d9ec4bd1c5",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "1700 Digital",
        "property": "payload.transmitterId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1090,
        "y": 220,
        "wires": [
            [
                "a16f16b10aa4487a"
            ]
        ]
    },
    {
        "id": "778e0dcff14acf45",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n       \n    \n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 260,
        "wires": [
            [
                "be1cafa730ac41af"
            ]
        ]
    },
    {
        "id": "e4e137e8bf57431d",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "1700 Digital",
        "property": "payload.deviceId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1090,
        "y": 260,
        "wires": [
            [
                "90e76d7451a1e8c7"
            ]
        ]
    },
    {
        "id": "36865d7fd1008906",
        "type": "ui_table",
        "z": "12fac42ea0b82cc0",
        "group": "058c327be4ddaa36",
        "name": "Sector ",
        "order": 2,
        "width": 0,
        "height": 0,
        "columns": [
            {
                "field": "transmitterId",
                "title": "Nr. de tarjeta",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "receiverId",
                "title": "Sector",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1710,
        "y": 220,
        "wires": [],
        "icon": "node-red/file.svg"
    },
    {
        "id": "90e76d7451a1e8c7",
        "type": "delay",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1280,
        "y": 260,
        "wires": [
            [
                "778e0dcff14acf45"
            ]
        ]
    },
    {
        "id": "a16f16b10aa4487a",
        "type": "change",
        "z": "12fac42ea0b82cc0",
        "name": "Listado Sectores",
        "rules": [
            {
                "t": "change",
                "p": "payload.rssiSignature[0].receiverId",
                "pt": "msg",
                "from": "b827eb534e65",
                "fromt": "str",
                "to": "Oficina 1700 Digital",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1290,
        "y": 220,
        "wires": [
            [
                "e6ccc95782230349"
            ]
        ]
    },
    {
        "id": "99498070d58bcfbf",
        "type": "ui_toast",
        "z": "12fac42ea0b82cc0",
        "position": "dialog",
        "displayTime": "30",
        "highlight": "red",
        "sendall": false,
        "outputs": 1,
        "ok": "Aceptar",
        "cancel": "",
        "raw": true,
        "className": "Activación botón de pánico- Netlife",
        "topic": "Activación botón de pánico- Netlife",
        "name": "POP-UP",
        "x": 1640,
        "y": 380,
        "wires": [
            []
        ]
    },
    {
        "id": "e575ddb3214251ff",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n        \"receiverId\": msg.payload.rssiSignature[0].receiverId,\n        \"transmitterId\": msg.payload.transmitterId,\n        \"rssi\": msg.payload.rssiSignature[0].rssi,\n        \"acceleration\": msg.payload.acceleration,\n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1480,
        "y": 340,
        "wires": [
            [
                "16633dcd13b72d58"
            ]
        ]
    },
    {
        "id": "f925deeaf9bd1ed0",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Netlife",
        "property": "payload.transmitterId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1070,
        "y": 340,
        "wires": [
            [
                "882c9d6fa184420f"
            ]
        ]
    },
    {
        "id": "cbdd6bdb65c5870d",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n       \n    \n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1480,
        "y": 380,
        "wires": [
            [
                "99498070d58bcfbf"
            ]
        ]
    },
    {
        "id": "97342b481a2cc6ba",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Netlife",
        "property": "payload.deviceId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1070,
        "y": 380,
        "wires": [
            [
                "f171d3b40f722739"
            ]
        ]
    },
    {
        "id": "16633dcd13b72d58",
        "type": "ui_table",
        "z": "12fac42ea0b82cc0",
        "group": "d36c8c9ae2b506b2",
        "name": "Sector ",
        "order": 2,
        "width": 0,
        "height": 0,
        "columns": [
            {
                "field": "transmitterId",
                "title": "Nr. de tarjeta",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "receiverId",
                "title": "Sector",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1630,
        "y": 340,
        "wires": [],
        "icon": "node-red/file.svg"
    },
    {
        "id": "f171d3b40f722739",
        "type": "delay",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1280,
        "y": 380,
        "wires": [
            [
                "cbdd6bdb65c5870d"
            ]
        ]
    },
    {
        "id": "882c9d6fa184420f",
        "type": "change",
        "z": "12fac42ea0b82cc0",
        "name": "Listado Sectores",
        "rules": [
            {
                "t": "change",
                "p": "payload.rssiSignature[0].receiverId",
                "pt": "msg",
                "from": "b827eb534e65",
                "fromt": "str",
                "to": "Oficina Netlife",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1290,
        "y": 340,
        "wires": [
            [
                "e575ddb3214251ff"
            ]
        ]
    },
    {
        "id": "f2ce0e8b851839c5",
        "type": "debug",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 290,
        "y": 280,
        "wires": []
    },
    {
        "id": "4f6c9d2dfdfac695",
        "type": "debug",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 270,
        "y": 720,
        "wires": []
    },
    {
        "id": "486411c207cb548d",
        "type": "ui_toast",
        "z": "12fac42ea0b82cc0",
        "position": "dialog",
        "displayTime": "30",
        "highlight": "red",
        "sendall": false,
        "outputs": 1,
        "ok": "Aceptar",
        "cancel": "",
        "raw": true,
        "className": "Activación botón de pánico- Bolon de Tere",
        "topic": "Activación botón de pánico- Bolon de Tere",
        "name": "POP-UP",
        "x": 1720,
        "y": 540,
        "wires": [
            []
        ]
    },
    {
        "id": "17adb049ffb39109",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n        \"receiverId\": msg.payload.rssiSignature[0].receiverId,\n        \"transmitterId\": msg.payload.transmitterId,\n        \"rssi\": msg.payload.rssiSignature[0].rssi,\n        \"acceleration\": msg.payload.acceleration,\n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 500,
        "wires": [
            [
                "83ba35c368a20928"
            ]
        ]
    },
    {
        "id": "84e87dd998ef0a03",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Bolon de Tere",
        "property": "payload.transmitterId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1100,
        "y": 500,
        "wires": [
            [
                "885c8010e9434bbe"
            ]
        ]
    },
    {
        "id": "24b4467d8504e743",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n       \n    \n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 540,
        "wires": [
            [
                "486411c207cb548d"
            ]
        ]
    },
    {
        "id": "17d460ed2389c2aa",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Bolon de Tere",
        "property": "payload.deviceId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1100,
        "y": 540,
        "wires": [
            [
                "c4a4a263a9fa3ec4"
            ]
        ]
    },
    {
        "id": "83ba35c368a20928",
        "type": "ui_table",
        "z": "12fac42ea0b82cc0",
        "group": "49364a9a2538f861",
        "name": "Sector ",
        "order": 2,
        "width": 0,
        "height": 0,
        "columns": [
            {
                "field": "transmitterId",
                "title": "Nr. de tarjeta",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "receiverId",
                "title": "Sector",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1710,
        "y": 500,
        "wires": [],
        "icon": "node-red/file.svg"
    },
    {
        "id": "c4a4a263a9fa3ec4",
        "type": "delay",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1320,
        "y": 540,
        "wires": [
            [
                "24b4467d8504e743"
            ]
        ]
    },
    {
        "id": "885c8010e9434bbe",
        "type": "change",
        "z": "12fac42ea0b82cc0",
        "name": "Listado Sectores",
        "rules": [
            {
                "t": "change",
                "p": "payload.rssiSignature[0].receiverId",
                "pt": "msg",
                "from": "b827eb534e65",
                "fromt": "str",
                "to": "Local Bolon de Tere",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1330,
        "y": 500,
        "wires": [
            [
                "17adb049ffb39109"
            ]
        ]
    },
    {
        "id": "2958f53d1d0f95a8",
        "type": "ui_toast",
        "z": "12fac42ea0b82cc0",
        "position": "dialog",
        "displayTime": "30",
        "highlight": "red",
        "sendall": false,
        "outputs": 1,
        "ok": "Aceptar",
        "cancel": "",
        "raw": true,
        "className": "Activación botón de pánico- Equivida",
        "topic": "Activación botón de pánico- Equivida",
        "name": "POP-UP",
        "x": 1720,
        "y": 660,
        "wires": [
            []
        ]
    },
    {
        "id": "2b14f49f8a5b94b1",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n        \"receiverId\": msg.payload.rssiSignature[0].receiverId,\n        \"transmitterId\": msg.payload.transmitterId,\n        \"rssi\": msg.payload.rssiSignature[0].rssi,\n        \"acceleration\": msg.payload.acceleration,\n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 620,
        "wires": [
            [
                "b9d48a96e0fb327a"
            ]
        ]
    },
    {
        "id": "813da07b16080663",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Equivida",
        "property": "payload.transmitterId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1080,
        "y": 620,
        "wires": [
            [
                "796fc2b9c2233542"
            ]
        ]
    },
    {
        "id": "904dc2533b0adbed",
        "type": "function",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n       \n    \n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 660,
        "wires": [
            [
                "2958f53d1d0f95a8"
            ]
        ]
    },
    {
        "id": "b4ba936917781c5f",
        "type": "switch",
        "z": "12fac42ea0b82cc0",
        "name": "Equivida",
        "property": "payload.deviceId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabb404",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1080,
        "y": 660,
        "wires": [
            [
                "7acdad9d280e5a76"
            ]
        ]
    },
    {
        "id": "b9d48a96e0fb327a",
        "type": "ui_table",
        "z": "12fac42ea0b82cc0",
        "group": "22edd46fd0804e1c",
        "name": "Sector ",
        "order": 2,
        "width": 0,
        "height": 0,
        "columns": [
            {
                "field": "transmitterId",
                "title": "Nr. de tarjeta",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "receiverId",
                "title": "Sector",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1710,
        "y": 620,
        "wires": [],
        "icon": "node-red/file.svg"
    },
    {
        "id": "7acdad9d280e5a76",
        "type": "delay",
        "z": "12fac42ea0b82cc0",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1280,
        "y": 660,
        "wires": [
            [
                "904dc2533b0adbed"
            ]
        ]
    },
    {
        "id": "796fc2b9c2233542",
        "type": "change",
        "z": "12fac42ea0b82cc0",
        "name": "Listado Sectores",
        "rules": [
            {
                "t": "change",
                "p": "payload.rssiSignature[0].receiverId",
                "pt": "msg",
                "from": "b827eb534e65",
                "fromt": "str",
                "to": "Lobby Equivida",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1290,
        "y": 620,
        "wires": [
            [
                "2b14f49f8a5b94b1"
            ]
        ]
    },
    {
        "id": "92c71489b179bb53",
        "type": "ui_group",
        "name": "Pec - Seguros Latina",
        "tab": "24390961ab7e42d7",
        "order": 20,
        "disp": true,
        "width": "8",
        "collapse": true,
        "className": "SegurosLatina"
    },
    {
        "id": "058c327be4ddaa36",
        "type": "ui_group",
        "name": "Pec - Digital",
        "tab": "24390961ab7e42d7",
        "order": 21,
        "disp": true,
        "width": "8",
        "collapse": true,
        "className": "Digital"
    },
    {
        "id": "d36c8c9ae2b506b2",
        "type": "ui_group",
        "name": "Pec - Netlife",
        "tab": "24390961ab7e42d7",
        "order": 22,
        "disp": true,
        "width": "8",
        "collapse": true,
        "className": "Netlife"
    },
    {
        "id": "49364a9a2538f861",
        "type": "ui_group",
        "name": "Pec - Bolon de Tere",
        "tab": "24390961ab7e42d7",
        "order": 23,
        "disp": true,
        "width": "8",
        "collapse": true,
        "className": "BolondeTere"
    },
    {
        "id": "22edd46fd0804e1c",
        "type": "ui_group",
        "name": "Pec - Equivida",
        "tab": "24390961ab7e42d7",
        "order": 24,
        "disp": true,
        "width": "8",
        "collapse": true,
        "className": "Equivida"
    },
    {
        "id": "24390961ab7e42d7",
        "type": "ui_tab",
        "name": "Servicio Vimo",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

Ok you have 100 physical buttons, how are they communicating with node-red? If each button has a unique identifier, why not build a database containing the information (location etc) and when the message arrives in NR, do a database lookup to grab the needed information and send it the -appropriate people.

For comunication Im using reelyactive/node-red-pareto-anywhere which digest and process the BLE Beacons data coming from differents BLE Gateways connected to the wlan, my problem is that each beacon( Button ) generates different tasks such as making calls, sending sms and also at the same time they trigger events in the visualization dashboard.

[
    {
        "id": "29e4689e85f74a5e",
        "type": "http request",
        "z": "92b079feca843005",
        "name": "SMS David",
        "method": "POST",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "http://api.textmebot.com/send.php?recipient=",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "senderr": false,
        "credentials": {
            "user": "",
            "password": ""
        },
        "x": 1530,
        "y": 380,
        "wires": [
            []
        ]
    },
    {
        "id": "33d2265a11676cbd",
        "type": "switch",
        "z": "92b079feca843005",
        "name": "Button Pressed",
        "property": "payload.isButtonPressed[0]",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "false",
        "repair": true,
        "outputs": 1,
        "x": 840,
        "y": 240,
        "wires": [
            [
                "9b3e56225f918145"
            ]
        ]
    },
    {
        "id": "8189a489d940b1c5",
        "type": "http request",
        "z": "92b079feca843005",
        "name": "SMS Xavier",
        "method": "POST",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "http://api.textmebot.com/send.php?recipient=",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "senderr": false,
        "credentials": {
            "user": "",
            "password": ""
        },
        "x": 1530,
        "y": 420,
        "wires": [
            []
        ]
    },
    {
        "id": "03d718caac950283",
        "type": "ui_toast",
        "z": "92b079feca843005",
        "position": "dialog",
        "displayTime": "30",
        "highlight": "red",
        "sendall": true,
        "outputs": 1,
        "ok": "Aceptar",
        "cancel": "",
        "raw": true,
        "className": "",
        "topic": "Activación botón de pánico- Latina Seguros",
        "name": "POP-UP",
        "x": 1740,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "d35c63c9c64566b2",
        "type": "function",
        "z": "92b079feca843005",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n        \"receiverId\": msg.payload.rssiSignature[0].receiverId,\n        \"transmitterId\": msg.payload.transmitterId,\n        \"rssi\": msg.payload.rssiSignature[0].rssi,\n        \"acceleration\": msg.payload.acceleration,\n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1580,
        "y": 80,
        "wires": [
            [
                "376f0dfb13113aa3"
            ]
        ]
    },
    {
        "id": "47865ebf9845f70b",
        "type": "switch",
        "z": "92b079feca843005",
        "name": "Latina Seguros",
        "property": "payload.transmitterId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabf708",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1100,
        "y": 80,
        "wires": [
            [
                "9fb80aab412c61c1"
            ]
        ]
    },
    {
        "id": "df12dddc74bc8fe6",
        "type": "function",
        "z": "92b079feca843005",
        "name": "",
        "func": "msg.payload = [\n    {\n        \"timestamp\": new Date(msg.payload.timestamp).toLocaleString(),\n       \n    \n\n    }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1580,
        "y": 240,
        "wires": [
            [
                "46099f0d40a19914",
                "03d718caac950283",
                "180c0a3e413cce42"
            ]
        ]
    },
    {
        "id": "9b3e56225f918145",
        "type": "switch",
        "z": "92b079feca843005",
        "name": "Latina Seguros",
        "property": "payload.deviceId",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ac233fabf708",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 1100,
        "y": 300,
        "wires": [
            [
                "3e9f7741809835e9",
                "20cf760835b1b03d"
            ]
        ]
    },
    {
        "id": "ce4b1dd443b812e3",
        "type": "pareto-anywhere-socketio",
        "z": "92b079feca843005",
        "uri": "http://localhost:3001",
        "x": 660,
        "y": 200,
        "wires": [
            [
                "47865ebf9845f70b"
            ],
            [
                "33d2265a11676cbd"
            ]
        ]
    },
    {
        "id": "376f0dfb13113aa3",
        "type": "ui_table",
        "z": "92b079feca843005",
        "group": "49c51169dfe375d7",
        "name": "Sector ",
        "order": 3,
        "width": 0,
        "height": 0,
        "columns": [
            {
                "field": "transmitterId",
                "title": "Nr. de tarjeta",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "receiverId",
                "title": "Sector",
                "width": "",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1730,
        "y": 80,
        "wires": [],
        "icon": "node-red/file.svg"
    },
    {
        "id": "46099f0d40a19914",
        "type": "ui_table",
        "z": "92b079feca843005",
        "group": "49c51169dfe375d7",
        "name": "Last Panic",
        "order": 2,
        "width": 0,
        "height": 0,
        "columns": [
            {
                "field": "timestamp",
                "title": "Ultima activacion boton de panico",
                "width": "",
                "align": "center",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1750,
        "y": 200,
        "wires": []
    },
    {
        "id": "20cf760835b1b03d",
        "type": "delay",
        "z": "92b079feca843005",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1360,
        "y": 320,
        "wires": [
            [
                "df12dddc74bc8fe6",
                "29e4689e85f74a5e",
                "8189a489d940b1c5"
            ]
        ]
    },
    {
        "id": "9fb80aab412c61c1",
        "type": "change",
        "z": "92b079feca843005",
        "name": "Listado Sectores",
        "rules": [
            {
                "t": "change",
                "p": "payload.rssiSignature[0].receiverId",
                "pt": "msg",
                "from": "b827eb534e65",
                "fromt": "str",
                "to": "Oficina LATINA Seguros",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1370,
        "y": 80,
        "wires": [
            [
                "d35c63c9c64566b2"
            ]
        ]
    },
    {
        "id": "4a59c78edfaaba58",
        "type": "ui_audio",
        "z": "92b079feca843005",
        "name": "TTS",
        "group": "49c51169dfe375d7",
        "voice": "Microsoft Pablo - Spanish (Spain)",
        "always": false,
        "x": 1970,
        "y": 360,
        "wires": []
    },
    {
        "id": "fe12b4a7b3fc52d5",
        "type": "change",
        "z": "92b079feca843005",
        "name": "aviso alarma",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Alarma Latina Seguros planta baja",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1750,
        "y": 360,
        "wires": [
            [
                "4a59c78edfaaba58",
                "180c0a3e413cce42"
            ]
        ]
    },
    {
        "id": "4800fd9e452aba93",
        "type": "ui_form",
        "z": "92b079feca843005",
        "name": "",
        "label": "Formulario",
        "group": "49c51169dfe375d7",
        "order": 5,
        "width": 8,
        "height": 1,
        "options": [
            {
                "label": "Usuario",
                "value": "Usuario",
                "type": "text",
                "required": true,
                "rows": null
            },
            {
                "label": "Asunto",
                "value": "Asunto",
                "type": "text",
                "required": true,
                "rows": null
            }
        ],
        "formValue": {
            "Usuario": "",
            "Asunto": ""
        },
        "payload": "",
        "submit": "submit",
        "cancel": "cancel",
        "topic": "topic",
        "topicType": "msg",
        "splitLayout": "",
        "className": "",
        "x": 1170,
        "y": 140,
        "wires": [
            [
                "ec7a55826e209975",
                "1b7720f0d1a7740d"
            ]
        ]
    },
    {
        "id": "3e9f7741809835e9",
        "type": "change",
        "z": "92b079feca843005",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload.color",
                "pt": "msg",
                "to": "#ff0000",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload.status",
                "pt": "msg",
                "to": "Alerta",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1360,
        "y": 280,
        "wires": [
            [
                "3f9f39c54cc27a65",
                "e8c297c3d16c832d"
            ]
        ]
    },
    {
        "id": "ec7a55826e209975",
        "type": "change",
        "z": "92b079feca843005",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload.color",
                "pt": "msg",
                "to": "#008800",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload.status",
                "pt": "msg",
                "to": "Normal",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1360,
        "y": 120,
        "wires": [
            [
                "3f9f39c54cc27a65"
            ]
        ]
    },
    {
        "id": "3f9f39c54cc27a65",
        "type": "ui_button",
        "z": "92b079feca843005",
        "name": "",
        "group": "49c51169dfe375d7",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "{{payload.status}}",
        "tooltip": "",
        "color": "",
        "bgcolor": "{{payload.color}}",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 1570,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "68f740be98b4e670",
        "type": "ui_template",
        "z": "92b079feca843005",
        "group": "49c51169dfe375d7",
        "name": "Seguros Latina",
        "order": 4,
        "width": 0,
        "height": 0,
        "format": "<style>\n    .SegurosLatina p.nr-dashboard-cardtitle {\n        color: {{msg.payload}} !important ;\n    }\n</style>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 1360,
        "y": 200,
        "wires": [
            []
        ],
        "info": "<style>\r\n.mplug17 p.nr-dashboard-cardtitle {\r\n        color: green !important;\r\n    }\r\n</style>"
    },
    {
        "id": "1b7720f0d1a7740d",
        "type": "change",
        "z": "92b079feca843005",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "#0094CE",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1360,
        "y": 160,
        "wires": [
            [
                "68f740be98b4e670"
            ]
        ]
    },
    {
        "id": "e8c297c3d16c832d",
        "type": "change",
        "z": "92b079feca843005",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "red",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1360,
        "y": 240,
        "wires": [
            [
                "68f740be98b4e670"
            ]
        ]
    },
    {
        "id": "180c0a3e413cce42",
        "type": "loop",
        "z": "92b079feca843005",
        "name": "Loop ",
        "kind": "fcnt",
        "count": "3",
        "initial": "1",
        "step": "1",
        "condition": "",
        "conditionType": "js",
        "when": "before",
        "enumeration": "enum",
        "enumerationType": "msg",
        "limit": "",
        "loopPayload": "loop-index",
        "finalPayload": "final-count",
        "x": 1750,
        "y": 300,
        "wires": [
            [],
            [
                "fe12b4a7b3fc52d5"
            ]
        ]
    },
    {
        "id": "49c51169dfe375d7",
        "type": "ui_group",
        "name": "Seguros Latina",
        "tab": "a63fd8bfd0ad2d25",
        "order": 5,
        "disp": true,
        "width": "8",
        "collapse": true,
        "className": "SegurosLatina"
    },
    {
        "id": "a63fd8bfd0ad2d25",
        "type": "ui_tab",
        "name": "Servicio Vimo - Parque Empresarial Colón",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

Are the actions that a button activation going to be fixed or variable? If variable how will you know?

How many unique actions will there be amoung all the buttons?

I would still have a database with the actions for each button. When a button’s id arrives you query the database and get the list of actions. The msg is then sent could go thru a function node that would parse all the actions and send out a msg for each action. (See the documentation on the function on how to send multiple messages.)

I think the nice thing about this method is to add an action to a button, you would just add that action to that id’s database record and you could remove actions too without changing the flow.

You could also add new buttons as you go.

But that is how I would do it, others might come up with better ideas since there is always multiple ways to solve a problem :grin:

2 Likes