Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Wireguard Server abfragen -> Client Infos

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Wireguard Server abfragen -> Client Infos

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kuddel @David G. last edited by

      @david-g kannst du das hier posten?

      Würde es dann versuchen mit im Javascript einzubauen und in der HTML Tabelle anzuzeigen

      David G. 1 Reply Last reply Reply Quote 0
      • David G.
        David G. @Kuddel last edited by David G.

        @kuddel

        Im Link in meiner Signatur findest du das Blockly.
        Da kannst du dir das rausholen.

        In der JS Ansicht ggf den ganzen entsprechenden Bereich kopieren....

        Screenshot_20241011_102738_Chrome.jpg

        K 1 Reply Last reply Reply Quote 1
        • K
          Kuddel @David G. last edited by

          Die Anzeige der Werte vom Wireguard Adapter über in JSON DP funz schonmal:

          fe1387ac-8072-4da1-8b89-0b3b603087a9-grafik.png

          Aktuell hänge ich noch an der whois Abfrage.

          Die Abfrage an sich funzt, nur mein javascript wartet aktuell nicht, bis die Abfrage eine Antwort gelifert hat. Somit sind die Werte immer undefiniert

          David G. 1 Reply Last reply Reply Quote 1
          • David G.
            David G. @Kuddel last edited by

            @kuddel

            So dürfte er erst nach einem Ergebnis oder 2sek weiter machen oder?
            Das ist der Code den mit Blockly gibt.

            httpGet('https://xxx.de', { timeout: 2000, responseType: 'text' }, async (err, response) => {
               console.info(response.data); 
            });
            
            K 1 Reply Last reply Reply Quote 0
            • K
              Kuddel @David G. last edited by

              @david-g timeout: 2000 bedeutet doch eigentlich nur, dass die Abfrage nicht länger als 2 Sekunden dauern darf.

              Eine Pause ist es aber nicht

              David G. 1 Reply Last reply Reply Quote 0
              • David G.
                David G. @Kuddel last edited by David G.

                @kuddel

                Das ist das Blockly was mir den Code generiert hat.
                Alles innerhalb des httpget Baustsins wird dort erst nach einer Antwort oder 2sek ausgeführt.

                Screenshot_20241015_110357_Chrome.jpg

                Edit
                Hier siehst du, dass die der Fehler schon zwischen beiden Warnungen kommt.
                Screenshot_20241015_113246_Chrome.jpg

                Mit einer echten Website hab ich da auch ein result stehen. Nur zu lang für einen Screenshot.

                K 1 Reply Last reply Reply Quote 0
                • K
                  Kuddel @David G. last edited by

                  @david-g

                  ICh bin schon einen Schritt weiter gekommen.

                  Wenn ich alle weiteren Schritte mit in den HTTP Get Block schreibe funktioniert es.

                  Problem ist jetzt, dass es nur für verbundene Clients geht.

                  Morgen mache ich einen erneuten Anlauf, um das Skript für alle Clients lauffähig zu bekommen

                  cc46f443-aab4-49bf-ad4d-9f2dcf631bd4-grafik.png

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    Kuddel @Kuddel last edited by

                    So, das Skript macht jetzt was es soll

                    cd29096c-f006-451c-9734-24d9263eae80-grafik.png

                    Morgen kommen dann nur noch Optimierungen

                    K 1 Reply Last reply Reply Quote 1
                    • K
                      Kuddel @Kuddel last edited by

                      Mein Script erstellt jetzt folgende zwei JSON Datein:

                      8cf30247-84c9-4b91-91c3-19482d8c0ee4-grafik.png

                      Oben sieht man den aktuellen Zustand:
                      Das Land und die Herkunft werden nur abgefragt, wenn sich der Client verbindet oder trennt. Habe da im Test irgednwann eine Ablehnung von der APi bekommen, weil ich zu viele Abfragen gestellt habe.
                      Des Weiteren läuft das Skript bei Änderungen des Traffics sowie der IP erneut los.

                      Unten sieht man eine Verbindungshistory, die nur befüllt wird, wenn sich ein Client verbindet oder wieder trennt.

                      Wenn Interesse besteht, kann ich das Skript gern teilen 🙂

                      Negalein 1 Reply Last reply Reply Quote 1
                      • Negalein
                        Negalein Global Moderator @Kuddel last edited by

                        @kuddel sagte in Wireguard Server abfragen -> Client Infos:

                        Wenn Interesse besteht, kann ich das Skript gern teilen

                        Ja bitte! 🙂

                        Und die View auch bitte! 😉

                        K 1 Reply Last reply Reply Quote 0
                        • K
                          Kuddel @Negalein last edited by Kuddel

                          @negalein

                          Das Skript habe ich mit freudlicher Unterstützung von ChatGPT erstellt. Ist also nicht nur auf meinem Mist gewachsen ^^

                          Skript:

                          /////////////////////
                          // Wireguard Infos //
                          /////////////////////
                          async function wireguard_infos(obj) {
                             // Define lists for clients
                             const list_of_clients = [];
                          
                             // Create states if they don't exist
                             await createStateIfNotExists('0_userdata.0.wireguard-clients.Wireguard-JSON', '[]', { name: 'Wireguard-JSON', type: 'string' });
                             await createStateIfNotExists('0_userdata.0.wireguard-clients.Letztes_Update', '', { name: 'Letztes_Update', type: 'string' });
                          
                             // Check if the trigger was for *.connected
                             let isConnectedTrigger = obj?.id && (obj.id.includes('.connected') || obj.id.includes('.endpoint'));
                          
                             // Get the current stored clients data from 0_userdata.0.wireguard-clients.Wireguard-JSON
                             let storedClients = JSON.parse(getState('0_userdata.0.wireguard-clients.Wireguard-JSON').val);
                          
                             // Iterate over each Wireguard client
                             var cacheSelector = $('[id=wireguard.0.Wireguard-wg0.peers.*.connected]');
                             cacheSelector.each(function(id, i) {
                                 var client_id = getObject(id)._id;
                                 client_id = client_id.replace(".connected", "");
                          
                                 // Get client name and status
                                 var client_name = getState(client_id + ".device").val;
                                 let client_status = getState(client_id + ".connected").val;
                          
                                 // Get connection time in German format
                                 var client_connection_time = formatDateToGerman(new Date(getState(client_id + ".connected").lc));
                          
                                 // Prepare other client details (empty values if disconnected)
                                 let client_ip = '';
                                 let client_transfer_dl = '';
                                 let client_transfer_ul = '';
                          
                                 if (client_status === true) {
                                     // Get IP address and split it from the port
                                     client_ip = getState(client_id + ".endpoint").val.split(':')[0];
                          
                                     // Calculate download and upload transfers in MB
                                     client_transfer_dl = (getState(client_id + ".transferRx").val / 1048576).toFixed(2) + ' MB';
                                     client_transfer_ul = (getState(client_id + ".transferTx").val / 1048576).toFixed(2) + ' MB';
                                 }
                          
                                 // Format status
                                 var client_status_formatted = client_status === false ? '🔴' : '🟢';
                          
                                 // Check if this client exists in the stored clients' data
                                 let storedClient = storedClients.find(c => c.client_name === client_name);
                          
                                 // Initialize origin values
                                 let client_origin = '';
                                 let client_origin_flag = '';
                          
                             	// Preserve stored client origin information
                                 if (storedClient && storedClient.client_origin && storedClient.client_origin_flag && client_status === true) {
                                     client_origin = storedClient.client_origin;
                                     client_origin_flag = storedClient.client_origin_flag;
                                 }
                          
                                 // Add client details to the list
                                 list_of_clients.push({
                                     "client_status_formatted": client_status_formatted,
                                     "client_connection_time": client_connection_time,
                                     "client_name": client_name,
                                     "client_ip": client_ip,
                                     "client_transfer_dl": client_transfer_dl,
                                     "client_transfer_ul": client_transfer_ul,
                                     "client_origin_flag": client_origin_flag,
                                     "client_origin": client_origin,
                                     "client_status": client_status
                                 });
                             });
                          
                             // Only fetch origin information for connected clients if the trigger was *.connected
                             if (isConnectedTrigger) {
                                 for (let client of list_of_clients) {
                                     if (client.client_ip) {
                                         // Check if the client exists in the stored data and has valid origin values
                                         let storedClient = storedClients.find(c => c.client_name === client.client_name);
                                         
                                         if (storedClient && storedClient.client_origin && storedClient.client_origin_flag) {
                                             // Use the stored values if they are valid
                                             client.client_origin = storedClient.client_origin;
                                             client.client_origin_flag = storedClient.client_origin_flag;
                                         } else {
                                             // Fetch and set if not already stored
                                             client.client_origin = await fetchClientOrigin(client.client_ip);
                                             client.client_origin_flag = await fetchClientOriginCountryCode(client.client_ip);
                                         }
                                     }
                                 }
                             }
                          
                             // Sort clients by status and name
                             list_of_clients.sort((a, b) => {
                                 // Compare client_status first, true should come before false
                                 if (a.client_status === b.client_status) {
                                     // If client_status is the same, compare client_name
                                     return a.client_name.localeCompare(b.client_name);
                                 } else {
                                     // Sort true (1) before false (0)
                                     return a.client_status === true ? -1 : 1;
                                 }
                             });
                          
                             // Write formatted lists to states for VIS and JARVIS
                             let dp = "0_userdata.0.wireguard-clients.Wireguard-JSON";
                             if (JSON.stringify(getState(dp).val) !== JSON.stringify(list_of_clients)) {
                                 setStateDelayed(dp, JSON.stringify(list_of_clients), 800);
                             }
                          
                             // Update last synchronization time
                             dp = "0_userdata.0.wireguard-clients.Letztes_Update";
                             let datum = new Date();
                             let heute = datum.getDate() + "." + (datum.getMonth() + 1) + "." + datum.getFullYear() + " " + datum.getHours() + ":" + datum.getMinutes() + ":" + datum.getSeconds() + " Uhr";
                             setStateDelayed(dp, heute, 800);
                          }
                          
                          
                          ///////////////////////
                          // Wireguard history //
                          ///////////////////////
                          async function wireguard_history(event) {
                             // Define list for history clients
                             const list_of_clients = [];
                          
                             // Create state for Wireguard history if not exists
                             await createStateIfNotExists('0_userdata.0.wireguard-clients.Wireguard-JSON-History', '[]', { name: 'Wireguard-JSON-History', type: 'string' });
                          
                             // Get client ID from event
                             var client_id = event.id.replace(".connected", "");
                          
                             // Get client name and status
                             var client_name = getState(client_id + '.device').val;
                             let client_status = event.state.val;
                             let client_status_formatted = event.state.val === true ? "🟢" : "🔴";
                          
                             // Get connection time in German format
                             var client_connection_time = formatDateToGerman(new Date(getState(client_id + ".connected").lc));
                          
                             // Prepare other history client details
                             var client_ip = getState(client_id + ".endpoint").val.split(':')[0];
                             var client_transfer_dl, client_transfer_ul;
                          
                             if (client_status === false) {
                                 client_transfer_dl = (getState(client_id + ".transferRx").val / 1048576).toFixed(2) + ' MB';
                                 client_transfer_ul = (getState(client_id + ".transferTx").val / 1048576).toFixed(2) + ' MB';
                             } else {
                                 client_transfer_dl = '';
                                 client_transfer_ul = '';
                             }
                          
                             // Add history client details to the list
                             list_of_clients.push({
                                 "client_status": client_status_formatted,
                                 "client_connection_time": client_connection_time,
                                 "client_name": client_name,
                                 "client_ip": client_ip,
                                 "client_transfer_dl": client_transfer_dl,
                                 "client_transfer_ul": client_transfer_ul,
                                 "client_origin_flag": '',
                                 "client_origin": ''
                             });
                          
                             // Fetch origin information for connected IPs
                             for (let client of list_of_clients) {
                                 if (client.client_ip) {
                                     client.client_origin = await fetchClientOrigin(client.client_ip);
                                 }
                             }
                          
                             // Fetch country_code for connected clients
                             for (let client of list_of_clients) {
                                 if (client.client_ip) {
                                     client.client_origin_flag = await fetchClientOriginCountryCode(client.client_ip);
                                 }
                             }
                          
                             // Append history clients to existing history state
                             var json_history = JSON.parse(getState('0_userdata.0.wireguard-clients.Wireguard-JSON-History').val);
                             json_history.unshift(...list_of_clients);
                             setState('0_userdata.0.wireguard-clients.Wireguard-JSON-History', JSON.stringify(json_history));
                          }
                          
                          
                          //////////////
                          // Triggers //
                          //////////////
                          
                          // Define triggers for updating wireguard data
                          $('wireguard.0.*.connected').on(wireguard_infos);
                          $('wireguard.0.*.endpoint').on(wireguard_infos);
                          $('wireguard.0.*.transferRx').on(wireguard_infos);
                          $('wireguard.0.*.transferTx').on(wireguard_infos);
                          
                          // Trigger wireguard function on start
                          wireguard_infos();
                          
                          // Define triggers for logging wireguard connection history
                          $('wireguard.0.*.connected').on(wireguard_history);
                          
                          
                          ///////////////
                          // Functions //
                          ///////////////
                          
                          // Helper function to make httpGet requests async
                          function httpGetAsync(url) {
                             return new Promise((resolve, reject) => {
                                 httpGet(url, { timeout: 2000, responseType: 'text' }, (err, response) => {
                                     if (err) return reject(err);
                                     resolve(response);
                                 });
                             });
                          }
                          
                          // Helper function to create states asynchronously if they don't exist
                          async function createStateIfNotExists(stateId, defaultValue, attributes) {
                             if (!existsState(stateId)) {
                                 await createStateAsync(stateId, defaultValue, attributes);
                             }
                          }
                          
                          // Helper function to format date and time into German format
                          function formatDateToGerman(date) {
                             const days = ["So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."];
                             let dayName = days[date.getDay()];
                             let day = ('0' + date.getDate()).slice(-2);
                             let month = ('0' + (date.getMonth() + 1)).slice(-2);
                             let year = date.getFullYear();
                             let hours = ('0' + date.getHours()).slice(-2);
                             let minutes = ('0' + date.getMinutes()).slice(-2);
                          
                             return `${dayName} ${day}.${month}.${year} - ${hours}:${minutes} Uhr`;
                          }
                          
                          
                          // Fetch client origin information using IP address
                          async function fetchClientOrigin(ip) {
                             if (ip.indexOf('.') > 0) {
                                 try {
                                     let url = `https://api.ipapi.is/?q=${ip}`;
                                     let response = await httpGetAsync(url);
                                     let json = JSON.parse(response.data);
                                     
                                     // Check if the necessary properties exist before accessing them
                                     let state = json?.location?.state || '';
                                     let city = json?.location?.city || '';
                                     let provider = json?.company?.name || '';
                                     
                                     return `${state} / ${city} / ${provider}`;
                                 } catch (error) {
                                     console.error('Wireguard Script: Error fetching client origin:', error);
                                     return '';
                                 }
                             }
                             return '';
                          }
                          
                          // Fetch client origin country code using IP address
                          async function fetchClientOriginCountryCode(ip) {
                             if (ip.indexOf('.') > 0) {
                                 try {
                                     let url = `https://api.ipapi.is/?q=${ip}`;
                                     let response = await httpGetAsync(url);
                                     let json = JSON.parse(response.data);
                                     
                                     // Check if the necessary properties exist before accessing them
                                     let countryCode = json?.location?.country_code || '';
                                     return `<img src="https://flagsapi.com/${countryCode}/flat/64.png" style="width:20px;height:20px;">`;
                                 } catch (error) {
                                     console.error('Wireguard Script: Error fetching client origin country code:', error);
                                     return 'Unknown';
                                 }
                             }
                             return '';
                          }
                          
                          

                          View Export (VIS 1)

                          {
                             "settings": {
                                 "style": {
                                     "background_class": "",
                                     "background-color": "#303030",
                                     "background-image": "",
                                     "background-repeat": "",
                                     "background-attachment": "",
                                     "background-position": "",
                                     "background-size": "",
                                     "background-clip": "",
                                     "background-origin": ""
                                 },
                                 "theme": "redmond",
                                 "sizex": "1500",
                                 "sizey": "2500",
                                 "gridSize": "",
                                 "useBackground": false,
                                 "snapType": null,
                                 "useAsDefault": true,
                                 "alwaysRender": true
                             },
                             "widgets": {
                                 "e00001": {
                                     "tpl": "tplVis-materialdesign-Table",
                                     "data": {
                                         "oid": "0_userdata.0.wireguard-clients.Wireguard-JSON",
                                         "g_fixed": true,
                                         "g_visibility": false,
                                         "g_css_font_text": false,
                                         "g_css_background": false,
                                         "g_css_shadow_padding": false,
                                         "g_css_border": false,
                                         "g_gestures": false,
                                         "g_signals": false,
                                         "g_last_change": false,
                                         "countCols": "7",
                                         "tableLayout": "standard",
                                         "showHeader": true,
                                         "headerTextSize": "20px",
                                         "showColumn0": "true",
                                         "colType0": "text",
                                         "textAlign0": "center",
                                         "showColumn1": "true",
                                         "colType1": "text",
                                         "textAlign1": "right",
                                         "signals-cond-0": "==",
                                         "signals-val-0": true,
                                         "signals-icon-0": "/vis.0/VIS_v3/lowbattery.png",
                                         "signals-icon-size-0": 0,
                                         "signals-blink-0": false,
                                         "signals-horz-0": 0,
                                         "signals-vert-0": 0,
                                         "signals-hide-edit-0": false,
                                         "signals-cond-1": "==",
                                         "signals-val-1": true,
                                         "signals-icon-1": "/vis.0/VIS_v3/lowbattery.png",
                                         "signals-icon-size-1": 0,
                                         "signals-blink-1": false,
                                         "signals-horz-1": 0,
                                         "signals-vert-1": 0,
                                         "signals-hide-edit-1": false,
                                         "signals-cond-2": "==",
                                         "signals-val-2": true,
                                         "signals-icon-2": "/vis.0/VIS_v3/lowbattery.png",
                                         "signals-icon-size-2": 0,
                                         "signals-blink-2": false,
                                         "signals-horz-2": 0,
                                         "signals-vert-2": 0,
                                         "signals-hide-edit-2": false,
                                         "lc-type": "last-change",
                                         "lc-is-interval": true,
                                         "lc-is-moment": false,
                                         "lc-format": "",
                                         "lc-position-vert": "top",
                                         "lc-position-horz": "right",
                                         "lc-offset-vert": 0,
                                         "lc-offset-horz": 0,
                                         "lc-font-size": "12px",
                                         "lc-font-family": "",
                                         "lc-font-style": "",
                                         "lc-bkg-color": "",
                                         "lc-color": "",
                                         "lc-border-width": "0",
                                         "lc-border-style": "",
                                         "lc-border-color": "",
                                         "lc-border-radius": 10,
                                         "lc-zindex": 0,
                                         "showColumn2": "true",
                                         "colType2": "text",
                                         "textAlign2": "center",
                                         "showColumn3": true,
                                         "colType3": "text",
                                         "textAlign3": "center",
                                         "label0": "Status",
                                         "label2": "Client",
                                         "label1": "Last Connection Change",
                                         "padding_left0": "10",
                                         "label3": "IP",
                                         "dataJson": "",
                                         "padding_left2": "",
                                         "class": "tableLog",
                                         "textSize3": "small",
                                         "textColor2": "#8f8f8f",
                                         "textSize2": "small",
                                         "padding_right3": "",
                                         "rowHeight": "25",
                                         "textSize0": "small",
                                         "textSize1": "small",
                                         "padding_left1": "",
                                         "textColor0": "#8f8f8f",
                                         "textColor1": "#8f8f8f",
                                         "textColor3": "#8f8f8f",
                                         "imageSize1": "",
                                         "prefix3": "<span style=\"word-wrap:break-all\">",
                                         "suffix3": "</span>",
                                         "colorHeaderRowText": "white",
                                         "colorHeaderRowBackground": "#212121",
                                         "colorRowBackground": "#303030",
                                         "colorRowText": "#fff",
                                         "dividers": "",
                                         "colorBackground": "transparent",
                                         "prefix2": "",
                                         "prefix1": "",
                                         "suffix2": "",
                                         "suffix1": "",
                                         "columnWidth0": "50",
                                         "columnWidth1": "130",
                                         "columnWidth3": "70",
                                         "columnWidth2": "70",
                                         "fontFamily1": "Arial, Helvetica, sans-serif",
                                         "fontFamily3": "Arial, Helvetica, sans-serif",
                                         "fontFamily2": "Arial, Helvetica, sans-serif",
                                         "fontFamily0": "Arial, Helvetica, sans-serif",
                                         "colTextSize2": "20px",
                                         "colTextSize3": "20px",
                                         "colTextSize1": "20px",
                                         "colTextSize0": "20px",
                                         "name": "Ubersicht",
                                         "headerRowHeight": "30",
                                         "headerFontFamily": "Arial, Helvetica, sans-serif",
                                         "colNoWrap1": true,
                                         "colNoWrap0": true,
                                         "colTextColor0": "white",
                                         "colTextColor1": "",
                                         "colTextColor2": "lightblue",
                                         "colTextColor3": "white",
                                         "colNoWrap3": true,
                                         "colNoWrap2": true,
                                         "roundBorder": false,
                                         "colorRowBackgroundHover": "grey",
                                         "borderColor": "#mdwTheme:vis-materialdesign.0.colors.table.border",
                                         "visibility-cond": "==",
                                         "visibility-val": 1,
                                         "visibility-groups-action": "hide",
                                         "fixedHeader": false,
                                         "showColumn4": "true",
                                         "colType4": "text",
                                         "textAlign4": "center",
                                         "colTextSize4": "20px",
                                         "fontFamily4": "Arial, Helvetica, sans-serif",
                                         "showColumn5": "true",
                                         "colType5": "text",
                                         "textAlign5": "left",
                                         "colTextSize5": "20px",
                                         "fontFamily5": "Arial, Helvetica, sans-serif",
                                         "showColumn6": "true",
                                         "colType6": "text",
                                         "textAlign6": "center",
                                         "colTextSize6": "20px",
                                         "fontFamily6": "Arial, Helvetica, sans-serif",
                                         "showColumn7": true,
                                         "colType7": "text",
                                         "textAlign7": "center",
                                         "colTextSize7": "20px",
                                         "fontFamily7": "Arial, Helvetica, sans-serif",
                                         "showColumn8": true,
                                         "colType8": "text",
                                         "textAlign8": "center",
                                         "colTextSize8": "20px",
                                         "fontFamily8": "Arial, Helvetica, sans-serif",
                                         "columnWidth4": "60",
                                         "label4": "DL",
                                         "columnWidth5": "60",
                                         "colNoWrap5": true,
                                         "label5": "UL",
                                         "label6": "Land",
                                         "label7": "Origin",
                                         "label8": "Origin",
                                         "showColumn9": "true",
                                         "colType9": "text",
                                         "textAlign9": "center",
                                         "colTextSize9": "60px",
                                         "fontFamily9": "Arial, Helvetica, sans-serif",
                                         "showColumn10": "true",
                                         "colType10": "text",
                                         "textAlign10": "center",
                                         "colTextSize10": "#mdwTheme:vis-materialdesign.0.fontSizes.table.row",
                                         "fontFamily10": "#mdwTheme:vis-materialdesign.0.fonts.table.row",
                                         "label9": "Vers.",
                                         "label10": "Temp.",
                                         "columnWidth6": "50",
                                         "columnWidth7": "200",
                                         "columnWidth8": "140",
                                         "colNoWrap6": true,
                                         "padding_right6": "1",
                                         "colNoWrap7": false
                                     },
                                     "style": {
                                         "left": "0px",
                                         "top": "0px",
                                         "width": "1240px",
                                         "height": "248px",
                                         "z-index": "",
                                         "overflow-y": ""
                                     },
                                     "widgetSet": "materialdesign"
                                 },
                                 "e00002": {
                                     "tpl": "tplHqButton",
                                     "data": {
                                         "oid": "javascript.0.scriptEnabled.java.abfragen.wireguard_clients",
                                         "min": "false",
                                         "max": "true",
                                         "iconName": "",
                                         "btIconWidth": "100",
                                         "offsetAuto": false,
                                         "leftOffset": "0",
                                         "topOffset": "0",
                                         "timeAsInterval": "true",
                                         "infoLeftFontSize": "12",
                                         "infoFontRightSize": "12",
                                         "caption": "",
                                         "captionOn": "",
                                         "iconOn": "",
                                         "gestures-offsetX": 0,
                                         "gestures-offsetY": 0,
                                         "signals-cond-0": "==",
                                         "signals-val-0": "true",
                                         "signals-icon-0": "/icons-mfd-png/control_clear.png",
                                         "signals-icon-size-0": "50",
                                         "signals-blink-0": false,
                                         "signals-horz-0": "-30",
                                         "signals-vert-0": "-30",
                                         "signals-hide-edit-0": false,
                                         "signals-cond-1": "==",
                                         "signals-val-1": "false",
                                         "signals-icon-1": "/icons-mfd-png/control_cancel.png",
                                         "signals-icon-size-1": "50",
                                         "signals-blink-1": true,
                                         "signals-horz-1": "-30",
                                         "signals-vert-1": "-30",
                                         "signals-hide-edit-1": false,
                                         "signals-cond-2": "==",
                                         "signals-val-2": true,
                                         "signals-icon-2": "/vis.0/VIS_v3/lowbattery.png",
                                         "signals-icon-size-2": 0,
                                         "signals-blink-2": false,
                                         "signals-horz-2": 0,
                                         "signals-vert-2": 0,
                                         "signals-hide-edit-2": false,
                                         "pushButton": false,
                                         "usejQueryStyle": false,
                                         "g_visibility": false,
                                         "styleActive": "hq-button-no-background",
                                         "name": "Infos_Skript-Status_Box",
                                         "infoLeftPaddingLeft": "15",
                                         "infoLeftPaddingRight": "50",
                                         "infoRightPaddingRight": "15",
                                         "gestures-swipeLeft-limit": "-1",
                                         "gestures-rotateLeft-limit": "2",
                                         "styleNormal": "hq-button-no-background",
                                         "testActive": false,
                                         "lc-type": "last-change",
                                         "lc-is-interval": true,
                                         "lc-is-moment": false,
                                         "lc-format": "",
                                         "lc-position-vert": "top",
                                         "lc-position-horz": "right",
                                         "lc-offset-vert": 0,
                                         "lc-offset-horz": 0,
                                         "lc-font-size": "12px",
                                         "lc-font-family": "",
                                         "lc-font-style": "",
                                         "lc-bkg-color": "",
                                         "lc-color": "",
                                         "lc-border-width": "0",
                                         "lc-border-style": "",
                                         "lc-border-color": "",
                                         "lc-border-radius": 10,
                                         "lc-zindex": 0,
                                         "descriptionLeft": "Side brush lifetime reset",
                                         "descriptionLeftDisabled": true,
                                         "visibility-cond": "==",
                                         "visibility-val": 1,
                                         "visibility-groups-action": "hide",
                                         "signals-oid-0": "javascript.0.scriptEnabled.java.abfragen.wireguard_clients",
                                         "signals-oid-1": "javascript.0.scriptEnabled.java.abfragen.wireguard_clients"
                                     },
                                     "style": {
                                         "left": "599px",
                                         "top": "750px",
                                         "width": "30px",
                                         "height": "30px",
                                         "border-width": "2px",
                                         "border-style": "hidden",
                                         "border-color": "{wert:javascript.0.scriptEnabled.java.abfragen.shelly_infos; wert==\"true\" ? \"#41f316\" : ",
                                         "border-radius": "10px",
                                         "z-index": "0",
                                         "text-align": "center",
                                         "font-size": "small",
                                         "box-shadow": "",
                                         "background": "#303030"
                                     },
                                     "widgetSet": "hqwidgets"
                                 },
                                 "e00003": {
                                     "tpl": "tplValueLastchange",
                                     "data": {
                                         "oid": "0_userdata.0.wireguard-devices.Letztes_Update",
                                         "g_fixed": true,
                                         "g_visibility": false,
                                         "g_css_font_text": true,
                                         "g_css_background": false,
                                         "g_css_shadow_padding": false,
                                         "g_css_border": false,
                                         "g_gestures": false,
                                         "g_signals": false,
                                         "g_last_change": false,
                                         "visibility-cond": "==",
                                         "visibility-val": 1,
                                         "visibility-groups-action": "hide",
                                         "signals-cond-0": "==",
                                         "signals-val-0": true,
                                         "signals-icon-0": "/vis/signals/lowbattery.png",
                                         "signals-icon-size-0": 0,
                                         "signals-blink-0": false,
                                         "signals-horz-0": 0,
                                         "signals-vert-0": 0,
                                         "signals-hide-edit-0": false,
                                         "signals-cond-1": "==",
                                         "signals-val-1": true,
                                         "signals-icon-1": "/vis/signals/lowbattery.png",
                                         "signals-icon-size-1": 0,
                                         "signals-blink-1": false,
                                         "signals-horz-1": 0,
                                         "signals-vert-1": 0,
                                         "signals-hide-edit-1": false,
                                         "signals-cond-2": "==",
                                         "signals-val-2": true,
                                         "signals-icon-2": "/vis/signals/lowbattery.png",
                                         "signals-icon-size-2": 0,
                                         "signals-blink-2": false,
                                         "signals-horz-2": 0,
                                         "signals-vert-2": 0,
                                         "signals-hide-edit-2": false,
                                         "lc-type": "last-change",
                                         "lc-is-interval": true,
                                         "lc-is-moment": false,
                                         "lc-format": "",
                                         "lc-position-vert": "top",
                                         "lc-position-horz": "right",
                                         "lc-offset-vert": 0,
                                         "lc-offset-horz": 0,
                                         "lc-font-size": "12px",
                                         "lc-font-family": "",
                                         "lc-font-style": "",
                                         "lc-bkg-color": "",
                                         "lc-color": "",
                                         "lc-border-width": "0",
                                         "lc-border-style": "",
                                         "lc-border-color": "",
                                         "lc-border-radius": 10,
                                         "lc-zindex": 0,
                                         "name": "Infos_Letzte_Aenderung",
                                         "format_date": "DD.MM.YYYY -  hh:mm:ss",
                                         "html_prepend": "Letzte Aktualisierung: ",
                                         "html_append": " Uhr"
                                     },
                                     "style": {
                                         "left": "10px",
                                         "top": "750px",
                                         "width": "410px",
                                         "height": "30px",
                                         "text-align": "left",
                                         "font-weight": "bolder",
                                         "font-size": "large",
                                         "line-height": "30px",
                                         "color": "white",
                                         "z-index": ""
                                     },
                                     "widgetSet": "basic"
                                 },
                                 "e00004": {
                                     "tpl": "tplHtml",
                                     "data": {
                                         "g_fixed": true,
                                         "g_visibility": false,
                                         "g_css_font_text": true,
                                         "g_css_background": true,
                                         "g_css_shadow_padding": false,
                                         "g_css_border": false,
                                         "g_gestures": false,
                                         "g_signals": false,
                                         "g_last_change": false,
                                         "visibility-cond": "==",
                                         "visibility-val": 1,
                                         "visibility-groups-action": "hide",
                                         "refreshInterval": "0",
                                         "signals-cond-0": "==",
                                         "signals-val-0": true,
                                         "signals-icon-0": "/vis/signals/lowbattery.png",
                                         "signals-icon-size-0": 0,
                                         "signals-blink-0": false,
                                         "signals-horz-0": 0,
                                         "signals-vert-0": 0,
                                         "signals-hide-edit-0": false,
                                         "signals-cond-1": "==",
                                         "signals-val-1": true,
                                         "signals-icon-1": "/vis/signals/lowbattery.png",
                                         "signals-icon-size-1": 0,
                                         "signals-blink-1": false,
                                         "signals-horz-1": 0,
                                         "signals-vert-1": 0,
                                         "signals-hide-edit-1": false,
                                         "signals-cond-2": "==",
                                         "signals-val-2": true,
                                         "signals-icon-2": "/vis/signals/lowbattery.png",
                                         "signals-icon-size-2": 0,
                                         "signals-blink-2": false,
                                         "signals-horz-2": 0,
                                         "signals-vert-2": 0,
                                         "signals-hide-edit-2": false,
                                         "lc-type": "last-change",
                                         "lc-is-interval": true,
                                         "lc-is-moment": false,
                                         "lc-format": "",
                                         "lc-position-vert": "top",
                                         "lc-position-horz": "right",
                                         "lc-offset-vert": 0,
                                         "lc-offset-horz": 0,
                                         "lc-font-size": "12px",
                                         "lc-font-family": "",
                                         "lc-font-style": "",
                                         "lc-bkg-color": "",
                                         "lc-color": "",
                                         "lc-border-width": "0",
                                         "lc-border-style": "",
                                         "lc-border-color": "",
                                         "lc-border-radius": 10,
                                         "lc-zindex": 0,
                                         "html": "Skript-Status",
                                         "name": "Infos_Skript-Status"
                                     },
                                     "style": {
                                         "left": "462px",
                                         "top": "750px",
                                         "height": "30px",
                                         "width": "130px",
                                         "z-index": "",
                                         "color": "white",
                                         "text-align": "center",
                                         "text-shadow": "",
                                         "font-family": "Arial, Helvetica, sans-serif",
                                         "font-style": "",
                                         "font-variant": "",
                                         "font-weight": "bolder",
                                         "font-size": "large",
                                         "line-height": "30px",
                                         "background": ""
                                     },
                                     "widgetSet": "basic"
                                 },
                                 "e00005": {
                                     "tpl": "tplVis-materialdesign-Table",
                                     "data": {
                                         "oid": "0_userdata.0.wireguard-clients.Wireguard-JSON-History",
                                         "g_fixed": true,
                                         "g_visibility": false,
                                         "g_css_font_text": false,
                                         "g_css_background": false,
                                         "g_css_shadow_padding": false,
                                         "g_css_border": false,
                                         "g_gestures": false,
                                         "g_signals": false,
                                         "g_last_change": false,
                                         "countCols": "7",
                                         "tableLayout": "standard",
                                         "showHeader": true,
                                         "headerTextSize": "20px",
                                         "showColumn0": "true",
                                         "colType0": "text",
                                         "textAlign0": "center",
                                         "showColumn1": "true",
                                         "colType1": "text",
                                         "textAlign1": "right",
                                         "signals-cond-0": "==",
                                         "signals-val-0": true,
                                         "signals-icon-0": "/vis.0/VIS_v3/lowbattery.png",
                                         "signals-icon-size-0": 0,
                                         "signals-blink-0": false,
                                         "signals-horz-0": 0,
                                         "signals-vert-0": 0,
                                         "signals-hide-edit-0": false,
                                         "signals-cond-1": "==",
                                         "signals-val-1": true,
                                         "signals-icon-1": "/vis.0/VIS_v3/lowbattery.png",
                                         "signals-icon-size-1": 0,
                                         "signals-blink-1": false,
                                         "signals-horz-1": 0,
                                         "signals-vert-1": 0,
                                         "signals-hide-edit-1": false,
                                         "signals-cond-2": "==",
                                         "signals-val-2": true,
                                         "signals-icon-2": "/vis.0/VIS_v3/lowbattery.png",
                                         "signals-icon-size-2": 0,
                                         "signals-blink-2": false,
                                         "signals-horz-2": 0,
                                         "signals-vert-2": 0,
                                         "signals-hide-edit-2": false,
                                         "lc-type": "last-change",
                                         "lc-is-interval": true,
                                         "lc-is-moment": false,
                                         "lc-format": "",
                                         "lc-position-vert": "top",
                                         "lc-position-horz": "right",
                                         "lc-offset-vert": 0,
                                         "lc-offset-horz": 0,
                                         "lc-font-size": "12px",
                                         "lc-font-family": "",
                                         "lc-font-style": "",
                                         "lc-bkg-color": "",
                                         "lc-color": "",
                                         "lc-border-width": "0",
                                         "lc-border-style": "",
                                         "lc-border-color": "",
                                         "lc-border-radius": 10,
                                         "lc-zindex": 0,
                                         "showColumn2": "true",
                                         "colType2": "text",
                                         "textAlign2": "center",
                                         "showColumn3": true,
                                         "colType3": "text",
                                         "textAlign3": "center",
                                         "label0": "Status",
                                         "label2": "Client",
                                         "label1": "Last Connection Change",
                                         "padding_left0": "10",
                                         "label3": "IP",
                                         "dataJson": "",
                                         "padding_left2": "",
                                         "class": "tableLog",
                                         "textSize3": "small",
                                         "textColor2": "#8f8f8f",
                                         "textSize2": "small",
                                         "padding_right3": "",
                                         "rowHeight": "25",
                                         "textSize0": "small",
                                         "textSize1": "small",
                                         "padding_left1": "",
                                         "textColor0": "#8f8f8f",
                                         "textColor1": "#8f8f8f",
                                         "textColor3": "#8f8f8f",
                                         "imageSize1": "",
                                         "prefix3": "<span style=\"word-wrap:break-all\">",
                                         "suffix3": "</span>",
                                         "colorHeaderRowText": "white",
                                         "colorHeaderRowBackground": "#212121",
                                         "colorRowBackground": "#303030",
                                         "colorRowText": "#fff",
                                         "dividers": "",
                                         "colorBackground": "transparent",
                                         "prefix2": "",
                                         "prefix1": "",
                                         "suffix2": "",
                                         "suffix1": "",
                                         "columnWidth0": "50",
                                         "columnWidth1": "130",
                                         "columnWidth3": "70",
                                         "columnWidth2": "70",
                                         "fontFamily1": "Arial, Helvetica, sans-serif",
                                         "fontFamily3": "Arial, Helvetica, sans-serif",
                                         "fontFamily2": "Arial, Helvetica, sans-serif",
                                         "fontFamily0": "Arial, Helvetica, sans-serif",
                                         "colTextSize2": "20px",
                                         "colTextSize3": "20px",
                                         "colTextSize1": "20px",
                                         "colTextSize0": "20px",
                                         "name": "History",
                                         "headerRowHeight": "30",
                                         "headerFontFamily": "Arial, Helvetica, sans-serif",
                                         "colNoWrap1": true,
                                         "colNoWrap0": true,
                                         "colTextColor0": "white",
                                         "colTextColor1": "",
                                         "colTextColor2": "lightblue",
                                         "colTextColor3": "white",
                                         "colNoWrap3": true,
                                         "colNoWrap2": true,
                                         "roundBorder": false,
                                         "colorRowBackgroundHover": "grey",
                                         "borderColor": "#mdwTheme:vis-materialdesign.0.colors.table.border",
                                         "visibility-cond": "==",
                                         "visibility-val": 1,
                                         "visibility-groups-action": "hide",
                                         "fixedHeader": false,
                                         "showColumn4": "true",
                                         "colType4": "text",
                                         "textAlign4": "center",
                                         "colTextSize4": "20px",
                                         "fontFamily4": "Arial, Helvetica, sans-serif",
                                         "showColumn5": "true",
                                         "colType5": "text",
                                         "textAlign5": "left",
                                         "colTextSize5": "20px",
                                         "fontFamily5": "Arial, Helvetica, sans-serif",
                                         "showColumn6": "true",
                                         "colType6": "text",
                                         "textAlign6": "center",
                                         "colTextSize6": "20px",
                                         "fontFamily6": "Arial, Helvetica, sans-serif",
                                         "showColumn7": true,
                                         "colType7": "text",
                                         "textAlign7": "center",
                                         "colTextSize7": "20px",
                                         "fontFamily7": "Arial, Helvetica, sans-serif",
                                         "showColumn8": true,
                                         "colType8": "text",
                                         "textAlign8": "center",
                                         "colTextSize8": "20px",
                                         "fontFamily8": "Arial, Helvetica, sans-serif",
                                         "columnWidth4": "60",
                                         "label4": "DL",
                                         "columnWidth5": "60",
                                         "colNoWrap5": true,
                                         "label5": "UL",
                                         "label6": "Land",
                                         "label7": "Origin",
                                         "label8": "Origin",
                                         "showColumn9": "true",
                                         "colType9": "text",
                                         "textAlign9": "center",
                                         "colTextSize9": "60px",
                                         "fontFamily9": "Arial, Helvetica, sans-serif",
                                         "showColumn10": "true",
                                         "colType10": "text",
                                         "textAlign10": "center",
                                         "colTextSize10": "#mdwTheme:vis-materialdesign.0.fontSizes.table.row",
                                         "fontFamily10": "#mdwTheme:vis-materialdesign.0.fonts.table.row",
                                         "label9": "Vers.",
                                         "label10": "Temp.",
                                         "columnWidth6": "50",
                                         "columnWidth7": "200",
                                         "columnWidth8": "140",
                                         "colNoWrap6": true,
                                         "padding_right6": "1",
                                         "colNoWrap7": false
                                     },
                                     "style": {
                                         "left": "5px",
                                         "top": "280px",
                                         "width": "1240px",
                                         "height": "460px",
                                         "z-index": "",
                                         "overflow-y": "auto"
                                     },
                                     "widgetSet": "materialdesign"
                                 }
                             },
                             "name": "2422_Netzwerk_Wireguard",
                             "filterList": []
                          }
                          

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          390
                          Online

                          31.8k
                          Users

                          80.0k
                          Topics

                          1.3m
                          Posts

                          3
                          22
                          761
                          Loading More Posts
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes
                          Reply
                          • Reply as topic
                          Log in to reply
                          Community
                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                          The ioBroker Community 2014-2023
                          logo