NEWS
[gelöst] UDM/ Unifi WLan ein/ausschalten
-
Hallo zusammen,
komme wieder nicht weiter leider
Möchte gerne per node das Wlan ein und auschalten.
Habe bisher folgendes leider ohne Erfolg versucht. Bin mir aber auch nicht sicher. Was ich unter Wlan-id zu verstehen habe. SSID oder den Zahlencode vom Browser.
Special Commands: (No GUI)
disableWlan : Disable/Enable Wlan { command: "disableWlan", wlan_id: "use _id from command WlanSettings", disable: true }[ { "id": "40fe92aa.17e42c", "type": "tab", "label": "Flow 4", "disabled": false, "info": "" }, { "id": "658df77f.8dec08", "type": "debug", "z": "40fe92aa.17e42c", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 890, "y": 420, "wires": [] }, { "id": "94a4dc5f.22d95", "type": "Unifi", "z": "40fe92aa.17e42c", "name": "UDM PRO", "ip": "192.168.2.1", "port": "443", "site": "default", "command": "110", "unifios": true, "x": 690, "y": 420, "wires": [ [ "658df77f.8dec08" ] ] }, { "id": "8a3e4967.edde68", "type": "inject", "z": "40fe92aa.17e42c", "name": "disableWlan", "props": [ { "p": "payload.command", "v": "disable: true", "vt": "str" }, { "p": "payload.wlan_id", "v": "Wlan_Gäste", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 390, "y": 460, "wires": [ [ "94a4dc5f.22d95" ] ] }, { "id": "fd7de505.7a3ac8", "type": "inject", "z": "40fe92aa.17e42c", "name": "enableWlan", "props": [ { "p": "payload.command", "v": "enableWlan", "vt": "str" }, { "p": "payload.wlan_id", "v": "5f6d818e42183e50c886985e", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 390, "y": 400, "wires": [ [ "94a4dc5f.22d95" ] ] } ]
Sind bestimmt fette Fehler drin.
-
@bahadir-ergüllü sagte in UDM/ Unifi WLan ein/ausschalten:
use _id from command WlanSettings
Was gibt denn WlanSettings zurück? Ich würde (gemäss der Beschreibung) erwarten, dass es eine "Tabelle" ist, in der es eine Spalte namens "_id" gibt. Diese müsstest du dann nehmen.
-
@unclesam Hi, habe hier mal was gefunden:
https://github.com/Isaksson/node-red-contrib-unifi/issues/4Das müsste glaube ich so aussehen.
Command disable auf true oder false setzen, zum aus oder einschalten.
Die Id bekommt man wohl mit dem Command WlanSettings raus.
Habe selber kein Unifi deshalb kann ich es nicht testen.[ { "id": "658df77f.8dec08", "type": "debug", "z": "40fe92aa.17e42c", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 890, "y": 420, "wires": [] }, { "id": "94a4dc5f.22d95", "type": "Unifi", "z": "40fe92aa.17e42c", "name": "UDM PRO", "ip": "192.168.2.1", "port": "443", "site": "default", "command": "110", "unifios": true, "x": 690, "y": 420, "wires": [ [ "658df77f.8dec08" ] ] }, { "id": "8a3e4967.edde68", "type": "inject", "z": "40fe92aa.17e42c", "name": "disableWlan", "props": [ { "p": "payload.command", "v": "disableWlan", "vt": "str" }, { "p": "payload.wlan_id", "v": "5f6d818e42183e50c886985e", "vt": "str" }, { "p": "payload.disable", "v": "true", "vt": "bool" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payloadType": "str", "x": 390, "y": 460, "wires": [ [ "94a4dc5f.22d95" ] ] }, { "id": "fd7de505.7a3ac8", "type": "inject", "z": "40fe92aa.17e42c", "name": "enableWlan", "props": [ { "p": "payload.command", "v": "disableWlan", "vt": "str" }, { "p": "payload.wlan_id", "v": "5f6d818e42183e50c886985e", "vt": "str" }, { "p": "payload.disable", "v": "false", "vt": "bool" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 390, "y": 400, "wires": [ [ "94a4dc5f.22d95" ] ] } ]
-
@frankyboy73 Hallo Frank,
vielen Dank das war die Lösung für das Problem.
Nutzen kann ich es leider nicht, da er alle Wlan Access Point´s neu provisioniert
Habe aber trotzdem was neues gelernt.
-
@bahadir-ergüllü Ok, schade das du es nicht nutzen kannst.
Vielleicht gibts ja noch ne andere Lösung, damit du dein Wlan schalten kannst. Aber wie gesagt mit Unifi kenne ich mich nicht aus.
Na wenigsten weiß du jetzt wie man mehrere msg in eine Nachricht packt.
Als Tipp, es ist auch meistens sehr hilfreich, mal in den Issues auf Git Hub von den Nodes oder auch bei Adaptern zu schauen, wenn man Infos sucht. Da werden nicht nur Fehler gemeldet sondern auch oft Fragen gestellt zur Umsetzung.
Edit:
Ich hätte gesagt, falls du Node Red als Adapter im Iobroker nutzt, könntest du es mit dem Unifi Adapter probieren und dann mit Iobroker Input / Output Nodes arbeiten. Aber beim Adapter wirst du wohl das gleiche Problem haben.
Zitat aus der Beschreibung:
By changing the 'enabled' state of a WLAN it is possible to enable/disable it. Some seconds later the change will be provisioned to the Access Points.