Skip to content
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Logo
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. [ gelöst ] JSON aufteilen in DP

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.1k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.8k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.0k

[ gelöst ] JSON aufteilen in DP

Scheduled Pinned Locked Moved Blockly
48 Posts 5 Posters 3.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I ioBrokerMike

    @homoran

    So jetzt die Filterung von Javascript:

       2024-11-29 20:59:14.006	warn	(COMPACT) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34)
    
    javascript.0
    2024-11-29 20:59:14.006	warn	(COMPACT) at Object.<anonymous> (script.js.00_Anwesend.AnzahlAnwesend:17:3)
    
    javascript.0
    2024-11-29 20:59:14.005	warn	(COMPACT) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:2090:20)
    
    javascript.0
    2024-11-29 20:59:14.003	warn	(COMPACT) You are assigning a number to the state "0_userdata.0.Anwesend.Anzahl" which expects a string. Please fix your code to use a string or change the state type to number. This warning might become an error in future versions.
    
    javascript.0
    2024-11-29 20:59:12.010	info	(COMPACT) State value to set for "0_userdata.0.Anwesend.Anzahl" has to be type "string" but received type "number"
    
    javascript.0
    2024-11-29 20:59:12.005	warn	(COMPACT) at processTimers (node:internal/timers:519:7)
    
    javascript.0
    2024-11-29 20:59:12.005	warn	(COMPACT) at listOnTimeout (node:internal/timers:581:17)
    
    javascript.0
    2024-11-29 20:59:12.004	warn	(COMPACT) at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7)
    
    javascript.0
    2024-11-29 20:59:12.004	warn	(COMPACT) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28
    
    javascript.0
    2024-11-29 20:59:12.004	warn	(COMPACT) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15)
    
    javascript.0
    2024-11-29 20:59:12.004	warn	(COMPACT) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34)
    
    javascript.0
    2024-11-29 20:59:12.003	warn	(COMPACT) at Object.<anonymous> (script.js.00_Anwesend.AnzahlAnwesend:17:3)
    
    javascript.0
    2024-11-29 20:59:12.003	warn	(COMPACT) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:2090:20)
    
    javascript.0
    2024-11-29 20:59:12.002	warn	(COMPACT) You are assigning a number to the state "0_userdata.0.Anwesend.Anzahl" which expects a string. Please fix your code to use a string or change the state type to number. This warning might become an error in future versions.
    
    javascript.0
    2024-11-29 20:59:10.011	info	(COMPACT) State value to set for "0_userdata.0.Anwesend.Anzahl" has to be type "string" but received type "number"
    
    javascript.0
    2024-11-29 20:59:10.005	warn	(COMPACT) at processTimers (node:internal/timers:519:7)
    
    

    starte mal die Instsnz neu und mach rinen Browserrefresh (Strg-f5)

    Javascript und mqtt neugestartet sowie F5

    mickymM Online
    mickymM Online
    mickym
    Most Active
    wrote on last edited by
    #36

    @iobrokermike Ja entweder konvertierst Du die Anzahl in eine Zahl oder den Datenpunkt in String/Zeichenkette.

    Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

    I 1 Reply Last reply
    0
    • HomoranH Homoran

      @mickym Ist sehr interessant (vielleicht werd ich deswegen mit jsonata nicht warm), aber könnten wir das bitte aus diesem Thread erst mal herauslassen.

      ich fürchte wir verlieren @ioBrokerMike sonst.

      mickymM Online
      mickymM Online
      mickym
      Most Active
      wrote on last edited by
      #37

      @homoran Ja ist OK - ich habs selbst gecheckt - Du kannst den Post auch löschen.

      Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

      1 Reply Last reply
      1
      • mickymM mickym

        @iobrokermike Ja entweder konvertierst Du die Anzahl in eine Zahl oder den Datenpunkt in String/Zeichenkette.

        I Offline
        I Offline
        ioBrokerMike
        wrote on last edited by
        #38

        @mickym sagte in JSON aufteilen in DP:

        die Anzahl in eine Zahl oder den Datenpunkt in String/Zeichenkette.

        Schon gemacht

        Mfg
        IOBrokerMike

        Achtung ! Sehkraft 25% | 60% , kein scherz
        Systeme : GEEKOM MiniAir 11 | Linux : Trixie 13.0 | HMIP | CCU3 | SMA PV Anlage | Robonect Hx | Hydrawise | RTL_433

        1 Reply Last reply
        0
        • I ioBrokerMike

          @homoran

          So jetzt die Filterung von Javascript:

             2024-11-29 20:59:14.006	warn	(COMPACT) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34)
          
          javascript.0
          2024-11-29 20:59:14.006	warn	(COMPACT) at Object.<anonymous> (script.js.00_Anwesend.AnzahlAnwesend:17:3)
          
          javascript.0
          2024-11-29 20:59:14.005	warn	(COMPACT) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:2090:20)
          
          javascript.0
          2024-11-29 20:59:14.003	warn	(COMPACT) You are assigning a number to the state "0_userdata.0.Anwesend.Anzahl" which expects a string. Please fix your code to use a string or change the state type to number. This warning might become an error in future versions.
          
          javascript.0
          2024-11-29 20:59:12.010	info	(COMPACT) State value to set for "0_userdata.0.Anwesend.Anzahl" has to be type "string" but received type "number"
          
          javascript.0
          2024-11-29 20:59:12.005	warn	(COMPACT) at processTimers (node:internal/timers:519:7)
          
          javascript.0
          2024-11-29 20:59:12.005	warn	(COMPACT) at listOnTimeout (node:internal/timers:581:17)
          
          javascript.0
          2024-11-29 20:59:12.004	warn	(COMPACT) at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7)
          
          javascript.0
          2024-11-29 20:59:12.004	warn	(COMPACT) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28
          
          javascript.0
          2024-11-29 20:59:12.004	warn	(COMPACT) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15)
          
          javascript.0
          2024-11-29 20:59:12.004	warn	(COMPACT) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34)
          
          javascript.0
          2024-11-29 20:59:12.003	warn	(COMPACT) at Object.<anonymous> (script.js.00_Anwesend.AnzahlAnwesend:17:3)
          
          javascript.0
          2024-11-29 20:59:12.003	warn	(COMPACT) at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:2090:20)
          
          javascript.0
          2024-11-29 20:59:12.002	warn	(COMPACT) You are assigning a number to the state "0_userdata.0.Anwesend.Anzahl" which expects a string. Please fix your code to use a string or change the state type to number. This warning might become an error in future versions.
          
          javascript.0
          2024-11-29 20:59:10.011	info	(COMPACT) State value to set for "0_userdata.0.Anwesend.Anzahl" has to be type "string" but received type "number"
          
          javascript.0
          2024-11-29 20:59:10.005	warn	(COMPACT) at processTimers (node:internal/timers:519:7)
          
          

          starte mal die Instsnz neu und mach rinen Browserrefresh (Strg-f5)

          Javascript und mqtt neugestartet sowie F5

          HomoranH Do not disturb
          HomoranH Do not disturb
          Homoran
          Global Moderator Administrators
          wrote on last edited by Homoran
          #39

          @iobrokermike sagte in JSON aufteilen in DP:

          So jetzt die Filterung von Javascript:

          und in dem Zeitbereich (4 Sekunden!) hast du das Testskript refreshed?

          @iobrokermike sagte in JSON aufteilen in DP:

                                  2024-11-29 20:59:12.004	warn	(COMPACT)
          

          läuft der Adapter bei dir im compact mode?
          warum?

          kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

          Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

          der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

          I 1 Reply Last reply
          0
          • HomoranH Homoran

            @iobrokermike sagte in JSON aufteilen in DP:

            So jetzt die Filterung von Javascript:

            und in dem Zeitbereich (4 Sekunden!) hast du das Testskript refreshed?

            @iobrokermike sagte in JSON aufteilen in DP:

                                    2024-11-29 20:59:12.004	warn	(COMPACT)
            

            läuft der Adapter bei dir im compact mode?
            warum?

            I Offline
            I Offline
            ioBrokerMike
            wrote on last edited by ioBrokerMike
            #40

            @homoran sagte in JSON aufteilen in DP:

            nd in dem Zeitbereich (4 Sekunden!) hast du das Testskript refres

            Nein das hatte ich nicht getan.

            läuft der Adapter bei dir im compact mode?
            warum?

            Das kann ich nicht sagen.
            Habe den harken im Host raus gemacht.

            Was mir eben auffiel ist :
            Wenn ich den Javascript Adapter auf debug stelle läuft das Testscript warum auch immer.
            Blockly 7.png

            Mfg
            IOBrokerMike

            Achtung ! Sehkraft 25% | 60% , kein scherz
            Systeme : GEEKOM MiniAir 11 | Linux : Trixie 13.0 | HMIP | CCU3 | SMA PV Anlage | Robonect Hx | Hydrawise | RTL_433

            HomoranH 1 Reply Last reply
            0
            • I ioBrokerMike

              @homoran sagte in JSON aufteilen in DP:

              nd in dem Zeitbereich (4 Sekunden!) hast du das Testskript refres

              Nein das hatte ich nicht getan.

              läuft der Adapter bei dir im compact mode?
              warum?

              Das kann ich nicht sagen.
              Habe den harken im Host raus gemacht.

              Was mir eben auffiel ist :
              Wenn ich den Javascript Adapter auf debug stelle läuft das Testscript warum auch immer.
              Blockly 7.png

              HomoranH Do not disturb
              HomoranH Do not disturb
              Homoran
              Global Moderator Administrators
              wrote on last edited by
              #41

              @iobrokermike sagte in JSON aufteilen in DP:

              läuft das Testscript warum auch immer.

              dann jetzt zum echten Skript!

              kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

              der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

              I 1 Reply Last reply
              0
              • HomoranH Homoran

                @iobrokermike sagte in JSON aufteilen in DP:

                läuft das Testscript warum auch immer.

                dann jetzt zum echten Skript!

                I Offline
                I Offline
                ioBrokerMike
                wrote on last edited by
                #42

                @homoran sagte in JSON aufteilen in DP:

                t zum echten Skript!

                Blockly 8.png

                Vielen Dank an euch und eure Geduld . 👍

                Mfg
                IOBrokerMike

                Achtung ! Sehkraft 25% | 60% , kein scherz
                Systeme : GEEKOM MiniAir 11 | Linux : Trixie 13.0 | HMIP | CCU3 | SMA PV Anlage | Robonect Hx | Hydrawise | RTL_433

                HomoranH 1 Reply Last reply
                0
                • I ioBrokerMike

                  @homoran sagte in JSON aufteilen in DP:

                  t zum echten Skript!

                  Blockly 8.png

                  Vielen Dank an euch und eure Geduld . 👍

                  HomoranH Do not disturb
                  HomoranH Do not disturb
                  Homoran
                  Global Moderator Administrators
                  wrote on last edited by
                  #43

                  @iobrokermike sagte in [ gelöst ] JSON aufteilen in DP:

                  Vielen Dank an euch und eure Geduld .

                  heisst das, dass es jetzt läuft?

                  kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                  Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                  der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                  I 1 Reply Last reply
                  0
                  • HomoranH Homoran

                    @iobrokermike sagte in [ gelöst ] JSON aufteilen in DP:

                    Vielen Dank an euch und eure Geduld .

                    heisst das, dass es jetzt läuft?

                    I Offline
                    I Offline
                    ioBrokerMike
                    wrote on last edited by
                    #44

                    @homoran

                    Richtig !!!
                    Es läuft.

                    Mfg
                    IOBrokerMike

                    Achtung ! Sehkraft 25% | 60% , kein scherz
                    Systeme : GEEKOM MiniAir 11 | Linux : Trixie 13.0 | HMIP | CCU3 | SMA PV Anlage | Robonect Hx | Hydrawise | RTL_433

                    HomoranH 1 Reply Last reply
                    0
                    • I ioBrokerMike

                      @homoran

                      Richtig !!!
                      Es läuft.

                      HomoranH Do not disturb
                      HomoranH Do not disturb
                      Homoran
                      Global Moderator Administrators
                      wrote on last edited by
                      #45

                      @iobrokermike sagte in [ gelöst ] JSON aufteilen in DP:

                      @homoran

                      Richtig !!!
                      Es läuft.

                      Super!
                      so muss es sein!

                      dann kann @mickym jetzt mit @paul53 weiter über die Wandlung des json zum Objekt philosophieren

                      kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                      Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                      der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                      mickymM 1 Reply Last reply
                      0
                      • HomoranH Homoran

                        @iobrokermike sagte in [ gelöst ] JSON aufteilen in DP:

                        @homoran

                        Richtig !!!
                        Es läuft.

                        Super!
                        so muss es sein!

                        dann kann @mickym jetzt mit @paul53 weiter über die Wandlung des json zum Objekt philosophieren

                        mickymM Online
                        mickymM Online
                        mickym
                        Most Active
                        wrote on last edited by
                        #46

                        @homoran Nicht mehr nötig - ich konnte es mir ja selbst erklären.

                        Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

                        HomoranH 1 Reply Last reply
                        0
                        • mickymM mickym

                          @homoran Nicht mehr nötig - ich konnte es mir ja selbst erklären.

                          HomoranH Do not disturb
                          HomoranH Do not disturb
                          Homoran
                          Global Moderator Administrators
                          wrote on last edited by
                          #47

                          @mickym sagte in [ gelöst ] JSON aufteilen in DP:

                          @homoran Nicht mehr nötig - ich konnte es mir ja selbst erklären.

                          ok, du hast wieder heimlich editiert 😉
                          ist aber nur eine Arbeitshypothese, oder?

                          kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                          Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                          der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                          mickymM 1 Reply Last reply
                          0
                          • HomoranH Homoran

                            @mickym sagte in [ gelöst ] JSON aufteilen in DP:

                            @homoran Nicht mehr nötig - ich konnte es mir ja selbst erklären.

                            ok, du hast wieder heimlich editiert 😉
                            ist aber nur eine Arbeitshypothese, oder?

                            mickymM Online
                            mickymM Online
                            mickym
                            Most Active
                            wrote on last edited by
                            #48

                            @homoran Nein ich habe nichts editiert. Ich habe nur folgendes verstanden:

                            1. Wenn Du über einen JSON String ein Attribut extrahierst, wird temporär in ein Objekt gewandelt, um das Attribut zu extrahieren. Es bleibt aber ein JSON, also Text und wird nicht in ein Objekt gewandelt.
                            2. Um also den JSON als Objekt weiter zu verarbeiten musst du den JSON permanent in ein Objekt wandeln.

                            Das ganze hat also nichts mit JSONATA zu tun.

                            Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            609

                            Online

                            32.4k

                            Users

                            81.4k

                            Topics

                            1.3m

                            Posts
                            Community
                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                            ioBroker Community 2014-2025
                            logo
                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Recent
                            • Tags
                            • Unread 0
                            • Categories
                            • Unreplied
                            • Popular
                            • GitHub
                            • Docu
                            • Hilfe