Dynamic Settings on MQTT Node

Hi,
I have over 100 mqtt broker on various places running, they are not allowed to be connected except in case of an emergency. To send them an "stop", I would like to use the mqtt-in node dynamically. For easy testing, I only use the username for now.

msg.connect
msg.username1
msg.payload...
msg.disconnect

repeat for the next username
...

But the MQTT node is not connecting. I tried to google, ChatGPD... Also I tried to input a variable in the credentials inside the node but had no success. When I add the username directly into the node, it connects directly. So the Broker works fine.

Do you have any ideas??
Here´s my code:

[
    {
        "id": "989ce477843d6ccb",
        "type": "inject",
        "z": "a07c6f2deb801e7a",
        "name": "connect",
        "props": [
            {
                "p": "action",
                "v": "connect",
                "vt": "str"
            },
            {
                "p": "username",
                "v": "fakeusername",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 590,
        "y": 800,
        "wires": [
            [
                "a8750ccc1e9f1a78",
                "43c3fe97cfaf9f04"
            ]
        ]
    },
    {
        "id": "43c3fe97cfaf9f04",
        "type": "debug",
        "z": "a07c6f2deb801e7a",
        "name": "debug 17",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 840,
        "y": 880,
        "wires": []
    },
    {
        "id": "a8750ccc1e9f1a78",
        "type": "mqtt out",
        "z": "a07c6f2deb801e7a",
        "name": "",
        "topic": "",
        "qos": "0",
        "retain": "false",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "52ed6cadc9f74173",
        "x": 830,
        "y": 800,
        "wires": []
    },
    {
        "id": "df44c2bae5d48a68",
        "type": "inject",
        "z": "a07c6f2deb801e7a",
        "name": "",
        "props": [
            {
                "p": "action",
                "v": "\"disconnect\"",
                "vt": "json"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 590,
        "y": 860,
        "wires": [
            [
                "a8750ccc1e9f1a78",
                "43c3fe97cfaf9f04"
            ]
        ]
    },
    {
        "id": "52ed6cadc9f74173",
        "type": "mqtt-broker",
        "name": "test connect",
        "broker": "192.168.178.12",
        "port": "1883",
        "clientid": "",
        "autoConnect": false,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "false",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closeRetain": "false",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willRetain": "false",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    }
]

You need to send msg.action and msg.broker with broker, port ,username and password to connect. To disconnect you just need to send msg.action
e.g.

[{"id":"989ce477843d6ccb","type":"inject","z":"d1395164b4eec73e","name":"connect","props":[{"p":"action","v":"connect","vt":"str"},{"p":"broker","v":"{\"broker\":\"192.168.1.25\",\"port\":1883,\"password\":\"\",\"username\":\"\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":370,"y":7640,"wires":[["a8750ccc1e9f1a78","43c3fe97cfaf9f04"]]},{"id":"a8750ccc1e9f1a78","type":"mqtt out","z":"d1395164b4eec73e","name":"","topic":"","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"e8ba3ef5.22f4a8","x":610,"y":7640,"wires":[]},{"id":"43c3fe97cfaf9f04","type":"debug","z":"d1395164b4eec73e","name":"debug 17","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":620,"y":7720,"wires":[]},{"id":"c67446f710eaae5a","type":"inject","z":"d1395164b4eec73e","name":"disconnect","props":[{"p":"action","v":"disconnect","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":7700,"wires":[["a8750ccc1e9f1a78","43c3fe97cfaf9f04"]]},{"id":"e8ba3ef5.22f4a8","type":"mqtt-broker","name":"testb","broker":"192.168.1.25","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"5","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]

Add you broker and user and password in the inject node.

Here is another example flow that demonstrates most dynamic mqtt features Dynamic MQTT node's "actions->connect" guidance needed - #2 by Steve-Mcl

There it is, thanks alot!