Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Seiteneigenschaften



Deutsch

Beschreibung:

Mit diesem Add-in Skript können Sie per Variable einen SSID-Namen und ein WLAN-Passwort bei LCOS LX-Access Points konfigurieren.

Liste der verwendeten Variablen:

VariableBeschreibung
SSIDnameGibt den Namen der SSID an
WLANpasswordPasswort für diese SSID

Add-in Code:

/**
 * @param {Config} config
 * @param {Context} context
 * Do not edit this comment or parameter types. Required for code suggestions
*/
 exports.main = function (config, context) {
    for (var ssidName in context.network.ssids);
 var table = config.getTableByOid("13.2.20.1");
 var row;
 var netNameUppercase = context.network.name.toUpperCase();
row = table.createNewRow();
row.setByOid("1", "1_" +netNameUppercase +"_" +ssidName);  // Network-Name
    if (context.vars.SSIDname != "")    {  
        row.setByOid(2, context.vars.SSIDname);
                                        }
    if (context.vars.WLANpassword.length > 7 && context.vars.WLANpassword.length < 64)  {
        row.setByOid(100, context.vars.WLANpassword);  
                                            }
    table.addOrMerge(row);
    };

;

Add-in als JSON-Datei:

View file
namelx-ssid-name-password.json
height150


Englisch

Description:

With this add-in script, you can configure an SSID name and a WLAN password for LCOS LX access points using a variable.

List of used variables:

VariableDescription
SSIDnameName of the SSID
WLANpasswordPassword for this SSID

Add-in code:

/**
 * @param {Config} config
 * @param {Context} context
 * Do not edit this comment or parameter types. Required for code suggestions
*/
 exports.main = function (config, context) {
    for (var ssidName in context.network.ssids);
 var table = config.getTableByOid("13.2.20.1");
 var row;
 var netNameUppercase = context.network.name.toUpperCase();
row = table.createNewRow();
row.setByOid("1", "1_" +netNameUppercase +"_" +ssidName);  // Network-Name
    if (context.vars.SSIDname != "")    {  
        row.setByOid(2, context.vars.SSIDname);
                                        }
    if (context.vars.WLANpassword.length > 7 && context.vars.WLANpassword.length < 64)  {
        row.setByOid(100, context.vars.WLANpassword);  
                                            }
    table.addOrMerge(row);
    };

Add-in as JSON file:

View file
namelx-ssid-name-password.json
height150

...