Weiter zum Inhalt
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Hell
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dunkel
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. "steuere" mit Datentyp "object"

NEWS

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    8
    1
    334

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    10
    1
    300

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    929

"steuere" mit Datentyp "object"

Geplant Angeheftet Gesperrt Verschoben Blockly
18 Beiträge 3 Kommentatoren 1.7k Aufrufe 2 Beobachtet
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • AsgothianA Asgothian

    Nachtrag:

    Damit bekommst du dann zumindest ein Objekt in den State geschrieben. Ob es. das "korrekte" Objekt ist hängt letztendlich vom Adapter ab. Das kann ich nicht sagen da ich diesen nicht einsetze.

    A.

    M Offline
    M Offline
    Matzinger
    schrieb am zuletzt editiert von
    #5

    @asgothian Danke schonmal. Leider klappt es so auch nicht. Ich habe das Skript wie folgt verändert:

    2319e25a-ea9e-41fa-98ab-1a3d72860bca-image.png

    und bekomme im Log dann Folgendes:

    javascript.0	2021-08-03 08:30:47.271	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
    javascript.0	2021-08-03 08:30:47.269	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
    javascript.0	2021-08-03 08:30:47.255	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
    javascript.0	2021-08-03 08:30:47.252	warn	(1720) at processImmediate (internal/timers.js:456:21)
    javascript.0	2021-08-03 08:30:47.252	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
    javascript.0	2021-08-03 08:30:47.252	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
    javascript.0	2021-08-03 08:30:47.252	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
    javascript.0	2021-08-03 08:30:47.251	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
    javascript.0	2021-08-03 08:30:47.251	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
    javascript.0	2021-08-03 08:30:47.249	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
    javascript.0	2021-08-03 08:30:47.247	warn	(1720) at processImmediate (internal/timers.js:456:21)
    javascript.0	2021-08-03 08:30:47.247	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
    javascript.0	2021-08-03 08:30:47.247	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
    javascript.0	2021-08-03 08:30:47.246	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
    javascript.0	2021-08-03 08:30:47.246	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
    javascript.0	2021-08-03 08:30:47.245	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
    javascript.0	2021-08-03 08:30:47.244	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
    javascript.0	2021-08-03 08:30:47.239	warn	(1720) at processImmediate (internal/timers.js:456:21)
    javascript.0	2021-08-03 08:30:47.239	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
    javascript.0	2021-08-03 08:30:47.238	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
    javascript.0	2021-08-03 08:30:47.237	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
    javascript.0	2021-08-03 08:30:47.236	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
    javascript.0	2021-08-03 08:30:47.235	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
    javascript.0	2021-08-03 08:30:47.231	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
    

    Hab ich irgendwas falsche gemackt?

    Gruß und Danke
    Matthias

    AsgothianA 1 Antwort Letzte Antwort
    0
    • paul53P paul53

      @matzinger sagte: Die RAW Daten des Datenpunktes sehen so aus:

      Erstelle ein Issue auf Github: common.def als String passt nicht zu common.type = "object".

      @matzinger sagte in "steuere" mit Datentyp "object":

      wieso der String plötzlich nicht mehr funktioniert,

      Funktioniert er wirklich nicht mehr? Der js-controller erzeugt (vorerst) nur eine Warnung.

      @Jey-Cee empfahl, common.type auf "string" zu ändern.

      M Offline
      M Offline
      Matzinger
      schrieb am zuletzt editiert von
      #6

      @paul53 also die Lampe reagiert nicht mehr und bleibt aus und der xy Wert wird rot angezeigt

      1 Antwort Letzte Antwort
      0
      • M Matzinger

        @asgothian Danke schonmal. Leider klappt es so auch nicht. Ich habe das Skript wie folgt verändert:

        2319e25a-ea9e-41fa-98ab-1a3d72860bca-image.png

        und bekomme im Log dann Folgendes:

        javascript.0	2021-08-03 08:30:47.271	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
        javascript.0	2021-08-03 08:30:47.269	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
        javascript.0	2021-08-03 08:30:47.255	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
        javascript.0	2021-08-03 08:30:47.252	warn	(1720) at processImmediate (internal/timers.js:456:21)
        javascript.0	2021-08-03 08:30:47.252	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
        javascript.0	2021-08-03 08:30:47.252	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
        javascript.0	2021-08-03 08:30:47.252	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
        javascript.0	2021-08-03 08:30:47.251	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
        javascript.0	2021-08-03 08:30:47.251	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
        javascript.0	2021-08-03 08:30:47.249	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
        javascript.0	2021-08-03 08:30:47.247	warn	(1720) at processImmediate (internal/timers.js:456:21)
        javascript.0	2021-08-03 08:30:47.247	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
        javascript.0	2021-08-03 08:30:47.247	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
        javascript.0	2021-08-03 08:30:47.246	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
        javascript.0	2021-08-03 08:30:47.246	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
        javascript.0	2021-08-03 08:30:47.245	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
        javascript.0	2021-08-03 08:30:47.244	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
        javascript.0	2021-08-03 08:30:47.239	warn	(1720) at processImmediate (internal/timers.js:456:21)
        javascript.0	2021-08-03 08:30:47.239	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
        javascript.0	2021-08-03 08:30:47.238	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
        javascript.0	2021-08-03 08:30:47.237	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
        javascript.0	2021-08-03 08:30:47.236	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
        javascript.0	2021-08-03 08:30:47.235	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
        javascript.0	2021-08-03 08:30:47.231	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
        

        Hab ich irgendwas falsche gemackt?

        Gruß und Danke
        Matthias

        AsgothianA Offline
        AsgothianA Offline
        Asgothian
        Developer
        schrieb am zuletzt editiert von
        #7

        @matzinger sagte in "steuere" mit Datentyp "object":

        Hab ich irgendwas falsche gemackt?

        Warhrscheinlich ja, allerdings auf "Anweisung".

        Mein problem ist das ich den Adapter nicht einsetze und damit nicht weiss was der für ein Objekt erwartet. Das mit dem Array ([]) war ein Versuch.

        Ich würde vorschlagen das du erst einmal versuchst den Typ des State im Objektbaum manuell wie von @paul53 vorgeschlagen auf "string" setzt und dann schaust ob du mit dem ummodifizierten Skript die Farbe steuern kannst.

        A.

        ioBroker auf RPi4 - Hardware soweit wie möglich via Zigbee.
        "Shit don't work" ist keine Fehlermeldung, sondern ein Fluch.

        M 1 Antwort Letzte Antwort
        0
        • AsgothianA Asgothian

          @matzinger sagte in "steuere" mit Datentyp "object":

          Hab ich irgendwas falsche gemackt?

          Warhrscheinlich ja, allerdings auf "Anweisung".

          Mein problem ist das ich den Adapter nicht einsetze und damit nicht weiss was der für ein Objekt erwartet. Das mit dem Array ([]) war ein Versuch.

          Ich würde vorschlagen das du erst einmal versuchst den Typ des State im Objektbaum manuell wie von @paul53 vorgeschlagen auf "string" setzt und dann schaust ob du mit dem ummodifizierten Skript die Farbe steuern kannst.

          A.

          M Offline
          M Offline
          Matzinger
          schrieb am zuletzt editiert von
          #8

          @asgothian wenn ich den Typ auf "string" ändere, kommt folgende Fehlermeldung:

          deconz.0	2021-08-03 10:41:58.572	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
          
          paul53P 1 Antwort Letzte Antwort
          0
          • M Matzinger

            @asgothian wenn ich den Typ auf "string" ändere, kommt folgende Fehlermeldung:

            deconz.0	2021-08-03 10:41:58.572	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
            
            paul53P Offline
            paul53P Offline
            paul53
            schrieb am zuletzt editiert von
            #9

            @matzinger

            Es gibt im Prinzip 3 Möglichkeiten, wovon eine sicherlich funktioniert:

            Bild_2021-08-03_123835.png

            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

            M 1 Antwort Letzte Antwort
            0
            • paul53P paul53

              @matzinger

              Es gibt im Prinzip 3 Möglichkeiten, wovon eine sicherlich funktioniert:

              Bild_2021-08-03_123835.png

              M Offline
              M Offline
              Matzinger
              schrieb am zuletzt editiert von
              #10

              @paul53 Leider ergeben alle 3 Möglichkeiten nur Fehler:

              d43d450e-04a0-4a84-b78f-6412fab399d2-image.png

              ergibt

              javascript.0	2021-08-03 14:05:54.750	warn	(1720) at processImmediate (internal/timers.js:456:21)
              javascript.0	2021-08-03 14:05:54.750	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
              javascript.0	2021-08-03 14:05:54.749	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
              javascript.0	2021-08-03 14:05:54.744	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
              javascript.0	2021-08-03 14:05:54.743	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
              javascript.0	2021-08-03 14:05:54.743	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
              javascript.0	2021-08-03 14:05:54.741	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
              javascript.0	2021-08-03 14:05:54.736	warn	(1720) at processImmediate (internal/timers.js:456:21)
              javascript.0	2021-08-03 14:05:54.735	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
              javascript.0	2021-08-03 14:05:54.735	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
              javascript.0	2021-08-03 14:05:54.735	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
              javascript.0	2021-08-03 14:05:54.734	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
              javascript.0	2021-08-03 14:05:54.734	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
              javascript.0	2021-08-03 14:05:54.732	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
              javascript.0	2021-08-03 14:05:54.729	warn	(1720) at processImmediate (internal/timers.js:456:21)
              javascript.0	2021-08-03 14:05:54.729	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
              javascript.0	2021-08-03 14:05:54.728	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
              javascript.0	2021-08-03 14:05:54.728	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
              javascript.0	2021-08-03 14:05:54.727	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:18:5)
              javascript.0	2021-08-03 14:05:54.726	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
              javascript.0	2021-08-03 14:05:54.724	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
              

              0e2b63c2-a228-4244-a073-ce84ae57c636-image.png

              ergibt:

              javascript.0	2021-08-03 14:01:43.110	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
              deconz.0	2021-08-03 14:01:43.074	warn	(1815) Code 400: Bad request set light state 6: [{"error":{"address":"/lights/6/state","description":"body contains invalid JSON","type":2}}]
              

              und

              9448816c-8640-4998-8ee9-333f025dc7d0-image.png

              erzeugt

              javascript.0	2021-08-03 14:08:35.862	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
              javascript.0	2021-08-03 14:08:35.859	warn	(1720) at processImmediate (internal/timers.js:456:21)
              javascript.0	2021-08-03 14:08:35.859	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
              javascript.0	2021-08-03 14:08:35.858	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
              javascript.0	2021-08-03 14:08:35.858	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
              javascript.0	2021-08-03 14:08:35.857	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
              javascript.0	2021-08-03 14:08:35.857	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
              javascript.0	2021-08-03 14:08:35.850	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
              javascript.0	2021-08-03 14:08:35.848	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
              javascript.0	2021-08-03 14:08:35.845	warn	(1720) at processImmediate (internal/timers.js:456:21)
              javascript.0	2021-08-03 14:08:35.845	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
              javascript.0	2021-08-03 14:08:35.845	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
              javascript.0	2021-08-03 14:08:35.844	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
              javascript.0	2021-08-03 14:08:35.844	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
              javascript.0	2021-08-03 14:08:35.843	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
              javascript.0	2021-08-03 14:08:35.842	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
              javascript.0	2021-08-03 14:08:35.839	warn	(1720) at processImmediate (internal/timers.js:456:21)
              javascript.0	2021-08-03 14:08:35.839	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
              javascript.0	2021-08-03 14:08:35.838	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
              javascript.0	2021-08-03 14:08:35.838	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
              javascript.0	2021-08-03 14:08:35.838	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
              javascript.0	2021-08-03 14:08:35.837	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
              javascript.0	2021-08-03 14:08:35.836	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
              
              paul53P 1 Antwort Letzte Antwort
              0
              • M Matzinger

                @paul53 Leider ergeben alle 3 Möglichkeiten nur Fehler:

                d43d450e-04a0-4a84-b78f-6412fab399d2-image.png

                ergibt

                javascript.0	2021-08-03 14:05:54.750	warn	(1720) at processImmediate (internal/timers.js:456:21)
                javascript.0	2021-08-03 14:05:54.750	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                javascript.0	2021-08-03 14:05:54.749	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                javascript.0	2021-08-03 14:05:54.744	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                javascript.0	2021-08-03 14:05:54.743	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                javascript.0	2021-08-03 14:05:54.743	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                javascript.0	2021-08-03 14:05:54.741	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
                javascript.0	2021-08-03 14:05:54.736	warn	(1720) at processImmediate (internal/timers.js:456:21)
                javascript.0	2021-08-03 14:05:54.735	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                javascript.0	2021-08-03 14:05:54.735	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                javascript.0	2021-08-03 14:05:54.735	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                javascript.0	2021-08-03 14:05:54.734	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                javascript.0	2021-08-03 14:05:54.734	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                javascript.0	2021-08-03 14:05:54.732	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
                javascript.0	2021-08-03 14:05:54.729	warn	(1720) at processImmediate (internal/timers.js:456:21)
                javascript.0	2021-08-03 14:05:54.729	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                javascript.0	2021-08-03 14:05:54.728	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                javascript.0	2021-08-03 14:05:54.728	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                javascript.0	2021-08-03 14:05:54.727	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:18:5)
                javascript.0	2021-08-03 14:05:54.726	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                javascript.0	2021-08-03 14:05:54.724	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
                

                0e2b63c2-a228-4244-a073-ce84ae57c636-image.png

                ergibt:

                javascript.0	2021-08-03 14:01:43.110	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
                deconz.0	2021-08-03 14:01:43.074	warn	(1815) Code 400: Bad request set light state 6: [{"error":{"address":"/lights/6/state","description":"body contains invalid JSON","type":2}}]
                

                und

                9448816c-8640-4998-8ee9-333f025dc7d0-image.png

                erzeugt

                javascript.0	2021-08-03 14:08:35.862	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
                javascript.0	2021-08-03 14:08:35.859	warn	(1720) at processImmediate (internal/timers.js:456:21)
                javascript.0	2021-08-03 14:08:35.859	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                javascript.0	2021-08-03 14:08:35.858	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                javascript.0	2021-08-03 14:08:35.858	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                javascript.0	2021-08-03 14:08:35.857	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                javascript.0	2021-08-03 14:08:35.857	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                javascript.0	2021-08-03 14:08:35.850	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
                javascript.0	2021-08-03 14:08:35.848	info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
                javascript.0	2021-08-03 14:08:35.845	warn	(1720) at processImmediate (internal/timers.js:456:21)
                javascript.0	2021-08-03 14:08:35.845	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                javascript.0	2021-08-03 14:08:35.845	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                javascript.0	2021-08-03 14:08:35.844	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                javascript.0	2021-08-03 14:08:35.844	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                javascript.0	2021-08-03 14:08:35.843	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                javascript.0	2021-08-03 14:08:35.842	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
                javascript.0	2021-08-03 14:08:35.839	warn	(1720) at processImmediate (internal/timers.js:456:21)
                javascript.0	2021-08-03 14:08:35.839	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                javascript.0	2021-08-03 14:08:35.838	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                javascript.0	2021-08-03 14:08:35.838	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                javascript.0	2021-08-03 14:08:35.838	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                javascript.0	2021-08-03 14:08:35.837	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                javascript.0	2021-08-03 14:08:35.836	warn	(1720) You are assigning a array to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to array. This warning might become an error
                
                paul53P Offline
                paul53P Offline
                paul53
                schrieb am zuletzt editiert von paul53
                #11

                @matzinger
                Die Warnungen kommen, wenn common.type nicht dem tatsächlichen Datentyp entspricht. Wichtig ist: Hat eine der 3 Versionen die Farbe richtig ausgegeben? Wenn ja, welche?

                @matzinger sagte in "steuere" mit Datentyp "object":

                info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
                

                könnte bedeuten, dass aus dem Array ein JSON gemacht werden muss:

                Bild_2021-08-03_142848.png

                Das macht in neuer Version (ab 5.2.0) aber schon der Javascript-Adapter.
                Update den Javascript-Adapter auf Version 5.2.8, ändere common.type in "array" (siehe Deconz) und dann:

                Bild_2021-08-03_171014.png

                Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                M 1 Antwort Letzte Antwort
                0
                • paul53P paul53

                  @matzinger
                  Die Warnungen kommen, wenn common.type nicht dem tatsächlichen Datentyp entspricht. Wichtig ist: Hat eine der 3 Versionen die Farbe richtig ausgegeben? Wenn ja, welche?

                  @matzinger sagte in "steuere" mit Datentyp "object":

                  info	(1720) State value to set for "deconz.0.Lights.6.xy" has to be stringified but received type "object"
                  

                  könnte bedeuten, dass aus dem Array ein JSON gemacht werden muss:

                  Bild_2021-08-03_142848.png

                  Das macht in neuer Version (ab 5.2.0) aber schon der Javascript-Adapter.
                  Update den Javascript-Adapter auf Version 5.2.8, ändere common.type in "array" (siehe Deconz) und dann:

                  Bild_2021-08-03_171014.png

                  M Offline
                  M Offline
                  Matzinger
                  schrieb am zuletzt editiert von
                  #12

                  @paul53 Objekt nach JSON erzeugt den gleichen Fehler wie oben.

                  javascript.0	2021-08-04 09:40:26.521	warn	(1720) at processImmediate (internal/timers.js:456:21)
                  javascript.0	2021-08-04 09:40:26.521	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                  javascript.0	2021-08-04 09:40:26.520	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                  javascript.0	2021-08-04 09:40:26.520	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                  javascript.0	2021-08-04 09:40:26.519	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                  javascript.0	2021-08-04 09:40:26.518	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                  javascript.0	2021-08-04 09:40:26.517	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
                  javascript.0	2021-08-04 09:40:26.510	warn	(1720) at processImmediate (internal/timers.js:456:21)
                  javascript.0	2021-08-04 09:40:26.510	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                  javascript.0	2021-08-04 09:40:26.510	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                  javascript.0	2021-08-04 09:40:26.509	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                  javascript.0	2021-08-04 09:40:26.509	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                  javascript.0	2021-08-04 09:40:26.508	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                  javascript.0	2021-08-04 09:40:26.496	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
                  

                  Das mit dem Javastript Adapter verstehe ich leider nicht. Die 5.1.3 ist die aktuelle stable version. Wenn ich den Verwahrungsort auf Beta stelle zeigt er mir als Verfügbare version 4.6.26 an

                  paul53P 1 Antwort Letzte Antwort
                  0
                  • M Matzinger

                    @paul53 Objekt nach JSON erzeugt den gleichen Fehler wie oben.

                    javascript.0	2021-08-04 09:40:26.521	warn	(1720) at processImmediate (internal/timers.js:456:21)
                    javascript.0	2021-08-04 09:40:26.521	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                    javascript.0	2021-08-04 09:40:26.520	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                    javascript.0	2021-08-04 09:40:26.520	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                    javascript.0	2021-08-04 09:40:26.519	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                    javascript.0	2021-08-04 09:40:26.518	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                    javascript.0	2021-08-04 09:40:26.517	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
                    javascript.0	2021-08-04 09:40:26.510	warn	(1720) at processImmediate (internal/timers.js:456:21)
                    javascript.0	2021-08-04 09:40:26.510	warn	(1720) at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5706:41)
                    javascript.0	2021-08-04 09:40:26.510	warn	(1720) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
                    javascript.0	2021-08-04 09:40:26.509	warn	(1720) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
                    javascript.0	2021-08-04 09:40:26.509	warn	(1720) at Object.<anonymous> (script.js.common.Skript_1LoxBettboden_temp:13:5)
                    javascript.0	2021-08-04 09:40:26.508	warn	(1720) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
                    javascript.0	2021-08-04 09:40:26.496	warn	(1720) You are assigning a string to the state "deconz.0.Lights.6.xy" which expects a object. Please fix your code to use a object or change the state type to string. This warning might become an erro
                    

                    Das mit dem Javastript Adapter verstehe ich leider nicht. Die 5.1.3 ist die aktuelle stable version. Wenn ich den Verwahrungsort auf Beta stelle zeigt er mir als Verfügbare version 4.6.26 an

                    paul53P Offline
                    paul53P Offline
                    paul53
                    schrieb am zuletzt editiert von paul53
                    #13

                    @matzinger sagte: Wenn ich den Verwahrungsort auf Beta stelle

                    Nimm den:

                    Bild_2021-08-04_104041.png

                    @matzinger sagte in "steuere" mit Datentyp "object":

                    Objekt nach JSON erzeugt den gleichen Fehler wie oben.

                    Du hast common.type nicht in "string" geändert. Die Farbe wurde aber richtig übertragen?

                    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                    M 1 Antwort Letzte Antwort
                    0
                    • paul53P paul53

                      @matzinger sagte: Wenn ich den Verwahrungsort auf Beta stelle

                      Nimm den:

                      Bild_2021-08-04_104041.png

                      @matzinger sagte in "steuere" mit Datentyp "object":

                      Objekt nach JSON erzeugt den gleichen Fehler wie oben.

                      Du hast common.type nicht in "string" geändert. Die Farbe wurde aber richtig übertragen?

                      M Offline
                      M Offline
                      Matzinger
                      schrieb am zuletzt editiert von
                      #14

                      @paul53 Du hast Recht, das hatte ich vergessen. Dann kommt folgende Meldung:

                      deconz.0	2021-08-05 07:49:21.112	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
                      deconz.0	2021-08-05 07:49:21.099	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
                      deconz.0	2021-08-05 07:49:21.067	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
                      

                      Nach der o.g. Meldung stellt sich der Type wieder von alleine auf "object" um. Beim nächsten Ausführen kommt dann wieder die lange Fehlermeldung vom Javascript Adapter.

                      Habe den Javasript Adapter nun auf 5.2.8 aktualisiert. Wenn ich nun ein Array übergebe, bekomme ich keine Fehler oder warnungen mehr im Log. der neue xy Wert wird auch übergeben, springt allerdings danach auf rot. Die Farbe der Lampe ändert sich nicht.

                      paul53P 1 Antwort Letzte Antwort
                      0
                      • M Matzinger

                        @paul53 Du hast Recht, das hatte ich vergessen. Dann kommt folgende Meldung:

                        deconz.0	2021-08-05 07:49:21.112	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
                        deconz.0	2021-08-05 07:49:21.099	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
                        deconz.0	2021-08-05 07:49:21.067	warn	(1815) {"address":"/lights/6/state","description":"invalid value, , for parameter, xy","type":7}
                        

                        Nach der o.g. Meldung stellt sich der Type wieder von alleine auf "object" um. Beim nächsten Ausführen kommt dann wieder die lange Fehlermeldung vom Javascript Adapter.

                        Habe den Javasript Adapter nun auf 5.2.8 aktualisiert. Wenn ich nun ein Array übergebe, bekomme ich keine Fehler oder warnungen mehr im Log. der neue xy Wert wird auch übergeben, springt allerdings danach auf rot. Die Farbe der Lampe ändert sich nicht.

                        paul53P Offline
                        paul53P Offline
                        paul53
                        schrieb am zuletzt editiert von
                        #15

                        @matzinger sagte: Nach der o.g. Meldung stellt sich der Type wieder von alleine auf "object" um.

                        Wirklich? Dann update den Deconz-Adapter von Github: Änderung von "xy" ist heute eingeflossen.

                        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                        M 1 Antwort Letzte Antwort
                        0
                        • paul53P paul53

                          @matzinger sagte: Nach der o.g. Meldung stellt sich der Type wieder von alleine auf "object" um.

                          Wirklich? Dann update den Deconz-Adapter von Github: Änderung von "xy" ist heute eingeflossen.

                          M Offline
                          M Offline
                          Matzinger
                          schrieb am zuletzt editiert von
                          #16

                          @paul53 ich habe nun auf 1.3.18 aktualisiert. Leider keine Änderung. Wenn ich ein Array übergebe, meckert der er, dass er ein Objekt will. Wenn ich ein JSON übergebe, schreibt er den neuen Wert zwar in den Datenpunkt, der wird aber gleich wieder rot und die Farbe der Lampe ändert sich nicht.

                          paul53P 1 Antwort Letzte Antwort
                          0
                          • M Matzinger

                            @paul53 ich habe nun auf 1.3.18 aktualisiert. Leider keine Änderung. Wenn ich ein Array übergebe, meckert der er, dass er ein Objekt will. Wenn ich ein JSON übergebe, schreibt er den neuen Wert zwar in den Datenpunkt, der wird aber gleich wieder rot und die Farbe der Lampe ändert sich nicht.

                            paul53P Offline
                            paul53P Offline
                            paul53
                            schrieb am zuletzt editiert von paul53
                            #17

                            @matzinger sagte: ich habe nun auf 1.3.18 aktualisiert.

                            1.3.18 ist nicht aktuell, sondern nur die Version auf Github (über Katze installieren). Die Versionsnummer ändert sich dabei nicht.

                            @matzinger sagte in "steuere" mit Datentyp "object":

                            meckert der er, dass er ein Objekt will.

                            In der Github-Version ist auf "array" korrigiert.

                            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                            M 1 Antwort Letzte Antwort
                            0
                            • paul53P paul53

                              @matzinger sagte: ich habe nun auf 1.3.18 aktualisiert.

                              1.3.18 ist nicht aktuell, sondern nur die Version auf Github (über Katze installieren). Die Versionsnummer ändert sich dabei nicht.

                              @matzinger sagte in "steuere" mit Datentyp "object":

                              meckert der er, dass er ein Objekt will.

                              In der Github-Version ist auf "array" korrigiert.

                              M Offline
                              M Offline
                              Matzinger
                              schrieb am zuletzt editiert von
                              #18

                              @paul53 Es geht wieder!!!!

                              Vielen vielen Dank für den Support.

                              1 Antwort Letzte Antwort
                              0

                              Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.

                              Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.

                              Mit deinem Input könnte dieser Beitrag noch besser werden 💗

                              Registrieren Anmelden
                              Antworten
                              • In einem neuen Thema antworten
                              Anmelden zum Antworten
                              • Älteste zuerst
                              • Neuste zuerst
                              • Meiste Stimmen


                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              556

                              Online

                              32.8k

                              Benutzer

                              82.8k

                              Themen

                              1.3m

                              Beiträge
                              Community
                              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                              ioBroker Community 2014-2025
                              logo
                              • Anmelden

                              • Du hast noch kein Konto? Registrieren

                              • Anmelden oder registrieren, um zu suchen
                              • Erster Beitrag
                                Letzter Beitrag
                              0
                              • Home
                              • Aktuell
                              • Tags
                              • Ungelesen 0
                              • Kategorien
                              • Unreplied
                              • Beliebt
                              • GitHub
                              • Docu
                              • Hilfe