Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Praktische Anwendungen (Showcase)
    4. Material Design Widgets: UniFi Netzwerk Status

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Material Design Widgets: UniFi Netzwerk Status

    This topic has been deleted. Only users with topic management privileges can see it.
    • cdellasanta
      cdellasanta Developer @Nashra last edited by

      @Nashra said in Material Design Widgets: UniFi Netzwerk Status:

      Nachtrag: das Bild wird nicht angezeigt weil der Zugriff verweigert wird.
      Nachtrag2: eingeloggt im Controller und Anzeige der VIS im selber Browser, dann werden die Bilder angezeigt

      Ist vermutlich wegen den self-signiertes Zertifikat des UniFi controller (ich müsste es auch bei mir es erstmal akzeptieren).

      Als alternative, jetzt dass du die Bilder siehst, kannst du die einzeln herunterladen und bei deine Lokale vis Bilder als device-model.png pflegen, und dann im Skript die Konfigurationvariabel unifiImagesUrlPrefix zu false ändern. Somit können die Bilder nicht wegen Zertifikatprobleme gestoppt werden. Nachteil ist dass für jede neue UniFi device model, muss man den Bild selber pflegen.

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

        @cdellasanta sagte in Material Design Widgets: UniFi Netzwerk Status:

        @Nashra said in Material Design Widgets: UniFi Netzwerk Status:

        Nachtrag: das Bild wird nicht angezeigt weil der Zugriff verweigert wird.
        Nachtrag2: eingeloggt im Controller und Anzeige der VIS im selber Browser, dann werden die Bilder angezeigt

        Ist vermutlich wegen den self-signiertes Zertifikat des UniFi controller (ich müsste es auch bei mir es erstmal akzeptieren).

        Als alternative, jetzt dass du die Bilder siehst, kannst du die einzeln herunterladen und bei deine Lokale vis Bilder als device-model.png pflegen, und dann im Skript die Konfigurationvariabel unifiImagesUrlPrefix zu false ändern. Somit
        können die Bilder nicht wegen Zertifikatprobleme gestoppt werden. Nachteil ist dass für jede neue UniFi device model, muss man den Bild selber pflegen.

        Erstmal ein frohes und gesundes neues Jahr @cdellasanta
        Skript habe ich geändert und die Bilder liegen jetzt im angegebenen Pfad und werden angezeigt 🙂
        Wegen dem Nachteil die jetzt manuell einzupflegen sehe ich kein Problem, ist in 5 Minuten erledigt.
        Vielen Dank nochmal für die Hilfen und das tolle Skript 👍

        1 Reply Last reply Reply Quote 0
        • tobasium
          tobasium @cdellasanta last edited by

          @cdellasanta ich bekomme leider einen Fehler wen ich dein script nutze:

          javascript.0	2021-01-01 19:00:30.452	error	(1936) at processTicksAndRejections (internal/process/task_queues.js:97:5)
          javascript.0	2021-01-01 19:00:30.452	error	(1936) at runMicrotasks (<anonymous>)
          javascript.0	2021-01-01 19:00:30.452	error	(1936) at /opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49
          javascript.0	2021-01-01 19:00:30.451	error	(1936) at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23)
          javascript.0	2021-01-01 19:00:30.450	error	(1936) at /opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInRedis.js:608:33
          javascript.0	2021-01-01 19:00:30.450	error	(1936) at /opt/iobroker/node_modules/iobroker.javascript/main.js:1219:17
          javascript.0	2021-01-01 19:00:30.449	error	(1936) at /opt/iobroker/node_modules/iobroker.javascript/main.js:1681:17
          javascript.0	2021-01-01 19:00:30.449	error	(1936) at prepareScript (/opt/iobroker/node_modules/iobroker.javascript/main.js:1587:37)
          javascript.0	2021-01-01 19:00:30.448	error	(1936) at createVM (/opt/iobroker/node_modules/iobroker.javascript/main.js:1364:28)
          javascript.0	2021-01-01 19:00:30.447	error	(1936) at Object.createScript (vm.js:261:10)
          javascript.0	2021-01-01 19:00:30.446	error	(1936) at new Script (vm.js:88:7)
          javascript.0	2021-01-01 19:00:30.444	error	(1936) SyntaxError: Unexpected token ':'
          javascript.0	2021-01-01 19:00:30.444	error	(1936) ^
          javascript.0	2021-01-01 19:00:30.443	error	(1936) function setup(): void {
          javascript.0	2021-01-01 19:00:30.442	error	at script.js.Smarthome_Tobi.System.Unifi-Status:119
          javascript.0	2021-01-01 19:00:30.442	error	(1936) script.js.Smarthome_Tobi.System.Unifi-Status compile failed:
          

          Siehst du woran es liegt? Vielen Dank Vorab.

          cdellasanta 1 Reply Last reply Reply Quote 0
          • cdellasanta
            cdellasanta Developer @tobasium last edited by

            @Nashra said in Material Design Widgets: UniFi Netzwerk Status:

            Erstmal ein frohes und gesundes neues Jahr @cdellasanta

            Danke gleichfalls 😉

            @tobasium said in Material Design Widgets: UniFi Netzwerk Status:

            Siehst du woran es liegt? Vielen Dank Vorab.

            Ich glaube ich sehe wo den Problem ist: script.js

            .. du musst es als TypeScript (neu)erstellen:
            9e3a945c-3734-4a4b-aaa8-7a5452284812-image.png

            tobasium 1 Reply Last reply Reply Quote 0
            • tobasium
              tobasium @cdellasanta last edited by

              @cdellasanta Danke schonmal leider immer noch errors im log:

              javascript.0	2021-01-01 23:09:15.310	error	(1936) at Script.runInContext (vm.js:130:18)
              javascript.0	2021-01-01 23:09:15.310	error	(1936) at script.js.Smarthome_Tobi.System.Unifi-Netzwerk:107:1
              javascript.0	2021-01-01 23:09:15.310	error	(1936) at initializeState (script.js.Smarthome_Tobi.System.Unifi-Netzwerk:549:9)
              javascript.0	2021-01-01 23:09:15.309	error	(1936) at registerListener (script.js.Smarthome_Tobi.System.Unifi-Netzwerk:516:13)
              javascript.0	2021-01-01 23:09:15.309	error	(1936) at runAfterInitialization (script.js.Smarthome_Tobi.System.Unifi-Netzwerk:510:10)
              javascript.0	2021-01-01 23:09:15.308	error	(1936) TypeError: Cannot read property 'setTimeout' of undefined
              javascript.0	2021-01-01 23:09:15.308	error	(1936) ^
              javascript.0	2021-01-01 23:09:15.307	error	(1936) this.setTimeout(function () { return runAfterInitialization(callback); }, 100);
              javascript.0	2021-01-01 23:09:15.307	error	(1936) script.js.Smarthome_Tobi.System.Unifi-Netzwerk: script.js.Smarthome_Tobi.System.Unifi-Netzwerk:510
              
              cdellasanta 1 Reply Last reply Reply Quote 0
              • cdellasanta
                cdellasanta Developer @tobasium last edited by cdellasanta

                @tobasium said in Material Design Widgets: UniFi Netzwerk Status:

                this.setTimeout(function ....

                Hmmm .. ändere alle this.setTimeout(..) einfach zu setTimeout(...) ...

                Ich habe den this prefixed (und es funktioniert bei mir) weil beim lesen der Beschreibung der Befehl fand ich es besser, und es gab damit keinen "Inspection Fehler" ..

                Edit: .. ich sehe jetzt dass es auch ohne this kein "Code Fehler" mehr gezeigt wird .. ich ändere den Code im oberen Abschnitt (und im PR).

                tobasium 1 Reply Last reply Reply Quote 0
                • tobasium
                  tobasium @cdellasanta last edited by

                  @cdellasanta

                  Also das sieht schon deutlich besser aus. Danke.

                  Nächste Fehler tauchen jetzt auf sobald ich Sortierung ändere:

                  javascript.0	2021-01-02 15:59:30.915	error	(1936) at processImmediate (internal/timers.js:461:21)
                  javascript.0	2021-01-02 15:59:30.915	error	(1936) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5384:37)
                  javascript.0	2021-01-02 15:59:30.914	error	(1936) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:472:25)
                  javascript.0	2021-01-02 15:59:30.914	error	(1936) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1070:38)
                  javascript.0	2021-01-02 15:59:30.914	error	(1936) at Object.<anonymous> (script.js.Smarthome_Tobi.System.Unifi-Netzwerk:107:163)
                  javascript.0	2021-01-02 15:59:30.913	error	(1936) at resetSortTimer (script.js.Smarthome_Tobi.System.Unifi-Netzwerk:313:14)
                  javascript.0	2021-01-02 15:59:30.912	error	(1936) Error in callback: TypeError: Cannot read property 'clearTimeout' of undefined
                  

                  Aber zumindestens läuft es jetzt schonmal.

                  Danke für deine ganze Arbeit.

                  cdellasanta 1 Reply Last reply Reply Quote 0
                  • cdellasanta
                    cdellasanta Developer @tobasium last edited by

                    @tobasium said in Material Design Widgets: UniFi Netzwerk Status:

                    clearTimeout

                    😧 hätte ich sehen müssen ... ändere zusätzlich alle this.clearTimeout(...) zu clearTimeout(...) ...

                    tobasium 1 Reply Last reply Reply Quote 1
                    • tobasium
                      tobasium @cdellasanta last edited by tobasium

                      @cdellasanta said in Material Design Widgets: UniFi Netzwerk Status:

                      clearTimeout(...)

                      Perfekt. jetzt läuft es ohne error.

                      Was mich nur wundert warum gibt es die Fehler bei mir und bei dir gab es die nicht?

                      Danke

                      cdellasanta 1 Reply Last reply Reply Quote 0
                      • cdellasanta
                        cdellasanta Developer @tobasium last edited by

                        @tobasium said in Material Design Widgets: UniFi Netzwerk Status:

                        Was mich nur wundert warum gibt es die Fehler bei mir und bei dir gab es die nicht?

                        Es hat sicher zu tun mit unterschiedliche Versionen, ich habe bei mir aktuell:

                        • Admin-controller: 4.1.12
                        • JS-Controller version: 4.10.8
                        • Node version: v12.18.4
                        • Operating system: linux (Raspbian)

                        Du hast vermutlich andere Versionen, ich vermute die Node Version ist da verantwortlich .. aber eben .. ist jetzt kein Problem mehr 😉

                        tobasium 1 Reply Last reply Reply Quote 0
                        • tobasium
                          tobasium @cdellasanta last edited by

                          @cdellasanta

                          Hier mal meine Infos:

                          Node.js: v12.20.0
                          NPM: 6.14.8
                          JS-Controller version: 4.10.8
                          Operating system: buanet docker image synology

                          lobomau 1 Reply Last reply Reply Quote 0
                          • lobomau
                            lobomau @tobasium last edited by

                            @tobasium @cdellasanta ihr redet wahrscheinlich von der Admin Version und nicht js-controller,oder?
                            Ich habe js-controller 3.1.6 und bin da eigentlich aktuell,dachte ich.

                            tobasium 1 Reply Last reply Reply Quote 0
                            • tobasium
                              tobasium @lobomau last edited by tobasium

                              @lobomau Wir reden schon vom Script Engine -> https://github.com/iobroker/ioBroker.javascript/blob/master/README.md

                              lobomau 1 Reply Last reply Reply Quote 0
                              • lobomau
                                lobomau @tobasium last edited by

                                @tobasium ihr redet vom Javascript Adapter und nicht vom js-controller.
                                Der Vergleich des js-controller ist auch ganz hilfreich, findet man unter Hosts:
                                Screenshot_20210103-230654.png

                                tobasium 1 Reply Last reply Reply Quote 0
                                • tobasium
                                  tobasium @lobomau last edited by

                                  @lobomau oh ok 3.1.6 also ebenfalls aktuell unterwegs

                                  lobomau 1 Reply Last reply Reply Quote 0
                                  • lobomau
                                    lobomau @tobasium last edited by

                                    @tobasium und ihr habt mit dem Javascript Adapter 4.10.x eine Beta Version. Das kann zu Problemen führen.
                                    Bei mir läuft 4.8.x stable Version.

                                    1 Reply Last reply Reply Quote 0
                                    • efxz
                                      efxz @Nashra last edited by

                                      @Nashra
                                      Ich versuche schon den ganzen Tag meinen Geräten Bilder zuzuordnen, leider erfolglos. Wie und wo im script kommen die Zuweisungen "image":"bildname.png", link"ip?" hin?

                                      tobasium Nashra 2 Replies Last reply Reply Quote 0
                                      • tobasium
                                        tobasium @efxz last edited by

                                        @efxz das musst du im unifi controller eintragen:

                                        1.Du logst dich im unfi controler ein.
                                        2. Klickst auf Endgeräte.
                                        3. Wählst hier das Gerät für welches du ein Bild im IoBroker hinterlegt hast.
                                        4. Nach dem öffnen des Ger#tes hier auf das Zahnrad (Konfiguration.
                                        5. Unter Anmerkung die Info hinterlge:

                                        f5c2106a-5729-4def-8917-b41c6cb99012-image.png
                                        Format wie folgt:

                                        {
                                            "image": "CCU2",
                                            "icon": "",   
                                            "link": "http"
                                        }
                                        
                                        efxz 1 Reply Last reply Reply Quote 0
                                        • Nashra
                                          Nashra Most Active Forum Testing @efxz last edited by Nashra

                                          @efxz sagte in Material Design Widgets: UniFi Netzwerk Status:

                                          @Nashra
                                          Ich versuche schon den ganzen Tag meinen Geräten Bilder zuzuordnen, leider erfolglos. Wie und wo im script kommen die Zuweisungen "image":"bildname.png", link"ip?" hin?

                                          Hey, @tobasium hat es ja oben schon beschrieben. Wenn Du alles so machst werden die einzelnen Bilder angezeigt.

                                          1 Reply Last reply Reply Quote 0
                                          • efxz
                                            efxz @tobasium last edited by

                                            @tobasium
                                            Vielen Dank

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            876
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            iconlist material design widgets statusanzeige unifi vis
                                            31
                                            109
                                            14638
                                            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