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

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Wie nutze ich eine custom class / npm Modul?

    This topic has been deleted. Only users with topic management privileges can see it.
    • 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
                          • K
                            Kentrath @disaster123 last edited by

                            @disaster123
                            Der Adapter funktioniert auch mit der Variante ESP21_SHTW_01, das meinte ich mit hat geklappt. Die Fehlermeldungen sind ja eher kosmetik als ein wirkliches Problem. Wäre trotzdem schön, die weg zu bekommen.
                            Die Version, die ich benutze, ist die vom 17.01.

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

                              @kentrath ah alles klar. Bitte mal updaten auf die aktuelle 0.0.5 von gestern und dann ggf. mal das Debug Log posten.

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

                                @disaster123
                                Hat leider noch nicht geholfen. Ich habe auch die gesamte Instanz gelöscht und neu gemacht. Die Fehlermeldung kommt nach wie vor (siehe Zeile 2).
                                Wenn ich den Datenpunkt sceneId händisch anlege, dann wird die Meldung ausgegeben, dass string erwartet wird, aber number übermittelt wird. Der Datenpunkt steht aber auf string (siehe Zeile 1).

                                wizconnect.0 2023-01-25 23:09:30.013	info	State value to set for "wizconnect.0.192_168_178_125.led.sceneId" has to be type "string" but received type "number"
                                wizconnect.0 2023-01-25 23:09:05.030	warn	State "wizconnect.0.192_168_178_125.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 wie gesagt ich brauche ein kompletten log mit dem Adapter auf Einstellung debug.

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

                                    @disaster123
                                    Da passiert leider so gut wie nichts im log trotz Stufe debug:

                                    wizconnect.0
                                    2023-01-27 08:41:08.498	info	State value to set for "wizconnect.0.192_168_178_125.led.sceneId" has to be type "string" but received type "number"
                                    wizconnect.0
                                    2023-01-27 08:41:08.301	info	config udpip: 192.168.178.5
                                    wizconnect.0
                                    2023-01-27 08:41:08.300	info	config udpmac: 26:8c:05:f2:0c:a9
                                    wizconnect.0
                                    2023-01-27 08:41:08.300	info	config bind_ip: 0.0.0.0
                                    wizconnect.0
                                    2023-01-27 08:41:08.289	info	starting. Version 0.0.5 (non-npm: disaster123/ioBroker.wizconnect#ad84f06e2e5e73de575ad53b91c9d7a24d8b9384) in /opt/iobroker/node_modules/iobroker.wizconnect, node: v16.19.0, js-controller: 4.0.24
                                    
                                    D 1 Reply Last reply Reply Quote 0
                                    • D
                                      disaster123 @Kentrath last edited by

                                      @kentrath Hast du das Loglevel auf debug gesetzt für die Instanz? Das sieht im Log nicht so aus.

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

                                        @disaster123
                                        Ja, habe ich.

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

                                          @kentrath Bitte einmal Instanz stoppen. Object 192_168_178_125 im Objekttree unter wizconnect.0 löschen. Dann Adapter wieder starten und debug anlassen.

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

                                            @disaster123

                                            wizconnect.0
                                            2023-01-27 09:15:42.258	warn	State "wizconnect.0.192_168_178_125.led.sceneId" has no existing object, this might lead to an error in future versions
                                            wizconnect.0
                                            2023-01-27 09:15:37.347	warn	State "wizconnect.0.192_168_178_125.led.dimming" has no existing object, this might lead to an error in future versions
                                            wizconnect.0
                                            2023-01-27 09:15:37.347	warn	State "wizconnect.0.192_168_178_125.led.temp" has no existing object, this might lead to an error in future versions
                                            wizconnect.0
                                            2023-01-27 09:15:37.346	warn	State "wizconnect.0.192_168_178_125.led.sceneId" has no existing object, this might lead to an error in future versions
                                            wizconnect.0
                                            2023-01-27 09:15:37.110	info	config udpip: 192.168.178.5
                                            wizconnect.0
                                            2023-01-27 09:15:37.110	info	config udpmac: 26:8c:05:f2:0c:a9
                                            wizconnect.0
                                            2023-01-27 09:15:37.110	info	config bind_ip: 0.0.0.0
                                            wizconnect.0
                                            2023-01-27 09:15:37.099	info	starting. Version 0.0.5 (non-npm: disaster123/ioBroker.wizconnect#ad84f06e2e5e73de575ad53b91c9d7a24d8b9384) in /opt/iobroker/node_modules/iobroker.wizconnect, node: v16.19.0, js-controller: 4.0.24
                                            host.IoBroker
                                            2023-01-27 09:15:36.444	info	instance system.adapter.wizconnect.0 started with pid 3317605
                                            host.IoBroker
                                            2023-01-27 09:15:36.329	info	"system.adapter.wizconnect.0" enabled
                                            
                                            D 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            795
                                            Online

                                            31.8k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

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