Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [gelöst] channelID hat keinen Wert

    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

    [gelöst] channelID hat keinen Wert

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

      @MCU Bekomme auch seit einiger Zeit Folgendes bei Installation eines Adapters:

      In file included from ../authenticate_pam.cc:23:../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type] , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete) ^
      ../authenticate_pam.cc: In function ‘void after_doing_auth(uv_work_t*, int)’:../authenticate_pam.cc:107:87: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(m->callback), 1, args); ^In file included from ../authenticate_pam.cc:23:../../nan/nan.h:1026:46: note: declared here NAN_DEPRECATED inline v8::Localv8::Value MakeCallback( ^~../authenticate_pam.cc:107:87: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(m->callback), 1, args); ^In file included from ../authenticate_pam.cc:23:../../nan/nan.h:1026:46: note: declared here NAN_DEPRECATED inline v8::Localv8::Value MakeCallback( ^~
      ../authenticate_pam.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Authenticate(Nan::NAN_METHOD_ARGS_TYPE)’:../authenticate_pam.cc:147:83: warning: ‘v8::Localv8::Value v8::Object::Get(v8::Localv8::Value)’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local<Value> res = options->Get(Nan::New<String>("serviceName").ToLocalChecked()); ^In file included from /home/iobroker/.cache/node-gyp/12.18.3/include/node/v8-internal.h:14, from /home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:27, from /home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:67, from ../../nan/nan.h:56, from ../authenticate_pam.cc:23:/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:3553:51: note: declared here V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~~~../authenticate_pam.cc:150:69: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’ serviceName->WriteUtf8(m->serviceName, sizeof(m->serviceName) - 1); ^In file included from /home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:67, from ../../nan/nan.h:56, from ../authenticate_pam.cc:23:/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate
      , char*, int, int*, int) const’ int WriteUtf8(Isolate* isolate, char* buffer, int length = -1, ^/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’../authenticate_pam.cc:152:69: warning: ‘v8::Localv8::Value v8::Object::Get(v8::Localv8::Value)’ is deprecated: Use maybe version [-Wdeprecated-declarations] res = options->Get(Nan::New<String>("remoteHost").ToLocalChecked()); ^In file included from /home/iobroker/.cache/node-gyp/12.18.3/include/node/v8-internal.h:14, from /home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:27, from /home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:67, from ../../nan/nan.h:56, from ../authenticate_pam.cc:23:/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:3553:51: note: declared here V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~
      ../authenticate_pam.cc:155:66: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’ remoteHost->WriteUtf8(m->remoteHost, sizeof(m->remoteHost) - 1); ^In file included from /home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:67, from ../../nan/nan.h:56, from ../authenticate_pam.cc:23:/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’ int WriteUtf8(Isolate* isolate, char* buffer, int length = -1, ^/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’../authenticate_pam.cc:160:58: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’ username->WriteUtf8(m->username, sizeof(m->username) - 1); ^In file included from /home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:67, from ../../nan/nan.h:56, from ../authenticate_pam.cc:23:/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’ int WriteUtf8(Isolate* isolate, char* buffer, int length = -1, ^/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’../authenticate_pam.cc:161:58: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’ password->WriteUtf8(m->password, sizeof(m->password) - 1); ^In file included from /home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:67, from ../../nan/nan.h:56, from ../authenticate_pam.cc:23:/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’ int WriteUtf8(Isolate* isolate, char* buffer, int length = -1, ^/home/iobroker/.cache/node-gyp/12.18.3/include/node/v8.h:2878:7: note: no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’../authenticate_pam.cc: At global scope:../authenticate_pam.cc:170:11: error: variable or field ‘init’ declared void void init(Handle<Object> exports) { ^~../authenticate_pam.cc:170:11: error: ‘Handle’ was not declared in this scope
      ../authenticate_pam.cc:170:11: note: suggested alternative: ‘rand_r’ void init(Handle<Object> exports) { ^
      ~ rand_r../authenticate_pam.cc:170:24: error: expected primary-expression before ‘>’ token void init(Handle<Object> exports) { ^../authenticate_pam.cc:170:26: error: ‘exports’ was not declared in this scope void init(Handle<Object> exports) { ^~~~~~~
      In file included from ../../nan/nan.h:56, from ../authenticate_pam.cc:23:../authenticate_pam.cc:175:31: error: ‘init’ was not declared in this scope NODE_MODULE(authenticate_pam, init); ^~/home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:608:36: note: in definition of macro ‘NODE_MODULE_X’ (node::addon_register_func) (regfunc), \ ^../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(authenticate_pam, init); ^~~~~~~
      ../authenticate_pam.cc:175:31: note: suggested alternative: ‘int’ NODE_MODULE(authenticate_pam, init); ^~/home/iobroker/.cache/node-gyp/12.18.3/include/node/node.h:608:36: note: in definition of macro ‘NODE_MODULE_X’ (node::addon_register_func) (regfunc), \ ^../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(authenticate_pam, init); ^~~~~~~
      make: *** [authenticate_pam.target.mk:109: Release/obj.target/authenticate_pam/authenticate_pam.o] Fehler 1
      gyp
      ERR! build error
      gyp ERR! stack Error: make failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)gyp ERR!
      stack at ChildProcess.emit (events.js:315:20)gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)gyp ERR! System Linux 5.4.51-v7l+gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"gyp ERR! cwd /opt/iobroker/node_modules/authenticate-pamgyp ERR! node -v v12.18.3gyp ERR! node-gyp -v v5.1.0gyp ERR! not ok
      npm WARN babel-eslint@10.1.0 requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself.
      npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: osx-temperature-sensor@1.0.7 (node_modules/osx-temperature-sensor):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for osx-temperature-sensor@1.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/zigbee-herdsman-converters/node_modules/fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/zigbee-herdsman/node_modules/jest-haste-map/node_modules/fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/zigbee-herdsman/node_modules/fsevents):npm WARN
      notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: authenticate-pam@1.0.2 (node_modules/authenticate-pam):npm WARN optional SKIPPING OPTIONAL DEPENDENCY: authenticate-pam@1.0.2 install: node-gyp rebuildnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

      Weiss jemand, wie man das beheben kann, damit keine Meldungen mehr kommen?

      Vielen Dank.

      1 Reply Last reply Reply Quote 0
      • M
        MCU @MCU last edited by

        @MCU Kompletten Adapter gelöscht (iobroker del javascript) und danach neu installiert mit (iobroker add javascript). Auch die Neuinstallation hat keinen Erfolg gebracht.

        1 Reply Last reply Reply Quote 0
        • M
          MCU @paul53 last edited by

          @paul53 Sorry. Hatte das mit dem DP ganz überlesen.
          Also die Struktur sieht so aus:
          javascript.0.TASKER.geräte-ID.Apps.app_start
          Bis zur Ebene: javascript.0.geräte-ID. funktioniert es mit der Kanal-ID.
          Geht man eine Ebene tiefer und wählt einen State von dort, zeigt er die Kanal-ID nicht mehr an.
          Kann evtl auch daran liegen, daß die Kanal-ID nur bis zur 2. Ebene geht?

          Vielen Dank.

          M paul53 2 Replies Last reply Reply Quote 0
          • M
            MCU @MCU last edited by

            @MCU Änderung: Bis zur Ebene: javascript.0.TASKER.geräte-ID. funktioniert es mit der Kanal-ID.

            M 1 Reply Last reply Reply Quote 0
            • M
              MCU @MCU last edited by

              @MCU Zur besseren Erklärung ein Bild der Struktur:

              iobroker-Kanal-ID-Struktur.png

              Vielleicht hilft es.

              Vielen Dank.

              1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @MCU last edited by

                @MCU sagte:

                daran liegen, daß die Kanal-ID nur bis zur 2. Ebene geht?

                Ja, die Kanal-ID liefert immer das parent-Objekt, sofern vorhanden. "Apps" ist kein Objekt, sondern nur ein Ordner. Die Kanal-ID solltest Du erhalten, wenn Du stattdessen die Geräte-ID abfragst.

                M 1 Reply Last reply Reply Quote 0
                • M
                  MCU @paul53 last edited by

                  @paul53 Hab es geändert:

                  iobroker-Geräte-ID-ohneFunktion.png

                  Funktioniert auch nicht!

                  paul53 M 2 Replies Last reply Reply Quote 0
                  • paul53
                    paul53 @MCU last edited by paul53

                    @MCU sagte:

                    Funktioniert auch nicht!

                    Ja, konnte ich nachvollziehen. Der zusätzliche Punkt in der Datenpunkt-ID stört offenbar.

                    Blockly_temp.JPG

                    1 Reply Last reply Reply Quote 0
                    • M
                      MCU @MCU last edited by

                      @MCU Ok, dann muß die Datenpunkte verändern:

                      /* Apps */
                      createState('TASKER.' + TASKER_ID + '.Apps',false, {
                      write:true,
                      read: false,
                      desc: "Apps",
                      type: "channel",
                      name: "Apps",
                      role: "channel",
                      def: false
                      });

                      Wäre das so richtig?
                      Vielen Dank.

                      paul53 M 2 Replies Last reply Reply Quote 0
                      • paul53
                        paul53 @MCU last edited by paul53

                        @MCU sagte:

                        Wäre das so richtig?

                        Nein, mit createState kann man keinen "channel" erzeugen.

                        let obj = {};
                        obj.type = 'channel';
                        obj.common = {};
                        obj.common.name = 'Alle Applikation-Daten';
                        obj.native ={};
                        setObject('javascript.0.TASKER.' + TASKER_ID + '.Apps', obj); 
                        
                        M 1 Reply Last reply Reply Quote 0
                        • M
                          MCU @MCU last edited by

                          @MCU
                          /* Apps-Struktur */
                          createState('TASKER.' + TASKER_ID + '.Apps',false, {
                          write:true,
                          read: false,
                          desc: "Apps",
                          type: "channel",
                          name: "Alle Applikation-Daten",
                          role: "channel",
                          def: false
                          });

                          Den "Ordner" auch als Channel definiert und schon klappt es. Hatte also nichts mit dem Update auf 4.6.22 zu tun.
                          Vielen Dank @paul53

                          1 Reply Last reply Reply Quote 0
                          • M
                            MCU @paul53 last edited by

                            @paul53 Hat aber geklappt!

                            paul53 1 Reply Last reply Reply Quote 0
                            • paul53
                              paul53 @MCU last edited by

                              @MCU sagte:

                              Hat aber geklappt!

                              Ja, Du hast zwar ein Objekt erzeugt, allerdings einen Datenpunkt mit dem unzulässigen Typ "channel".

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                MCU @paul53 last edited by

                                @paul53 iobroker-Kanal-ID-Channel-angelegt.png

                                paul53 1 Reply Last reply Reply Quote 0
                                • paul53
                                  paul53 @MCU last edited by paul53

                                  @MCU Genau so wie ich geschrieben habe: Datenpunkt vom unzulässigen Typ "channel". Du kannst das falsche Objekt aber - wie oben beschrieben - korrigieren: setObject(id, obj) überschreibt das bestehende Objekt.

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    MCU @paul53 last edited by

                                    @paul53 Hab den Typ geändert. Klappt wunderbar. Vielen Dank für die Hilfe.

                                    paul53 1 Reply Last reply Reply Quote 0
                                    • paul53
                                      paul53 @MCU last edited by paul53

                                      @MCU sagte:

                                      Typ geändert. Klappt wunderbar.

                                      Dann solltest Du gleich noch das parent-Objekt vom channel korrigieren:

                                      let obj = {};
                                      obj.type = 'device';
                                      obj.common = {};
                                      obj.common.name = 'TAB_2';
                                      obj.native = {};
                                      setObject('javascript.0.TASKER.' + TASKER_ID, obj);
                                      
                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        MCU @paul53 last edited by

                                        @paul53 Super. Mache ich. Vielen Dank.

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

                                        Support us

                                        ioBroker
                                        Community Adapters
                                        Donate

                                        460
                                        Online

                                        31.9k
                                        Users

                                        80.2k
                                        Topics

                                        1.3m
                                        Posts

                                        blockly javascript
                                        2
                                        23
                                        953
                                        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