Skip to content
  • Home
  • 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
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Node-Red
  5. Payload String zerlegen

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    16
    1
    1.9k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    913

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.2k

Payload String zerlegen

Scheduled Pinned Locked Moved Node-Red
77 Posts 7 Posters 16.1k Views 7 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.
  • riste76R Offline
    riste76R Offline
    riste76
    wrote on last edited by
    #1

    Hallo Gemeinde,

    ich habe eine kleine Herausforderung, ich möchte aus diesem String:

    mqtt/0/tele/zisterne/SENSOR : msg.payload : string[58]
    "{"Time":"2021-06-20T20:16:28","SR04":{"Distance":130.544}}"
    

    die 130.544 extrahieren....

    könnt ihr mir einen Tipp geben wie ich das machen kann?
    Vielen Dank im Voraus, Gruß
    Christian

    mickymM 1 Reply Last reply
    0
    • riste76R riste76

      Hallo Gemeinde,

      ich habe eine kleine Herausforderung, ich möchte aus diesem String:

      mqtt/0/tele/zisterne/SENSOR : msg.payload : string[58]
      "{"Time":"2021-06-20T20:16:28","SR04":{"Distance":130.544}}"
      

      die 130.544 extrahieren....

      könnt ihr mir einen Tipp geben wie ich das machen kann?
      Vielen Dank im Voraus, Gruß
      Christian

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

      @riste76 sagte in Payload String zerlegen:

      "{"Time":"2021-06-20T20:16:28","SR04":{"Distance":130.544}}"

      [
         {
             "id": "f70f29ac.e79a08",
             "type": "inject",
             "z": "dce8fa20.2e93c8",
             "name": "",
             "props": [
                 {
                     "p": "payload"
                 }
             ],
             "repeat": "",
             "crontab": "",
             "once": false,
             "onceDelay": 0.1,
             "topic": "",
             "payload": "{\"Time\":\"2021-06-20T20:16:28\",\"SR04\":{\"Distance\":130.544}}",
             "payloadType": "str",
             "x": 470,
             "y": 3080,
             "wires": [
                 [
                     "c3b8297b.63a338"
                 ]
             ]
         },
         {
             "id": "e304c54b.d7a758",
             "type": "debug",
             "z": "dce8fa20.2e93c8",
             "name": "",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": false,
             "complete": "false",
             "statusVal": "",
             "statusType": "auto",
             "x": 1010,
             "y": 3080,
             "wires": []
         },
         {
             "id": "c3b8297b.63a338",
             "type": "json",
             "z": "dce8fa20.2e93c8",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 610,
             "y": 3080,
             "wires": [
                 [
                     "cfabc75c.493b78"
                 ]
             ]
         },
         {
             "id": "cfabc75c.493b78",
             "type": "change",
             "z": "dce8fa20.2e93c8",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.SR04.Distance",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 810,
             "y": 3080,
             "wires": [
                 [
                     "e304c54b.d7a758"
                 ]
             ]
         }
      ]
      

      Hier bitte:

      6ada31db-f957-434f-b0c0-605f8eb107d8-image.png

      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.

      riste76R 66er6 2 Replies Last reply
      1
      • mickymM mickym

        @riste76 sagte in Payload String zerlegen:

        "{"Time":"2021-06-20T20:16:28","SR04":{"Distance":130.544}}"

        [
           {
               "id": "f70f29ac.e79a08",
               "type": "inject",
               "z": "dce8fa20.2e93c8",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "{\"Time\":\"2021-06-20T20:16:28\",\"SR04\":{\"Distance\":130.544}}",
               "payloadType": "str",
               "x": 470,
               "y": 3080,
               "wires": [
                   [
                       "c3b8297b.63a338"
                   ]
               ]
           },
           {
               "id": "e304c54b.d7a758",
               "type": "debug",
               "z": "dce8fa20.2e93c8",
               "name": "",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "false",
               "statusVal": "",
               "statusType": "auto",
               "x": 1010,
               "y": 3080,
               "wires": []
           },
           {
               "id": "c3b8297b.63a338",
               "type": "json",
               "z": "dce8fa20.2e93c8",
               "name": "",
               "property": "payload",
               "action": "",
               "pretty": false,
               "x": 610,
               "y": 3080,
               "wires": [
                   [
                       "cfabc75c.493b78"
                   ]
               ]
           },
           {
               "id": "cfabc75c.493b78",
               "type": "change",
               "z": "dce8fa20.2e93c8",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload.SR04.Distance",
                       "tot": "msg"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 810,
               "y": 3080,
               "wires": [
                   [
                       "e304c54b.d7a758"
                   ]
               ]
           }
        ]
        

        Hier bitte:

        6ada31db-f957-434f-b0c0-605f8eb107d8-image.png

        riste76R Offline
        riste76R Offline
        riste76
        wrote on last edited by
        #3

        @mickym
        vielen Dank!
        funktioniert

        1 Reply Last reply
        0
        • mickymM mickym

          @riste76 sagte in Payload String zerlegen:

          "{"Time":"2021-06-20T20:16:28","SR04":{"Distance":130.544}}"

          [
             {
                 "id": "f70f29ac.e79a08",
                 "type": "inject",
                 "z": "dce8fa20.2e93c8",
                 "name": "",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"Time\":\"2021-06-20T20:16:28\",\"SR04\":{\"Distance\":130.544}}",
                 "payloadType": "str",
                 "x": 470,
                 "y": 3080,
                 "wires": [
                     [
                         "c3b8297b.63a338"
                     ]
                 ]
             },
             {
                 "id": "e304c54b.d7a758",
                 "type": "debug",
                 "z": "dce8fa20.2e93c8",
                 "name": "",
                 "active": true,
                 "tosidebar": true,
                 "console": false,
                 "tostatus": false,
                 "complete": "false",
                 "statusVal": "",
                 "statusType": "auto",
                 "x": 1010,
                 "y": 3080,
                 "wires": []
             },
             {
                 "id": "c3b8297b.63a338",
                 "type": "json",
                 "z": "dce8fa20.2e93c8",
                 "name": "",
                 "property": "payload",
                 "action": "",
                 "pretty": false,
                 "x": 610,
                 "y": 3080,
                 "wires": [
                     [
                         "cfabc75c.493b78"
                     ]
                 ]
             },
             {
                 "id": "cfabc75c.493b78",
                 "type": "change",
                 "z": "dce8fa20.2e93c8",
                 "name": "",
                 "rules": [
                     {
                         "t": "set",
                         "p": "payload",
                         "pt": "msg",
                         "to": "payload.SR04.Distance",
                         "tot": "msg"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 810,
                 "y": 3080,
                 "wires": [
                     [
                         "e304c54b.d7a758"
                     ]
                 ]
             }
          ]
          

          Hier bitte:

          6ada31db-f957-434f-b0c0-605f8eb107d8-image.png

          66er6 Offline
          66er6 Offline
          66er
          wrote on last edited by
          #4

          @mickym

          Ich möchte das Thema mal aufgreifen und hoffe, Du kannst mir auch den Weg weisen.

          Ich habe versucht, Deine Lösung nachzubauen für folgenden JSON, den ich aus dem MQTT-Adapter nach NodeRed hole:

          {"src":"shellyplus1-xxxxxxxxxxxxx","dst":"ShellyPlus1/events","method":"NotifyStatus","params":{"ts":1632490225.43,"switch:0":{"id":0,"output":true,"source":"WS_in"}}}
          

          Ich brauche den Wert von "output", der true oder false sein kann.

          Wie müßte ich den Flow korrekt ändern?

          Vielen Dank schon mal für jegliche Unterstützung.

          LG
          Stefan

          mickymM 1 Reply Last reply
          0
          • 66er6 66er

            @mickym

            Ich möchte das Thema mal aufgreifen und hoffe, Du kannst mir auch den Weg weisen.

            Ich habe versucht, Deine Lösung nachzubauen für folgenden JSON, den ich aus dem MQTT-Adapter nach NodeRed hole:

            {"src":"shellyplus1-xxxxxxxxxxxxx","dst":"ShellyPlus1/events","method":"NotifyStatus","params":{"ts":1632490225.43,"switch:0":{"id":0,"output":true,"source":"WS_in"}}}
            

            Ich brauche den Wert von "output", der true oder false sein kann.

            Wie müßte ich den Flow korrekt ändern?

            Vielen Dank schon mal für jegliche Unterstützung.

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

            @66er sagte in Payload String zerlegen:

            {"src":"shellyplus1-xxxxxxxxxxxxx","dst":"ShellyPlus1/events","method":"NotifyStatus","params":{"ts":1632490225.43,"switch:0":{"id":0,"output":true,"source":"WS_in"}}}

            Ja das war mit den Doppelpunkten in der Tat etwas tricky. Aber NodeRed bietet im Debug-Fenster eine ganz tolle Hilfe

            Wenn Du mit der Maus über den Wert der Dich interessiert fährst, kannst Du den Pfad innerhalb des Objektes kopieren:

            7dc81b02-6a4e-45a0-803f-1be460d82348-image.png

            Somit sieht die Change Node dann so aus:

            de227c08-73fd-4b36-b3c9-3ff196c8f5db-image.png

            [
               {
                   "id": "bb709554.04b598",
                   "type": "inject",
                   "z": "169f5b00.a13415",
                   "name": "",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"src\":\"shellyplus1-xxxxxxxxxxxxx\",\"dst\":\"ShellyPlus1/events\",\"method\":\"NotifyStatus\",\"params\":{\"ts\":1632490225.43,\"switch:0\":{\"id\":0,\"output\":true,\"source\":\"WS_in\"}}}",
                   "payloadType": "str",
                   "x": 610,
                   "y": 960,
                   "wires": [
                       [
                           "b10bf87d.eae1a8"
                       ]
                   ]
               },
               {
                   "id": "b10bf87d.eae1a8",
                   "type": "json",
                   "z": "169f5b00.a13415",
                   "name": "",
                   "property": "payload",
                   "action": "",
                   "pretty": false,
                   "x": 760,
                   "y": 960,
                   "wires": [
                       [
                           "5af68d9f.4c24b4",
                           "d702c4c8.ddc6f8"
                       ]
                   ]
               },
               {
                   "id": "5af68d9f.4c24b4",
                   "type": "debug",
                   "z": "169f5b00.a13415",
                   "name": "",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "false",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 940,
                   "y": 920,
                   "wires": []
               },
               {
                   "id": "4d5422a9.651b0c",
                   "type": "debug",
                   "z": "169f5b00.a13415",
                   "name": "",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "false",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 1150,
                   "y": 960,
                   "wires": []
               },
               {
                   "id": "d702c4c8.ddc6f8",
                   "type": "change",
                   "z": "169f5b00.a13415",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "payload.params[\"switch:0\"].output",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 950,
                   "y": 960,
                   "wires": [
                       [
                           "4d5422a9.651b0c"
                       ]
                   ]
               }
            ]
            

            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.

            66er6 2 Replies Last reply
            0
            • 66er6 Offline
              66er6 Offline
              66er
              wrote on last edited by
              #6

              Werde ich gleich austesten. :+1:

              Vielen Dank.

              (Und wieder was dazu lernen dürfen . ;-) )

              LG
              Stefan

              1 Reply Last reply
              0
              • mickymM mickym

                @66er sagte in Payload String zerlegen:

                {"src":"shellyplus1-xxxxxxxxxxxxx","dst":"ShellyPlus1/events","method":"NotifyStatus","params":{"ts":1632490225.43,"switch:0":{"id":0,"output":true,"source":"WS_in"}}}

                Ja das war mit den Doppelpunkten in der Tat etwas tricky. Aber NodeRed bietet im Debug-Fenster eine ganz tolle Hilfe

                Wenn Du mit der Maus über den Wert der Dich interessiert fährst, kannst Du den Pfad innerhalb des Objektes kopieren:

                7dc81b02-6a4e-45a0-803f-1be460d82348-image.png

                Somit sieht die Change Node dann so aus:

                de227c08-73fd-4b36-b3c9-3ff196c8f5db-image.png

                [
                   {
                       "id": "bb709554.04b598",
                       "type": "inject",
                       "z": "169f5b00.a13415",
                       "name": "",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"src\":\"shellyplus1-xxxxxxxxxxxxx\",\"dst\":\"ShellyPlus1/events\",\"method\":\"NotifyStatus\",\"params\":{\"ts\":1632490225.43,\"switch:0\":{\"id\":0,\"output\":true,\"source\":\"WS_in\"}}}",
                       "payloadType": "str",
                       "x": 610,
                       "y": 960,
                       "wires": [
                           [
                               "b10bf87d.eae1a8"
                           ]
                       ]
                   },
                   {
                       "id": "b10bf87d.eae1a8",
                       "type": "json",
                       "z": "169f5b00.a13415",
                       "name": "",
                       "property": "payload",
                       "action": "",
                       "pretty": false,
                       "x": 760,
                       "y": 960,
                       "wires": [
                           [
                               "5af68d9f.4c24b4",
                               "d702c4c8.ddc6f8"
                           ]
                       ]
                   },
                   {
                       "id": "5af68d9f.4c24b4",
                       "type": "debug",
                       "z": "169f5b00.a13415",
                       "name": "",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "false",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 940,
                       "y": 920,
                       "wires": []
                   },
                   {
                       "id": "4d5422a9.651b0c",
                       "type": "debug",
                       "z": "169f5b00.a13415",
                       "name": "",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "false",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 1150,
                       "y": 960,
                       "wires": []
                   },
                   {
                       "id": "d702c4c8.ddc6f8",
                       "type": "change",
                       "z": "169f5b00.a13415",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "payload.params[\"switch:0\"].output",
                               "tot": "msg"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 950,
                       "y": 960,
                       "wires": [
                           [
                               "4d5422a9.651b0c"
                           ]
                       ]
                   }
                ]
                

                66er6 Offline
                66er6 Offline
                66er
                wrote on last edited by
                #7

                @mickym sagte in Payload String zerlegen:

                Finale Rückmeldung: Funzt 1A :+1: :+1: :+1:

                Vielen Dank nochmals.

                LG
                Stefan

                1 Reply Last reply
                0
                • mickymM mickym

                  @66er sagte in Payload String zerlegen:

                  {"src":"shellyplus1-xxxxxxxxxxxxx","dst":"ShellyPlus1/events","method":"NotifyStatus","params":{"ts":1632490225.43,"switch:0":{"id":0,"output":true,"source":"WS_in"}}}

                  Ja das war mit den Doppelpunkten in der Tat etwas tricky. Aber NodeRed bietet im Debug-Fenster eine ganz tolle Hilfe

                  Wenn Du mit der Maus über den Wert der Dich interessiert fährst, kannst Du den Pfad innerhalb des Objektes kopieren:

                  7dc81b02-6a4e-45a0-803f-1be460d82348-image.png

                  Somit sieht die Change Node dann so aus:

                  de227c08-73fd-4b36-b3c9-3ff196c8f5db-image.png

                  [
                     {
                         "id": "bb709554.04b598",
                         "type": "inject",
                         "z": "169f5b00.a13415",
                         "name": "",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"src\":\"shellyplus1-xxxxxxxxxxxxx\",\"dst\":\"ShellyPlus1/events\",\"method\":\"NotifyStatus\",\"params\":{\"ts\":1632490225.43,\"switch:0\":{\"id\":0,\"output\":true,\"source\":\"WS_in\"}}}",
                         "payloadType": "str",
                         "x": 610,
                         "y": 960,
                         "wires": [
                             [
                                 "b10bf87d.eae1a8"
                             ]
                         ]
                     },
                     {
                         "id": "b10bf87d.eae1a8",
                         "type": "json",
                         "z": "169f5b00.a13415",
                         "name": "",
                         "property": "payload",
                         "action": "",
                         "pretty": false,
                         "x": 760,
                         "y": 960,
                         "wires": [
                             [
                                 "5af68d9f.4c24b4",
                                 "d702c4c8.ddc6f8"
                             ]
                         ]
                     },
                     {
                         "id": "5af68d9f.4c24b4",
                         "type": "debug",
                         "z": "169f5b00.a13415",
                         "name": "",
                         "active": true,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "false",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 940,
                         "y": 920,
                         "wires": []
                     },
                     {
                         "id": "4d5422a9.651b0c",
                         "type": "debug",
                         "z": "169f5b00.a13415",
                         "name": "",
                         "active": true,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "false",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1150,
                         "y": 960,
                         "wires": []
                     },
                     {
                         "id": "d702c4c8.ddc6f8",
                         "type": "change",
                         "z": "169f5b00.a13415",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload.params[\"switch:0\"].output",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 950,
                         "y": 960,
                         "wires": [
                             [
                                 "4d5422a9.651b0c"
                             ]
                         ]
                     }
                  ]
                  

                  66er6 Offline
                  66er6 Offline
                  66er
                  wrote on last edited by 66er
                  #8

                  @mickym

                  Hallo und schönen Sonntag.

                  Nochmals Danke für Deine bisherige Unterstützung.

                  Das Gelernte konnte ich inzwischen auf weitere Gerätetypen umsetzen. Soweit so gut. :+1:

                  Doch nun scheitere ich an einem Gerät mit 4 Kanälen, der JSON ist entsprechend umfangreicher:

                  {"ble":{},"cloud":{"connected":false},"eth":{"ip":null},"input:0":{"id":0,"state":false},"input:1":{"id":1,"state":false},"input:2":{"id":2,"state":false},"input:3":{"id":3,"state":false},"mqtt":{"connected":true},"switch:0":{"id": 0, "source": "UI", "output": false, "apower": 0.000, "voltage": 237.237,"aenergy": {"total":0.021,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241652},"temperature":{"tC":null, "tF":null}},"switch:1":{"id": 1, "source": "init", "output": false, "apower": 0.000, "voltage": 237.292,"aenergy": {"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241652},"temperature":{"tC":null, "tF":null}},"switch:2":{"id": 2, "source": "init", "output": false, "apower": 0.000, "voltage": 238.268,"aenergy": {"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241652},"temperature":{"tC":null, "tF":null}},"switch:3":{"id": 3, "source": "init", "output": false, "apower": 0.000, "voltage": 238.230,"aenergy": {"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241651},"temperature":{"tC":null, "tF":null}},"sys":{"mac":"95CCA87E43AC","restart_required":false,"time":"08:14","unixtime":1633241653,"uptime":741,"ram_size":236340,"ram_free":147172,"fs_size":474641,"fs_free":317515,"available_updates":{"beta":{"version":"0.9.0-beta1"}}},"wifi":{"sta_ip":"192.168.1.182","status":"got ip","ssid":"IoT","rssi":-58}}
                  

                  Wie bekomme ich da die 4 Werte "output" sauber raus? Obwohl ich nach Deiner Vorlage auch hier vorgegangen bin, kommen am Debug-Node auch Meldungen der anderen Kanäle raus.

                  Bin für Deine Unterstützung sehr dankbar.

                  Edit:
                  So sieht mein aktuelles Ergebnis aus:

                  Bildschirmfoto vom 2021-10-03 11-01-06.png

                  Auch die von Dir gezeigte Pfadübernahme aus dem DEBUG bringt mir leider nicht das gewünschte Ergebnis.

                  LG
                  Stefan

                  66er6 1 Reply Last reply
                  0
                  • 66er6 66er

                    @mickym

                    Hallo und schönen Sonntag.

                    Nochmals Danke für Deine bisherige Unterstützung.

                    Das Gelernte konnte ich inzwischen auf weitere Gerätetypen umsetzen. Soweit so gut. :+1:

                    Doch nun scheitere ich an einem Gerät mit 4 Kanälen, der JSON ist entsprechend umfangreicher:

                    {"ble":{},"cloud":{"connected":false},"eth":{"ip":null},"input:0":{"id":0,"state":false},"input:1":{"id":1,"state":false},"input:2":{"id":2,"state":false},"input:3":{"id":3,"state":false},"mqtt":{"connected":true},"switch:0":{"id": 0, "source": "UI", "output": false, "apower": 0.000, "voltage": 237.237,"aenergy": {"total":0.021,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241652},"temperature":{"tC":null, "tF":null}},"switch:1":{"id": 1, "source": "init", "output": false, "apower": 0.000, "voltage": 237.292,"aenergy": {"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241652},"temperature":{"tC":null, "tF":null}},"switch:2":{"id": 2, "source": "init", "output": false, "apower": 0.000, "voltage": 238.268,"aenergy": {"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241652},"temperature":{"tC":null, "tF":null}},"switch:3":{"id": 3, "source": "init", "output": false, "apower": 0.000, "voltage": 238.230,"aenergy": {"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1633241651},"temperature":{"tC":null, "tF":null}},"sys":{"mac":"95CCA87E43AC","restart_required":false,"time":"08:14","unixtime":1633241653,"uptime":741,"ram_size":236340,"ram_free":147172,"fs_size":474641,"fs_free":317515,"available_updates":{"beta":{"version":"0.9.0-beta1"}}},"wifi":{"sta_ip":"192.168.1.182","status":"got ip","ssid":"IoT","rssi":-58}}
                    

                    Wie bekomme ich da die 4 Werte "output" sauber raus? Obwohl ich nach Deiner Vorlage auch hier vorgegangen bin, kommen am Debug-Node auch Meldungen der anderen Kanäle raus.

                    Bin für Deine Unterstützung sehr dankbar.

                    Edit:
                    So sieht mein aktuelles Ergebnis aus:

                    Bildschirmfoto vom 2021-10-03 11-01-06.png

                    Auch die von Dir gezeigte Pfadübernahme aus dem DEBUG bringt mir leider nicht das gewünschte Ergebnis.

                    66er6 Offline
                    66er6 Offline
                    66er
                    wrote on last edited by
                    #9

                    Gefühlt 1000 Versuche später:

                    Geschafft und erledigt. :+1:
                    (Freu' mich, denn am Besten bleibt es haften, wenn man selbst drauf gekommen ist. ;-) )

                    Die einzelnen Kanäle habe ich nun mittels eines "Switch" mit 4 Bedingungen gefiltert. Der restliche Ablauf funktioniert dann unverändert. :blush:

                    LG
                    Stefan

                    mickymM 1 Reply Last reply
                    0
                    • 66er6 66er

                      Gefühlt 1000 Versuche später:

                      Geschafft und erledigt. :+1:
                      (Freu' mich, denn am Besten bleibt es haften, wenn man selbst drauf gekommen ist. ;-) )

                      Die einzelnen Kanäle habe ich nun mittels eines "Switch" mit 4 Bedingungen gefiltert. Der restliche Ablauf funktioniert dann unverändert. :blush:

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

                      @66er Ehrlich gesagt verstehe ich das Problem nicht. Man kann auch diese Werte ganz normal über den Pfad selektieren (Pfad kopieren):

                      a61217ba-03cf-4891-99c1-8b2c3eff1459-image.png

                      [
                         {
                             "id": "f86a9994.9674a8",
                             "type": "inject",
                             "z": "169f5b00.a13415",
                             "name": "",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"ble\":{},\"cloud\":{\"connected\":false},\"eth\":{\"ip\":null},\"input:0\":{\"id\":0,\"state\":false},\"input:1\":{\"id\":1,\"state\":false},\"input:2\":{\"id\":2,\"state\":false},\"input:3\":{\"id\":3,\"state\":false},\"mqtt\":{\"connected\":true},\"switch:0\":{\"id\": 0, \"source\": \"UI\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.237,\"aenergy\": {\"total\":0.021,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:1\":{\"id\": 1, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.292,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:2\":{\"id\": 2, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.268,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:3\":{\"id\": 3, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.230,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241651},\"temperature\":{\"tC\":null, \"tF\":null}},\"sys\":{\"mac\":\"95CCA87E43AC\",\"restart_required\":false,\"time\":\"08:14\",\"unixtime\":1633241653,\"uptime\":741,\"ram_size\":236340,\"ram_free\":147172,\"fs_size\":474641,\"fs_free\":317515,\"available_updates\":{\"beta\":{\"version\":\"0.9.0-beta1\"}}},\"wifi\":{\"sta_ip\":\"192.168.1.182\",\"status\":\"got ip\",\"ssid\":\"IoT\",\"rssi\":-58}}",
                             "payloadType": "str",
                             "x": 270,
                             "y": 1280,
                             "wires": [
                                 [
                                     "6cd75bd9.78f334"
                                 ]
                             ]
                         },
                         {
                             "id": "6cd75bd9.78f334",
                             "type": "json",
                             "z": "169f5b00.a13415",
                             "name": "",
                             "property": "payload",
                             "action": "",
                             "pretty": false,
                             "x": 440,
                             "y": 1280,
                             "wires": [
                                 [
                                     "d59ab49f.83adb8",
                                     "e409ee82.60264",
                                     "7e3fb303.82128c",
                                     "efc2f40c.3bb7f8",
                                     "b65c559e.7ae848"
                                 ]
                             ]
                         },
                         {
                             "id": "efc2f40c.3bb7f8",
                             "type": "change",
                             "z": "169f5b00.a13415",
                             "name": "switch3",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "payload[\"switch:3\"].output",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 640,
                             "y": 1340,
                             "wires": [
                                 [
                                     "1011a999.7fcb76"
                                 ]
                             ]
                         },
                         {
                             "id": "7e3fb303.82128c",
                             "type": "change",
                             "z": "169f5b00.a13415",
                             "name": "switch2",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "payload[\"switch:2\"].output",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 640,
                             "y": 1300,
                             "wires": [
                                 [
                                     "4d31248e.23a35c"
                                 ]
                             ]
                         },
                         {
                             "id": "e409ee82.60264",
                             "type": "change",
                             "z": "169f5b00.a13415",
                             "name": "switch1",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "payload[\"switch:1\"].output",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 640,
                             "y": 1260,
                             "wires": [
                                 [
                                     "91670dba.155fc"
                                 ]
                             ]
                         },
                         {
                             "id": "d59ab49f.83adb8",
                             "type": "change",
                             "z": "169f5b00.a13415",
                             "name": "switch0",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "payload[\"switch:0\"].output",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 640,
                             "y": 1220,
                             "wires": [
                                 [
                                     "5c94d229.fcf79c"
                                 ]
                             ]
                         },
                         {
                             "id": "b65c559e.7ae848",
                             "type": "debug",
                             "z": "169f5b00.a13415",
                             "name": "",
                             "active": true,
                             "tosidebar": true,
                             "console": false,
                             "tostatus": false,
                             "complete": "true",
                             "targetType": "full",
                             "statusVal": "",
                             "statusType": "auto",
                             "x": 420,
                             "y": 1360,
                             "wires": []
                         },
                         {
                             "id": "5c94d229.fcf79c",
                             "type": "debug",
                             "z": "169f5b00.a13415",
                             "name": "switch0",
                             "active": true,
                             "tosidebar": true,
                             "console": false,
                             "tostatus": false,
                             "complete": "payload",
                             "targetType": "msg",
                             "statusVal": "",
                             "statusType": "auto",
                             "x": 820,
                             "y": 1220,
                             "wires": []
                         },
                         {
                             "id": "91670dba.155fc",
                             "type": "debug",
                             "z": "169f5b00.a13415",
                             "name": "switch1",
                             "active": true,
                             "tosidebar": true,
                             "console": false,
                             "tostatus": false,
                             "complete": "payload",
                             "targetType": "msg",
                             "statusVal": "",
                             "statusType": "auto",
                             "x": 820,
                             "y": 1260,
                             "wires": []
                         },
                         {
                             "id": "4d31248e.23a35c",
                             "type": "debug",
                             "z": "169f5b00.a13415",
                             "name": "switch2",
                             "active": true,
                             "tosidebar": true,
                             "console": false,
                             "tostatus": false,
                             "complete": "payload",
                             "targetType": "msg",
                             "statusVal": "",
                             "statusType": "auto",
                             "x": 820,
                             "y": 1300,
                             "wires": []
                         },
                         {
                             "id": "1011a999.7fcb76",
                             "type": "debug",
                             "z": "169f5b00.a13415",
                             "name": "switch3",
                             "active": true,
                             "tosidebar": true,
                             "console": false,
                             "tostatus": false,
                             "complete": "payload",
                             "targetType": "msg",
                             "statusVal": "",
                             "statusType": "auto",
                             "x": 820,
                             "y": 1340,
                             "wires": []
                         }
                      ]
                      

                      Verstehe nicht warum man da irgendwas filtern muss - klappt ganz normal:

                      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.

                      66er6 1 Reply Last reply
                      0
                      • mickymM mickym

                        @66er Ehrlich gesagt verstehe ich das Problem nicht. Man kann auch diese Werte ganz normal über den Pfad selektieren (Pfad kopieren):

                        a61217ba-03cf-4891-99c1-8b2c3eff1459-image.png

                        [
                           {
                               "id": "f86a9994.9674a8",
                               "type": "inject",
                               "z": "169f5b00.a13415",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "{\"ble\":{},\"cloud\":{\"connected\":false},\"eth\":{\"ip\":null},\"input:0\":{\"id\":0,\"state\":false},\"input:1\":{\"id\":1,\"state\":false},\"input:2\":{\"id\":2,\"state\":false},\"input:3\":{\"id\":3,\"state\":false},\"mqtt\":{\"connected\":true},\"switch:0\":{\"id\": 0, \"source\": \"UI\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.237,\"aenergy\": {\"total\":0.021,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:1\":{\"id\": 1, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.292,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:2\":{\"id\": 2, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.268,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:3\":{\"id\": 3, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.230,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241651},\"temperature\":{\"tC\":null, \"tF\":null}},\"sys\":{\"mac\":\"95CCA87E43AC\",\"restart_required\":false,\"time\":\"08:14\",\"unixtime\":1633241653,\"uptime\":741,\"ram_size\":236340,\"ram_free\":147172,\"fs_size\":474641,\"fs_free\":317515,\"available_updates\":{\"beta\":{\"version\":\"0.9.0-beta1\"}}},\"wifi\":{\"sta_ip\":\"192.168.1.182\",\"status\":\"got ip\",\"ssid\":\"IoT\",\"rssi\":-58}}",
                               "payloadType": "str",
                               "x": 270,
                               "y": 1280,
                               "wires": [
                                   [
                                       "6cd75bd9.78f334"
                                   ]
                               ]
                           },
                           {
                               "id": "6cd75bd9.78f334",
                               "type": "json",
                               "z": "169f5b00.a13415",
                               "name": "",
                               "property": "payload",
                               "action": "",
                               "pretty": false,
                               "x": 440,
                               "y": 1280,
                               "wires": [
                                   [
                                       "d59ab49f.83adb8",
                                       "e409ee82.60264",
                                       "7e3fb303.82128c",
                                       "efc2f40c.3bb7f8",
                                       "b65c559e.7ae848"
                                   ]
                               ]
                           },
                           {
                               "id": "efc2f40c.3bb7f8",
                               "type": "change",
                               "z": "169f5b00.a13415",
                               "name": "switch3",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload[\"switch:3\"].output",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 640,
                               "y": 1340,
                               "wires": [
                                   [
                                       "1011a999.7fcb76"
                                   ]
                               ]
                           },
                           {
                               "id": "7e3fb303.82128c",
                               "type": "change",
                               "z": "169f5b00.a13415",
                               "name": "switch2",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload[\"switch:2\"].output",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 640,
                               "y": 1300,
                               "wires": [
                                   [
                                       "4d31248e.23a35c"
                                   ]
                               ]
                           },
                           {
                               "id": "e409ee82.60264",
                               "type": "change",
                               "z": "169f5b00.a13415",
                               "name": "switch1",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload[\"switch:1\"].output",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 640,
                               "y": 1260,
                               "wires": [
                                   [
                                       "91670dba.155fc"
                                   ]
                               ]
                           },
                           {
                               "id": "d59ab49f.83adb8",
                               "type": "change",
                               "z": "169f5b00.a13415",
                               "name": "switch0",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload[\"switch:0\"].output",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 640,
                               "y": 1220,
                               "wires": [
                                   [
                                       "5c94d229.fcf79c"
                                   ]
                               ]
                           },
                           {
                               "id": "b65c559e.7ae848",
                               "type": "debug",
                               "z": "169f5b00.a13415",
                               "name": "",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "true",
                               "targetType": "full",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 420,
                               "y": 1360,
                               "wires": []
                           },
                           {
                               "id": "5c94d229.fcf79c",
                               "type": "debug",
                               "z": "169f5b00.a13415",
                               "name": "switch0",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 820,
                               "y": 1220,
                               "wires": []
                           },
                           {
                               "id": "91670dba.155fc",
                               "type": "debug",
                               "z": "169f5b00.a13415",
                               "name": "switch1",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 820,
                               "y": 1260,
                               "wires": []
                           },
                           {
                               "id": "4d31248e.23a35c",
                               "type": "debug",
                               "z": "169f5b00.a13415",
                               "name": "switch2",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 820,
                               "y": 1300,
                               "wires": []
                           },
                           {
                               "id": "1011a999.7fcb76",
                               "type": "debug",
                               "z": "169f5b00.a13415",
                               "name": "switch3",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 820,
                               "y": 1340,
                               "wires": []
                           }
                        ]
                        

                        Verstehe nicht warum man da irgendwas filtern muss - klappt ganz normal:

                        66er6 Offline
                        66er6 Offline
                        66er
                        wrote on last edited by 66er
                        #11

                        @mickym

                        Danke für's Feedback.

                        Vielleicht hatte sich auch bei mir ein Fehler eingeschlichen!?

                        Stehe ja erst am Anfang mit MQTT und NodeRed.

                        Da heißt es schon mal hinfallen, aufstehen und weitermachen.

                        Danke nochmal. :+1:

                        (PS: Werde es nochmal gegenchecken. Sollte dann ja auch bei mir laufen.)

                        LG
                        Stefan

                        mickymM 1 Reply Last reply
                        0
                        • 66er6 66er

                          @mickym

                          Danke für's Feedback.

                          Vielleicht hatte sich auch bei mir ein Fehler eingeschlichen!?

                          Stehe ja erst am Anfang mit MQTT und NodeRed.

                          Da heißt es schon mal hinfallen, aufstehen und weitermachen.

                          Danke nochmal. :+1:

                          (PS: Werde es nochmal gegenchecken. Sollte dann ja auch bei mir laufen.)

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

                          @66er Du kannst auch jedes Switch Objekt nur auf die Objektebene herauslösen und dann die Eigenschaften eines Switches in einem 2. Schritt bearbeiten. Deiner Fantasie sind keine Grenzen gesetzt:

                          f54354a0-c8fb-41f2-8e38-7508b181b48b-image.png

                          [
                             {
                                 "id": "f86a9994.9674a8",
                                 "type": "inject",
                                 "z": "169f5b00.a13415",
                                 "name": "",
                                 "props": [
                                     {
                                         "p": "payload"
                                     }
                                 ],
                                 "repeat": "",
                                 "crontab": "",
                                 "once": false,
                                 "onceDelay": 0.1,
                                 "topic": "",
                                 "payload": "{\"ble\":{},\"cloud\":{\"connected\":false},\"eth\":{\"ip\":null},\"input:0\":{\"id\":0,\"state\":false},\"input:1\":{\"id\":1,\"state\":false},\"input:2\":{\"id\":2,\"state\":false},\"input:3\":{\"id\":3,\"state\":false},\"mqtt\":{\"connected\":true},\"switch:0\":{\"id\": 0, \"source\": \"UI\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.237,\"aenergy\": {\"total\":0.021,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:1\":{\"id\": 1, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.292,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:2\":{\"id\": 2, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.268,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:3\":{\"id\": 3, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.230,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241651},\"temperature\":{\"tC\":null, \"tF\":null}},\"sys\":{\"mac\":\"95CCA87E43AC\",\"restart_required\":false,\"time\":\"08:14\",\"unixtime\":1633241653,\"uptime\":741,\"ram_size\":236340,\"ram_free\":147172,\"fs_size\":474641,\"fs_free\":317515,\"available_updates\":{\"beta\":{\"version\":\"0.9.0-beta1\"}}},\"wifi\":{\"sta_ip\":\"192.168.1.182\",\"status\":\"got ip\",\"ssid\":\"IoT\",\"rssi\":-58}}",
                                 "payloadType": "str",
                                 "x": 330,
                                 "y": 1320,
                                 "wires": [
                                     [
                                         "6cd75bd9.78f334"
                                     ]
                                 ]
                             },
                             {
                                 "id": "6cd75bd9.78f334",
                                 "type": "json",
                                 "z": "169f5b00.a13415",
                                 "name": "",
                                 "property": "payload",
                                 "action": "",
                                 "pretty": false,
                                 "x": 500,
                                 "y": 1320,
                                 "wires": [
                                     [
                                         "d59ab49f.83adb8",
                                         "e409ee82.60264",
                                         "7e3fb303.82128c",
                                         "efc2f40c.3bb7f8",
                                         "b65c559e.7ae848"
                                     ]
                                 ]
                             },
                             {
                                 "id": "efc2f40c.3bb7f8",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "switch3",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload[\"switch:3\"]",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 700,
                                 "y": 1480,
                                 "wires": [
                                     [
                                         "666be515.af213c",
                                         "9b305a05.dd89e8"
                                     ]
                                 ]
                             },
                             {
                                 "id": "7e3fb303.82128c",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "switch2",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload[\"switch:2\"]",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 700,
                                 "y": 1400,
                                 "wires": [
                                     [
                                         "1306fb28.2e72e5",
                                         "ffe7aeed.e875e"
                                     ]
                                 ]
                             },
                             {
                                 "id": "e409ee82.60264",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "switch1",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload[\"switch:1\"]",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 700,
                                 "y": 1320,
                                 "wires": [
                                     [
                                         "1ab33829.4b2438",
                                         "9a153f8f.51f3a"
                                     ]
                                 ]
                             },
                             {
                                 "id": "d59ab49f.83adb8",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "switch0",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload[\"switch:0\"]",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 700,
                                 "y": 1240,
                                 "wires": [
                                     [
                                         "10fa2b5a.1d3fd5",
                                         "d9d71e77.faca5"
                                     ]
                                 ]
                             },
                             {
                                 "id": "b65c559e.7ae848",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "true",
                                 "targetType": "full",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 480,
                                 "y": 1400,
                                 "wires": []
                             },
                             {
                                 "id": "10fa2b5a.1d3fd5",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "output",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.output",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1220,
                                 "wires": [
                                     [
                                         "21f577ba.3b76c8"
                                     ]
                                 ]
                             },
                             {
                                 "id": "d9d71e77.faca5",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "energy",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.aenergy.total",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1260,
                                 "wires": [
                                     [
                                         "f8d0d07f.86fff"
                                     ]
                                 ]
                             },
                             {
                                 "id": "1ab33829.4b2438",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "output",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.output",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1300,
                                 "wires": [
                                     [
                                         "d763e07f.5c467"
                                     ]
                                 ]
                             },
                             {
                                 "id": "9a153f8f.51f3a",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "energy",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.aenergy.total",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1340,
                                 "wires": [
                                     [
                                         "ae57bd4a.003a3"
                                     ]
                                 ]
                             },
                             {
                                 "id": "1306fb28.2e72e5",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "output",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.output",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1380,
                                 "wires": [
                                     [
                                         "63096a35.170df4"
                                     ]
                                 ]
                             },
                             {
                                 "id": "ffe7aeed.e875e",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "energy",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.aenergy.total",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1420,
                                 "wires": [
                                     [
                                         "678ced56.3d2c44"
                                     ]
                                 ]
                             },
                             {
                                 "id": "666be515.af213c",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "output",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.output",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1460,
                                 "wires": [
                                     [
                                         "85150103.9bf37"
                                     ]
                                 ]
                             },
                             {
                                 "id": "9b305a05.dd89e8",
                                 "type": "change",
                                 "z": "169f5b00.a13415",
                                 "name": "energy",
                                 "rules": [
                                     {
                                         "t": "set",
                                         "p": "payload",
                                         "pt": "msg",
                                         "to": "payload.aenergy.total",
                                         "tot": "msg"
                                     }
                                 ],
                                 "action": "",
                                 "property": "",
                                 "from": "",
                                 "to": "",
                                 "reg": false,
                                 "x": 890,
                                 "y": 1500,
                                 "wires": [
                                     [
                                         "5dfb6b7f.67f114"
                                     ]
                                 ]
                             },
                             {
                                 "id": "21f577ba.3b76c8",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 0 output",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1220,
                                 "wires": []
                             },
                             {
                                 "id": "f8d0d07f.86fff",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 0 energy",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1260,
                                 "wires": []
                             },
                             {
                                 "id": "d763e07f.5c467",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 1 output",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1300,
                                 "wires": []
                             },
                             {
                                 "id": "ae57bd4a.003a3",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 1 energy",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1340,
                                 "wires": []
                             },
                             {
                                 "id": "63096a35.170df4",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 2 output",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1380,
                                 "wires": []
                             },
                             {
                                 "id": "678ced56.3d2c44",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 2 energy",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1420,
                                 "wires": []
                             },
                             {
                                 "id": "85150103.9bf37",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 3 output",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1460,
                                 "wires": []
                             },
                             {
                                 "id": "5dfb6b7f.67f114",
                                 "type": "debug",
                                 "z": "169f5b00.a13415",
                                 "name": "switch 3 energy",
                                 "active": true,
                                 "tosidebar": true,
                                 "console": false,
                                 "tostatus": false,
                                 "complete": "payload",
                                 "targetType": "msg",
                                 "statusVal": "",
                                 "statusType": "auto",
                                 "x": 1080,
                                 "y": 1500,
                                 "wires": []
                             }
                          ]
                          

                          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.

                          66er6 1 Reply Last reply
                          0
                          • mickymM mickym

                            @66er Du kannst auch jedes Switch Objekt nur auf die Objektebene herauslösen und dann die Eigenschaften eines Switches in einem 2. Schritt bearbeiten. Deiner Fantasie sind keine Grenzen gesetzt:

                            f54354a0-c8fb-41f2-8e38-7508b181b48b-image.png

                            [
                               {
                                   "id": "f86a9994.9674a8",
                                   "type": "inject",
                                   "z": "169f5b00.a13415",
                                   "name": "",
                                   "props": [
                                       {
                                           "p": "payload"
                                       }
                                   ],
                                   "repeat": "",
                                   "crontab": "",
                                   "once": false,
                                   "onceDelay": 0.1,
                                   "topic": "",
                                   "payload": "{\"ble\":{},\"cloud\":{\"connected\":false},\"eth\":{\"ip\":null},\"input:0\":{\"id\":0,\"state\":false},\"input:1\":{\"id\":1,\"state\":false},\"input:2\":{\"id\":2,\"state\":false},\"input:3\":{\"id\":3,\"state\":false},\"mqtt\":{\"connected\":true},\"switch:0\":{\"id\": 0, \"source\": \"UI\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.237,\"aenergy\": {\"total\":0.021,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:1\":{\"id\": 1, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 237.292,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:2\":{\"id\": 2, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.268,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241652},\"temperature\":{\"tC\":null, \"tF\":null}},\"switch:3\":{\"id\": 3, \"source\": \"init\", \"output\": false, \"apower\": 0.000, \"voltage\": 238.230,\"aenergy\": {\"total\":0.000,\"by_minute\":[0.000,0.000,0.000],\"minute_ts\":1633241651},\"temperature\":{\"tC\":null, \"tF\":null}},\"sys\":{\"mac\":\"95CCA87E43AC\",\"restart_required\":false,\"time\":\"08:14\",\"unixtime\":1633241653,\"uptime\":741,\"ram_size\":236340,\"ram_free\":147172,\"fs_size\":474641,\"fs_free\":317515,\"available_updates\":{\"beta\":{\"version\":\"0.9.0-beta1\"}}},\"wifi\":{\"sta_ip\":\"192.168.1.182\",\"status\":\"got ip\",\"ssid\":\"IoT\",\"rssi\":-58}}",
                                   "payloadType": "str",
                                   "x": 330,
                                   "y": 1320,
                                   "wires": [
                                       [
                                           "6cd75bd9.78f334"
                                       ]
                                   ]
                               },
                               {
                                   "id": "6cd75bd9.78f334",
                                   "type": "json",
                                   "z": "169f5b00.a13415",
                                   "name": "",
                                   "property": "payload",
                                   "action": "",
                                   "pretty": false,
                                   "x": 500,
                                   "y": 1320,
                                   "wires": [
                                       [
                                           "d59ab49f.83adb8",
                                           "e409ee82.60264",
                                           "7e3fb303.82128c",
                                           "efc2f40c.3bb7f8",
                                           "b65c559e.7ae848"
                                       ]
                                   ]
                               },
                               {
                                   "id": "efc2f40c.3bb7f8",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "switch3",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload[\"switch:3\"]",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 700,
                                   "y": 1480,
                                   "wires": [
                                       [
                                           "666be515.af213c",
                                           "9b305a05.dd89e8"
                                       ]
                                   ]
                               },
                               {
                                   "id": "7e3fb303.82128c",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "switch2",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload[\"switch:2\"]",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 700,
                                   "y": 1400,
                                   "wires": [
                                       [
                                           "1306fb28.2e72e5",
                                           "ffe7aeed.e875e"
                                       ]
                                   ]
                               },
                               {
                                   "id": "e409ee82.60264",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "switch1",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload[\"switch:1\"]",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 700,
                                   "y": 1320,
                                   "wires": [
                                       [
                                           "1ab33829.4b2438",
                                           "9a153f8f.51f3a"
                                       ]
                                   ]
                               },
                               {
                                   "id": "d59ab49f.83adb8",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "switch0",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload[\"switch:0\"]",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 700,
                                   "y": 1240,
                                   "wires": [
                                       [
                                           "10fa2b5a.1d3fd5",
                                           "d9d71e77.faca5"
                                       ]
                                   ]
                               },
                               {
                                   "id": "b65c559e.7ae848",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "true",
                                   "targetType": "full",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 480,
                                   "y": 1400,
                                   "wires": []
                               },
                               {
                                   "id": "10fa2b5a.1d3fd5",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "output",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.output",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1220,
                                   "wires": [
                                       [
                                           "21f577ba.3b76c8"
                                       ]
                                   ]
                               },
                               {
                                   "id": "d9d71e77.faca5",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "energy",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.aenergy.total",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1260,
                                   "wires": [
                                       [
                                           "f8d0d07f.86fff"
                                       ]
                                   ]
                               },
                               {
                                   "id": "1ab33829.4b2438",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "output",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.output",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1300,
                                   "wires": [
                                       [
                                           "d763e07f.5c467"
                                       ]
                                   ]
                               },
                               {
                                   "id": "9a153f8f.51f3a",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "energy",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.aenergy.total",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1340,
                                   "wires": [
                                       [
                                           "ae57bd4a.003a3"
                                       ]
                                   ]
                               },
                               {
                                   "id": "1306fb28.2e72e5",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "output",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.output",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1380,
                                   "wires": [
                                       [
                                           "63096a35.170df4"
                                       ]
                                   ]
                               },
                               {
                                   "id": "ffe7aeed.e875e",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "energy",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.aenergy.total",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1420,
                                   "wires": [
                                       [
                                           "678ced56.3d2c44"
                                       ]
                                   ]
                               },
                               {
                                   "id": "666be515.af213c",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "output",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.output",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1460,
                                   "wires": [
                                       [
                                           "85150103.9bf37"
                                       ]
                                   ]
                               },
                               {
                                   "id": "9b305a05.dd89e8",
                                   "type": "change",
                                   "z": "169f5b00.a13415",
                                   "name": "energy",
                                   "rules": [
                                       {
                                           "t": "set",
                                           "p": "payload",
                                           "pt": "msg",
                                           "to": "payload.aenergy.total",
                                           "tot": "msg"
                                       }
                                   ],
                                   "action": "",
                                   "property": "",
                                   "from": "",
                                   "to": "",
                                   "reg": false,
                                   "x": 890,
                                   "y": 1500,
                                   "wires": [
                                       [
                                           "5dfb6b7f.67f114"
                                       ]
                                   ]
                               },
                               {
                                   "id": "21f577ba.3b76c8",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 0 output",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1220,
                                   "wires": []
                               },
                               {
                                   "id": "f8d0d07f.86fff",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 0 energy",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1260,
                                   "wires": []
                               },
                               {
                                   "id": "d763e07f.5c467",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 1 output",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1300,
                                   "wires": []
                               },
                               {
                                   "id": "ae57bd4a.003a3",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 1 energy",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1340,
                                   "wires": []
                               },
                               {
                                   "id": "63096a35.170df4",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 2 output",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1380,
                                   "wires": []
                               },
                               {
                                   "id": "678ced56.3d2c44",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 2 energy",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1420,
                                   "wires": []
                               },
                               {
                                   "id": "85150103.9bf37",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 3 output",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1460,
                                   "wires": []
                               },
                               {
                                   "id": "5dfb6b7f.67f114",
                                   "type": "debug",
                                   "z": "169f5b00.a13415",
                                   "name": "switch 3 energy",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1080,
                                   "y": 1500,
                                   "wires": []
                               }
                            ]
                            

                            66er6 Offline
                            66er6 Offline
                            66er
                            wrote on last edited by
                            #13

                            @mickym
                            Sieht ja fast aus, wie mein Ergebnis. :+1:

                            So bin ich zu Erfolg gekommen:
                            Bildschirmfoto vom 2021-10-03 14-18-14.png

                            LG
                            Stefan

                            mickymM 1 Reply Last reply
                            0
                            • 66er6 66er

                              @mickym
                              Sieht ja fast aus, wie mein Ergebnis. :+1:

                              So bin ich zu Erfolg gekommen:
                              Bildschirmfoto vom 2021-10-03 14-18-14.png

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

                              @66er Falls Du das nur in eigene DP wegschreiben willst, dann kannst Dir ja mal meinen Subflow anschauen:

                              https://forum.iobroker.net/topic/43856/json-string-oder-java-object-in-iobroker-struktur

                              Seit Admin 5 musst Du dann zwar noch etwas nacharbeiten, in dem Du mit einem Skript die fehlenden Objekte noch erzeugst. Aber falls Du ihn nutzen willst, bekommst Du so alles in DP zerlegt.

                              IN meinen Augen ist das zwar nicht sinnvoll, aber ich sehe ja, dass Du mit Deinem Flow nichts anderes machst.

                              Oder Du nimmst den mqtt-Adapter im iobroker - dann hast Du ebenfalls alles als einzelne Datenpunkte.

                              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.

                              66er6 1 Reply Last reply
                              0
                              • mickymM mickym

                                @66er Falls Du das nur in eigene DP wegschreiben willst, dann kannst Dir ja mal meinen Subflow anschauen:

                                https://forum.iobroker.net/topic/43856/json-string-oder-java-object-in-iobroker-struktur

                                Seit Admin 5 musst Du dann zwar noch etwas nacharbeiten, in dem Du mit einem Skript die fehlenden Objekte noch erzeugst. Aber falls Du ihn nutzen willst, bekommst Du so alles in DP zerlegt.

                                IN meinen Augen ist das zwar nicht sinnvoll, aber ich sehe ja, dass Du mit Deinem Flow nichts anderes machst.

                                Oder Du nimmst den mqtt-Adapter im iobroker - dann hast Du ebenfalls alles als einzelne Datenpunkte.

                                66er6 Offline
                                66er6 Offline
                                66er
                                wrote on last edited by 66er
                                #15

                                @mickym sagte in Payload String zerlegen:

                                ...

                                IN meinen Augen ist das zwar nicht sinnvoll, aber ich sehe ja, dass Du mit Deinem Flow nichts anderes machst.

                                Schau mir den anderen Link natürlich noch an.

                                Warum ist das nicht sinnvoll? (Ich lerne mich ja gerade erst ein und wenn ich hier was falsch mache, sollte ich verstehen warum.)

                                Versuchsweise schreibe ich die Werte da rein und visualisiere sie dann.

                                Leider geben die Geräte nur einen "Sammelstring" nach MQTT und keine einzelnen, direkt verwertbare Datenpunkte.

                                LG
                                Stefan

                                mickymM 1 Reply Last reply
                                0
                                • 66er6 66er

                                  @mickym sagte in Payload String zerlegen:

                                  ...

                                  IN meinen Augen ist das zwar nicht sinnvoll, aber ich sehe ja, dass Du mit Deinem Flow nichts anderes machst.

                                  Schau mir den anderen Link natürlich noch an.

                                  Warum ist das nicht sinnvoll? (Ich lerne mich ja gerade erst ein und wenn ich hier was falsch mache, sollte ich verstehen warum.)

                                  Versuchsweise schreibe ich die Werte da rein und visualisiere sie dann.

                                  Leider geben die Geräte nur einen "Sammelstring" nach MQTT und keine einzelnen, direkt verwertbare Datenpunkte.

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

                                  @66er OK zum Visualisieren hängt davon ab, was Du halt nutzt. Für VIS ja.

                                  Wenn Du das Node-Red Dashborad nutzt, dann fütterst Du ja den switch mit der payload und der Switch behält ja den Status.
                                  Aber Du hast Recht für VIS ist es sinnvoll.

                                  Ansonsten ist zwar schön alles in eigene Datenpunkte zu schreiben, aber gibt Dir ja keinen Mehrwert, weil die Info letztlich in dem JSON String enthalten ist. Wie gesagt für VIS ist es sinnvoll.

                                  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.

                                  66er6 1 Reply Last reply
                                  0
                                  • mickymM mickym

                                    @66er OK zum Visualisieren hängt davon ab, was Du halt nutzt. Für VIS ja.

                                    Wenn Du das Node-Red Dashborad nutzt, dann fütterst Du ja den switch mit der payload und der Switch behält ja den Status.
                                    Aber Du hast Recht für VIS ist es sinnvoll.

                                    Ansonsten ist zwar schön alles in eigene Datenpunkte zu schreiben, aber gibt Dir ja keinen Mehrwert, weil die Info letztlich in dem JSON String enthalten ist. Wie gesagt für VIS ist es sinnvoll.

                                    66er6 Offline
                                    66er6 Offline
                                    66er
                                    wrote on last edited by 66er
                                    #17

                                    @mickym

                                    Ja, ich nutze VIS.

                                    Hier noch ein Screenshot von MQTT:

                                    Bildschirmfoto vom 2021-10-03 16-27-21.png

                                    Im RPC-String unter events steht alles drin.

                                    LG
                                    Stefan

                                    mickymM 1 Reply Last reply
                                    0
                                    • 66er6 66er

                                      @mickym

                                      Ja, ich nutze VIS.

                                      Hier noch ein Screenshot von MQTT:

                                      Bildschirmfoto vom 2021-10-03 16-27-21.png

                                      Im RPC-String unter events steht alles drin.

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

                                      @66er Ja wie gesagt, wenn Du nur das wieder in DP speicherst, was Du visualisierst - passt das schon!!!

                                      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.

                                      66er6 1 Reply Last reply
                                      0
                                      • mickymM mickym

                                        @66er Ja wie gesagt, wenn Du nur das wieder in DP speicherst, was Du visualisierst - passt das schon!!!

                                        66er6 Offline
                                        66er6 Offline
                                        66er
                                        wrote on last edited by
                                        #19

                                        @mickym

                                        Prima,

                                        und ja: alle anderen Datenpunkt bleiben im JSON ohne das ich die anpacke.

                                        Danke, wieder mein Wissen und Verständnis für MQTT erweitert.:+1:

                                        LG
                                        Stefan

                                        R 1 Reply Last reply
                                        0
                                        • 66er6 66er

                                          @mickym

                                          Prima,

                                          und ja: alle anderen Datenpunkt bleiben im JSON ohne das ich die anpacke.

                                          Danke, wieder mein Wissen und Verständnis für MQTT erweitert.:+1:

                                          R Offline
                                          R Offline
                                          rieders
                                          wrote on last edited by rieders
                                          #20

                                          Hallo

                                          Ich versuche gerade mein Stromzähler String zu zerlegen.
                                          Eine Verbindung zum mqtt-Broker besteht, die Daten werden auch im Debug angezeigt.

                                          Ich habe schon einiges Versuch, ich bekomme einfach nicht die Werte einzeln angezeigt.

                                          Smartmeter_Garten/tele/SENSOR : msg.payload : string[643]
                                          "{"Time":"2023-01-13T12:54:35","SDM630":{"1":178,"Voltage_P1":231.88,"Voltage_P2":231.5,"Voltage_P3":232.49,"Current_P1":0,"Current_P2":0.1,"Current_P3":0,"Power_P1":0,"Power_P2":22.35,"Power_P3":0,"Frequenz":50.01,"Total":534.694,"phase_angle":-9.73,"Import_nres":186.145,"Export_nres":348.549,"Export_P1":13.568,"Export_P2":334.981,"Export_P3":0,"Import_P1":19.409,"Import_P2":131.003,"Import_P3":35.733,"L1_total_kwh":32.977,"L2_total_kwh":465.984,"L3_total_kwh":35.733,"Blindleistung_L1":0,"Blindleistung_L2":-7.734,"Blindleistung_L3":0,"Scheinleistung_L1":0,"Scheinleistung_L2":22.627,"Scheinleistung_L3":0,"VAh_since_last_reset":565.815}}"

                                          Screenshot 2023-01-13 130004.png

                                          Ich hoffe jemand kann mir weiter helfen.


                                          [
                                          {
                                          "id": "553525487db580b5",
                                          "type": "mqtt in",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "Smartmeter_Garten/tele/SENSOR",
                                          "topic": "Smartmeter_Garten/tele/SENSOR",
                                          "qos": "2",
                                          "datatype": "auto-detect",
                                          "broker": "e7e1e2255e66e588",
                                          "nl": false,
                                          "rap": true,
                                          "rh": "2",
                                          "inputs": 0,
                                          "x": 180,
                                          "y": 260,
                                          "wires": [
                                          [
                                          "04a7ba72539a5cb1",
                                          "df378652670347e0"
                                          ]
                                          ]
                                          },
                                          {
                                          "id": "b0fcb45d6d8ab9f4",
                                          "type": "ui_gauge",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "Test",
                                          "group": "67140eec2a9994a9",
                                          "order": 0,
                                          "width": 0,
                                          "height": 0,
                                          "gtype": "gage",
                                          "title": "Voltage_P1",
                                          "label": "",
                                          "format": "{{Value}}",
                                          "min": "1",
                                          "max": "260",
                                          "colors": [
                                          "#b30000",
                                          "#e6e600",
                                          "#00b815"
                                          ],
                                          "seg1": "",
                                          "seg2": "",
                                          "x": 890,
                                          "y": 260,
                                          "wires": []
                                          },
                                          {
                                          "id": "9faaac80e56b9d83",
                                          "type": "ui_chart",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "",
                                          "group": "67140eec2a9994a9",
                                          "order": 0,
                                          "width": 0,
                                          "height": 0,
                                          "label": "chart",
                                          "chartType": "line",
                                          "legend": "false",
                                          "xformat": "HH:mm:ss",
                                          "interpolate": "linear",
                                          "nodata": "",
                                          "dot": false,
                                          "ymin": "0",
                                          "ymax": "260",
                                          "removeOlder": 1,
                                          "removeOlderPoints": "",
                                          "removeOlderUnit": "3600",
                                          "cutout": 0,
                                          "useOneColor": false,
                                          "useUTC": false,
                                          "colors": [
                                          "#1f77b4",
                                          "#aec7e8",
                                          "#ff7f0e",
                                          "#2ca02c",
                                          "#98df8a",
                                          "#d62728",
                                          "#ff9896",
                                          "#9467bd",
                                          "#c5b0d5"
                                          ],
                                          "outputs": 1,
                                          "useDifferentColor": false,
                                          "x": 890,
                                          "y": 320,
                                          "wires": [
                                          []
                                          ]
                                          },
                                          {
                                          "id": "04a7ba72539a5cb1",
                                          "type": "json",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "V1",
                                          "property": "payload",
                                          "action": "",
                                          "pretty": false,
                                          "x": 450,
                                          "y": 200,
                                          "wires": [
                                          [
                                          "35354018b6c6c095",
                                          "639599639f78788c"
                                          ]
                                          ]
                                          },
                                          {
                                          "id": "6f72cb37f4aa2278",
                                          "type": "debug",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "debug 1",
                                          "active": true,
                                          "tosidebar": true,
                                          "console": false,
                                          "tostatus": false,
                                          "complete": "payload",
                                          "targetType": "msg",
                                          "statusVal": "",
                                          "statusType": "auto",
                                          "x": 900,
                                          "y": 200,
                                          "wires": []
                                          },
                                          {
                                          "id": "35354018b6c6c095",
                                          "type": "debug",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "debug 2",
                                          "active": true,
                                          "tosidebar": true,
                                          "console": false,
                                          "tostatus": false,
                                          "complete": "payload",
                                          "targetType": "msg",
                                          "statusVal": "",
                                          "statusType": "auto",
                                          "x": 620,
                                          "y": 120,
                                          "wires": []
                                          },
                                          {
                                          "id": "639599639f78788c",
                                          "type": "change",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "",
                                          "rules": [
                                          {
                                          "t": "set",
                                          "p": "payload",
                                          "pt": "msg",
                                          "to": "payload["SDM630"].Voltage_P1",
                                          "tot": "msg"
                                          }
                                          ],
                                          "action": "",
                                          "property": "",
                                          "from": "",
                                          "to": "",
                                          "reg": false,
                                          "x": 670,
                                          "y": 200,
                                          "wires": [
                                          [
                                          "6f72cb37f4aa2278",
                                          "b0fcb45d6d8ab9f4",
                                          "9faaac80e56b9d83"
                                          ]
                                          ]
                                          },
                                          {
                                          "id": "a5192d83b6ce2f1c",
                                          "type": "mqtt out",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "V1",
                                          "topic": "Testzähler",
                                          "qos": "",
                                          "retain": "",
                                          "respTopic": "",
                                          "contentType": "",
                                          "userProps": "",
                                          "correl": "",
                                          "expiry": "",
                                          "broker": "d19896c9b4e98e28",
                                          "x": 750,
                                          "y": 340,
                                          "wires": []
                                          },
                                          {
                                          "id": "df378652670347e0",
                                          "type": "function",
                                          "z": "eb71b4cddc9da37a",
                                          "name": "function 2",
                                          "func": "\nreturn msg;payload["SDM630"].Voltage_P1",
                                          "outputs": 1,
                                          "noerr": 0,
                                          "initialize": "",
                                          "finalize": "",
                                          "libs": [],
                                          "x": 560,
                                          "y": 340,
                                          "wires": [
                                          [
                                          "a5192d83b6ce2f1c"
                                          ]
                                          ]
                                          },
                                          {
                                          "id": "e7e1e2255e66e588",
                                          "type": "mqtt-broker",
                                          "name": "mqtt-broker",
                                          "broker": "192.168.1.146",
                                          "port": "1885",
                                          "clientid": "",
                                          "autoConnect": true,
                                          "usetls": false,
                                          "protocolVersion": "4",
                                          "keepalive": "60",
                                          "cleansession": true,
                                          "birthTopic": "",
                                          "birthQos": "0",
                                          "birthPayload": "",
                                          "birthMsg": {},
                                          "closeTopic": "",
                                          "closeQos": "0",
                                          "closePayload": "",
                                          "closeMsg": {},
                                          "willTopic": "",
                                          "willQos": "0",
                                          "willPayload": "",
                                          "willMsg": {},
                                          "userProps": "",
                                          "sessionExpiry": ""
                                          },
                                          {
                                          "id": "67140eec2a9994a9",
                                          "type": "ui_group",
                                          "name": "Test",
                                          "tab": "71f6d060a354b8d9",
                                          "order": 1,
                                          "disp": true,
                                          "width": "6",
                                          "collapse": false
                                          },
                                          {
                                          "id": "d19896c9b4e98e28",
                                          "type": "mqtt-broker",
                                          "name": "Venus OS",
                                          "broker": "192.168.1.37",
                                          "port": "1883",
                                          "clientid": "test-client",
                                          "autoConnect": true,
                                          "usetls": false,
                                          "protocolVersion": "4",
                                          "keepalive": "60",
                                          "cleansession": true,
                                          "birthTopic": "",
                                          "birthQos": "0",
                                          "birthPayload": "",
                                          "birthMsg": {},
                                          "closeTopic": "",
                                          "closeQos": "0",
                                          "closePayload": "",
                                          "closeMsg": {},
                                          "willTopic": "",
                                          "willQos": "0",
                                          "willPayload": "",
                                          "willMsg": {},
                                          "userProps": "",
                                          "sessionExpiry": ""
                                          },
                                          {
                                          "id": "71f6d060a354b8d9",
                                          "type": "ui_tab",
                                          "name": "Home",
                                          "icon": "dashboard",
                                          "disabled": false,
                                          "hidden": false
                                          }
                                          ]

                                          Grüße André

                                          mickymM 1 2 Replies 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

                                          608

                                          Online

                                          32.6k

                                          Users

                                          82.2k

                                          Topics

                                          1.3m

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

                                          • Don't have an account? Register

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