Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. js-controller 2 jetzt für alle im Stable

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    js-controller 2 jetzt für alle im Stable

    This topic has been deleted. Only users with topic management privileges can see it.
    • Diginix
      Diginix last edited by Diginix

      Bei mir hing gerade der radar2 Adapter und ein Skripte welches auf das Objekt system.adapter.radar2.0.connected hört warf den Fehler dass das Objekt nicht existiert.

      2019-11-15 21:24:00.014  - warn: javascript.0 (27906) getState "system.adapter.radar2.0.connected" not found (3)
      

      Es ist zwar da war aber wertelos. Bis JS-Controller 1.5 waren alive und connected immer ausnahmslos entweder true oder fase, aber nicht leer. Und wieso sagt das Log not found obwohl das Objekt vorhanden ist?

      bdb02314-2aae-4ea8-a95b-0623fdd2c602-image.png

      Edit: Es gab einen Zombiprozess der mit pkill nicht zu töten war.

      diginix@host:/opt/iobroker/log$ sudo pkill -f io.radar2.0
      diginix@host:/opt/iobroker/log$ ps aux | grep radar
      iobroker   457  0.0  2.1 824208 85064 ?        Sl   19:34   0:06 io.radar2.0
      

      Nur mit kill -9 457 konnte ich ihn beenden.

      apollon77 1 Reply Last reply Reply Quote 0
      • apollon77
        apollon77 @Diginix last edited by apollon77

        @Diginix alive und connected werden mit einem "expire" von glaube ca. 30s auf "true" gesetzt während der Adapter läuft. Normalerweise wird der Wert alle 15s neu gesetzt und damit bleibt er "true". Wenn Adapter gestoppt setzt der Controller auf false ohne expire.

        Falls der Adapter jetzt hängenbleibt und damit der Wert "expired" wird der State auf null gesetzt und ist Wert-los ... genau das meckert JavaScript in dem Fall ggf an.

        In controller 1.5 wurde bei einem expire (und file DB) nicht der State gelöscht sondern der Wert auf "null" (für dich dann auch false) gesetzt. Bei redis DB aber gelöscht wie jetzt. Mit js.controller 2 ziehen wir das gleich.

        1 Reply Last reply Reply Quote 0
        • Diginix
          Diginix last edited by

          Hm, ok dann muss ich mal schauen was ich am Skript ändern kann.
          Aktuell habe ich andauern ein Zombie vom radar2 v1.2.0 (mit gepatchter myAdapter.js).
          Lief mit JS-Controller 1.5.14 monatelang stabil. Hoffe das fängt sich wieder mit 2.x.

          apollon77 1 Reply Last reply Reply Quote 0
          • apollon77
            apollon77 @Diginix last edited by

            @Diginix Es kann sehr gut sein das in der myAdapter Lib von Frank noch irgendwo was drin steckt was bisher keinen Fehler wirft aber solche hänger verursacht ... Hoffen wir mal das Frank bald wieder zeit findet. leg doch bitte ein Issue an mit so vielen Infos wie es geht

            1 Reply Last reply Reply Quote 0
            • marcuskl
              marcuskl @apollon77 last edited by

              @apollon77 Ok habe ich gemacht.

              1 Reply Last reply Reply Quote 0
              • S
                Superdad last edited by

                Bei mir lief die Installation ohne Fehler durch.
                Jetzt komme ich bis zur Anmeldeseite und kann mich mit meinem Namen und Passwort nicht mehr anmelden.
                Muss ich etwa was anderes eingeben?

                apollon77 1 Reply Last reply Reply Quote 0
                • Diginix
                  Diginix last edited by

                  Aarg!
                  simple-api wirft nun einen {"error":"permissionError"} bei den Aufrufen die bis vor dem Update problemlos funktionierten.
                  Was hat sich da denn geändert?

                  apollon77 1 Reply Last reply Reply Quote 0
                  • apollon77
                    apollon77 @Diginix last edited by

                    @Diginix Wie sehen die Einstellungen aus?

                    Diginix 1 Reply Last reply Reply Quote 0
                    • apollon77
                      apollon77 @Superdad last edited by

                      @Superdad Was sagt er? Login Fehler oder was? Wie sehen die Einstellungen aus? Versuch mal Passwort neu zusetzen.

                      An sich hat sich da nichts geändert

                      1 Reply Last reply Reply Quote 0
                      • Diginix
                        Diginix @apollon77 last edited by

                        @apollon77
                        Berechtigungen im Objekt:
                        2b4b0422-a862-44b8-87f9-d14ecf6d665b-image.png

                        Berechtigungen der Gruppe:
                        d9c53d3d-ee37-4981-9e47-3b34b24ba48f-image.png

                        Verwendeter User ist in der Gruppe.

                        apollon77 1 Reply Last reply Reply Quote 0
                        • apollon77
                          apollon77 @Diginix last edited by

                          @Diginix Und welche Aktion machst du? Versuch mal "list" Rechte zu aktivieren bitte

                          Diginix 1 Reply Last reply Reply Quote 0
                          • Diginix
                            Diginix @apollon77 last edited by Diginix

                            @apollon77
                            Habe der Gruppe jetzt alle Haken gegeben. Fehler bleibt der selbe.
                            Aufruf ist dieser:

                            http://ip:port/set/javascript.0.Objects.Door_Window.Gate_Switch?value=true&user=apiuser&pass=******
                            

                            Selbst das Lesen schlägt fehl:

                            http://ip:port/getPlainValue/javascript.0.Objects.Door_Window.Gate_Switch?user=apiuser&pass=******
                            

                            Habe dem Objekt jetzt noch zusätzlich den apiuser als Besitzer gegeben, statt admin. Aber nützt auch nichts.
                            Nur mit admin user/pw in der URL funktioniert aktuell das Lesen/Schreiben per simple-api.

                            apollon77 2 Replies Last reply Reply Quote 0
                            • S
                              Superdad last edited by

                              @apollon77

                              kann ja kein neues Passwort setzen, da ich ja keinen Login machen kann.
                              Es kommt keine Fehlermeldung.
                              Nur wenn ich den Benutzer oder das Passwort ändere, dann kommt eine Fehlermeldung.

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

                                Update wird wieder nicht links im Reiter angezeigt, obwohl vorhanden.
                                Bei den letzten beiden Versionen hatte die Anzeige wieder funktioniert. Die aktuelle Version wieder nicht.
                                Issue hatte ich ja schon erstellt.

                                apollon77 1 Reply Last reply Reply Quote 0
                                • apollon77
                                  apollon77 @Superdad last edited by

                                  @Superdad Hattest Du vorher alle Adapter wie nötig aktualisiert? Naja kannst eine weitere Admin instanz anlegen ohne Auth und dann updates nachziehen wenn nötig und dann nochmal versuchen.

                                  1 Reply Last reply Reply Quote 0
                                  • apollon77
                                    apollon77 @Diginix last edited by

                                    @Diginix Bitte leg mal ein Issue mit allen Details, Screenshots von allen User/Gruppen/Default-ACL Screens und so an im js.controller. Müssen wir ansehen. 😞 SO lange versuch mal den User in die Administrator Gruppe zu schieben

                                    1 Reply Last reply Reply Quote 0
                                    • apollon77
                                      apollon77 @crunchip last edited by

                                      @crunchip bestimmt wieder "nur" Reload issue

                                      1 Reply Last reply Reply Quote 0
                                      • apollon77
                                        apollon77 @Diginix last edited by

                                        @Diginix Und PS: Du hast die nötige Aktualisierung des Adapters gemacht?

                                        Diginix 1 Reply Last reply Reply Quote 0
                                        • Diginix
                                          Diginix @apollon77 last edited by Diginix

                                          @apollon77
                                          Welcher Adapter?
                                          Es sind alle auf aktuellem latest Level.
                                          js-controller 2.1.0
                                          simple-api 0.1.2 2.3.2
                                          web 2.4.10

                                          apollon77 1 Reply Last reply Reply Quote 0
                                          • S
                                            Superdad last edited by

                                            Hatte jetzt ein Backup eingespielt.
                                            Dann im Admin https und Anmeldung herausgenommen.
                                            Anschließend nochmal alles neu installiert. Jetzt funktioniert es ohne Anmeldung.
                                            Muss dann noch probieren, was passiert, wenn ich https wieder aktiviere.

                                            Habe aber jetzt noch folgende Fehlermeldung beim SQL-Adapter.
                                            vielleicht kann mir das jemand übersetzen?

                                            host.andreas-PC	2019-11-15 22:55:20.075	info	Do not restart adapter system.adapter.sql.0 because disabled or deleted
                                            host.andreas-PC	2019-11-15 22:55:20.075	error	instance system.adapter.sql.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
                                            host.andreas-PC	2019-11-15 22:55:20.075	error	Caught by controller[0]: at Module.load (internal/modules/cjs/loader.js:653:32)
                                            host.andreas-PC	2019-11-15 22:55:20.075	error	Caught by controller[0]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
                                            host.andreas-PC	2019-11-15 22:55:20.075	error	Caught by controller[0]: at Module._compile (internal/modules/cjs/loader.js:778:30)
                                            host.andreas-PC	2019-11-15 22:55:20.075	error	Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.sql/node_modules/mmmagic/lib/index.js:1:13)
                                            host.andreas-PC	2019-11-15 22:55:20.074	error	Caught by controller[0]: at require (internal/modules/cjs/helpers.js:25:18)
                                            host.andreas-PC	2019-11-15 22:55:20.074	error	Caught by controller[0]: at Module.require (internal/modules/cjs/loader.js:692:17)
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: at Module.load (internal/modules/cjs/loader.js:653:32)
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: the module (for instance, using `npm rebuild` or `npm install`).
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: NODE_MODULE_VERSION 57. This version of Node.js requires
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: was compiled against a different Node.js version using
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: Error: The module '/opt/iobroker/node_modules/iobroker.sql/node_modules/mmmagic/build/Release/magic.node'
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: ^
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: return process.dlopen(module, path.toNamespacedPath(filename));
                                            host.andreas-PC	2019-11-15 22:55:20.073	error	Caught by controller[0]: internal/modules/cjs/loader.js:807
                                            
                                            apollon77 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            516
                                            Online

                                            31.6k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            js-controller js-controller 2
                                            74
                                            556
                                            132769
                                            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