Wifi Settings UI Dashboard for Bookworm nmcli

I want to use the Wifi settings UI Dashboard with Bookworm.
Wifi settings UI Dashboard
The outcome is the following;

msg.payload : Object
object
ssid: "Test01"
password: "1234"

I have no idee how to make it ;

nmcli device wifi con ssid Test01 password "1234"

So i can use it in the command line.

I have tried a function block;

var data = msg.payload
var command = `nmcli device wifi con ssid "${data.ssid}" password "${data.password}"'`
msg.payload = command
return msg

But the outcome is; "nmcli device wifi con ssid "Test01" password "1234"'"

Can someone help me please ?

That flow updates /etc/wpa_supplicant/wpa_supplicant.conf, but in Bookworm that is not used for network credentials so your flow achieves nothing.

The "official" way to setup networking is either using the tools in the RPi Imager or else via raspi-config.

In Bookworm < nmcli device wifi con ssid Test01 password "1234" > works on the commend line.

Try this

[
    {
        "id": "995061048c706d6e",
        "type": "tab",
        "label": "流程 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "f6cde6d32be766eb",
        "type": "function",
        "z": "995061048c706d6e",
        "name": "function 1",
        "func": "msg.payload = \n{\n    ssid: \"Test01\",\npassword: \"1234\"\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 100,
        "y": 220,
        "wires": [
            [
                "6dece5d4154264f9"
            ]
        ]
    },
    {
        "id": "77c9b67ab488af4d",
        "type": "inject",
        "z": "995061048c706d6e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 70,
        "y": 140,
        "wires": [
            [
                "f6cde6d32be766eb"
            ]
        ]
    },
    {
        "id": "6dece5d4154264f9",
        "type": "function",
        "z": "995061048c706d6e",
        "name": "function 2",
        "func": "var command = \"nmcli device wifi con ssid \" + msg.payload.ssid + \" password \\\"\" + msg.payload.password +\"\\\"\";\nmsg.payload = command;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 280,
        "y": 200,
        "wires": [
            [
                "434be9b283ea07a3"
            ]
        ]
    },
    {
        "id": "434be9b283ea07a3",
        "type": "debug",
        "z": "995061048c706d6e",
        "name": "debug 21",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 480,
        "y": 200,
        "wires": []
    }
]