Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. JSON in Text umwandeln

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    JSON in Text umwandeln

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

      Nabend!

      Ich würde gerne den Wert der hinter "CarbonDioxide" steht (456) in einen Datenpunkt schreiben.

      Wie geht's`?
      Das hier wird geliefert:
      {"Time":"2022-09-27T17:27:05","MHZ19B":{"Model":"B","CarbonDioxide":456,"Temperature":10.0},"TempUnit":"C"}

      Alles was man mit gogle finden kann hab ich ausprobiert. Bin zu doof. Angeblich sollte der Sonoff Adapter die interessanten Werte automatisch als Datenpunkt zur Verfügung stellen, macht er aber nicht. (ich hab einen Wemos D1 Mini mit Tasmota-Sensor geflasht und einen MHZ19B CO2 Sensor angeschlossen)

      mickym Glasfaser liv-in-sky paul53 4 Replies Last reply Reply Quote 0
      • mickym
        mickym Most Active @Roelli last edited by

        @roelli cc2c0895-64af-404d-9fe0-3a1f7734481d-image.png

        1 Reply Last reply Reply Quote 0
        • Glasfaser
          Glasfaser @Roelli last edited by

          @roelli

          bac8b5ae-02dc-4183-a522-12ff3dbdcd9a-grafik.png

          1 Reply Last reply Reply Quote 0
          • liv-in-sky
            liv-in-sky @Roelli last edited by liv-in-sky

            @roelli sagte in JSON in Text umwandeln:

            {"Time":"2022-09-27T17:27:05","MHZ19B":{"Model":"B","CarbonDioxide":456,"Temperature":10.0},"TempUnit":"C"}

            Image 118.png

            EDIT: sorry - ihr seid schneller gewesen

            R 1 Reply Last reply Reply Quote 0
            • mickym
              mickym Most Active last edited by mickym

              Hihi 🙃 - aber alle innerhalb von 3 Minuten - gute Performance. 🙂

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

                @roelli sagte: Wert der hinter "CarbonDioxide" steht (456) in einen Datenpunkt schreiben.

                Bild_2022-09-27_184829503.png

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

                  Cool!
                  So schnell hab ich in meinen ganzen Leben noch keine Antworten erhalten. 🙂

                  Wollte ich direkt mal ausprobieren... aber ich kann keinen Datenpunkt anlegen im Ordner "Sensoren".
                  In anderen Ordnern geht's allerdings. Watt mach ich da falsch?

                  datenpunkt.gif

                  Glasfaser paul53 2 Replies Last reply Reply Quote 0
                  • Glasfaser
                    Glasfaser @Roelli last edited by

                    @roelli

                    Erstelle den Ordner einmal neu .. mit dem gleichen Namen

                    0_userdata.Sensoren

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

                      @roelli sagte: kann keinen Datenpunkt anlegen im Ordner "Sensoren".

                      Der Ordner "Sensoren" ist ein Datenpunkt ("type": "state"). Mache daraus "folder", "device" oder "channel".

                      1 Reply Last reply Reply Quote 0
                      • R
                        Roelli @liv-in-sky last edited by

                        @liv-in-sky

                        Direkt mal ausprobiert. Bei mir gehts NICHT! 👶 🙆‍♂️
                        nix.jpg

                        liv-in-sky 1 Reply Last reply Reply Quote 0
                        • liv-in-sky
                          liv-in-sky @Roelli last edited by

                          @roelli schau mal im log tab - icht unter dem script

                          R 1 Reply Last reply Reply Quote 0
                          • R
                            Roelli @liv-in-sky last edited by

                            @liv-in-sky

                            script.js.common.Sensoren.CO2_Sensor_Schlafzimmer: Cannot parse "mqtt.0.CO2_Schlafzimmer.SENSOR"SyntaxError: Unexpected token m in JSON at position 0
                            R Glasfaser 2 Replies Last reply Reply Quote 0
                            • R
                              Roelli @Roelli last edited by

                              @roelli

                              Da kommt inzwischen exakt GARKEINE Meldung im Log (unter Protokolle).
                              Vorher kam auch unter dem Blockly-Script mal eine Fehlermeldung. Nun nix mehr.

                              JavaScript Adapter neu starten... hilft auch nicht.

                              1 Reply Last reply Reply Quote 0
                              • Glasfaser
                                Glasfaser @Roelli last edited by

                                @roelli

                                nimm den Baustein "JSON nach Objekt" raus und kontrolliere den JSON den du im Testbaustein eingefügt hast

                                R 1 Reply Last reply Reply Quote 0
                                • R
                                  Roelli @Glasfaser last edited by

                                  @glasfaser

                                  Hab ich jetzt probiert. Aber... keine LOG Ausgabe.

                                  kaputt.jpg

                                  R 1 Reply Last reply Reply Quote 0
                                  • R
                                    Roelli @Roelli last edited by

                                    @roelli

                                    So kommt auch nix mehr.
                                    kaputt2.jpg

                                    Glasfaser liv-in-sky 2 Replies Last reply Reply Quote 0
                                    • Glasfaser
                                      Glasfaser @Roelli last edited by

                                      @roelli

                                      Schau bitte im Log TAB

                                      Glasfaser 1 Reply Last reply Reply Quote 0
                                      • liv-in-sky
                                        liv-in-sky @Roelli last edited by

                                        @roelli

                                        das log unter den scripten hat immer wieder mal ein problem - ich tippe auf browser cache

                                        daher : wenn das unten nicht angezeigt wird - einfach im log tab nachsehen

                                        manchmal passiert das auch, wenn man einscript kopiert

                                        R 1 Reply Last reply Reply Quote 0
                                        • R
                                          Roelli @liv-in-sky last edited by

                                          @liv-in-sky

                                          debug.gif

                                          liv-in-sky 1 Reply Last reply Reply Quote 0
                                          • liv-in-sky
                                            liv-in-sky @Roelli last edited by

                                            @roelli

                                            oje - du hast sicher einen virus 😞

                                            im ernst - da kann ich nicht wirklich helfen - ich habe diese fehlermeldung auch seit einiger zeit und weiß nicht, was sie bedeutet bzw. in welchen script sie vorkommt

                                            da es bei dir evtl mit diesem script zusammenhängt, würd ich das script mal löschen und einfach nochmal machen.
                                            aber vorher:
                                            was passiert, wenn du den debug block aus dem timertrigger rausziehst und das script startest - kommt dann im log das richtige ?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            591
                                            Online

                                            32.0k
                                            Users

                                            80.5k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            23
                                            622
                                            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