Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Wie nutze ich eine custom class / npm Modul?

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Wie nutze ich eine custom class / npm Modul?

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

      @disaster123
      Das hört sich spannend an. Ich warte schon lange auf eine WIZ Lösung für unseren ioBroker. Wie kann ich das ausprobieren? Bei mir liefert npm install iobroker.wizconnect leider eine Fehlermeldung. Kannst Du mir als Newbie ein wenig auf die Sprünge helfen? Vielen Dank

      Thomas Braun 1 Reply Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @Kentrath last edited by

        @kentrath sagte in Wie nutze ich eine custom class / npm Modul?:

        leider eine Fehlermeldung

        Welche?
        Gitub-Installationen am besten über die 'Octocat' machen und nicht per npm direkt.

        K 1 Reply Last reply Reply Quote 0
        • K
          Kentrath @Thomas Braun last edited by

          @thomas-braun
          root@IoBroker:/opt/iobroker# npm install iobroker.wizconnect
          npm ERR! code E404
          npm ERR! 404 Not Found - GET https://registry.npmjs.org/iobroker.wizconnect - Not found
          npm ERR! 404
          npm ERR! 404 'iobroker.wizconnect@*' is not in this registry.
          npm ERR! 404
          npm ERR! 404 Note that you can also install from a
          npm ERR! 404 tarball, folder, http url, or git url.

          Thomas Braun 1 Reply Last reply Reply Quote 0
          • Thomas Braun
            Thomas Braun Most Active @Kentrath last edited by

            @kentrath

            NICHT als root herumhampeln.

            Das Modul ist offenbar nicht in der npm-Registry eingetragen.
            Mach es am besten 'über die Katze' und da die URL entsprechend reinkopieren.

            K 1 Reply Last reply Reply Quote 0
            • K
              Kentrath @Thomas Braun last edited by

              @thomas-braun

              "Über die Katze" hat es geklappt 🙂
              Das Thema root steht auf meiner Agenda. Dein Artikel zu Node hatte mir auch schon sehr weiter geholfen. Hast Du vielleicht auch einen guten Guide für das richtige Anwenden von Nutzern. Bisher habe ich mich da nich ran getraut, weil es halt mit root alles funktioniert. Optimal ist das natürlich nicht 😕

              Thomas Braun 1 Reply Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @Kentrath last edited by

                @kentrath sagte in Wie nutze ich eine custom class / npm Modul?:

                weil es halt mit root alles funktioniert.

                Damit funktioniert es besonders gut sein System zu verfummeln, stimmt.
                Was haste denn da genau am Start?
                Anlegen von usern ist so ein grundlegender Task, das findet sich in jeder Anleitung zu deinem Betriebssystem.

                K 1 Reply Last reply Reply Quote 0
                • K
                  Kentrath last edited by

                  @disaster123
                  Im System konnte ich eine Instanz anlegen, bekomme sie aber nicht "grün".
                  Was muss ich denn in den einzelnen Feldern der Haupteinstellungen einstellen? Bind IP? udp target? Haken bei register devices?
                  Vielen Dank

                  D 1 Reply Last reply Reply Quote 0
                  • K
                    Kentrath @Thomas Braun last edited by

                    @thomas-braun
                    Eine Debian VM in einem Proxmox

                    Thomas Braun 1 Reply Last reply Reply Quote 0
                    • Thomas Braun
                      Thomas Braun Most Active @Kentrath last edited by Thomas Braun

                      @kentrath

                      Beim Debian-Installer wird das direkt schon richtig gemacht, wenn man bei der Anlage KEIN Passwort für den root vergibt.

                      Nachträglich einen user mit passenden Rechten anlegen:

                      https://phoenixnap.com/kb/create-a-sudo-user-on-debian

                      Künftig nicht mehr als root einloggen sondern mit dem neuen user herumhüpfen.

                      1 Reply Last reply Reply Quote 1
                      • D
                        disaster123 @Kentrath last edited by

                        @kentrath sagte in Wie nutze ich eine custom class / npm Modul?:

                        @disaster123
                        Im System konnte ich eine Instanz anlegen, bekomme sie aber nicht "grün".
                        Was muss ich denn in den einzelnen Feldern der Haupteinstellungen einstellen? Bind IP? udp target? Haken bei register devices?
                        Vielen Dank

                        Bind IP: die IP an die er sich zum Empfangen der Pakete binden soll - meistens kann man hier einfach 0.0.0.0 nutzen

                        Bei Docker zum Beispiel braucht man die die UDP Pakete andere target IPs und Macs als iobroker eigentlich hat. Dafür sind die Felder:

                        • udp target ip for auto update
                        • udp mac adress for auto update

                        Wenn man kein Docker nutzt, kommen da einfach die IP und MAC der iobroker Instanz rein.

                        Bzgl. nicht grün müsstest du mal dein Log posten.

                        D 1 Reply Last reply Reply Quote 1
                        • D
                          disaster123 @disaster123 last edited by

                          @disaster123 sagte in Wie nutze ich eine custom class / npm Modul?:

                          @kentrath sagte in Wie nutze ich eine custom class / npm Modul?:

                          @disaster123
                          Im System konnte ich eine Instanz anlegen, bekomme sie aber nicht "grün".
                          Was muss ich denn in den einzelnen Feldern der Haupteinstellungen einstellen? Bind IP? udp target? Haken bei register devices?
                          Vielen Dank

                          Bind IP: die IP an die er sich zum Empfangen der Pakete binden soll - meistens kann man hier einfach 0.0.0.0 nutzen

                          Bei Docker zum Beispiel braucht man die die UDP Pakete andere target IPs und Macs als iobroker eigentlich hat. Dafür sind die Felder:

                          • udp target ip for auto update
                          • udp mac adress for auto update

                          Wenn man kein Docker nutzt, kommen da einfach die IP und MAC der iobroker Instanz rein.

                          Genau.

                          Bzgl. nicht grün müsstest du mal dein Log posten.

                          Log hängt bisher nicht an.

                          1 Reply Last reply Reply Quote 0
                          • K
                            Kentrath last edited by

                            @disaster123

                            TypeError: Cannot read properties of undefined (reading '0') at new Wizconnect (/opt/iobroker/node_modules/iobroker.wizconnect/main.js:44:44) at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.wizconnect/main.js:666:2) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47
                            
                            1 Reply Last reply Reply Quote 0
                            • D
                              disaster123 last edited by

                              @kentrath sagte in Wie nutze ich eine custom class / npm Modul?:

                              @disaster123

                              TypeError: Cannot read properties of undefined (reading '0') at new Wizconnect (/opt/iobroker/node_modules/iobroker.wizconnect/main.js:44:44) at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.wizconnect/main.js:666:2) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47
                              

                              Ich habe das Modul leider recht Buggy im Netz gefunden und habe es nur angepasst. Das ursprüngliche Modul erwartet eine Netzwerkkarte unter Linux mit dem Namen eth0.

                              Ich habe das mal ausgebaut. Bitte neu via github / katze installieren.

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

                                @disaster123
                                Du bist ja Mega 😀
                                Die einzelnen Leuchten müssen dann händisch hinzugefügt werden oder? Ich habe mal eine eingesetzt und die lässt sich wunderbar steuern. Da warte ich jetzt über ein Jahr drauf. Die Zwischenlösung über Home Assistant war so naja...

                                Jetzt kommt noch eine kleine Warnmeldung:

                                State "wizconnect.0.192_168_178_123.led.sceneId" has no existing object, this might lead to an error in future versions
                                
                                D 1 Reply Last reply Reply Quote 0
                                • D
                                  disaster123 @Kentrath last edited by

                                  @kentrath sagte in Wie nutze ich eine custom class / npm Modul?:

                                  @disaster123
                                  Du bist ja Mega 😀
                                  Die einzelnen Leuchten müssen dann händisch hinzugefügt werden oder? Ich habe mal eine eingesetzt und die lässt sich wunderbar steuern. Da warte ich jetzt über ein Jahr drauf. Die Zwischenlösung über Home Assistant war so naja...

                                  Jetzt kommt noch eine kleine Warnmeldung:

                                  State "wizconnect.0.192_168_178_123.led.sceneId" has no existing object, this might lead to an error in future versions
                                  

                                  Danke. Die Meldung geht nach einem erneuten Neustart des Adapters weg. Ich habe keine Ahnung wieso. Dazu müsste ich wissen, das die Meldung von iobroker genau bedeutet... und das habe ich bis jetzt nicht herausgefunden.

                                  K 2 Replies Last reply Reply Quote 0
                                  • K
                                    Kentrath @disaster123 last edited by Kentrath

                                    @disaster123

                                    Teilweise fehlt die Auswahl von Brightness und Color. Bei den Lampen kommt die Fehlermeldung:

                                    TypeError: AllDeviceAttributes.ESP21_SHTW_01 is not a function
                                    
                                    D 1 Reply Last reply Reply Quote 0
                                    • D
                                      disaster123 @Kentrath last edited by

                                      @kentrath sagte in Wie nutze ich eine custom class / npm Modul?:

                                      @disaster123

                                      Teilweise fehlt die Auswahl von Brightness und Color. Bei den Lampen kommt die Fehlermeldung:

                                      TypeError: AllDeviceAttributes.ESP21_SHTW_01 is not a function
                                      

                                      Device ESP21_SHTW_01 war bisher nicht implementiert - bitte einmal Modul updaten. Lampe löschen und speichern. Object im Tree löschen. Lampe wieder hinzufügen.

                                      K 1 Reply Last reply Reply Quote 1
                                      • K
                                        Kentrath @disaster123 last edited by

                                        @disaster123

                                        Hat geklappt 😀

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

                                          @disaster123
                                          Leider kommen die Meldungen

                                          State "wizconnect.0.192_168_178_121.led.sceneId" has no existing object, this might lead to an error in future versions
                                          

                                          auch nach mehreren Neustarts noch und "spammen" mein Protokoll voll. Hast Du eine Idee, wie wir das abstellen könnten? Vielen Dank

                                          D 1 Reply Last reply Reply Quote 0
                                          • D
                                            disaster123 @Kentrath last edited by

                                            @kentrath am 17.01. hieß es noch - hat geklappt. Jetzt bin ich irritiert. Welche Version nutzt du vom Adapter? Kannst du ein debug log Posten?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            940
                                            Online

                                            31.7k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            7
                                            65
                                            3573
                                            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