Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Unifi WLAN Script 2 mit Anwesenheitskontrolle

    NEWS

    • [erledigt] 15. 05. Wartungsarbeiten am ioBroker Forum

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Unifi WLAN Script 2 mit Anwesenheitskontrolle

    This topic has been deleted. Only users with topic management privileges can see it.
    • liv-in-sky
      liv-in-sky @Nashra last edited by

      @Nashra immer gut positives zu hören - schönen abend

      1 Reply Last reply Reply Quote 0
      • Nashra
        Nashra Most Active Forum Testing last edited by

        @liv-in-sky dito 👋

        1 Reply Last reply Reply Quote 0
        • coyote
          coyote Most Active last edited by

          @liv-in-sky hab eigentlich ja nicht viel gemacht, sind nur 2 Zeilen dazu gekommen:

          createState(dpPrefix + "WLANUnifi.Wifi_Info", { name: 'Info_HTML_Table_VIS',  role: 'string', read:  true,  write: true,});
          if (health) {createState(dpPrefix + "WLANUnifi.Health.WLAN.Status", { name: 'Health_Status', desc: 'Health_Status', type: 'string', unit: '',  role: '',read: true, write: true }); 
                       createState(dpPrefix + "WLANUnifi.Health.WLAN.Users", { name: 'Health_Users', desc: 'Health_Users', type: 'number', unit: '', min: '0', max: '1000', role: '',read: true, write: true }); 
                       createState(dpPrefix + "WLANUnifi.Health.WLAN.Guests", { name: 'Health_Guests', desc: 'Health_Guests', type: 'number', unit: '', min: '0', max: '100', role: '',read: true, write: true }); 
                       createState(dpPrefix + "WLANUnifi.Health.WLAN.TXBytes", { name: 'Health_TXBytes', desc: 'Health_TXBytes', type: 'number', unit: '', min: '0', max: '9999999', role: '',read: true, write: true });
                       createState(dpPrefix + "WLANUnifi.Health.WLAN.RXBytes", { name: 'Health_RXBytes', desc: 'Health_RXBytes', type: 'number', unit: '', min: '0', max: '9999999', role: '',read: true, write: true }); 
                       createState(dpPrefix + "WLANUnifi.Health.WLAN.Adopted", { name: 'Health_Adopted', desc: 'Health_Adopted', type: 'number', unit: '', min: '0', max: '100', role: '',read: true, write: true });
                       createState(dpPrefix + "WLANUnifi.Health.WLAN.Disabled", { name: 'Health_Disabled', desc: 'Health_Disabled', type: 'number', unit: '', min: '0', max: '100', role: '',read: true, write: true }); 
                       createState(dpPrefix + "WLANUnifi.Health.WLAN.Disconnected", { name: 'Health_Disconnected', desc: 'Health_Disconnected', type: 'number', unit: '', min: '0', max: '100', role: '',read: true, write: true });
                       createState(dpPrefix + "WLANUnifi.Health.WAN.WAN_IP", {name: 'WAN_Adresse', desc: 'WAN_IP', role: 'state',read: true,write: true,type: 'string' });   }
          

          und

              resph=resph.replace(/-r/g, "_r")
              resph = JSON.parse(resph);
              mylog(resph.data[0].rx_bytes_r);
              setState(dpPrefix + "WLANUnifi.Health.WLAN.Status",resph.data[0].status );
              setState(dpPrefix + "WLANUnifi.Health.WLAN.Users",resph.data[0].num_user);
              setState(dpPrefix + "WLANUnifi.Health.WLAN.Guests",resph.data[0].num_guest );
              setState(dpPrefix + "WLANUnifi.Health.WLAN.TXBytes",resph.data[0].tx_bytes_r );
              setState(dpPrefix + "WLANUnifi.Health.WLAN.RXBytes",resph.data[0].rx_bytes_r );
              setState(dpPrefix + "WLANUnifi.Health.WLAN.Adopted",resph.data[0].num_adopted );
              setState(dpPrefix + "WLANUnifi.Health.WLAN.Disabled",resph.data[0].num_disabled );
              setState(dpPrefix + "WLANUnifi.Health.WLAN.Disconnected",resph.data[0].num_disconnected );
              setState(dpPrefix + "WLANUnifi.Health.WAN.WAN_IP",resph.data[1].wan_ip );
          

          jeweils immer die letzte Zeile

          liv-in-sky 2 Replies Last reply Reply Quote 0
          • liv-in-sky
            liv-in-sky @coyote last edited by liv-in-sky

            @coyote danke dir - macht es einfacher für mich - ich habe die daten nicht, da ich keine hardware dazu habe - werde es mit einpflegen

            andere frage - nutzt du jetzt auch objects und files von redis - ist dass unser problem ?
            wenn das file noch im directory existiert und upgedated wird - hast du dann keine rechte darauf oder ist das file leer

            coyote 1 Reply Last reply Reply Quote 0
            • coyote
              coyote Most Active @liv-in-sky last edited by coyote

              @liv-in-sky ganz genau, habe umgestellt auf redis/redis
              Das file ist noch da und wird auch geändert (es sind auch Daten im File), aber ich habe dann wohl keinen Zugriff drauf über iqontrol. iqontrol sagt "File existiert nicht"
              Wenn ich Apollon richtig verstanden habe, gehört das File aber anscheinend nicht da hin.

              liv-in-sky 1 Reply Last reply Reply Quote 0
              • liv-in-sky
                liv-in-sky @coyote last edited by

                @coyote ja scheint so - leider hat er bis jetzt noch nichts zurückgeschrieben - wegren meiner kann ich auch ein anderes verzeichnis nehmen - ich müßte nur wissen welches - ich habe immer gedacht, der fixer gibt die rechte auf die iobroker verzeichnisse
                falls du lust hast - zeige mir doch mal ein bild vom verzeichnis mit dem befehl ls -la
                naja , vieleicht gibt es morgen was neues

                coyote 1 Reply Last reply Reply Quote 0
                • coyote
                  coyote Most Active @liv-in-sky last edited by

                  @liv-in-sky ja hab ich gesehen, dass noch niemand was dazu geschrieben hat.
                  Von welchem Verzeichnis genau meinst du?
                  Ich habe auch nicht verstanden, was genau jetzt anders ist bzw. sein muss/soll.

                  liv-in-sky 1 Reply Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @coyote last edited by

                    @coyote ich meinte das verzeichnis , indem die files vom script liegen
                    /opt/iobroker/iobroker-data/files/iqontrol

                    coyote 1 Reply Last reply Reply Quote 0
                    • coyote
                      coyote Most Active @liv-in-sky last edited by coyote

                      @liv-in-sky achso, sieht aus wie vorher denk ich.
                      Hier:

                      root@debian:/opt/iobroker/iobroker-data/files/iqontrol# ls -la
                      insgesamt 1020
                      drwxrwxrwx+  6 iobroker iobroker   4096 Okt  5 12:55 .
                      drwxrwxrwx+ 87 iobroker iobroker   4096 Sep 30 10:28 ..
                      -rwxrwxrwx+  1 iobroker iobroker   1044 Okt  3 14:31 cache.manifest
                      -rwxrwxrwx+  1 iobroker iobroker  49103 Okt  3 14:31 conn.js
                      -rwxrwxrwx+  1 iobroker iobroker 125162 Okt  3 14:31 _data.json
                      -rwxrwxrwx+  1 iobroker iobroker  28640 Okt  3 14:31 favicon_big.pn
                      g
                      -rwxrwxrwx+  1 iobroker iobroker  32038 Okt  3 14:31 favicon.ico
                      -rwxrwxrwx+  1 iobroker iobroker  12582 Okt  3 14:31 favicon.png
                      -rw-rw-rw-+  1 iobroker iobroker    173 Okt  5 20:29 htmlalarm.html
                      -rw-rwxrw-+  1 iobroker iobroker   6514 Okt  5 20:29 htmlclients.ht
                      ml
                      -rw-rwxrw-+  1 iobroker iobroker   2453 Okt  5 20:29 htmlinfo.html
                      -rw-rwxrw-+  1 iobroker iobroker     88 Okt  5 13:31 htmlvoucher.ht
                      ml
                      drwxrwxrwx+ 12 iobroker iobroker   4096 Mai  3 12:12 i18n
                      drwxrwxrwx+  4 iobroker iobroker   4096 Sep  8 13:35 images
                      -rwxrwxrwx+  1 iobroker iobroker  17538 Okt  3 14:31 index.css
                      -rwxrwxrwx+  1 iobroker iobroker   5687 Okt  3 14:31 index.html
                      -rwxrwxrwx+  1 iobroker iobroker 330878 Okt  3 14:31 index.js
                      drwxrwxrwx+  4 iobroker iobroker   4096 Mai  3 12:12 jquery
                      -rw-rwxrw-+  1 iobroker iobroker   3262 Okt  3 14:29 offline.html
                      -rwxrwxrwx+  1 iobroker iobroker   1867 Mai  4 13:16 test.html
                      drwxrwxrwx+  4 iobroker iobroker   4096 Jul 31 12:06 userimages
                      -rwxrwxrwx+  1 iobroker iobroker 371855 Okt  3 14:29 words.js
                      

                      Ach jetzt weiß ich was du willst, du willst schätze ich nach dem Rechten schauen oder?

                      liv-in-sky 3 Replies Last reply Reply Quote 0
                      • liv-in-sky
                        liv-in-sky @coyote last edited by

                        @coyote genau und die sind da - wie schaut den der inhalt des iqontrol popups aus ?

                        1 Reply Last reply Reply Quote 0
                        • liv-in-sky
                          liv-in-sky @coyote last edited by

                          @coyote ich meine das setting der kachel

                          1 Reply Last reply Reply Quote 0
                          • liv-in-sky
                            liv-in-sky @coyote last edited by

                            @coyote welchen browser nutzt du ? ich habe bemerkt, dass firefox bei mir nicht funktioniert

                            coyote 1 Reply Last reply Reply Quote 0
                            • coyote
                              coyote Most Active @liv-in-sky last edited by

                              @liv-in-sky

                              Chrome

                              Hier die Kachel:
                              iqontrol_kachel.JPG

                              Hier Setting:

                              iqontrol_set.JPG

                              liv-in-sky 1 Reply Last reply Reply Quote 0
                              • liv-in-sky
                                liv-in-sky @coyote last edited by

                                @coyote wird wohl tatsächlich am controller liegen - leider weiß ich nicht, wie das mit redis funktioniert - wird da ein pfad hineingeschrieben oder das ganze file in redis abgelegt ??? warten wir mal auf morgen

                                coyote 1 Reply Last reply Reply Quote 0
                                • coyote
                                  coyote Most Active @liv-in-sky last edited by coyote

                                  @liv-in-sky da fragst du mich was..
                                  Apollon hat geantwortet in deinem anderen Thread.
                                  Die Files sollen wohl nach iqontrol.meta

                                  liv-in-sky 1 Reply Last reply Reply Quote 0
                                  • liv-in-sky
                                    liv-in-sky @coyote last edited by

                                    @coyote hab es gesehen - weiß nicht, ob ich das verstehe - teste morgen - bin heute nicht mehr am hauptrechner

                                    coyote 1 Reply Last reply Reply Quote 0
                                    • coyote
                                      coyote Most Active @liv-in-sky last edited by coyote

                                      @liv-in-sky ich schaue morgen auch mal weiter. Die iqontrol User Files funktionieren ja auch nach der redis Umstellung. Die ganzen Icons sind noch da.
                                      Ich schaue morgen mal ob die unter iqontrol.meta liegen, dann müssten deine Files vielleicht auch einfach nur dort hin🤷‍♂️

                                      EDIT: Also, da liegen auch die Usericons drin, heißt es reicht vllt aus wenn du die Files einfach dahin schreibst, kann ich aber morgen oder später noch, ausprobieren.

                                      1 Reply Last reply Reply Quote 0
                                      • Chaot
                                        Chaot @liv-in-sky last edited by

                                        @liv-in-sky DeineView gefällt mir wirklich gut.
                                        Kannst du eventuell die zugehörigen Bilder auch mit exportieren? Das wäre das i-Tüpfelchen.

                                        Übrigens funktioniert das Script bei mir bisher absolut Problemlos. Gerade mit den selbst erstellten Vouchers kommt das richtig gut an.

                                        liv-in-sky 1 Reply Last reply Reply Quote 0
                                        • Nashra
                                          Nashra Most Active Forum Testing last edited by

                                          Moin Moin,
                                          im Log im Minutentakt diese Meldung

                                          javascript.0	2019-10-06 09:02:11.915	warn	at Timer.processTimers (timers.js:223:10)
                                          javascript.0	2019-10-06 09:02:11.915	warn	at listOnTimeout (timers.js:263:5)
                                          javascript.0	2019-10-06 09:02:11.915	warn	at tryOnTimeout (timers.js:300:5)
                                          javascript.0	2019-10-06 09:02:11.914	warn	at ontimeout (timers.js:438:13)
                                          javascript.0	2019-10-06 09:02:11.914	warn	at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1332:29)
                                          javascript.0	2019-10-06 09:02:11.914	warn	at Object.setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1276:20)
                                          javascript.0	2019-10-06 09:02:11.914	warn	You are assigning a string to the state "javascript.0.WLANUnifi.WSS_nomap" which expects a boolean. Please fix your code to use a boolean or change the state type to string. This warning might become 
                                          
                                          liv-in-sky 1 Reply Last reply Reply Quote 0
                                          • liv-in-sky
                                            liv-in-sky @Nashra last edited by

                                            @Nashra auch moin

                                            die meldung macht bei mir keinen sinn, da die zeilen um 1276 um voucher löschung geht

                                            der datenpunkt ...WLANUnifi.WSS_nomap scheint aber ein WLAN name zu sein - kannst du bitte mal ein bild des scripts um diese zeilen posten (mit sichtbaren zeilennummern)

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            788
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript monitoring
                                            46
                                            1358
                                            346142
                                            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