Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • 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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
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
    15
    1
    633

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    1.9k

Payload String zerlegen

Geplant Angeheftet Gesperrt Verschoben Node-Red
77 Beiträge 7 Kommentatoren 16.0k Aufrufe 7 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • 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
    schrieb am zuletzt editiert von 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 Antworten Letzte Antwort
    0
    • 66er6 Offline
      66er6 Offline
      66er
      schrieb am zuletzt editiert von
      #6

      Werde ich gleich austesten. :+1:

      Vielen Dank.

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

      LG
      Stefan

      1 Antwort Letzte Antwort
      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
        schrieb am zuletzt editiert von
        #7

        @mickym sagte in Payload String zerlegen:

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

        Vielen Dank nochmals.

        LG
        Stefan

        1 Antwort Letzte Antwort
        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
          schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
          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
            schrieb am zuletzt editiert von
            #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 Antwort Letzte Antwort
            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
              schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
              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
                schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
                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
                  schrieb am zuletzt editiert von
                  #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 Antwort Letzte Antwort
                  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
                    schrieb am zuletzt editiert von
                    #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 Antwort Letzte Antwort
                    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
                      schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
                      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
                        schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
                        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
                          schrieb am zuletzt editiert von
                          #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 Antwort Letzte Antwort
                          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
                            schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
                            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
                              schrieb am zuletzt editiert von
                              #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 Antwort Letzte Antwort
                              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
                                schrieb am zuletzt editiert von
                                #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 Antwort Letzte Antwort
                                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
                                  schrieb am zuletzt editiert von 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 Antworten Letzte Antwort
                                  0
                                  • R rieders

                                    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 Online
                                    mickymM Online
                                    mickym
                                    Most Active
                                    schrieb am zuletzt editiert von mickym
                                    #21

                                    @rieders Am besten ist es aus dem Debugfenster einfach den Pfad kopieren. Sprich du schaust, was aus debug2 rauskommt und kopierst den Pfad, des Wertes den Du anzeigen willst.

                                    copy path.gif

                                    Wenn ich also Dein Objekt nehme (Dein Flow lässt sich nicht importieren, da Du keine CodeTags verwendest) und möchte den Total Wert in der Text Node anzeigen, gehe ich mit dem Cursor dahin und kopieren den Pfad:

                                    cca960b2-944e-4f26-a76f-d729853f8e0f-image.png

                                    Dann kommt folgendes raus:

                                    payload.SDM630.Total
                                    

                                    Das kannst Du nun direkt in der text node verwenden oder die payload verändern um es dann in einer gauge anzuzeigen.

                                    In der Text-Node:
                                    16172d89-4af0-4c05-aa6c-a6859d47d6a5-image.png

                                    Mit der Change-Node:
                                    d79496f0-9682-4b6b-856d-ce10b22dd2d1-image.png

                                    8b658eef-2178-44f5-a447-1d68ae48ca9e-image.png

                                    Hier mal mein Flow richtig exportiert in CodeTags:
                                    Code-Tags.gif

                                    [
                                       {
                                           "id": "79cb540f2a41c739",
                                           "type": "inject",
                                           "z": "289f539dcc33814e",
                                           "name": "",
                                           "props": [
                                               {
                                                   "p": "payload"
                                               }
                                           ],
                                           "repeat": "",
                                           "crontab": "",
                                           "once": false,
                                           "onceDelay": 0.1,
                                           "topic": "",
                                           "payload": "{\"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}}",
                                           "payloadType": "json",
                                           "x": 230,
                                           "y": 4260,
                                           "wires": [
                                               [
                                                   "479307770498d089",
                                                   "7e8331652d9d7389",
                                                   "ae5bde5b22da03b0"
                                               ]
                                           ]
                                       },
                                       {
                                           "id": "479307770498d089",
                                           "type": "debug",
                                           "z": "289f539dcc33814e",
                                           "name": "Objekt",
                                           "active": true,
                                           "tosidebar": true,
                                           "console": false,
                                           "tostatus": false,
                                           "complete": "payload",
                                           "targetType": "msg",
                                           "statusVal": "",
                                           "statusType": "auto",
                                           "x": 390,
                                           "y": 4260,
                                           "wires": []
                                       },
                                       {
                                           "id": "c9e73544e1bfa520",
                                           "type": "ui_gauge",
                                           "z": "289f539dcc33814e",
                                           "name": "",
                                           "group": "57f13d6f733e5c9d",
                                           "order": 2,
                                           "width": 0,
                                           "height": 0,
                                           "gtype": "gage",
                                           "title": "Total",
                                           "label": "units",
                                           "format": "{{value}}",
                                           "min": 0,
                                           "max": "1000",
                                           "colors": [
                                               "#00b500",
                                               "#e6e600",
                                               "#ca3838"
                                           ],
                                           "seg1": "",
                                           "seg2": "",
                                           "className": "",
                                           "x": 630,
                                           "y": 4340,
                                           "wires": []
                                       },
                                       {
                                           "id": "7e8331652d9d7389",
                                           "type": "ui_text",
                                           "z": "289f539dcc33814e",
                                           "group": "57f13d6f733e5c9d",
                                           "order": 3,
                                           "width": 0,
                                           "height": 0,
                                           "name": "",
                                           "label": "Total",
                                           "format": "{{msg.payload.SDM630.Total}}",
                                           "layout": "row-spread",
                                           "className": "",
                                           "x": 390,
                                           "y": 4300,
                                           "wires": []
                                       },
                                       {
                                           "id": "ae5bde5b22da03b0",
                                           "type": "change",
                                           "z": "289f539dcc33814e",
                                           "name": "",
                                           "rules": [
                                               {
                                                   "t": "set",
                                                   "p": "payload",
                                                   "pt": "msg",
                                                   "to": "payload.SDM630.Total",
                                                   "tot": "msg"
                                               }
                                           ],
                                           "action": "",
                                           "property": "",
                                           "from": "",
                                           "to": "",
                                           "reg": false,
                                           "x": 430,
                                           "y": 4340,
                                           "wires": [
                                               [
                                                   "c9e73544e1bfa520",
                                                   "680cd23566aafb30"
                                               ]
                                           ]
                                       },
                                       {
                                           "id": "680cd23566aafb30",
                                           "type": "debug",
                                           "z": "289f539dcc33814e",
                                           "name": "Total",
                                           "active": true,
                                           "tosidebar": true,
                                           "console": false,
                                           "tostatus": false,
                                           "complete": "payload",
                                           "targetType": "msg",
                                           "statusVal": "",
                                           "statusType": "auto",
                                           "x": 630,
                                           "y": 4380,
                                           "wires": []
                                       },
                                       {
                                           "id": "57f13d6f733e5c9d",
                                           "type": "ui_group",
                                           "name": "Test",
                                           "tab": "20b3095113f94d70",
                                           "order": 2,
                                           "disp": true,
                                           "width": "6",
                                           "collapse": false,
                                           "className": ""
                                       },
                                       {
                                           "id": "20b3095113f94d70",
                                           "type": "ui_tab",
                                           "name": "Home",
                                           "icon": "dashboard",
                                           "order": 1,
                                           "disabled": false,
                                           "hidden": false
                                       }
                                    ]
                                    

                                    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.

                                    R 1 Antwort Letzte Antwort
                                    1
                                    • mickymM mickym

                                      @rieders Am besten ist es aus dem Debugfenster einfach den Pfad kopieren. Sprich du schaust, was aus debug2 rauskommt und kopierst den Pfad, des Wertes den Du anzeigen willst.

                                      copy path.gif

                                      Wenn ich also Dein Objekt nehme (Dein Flow lässt sich nicht importieren, da Du keine CodeTags verwendest) und möchte den Total Wert in der Text Node anzeigen, gehe ich mit dem Cursor dahin und kopieren den Pfad:

                                      cca960b2-944e-4f26-a76f-d729853f8e0f-image.png

                                      Dann kommt folgendes raus:

                                      payload.SDM630.Total
                                      

                                      Das kannst Du nun direkt in der text node verwenden oder die payload verändern um es dann in einer gauge anzuzeigen.

                                      In der Text-Node:
                                      16172d89-4af0-4c05-aa6c-a6859d47d6a5-image.png

                                      Mit der Change-Node:
                                      d79496f0-9682-4b6b-856d-ce10b22dd2d1-image.png

                                      8b658eef-2178-44f5-a447-1d68ae48ca9e-image.png

                                      Hier mal mein Flow richtig exportiert in CodeTags:
                                      Code-Tags.gif

                                      [
                                         {
                                             "id": "79cb540f2a41c739",
                                             "type": "inject",
                                             "z": "289f539dcc33814e",
                                             "name": "",
                                             "props": [
                                                 {
                                                     "p": "payload"
                                                 }
                                             ],
                                             "repeat": "",
                                             "crontab": "",
                                             "once": false,
                                             "onceDelay": 0.1,
                                             "topic": "",
                                             "payload": "{\"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}}",
                                             "payloadType": "json",
                                             "x": 230,
                                             "y": 4260,
                                             "wires": [
                                                 [
                                                     "479307770498d089",
                                                     "7e8331652d9d7389",
                                                     "ae5bde5b22da03b0"
                                                 ]
                                             ]
                                         },
                                         {
                                             "id": "479307770498d089",
                                             "type": "debug",
                                             "z": "289f539dcc33814e",
                                             "name": "Objekt",
                                             "active": true,
                                             "tosidebar": true,
                                             "console": false,
                                             "tostatus": false,
                                             "complete": "payload",
                                             "targetType": "msg",
                                             "statusVal": "",
                                             "statusType": "auto",
                                             "x": 390,
                                             "y": 4260,
                                             "wires": []
                                         },
                                         {
                                             "id": "c9e73544e1bfa520",
                                             "type": "ui_gauge",
                                             "z": "289f539dcc33814e",
                                             "name": "",
                                             "group": "57f13d6f733e5c9d",
                                             "order": 2,
                                             "width": 0,
                                             "height": 0,
                                             "gtype": "gage",
                                             "title": "Total",
                                             "label": "units",
                                             "format": "{{value}}",
                                             "min": 0,
                                             "max": "1000",
                                             "colors": [
                                                 "#00b500",
                                                 "#e6e600",
                                                 "#ca3838"
                                             ],
                                             "seg1": "",
                                             "seg2": "",
                                             "className": "",
                                             "x": 630,
                                             "y": 4340,
                                             "wires": []
                                         },
                                         {
                                             "id": "7e8331652d9d7389",
                                             "type": "ui_text",
                                             "z": "289f539dcc33814e",
                                             "group": "57f13d6f733e5c9d",
                                             "order": 3,
                                             "width": 0,
                                             "height": 0,
                                             "name": "",
                                             "label": "Total",
                                             "format": "{{msg.payload.SDM630.Total}}",
                                             "layout": "row-spread",
                                             "className": "",
                                             "x": 390,
                                             "y": 4300,
                                             "wires": []
                                         },
                                         {
                                             "id": "ae5bde5b22da03b0",
                                             "type": "change",
                                             "z": "289f539dcc33814e",
                                             "name": "",
                                             "rules": [
                                                 {
                                                     "t": "set",
                                                     "p": "payload",
                                                     "pt": "msg",
                                                     "to": "payload.SDM630.Total",
                                                     "tot": "msg"
                                                 }
                                             ],
                                             "action": "",
                                             "property": "",
                                             "from": "",
                                             "to": "",
                                             "reg": false,
                                             "x": 430,
                                             "y": 4340,
                                             "wires": [
                                                 [
                                                     "c9e73544e1bfa520",
                                                     "680cd23566aafb30"
                                                 ]
                                             ]
                                         },
                                         {
                                             "id": "680cd23566aafb30",
                                             "type": "debug",
                                             "z": "289f539dcc33814e",
                                             "name": "Total",
                                             "active": true,
                                             "tosidebar": true,
                                             "console": false,
                                             "tostatus": false,
                                             "complete": "payload",
                                             "targetType": "msg",
                                             "statusVal": "",
                                             "statusType": "auto",
                                             "x": 630,
                                             "y": 4380,
                                             "wires": []
                                         },
                                         {
                                             "id": "57f13d6f733e5c9d",
                                             "type": "ui_group",
                                             "name": "Test",
                                             "tab": "20b3095113f94d70",
                                             "order": 2,
                                             "disp": true,
                                             "width": "6",
                                             "collapse": false,
                                             "className": ""
                                         },
                                         {
                                             "id": "20b3095113f94d70",
                                             "type": "ui_tab",
                                             "name": "Home",
                                             "icon": "dashboard",
                                             "order": 1,
                                             "disabled": false,
                                             "hidden": false
                                         }
                                      ]
                                      

                                      R Offline
                                      R Offline
                                      rieders
                                      schrieb am zuletzt editiert von rieders
                                      #22

                                      Vielen Dank für die Hilfe.

                                      Das Auslesen funktioniert super.
                                      Ich weiß nur nicht wie du aus dem debug2 den Pfad ausgelesen hast, bei mir sieht das ganz anders aus.

                                      Screenshot 2023-01-13 182121.png

                                      Jetzt kann ich die Daten an Venus OS übergeben und hoffentlich als virtualen Zähler sehen.

                                      mickymM 1 Antwort Letzte Antwort
                                      0
                                      • R rieders

                                        Vielen Dank für die Hilfe.

                                        Das Auslesen funktioniert super.
                                        Ich weiß nur nicht wie du aus dem debug2 den Pfad ausgelesen hast, bei mir sieht das ganz anders aus.

                                        Screenshot 2023-01-13 182121.png

                                        Jetzt kann ich die Daten an Venus OS übergeben und hoffentlich als virtualen Zähler sehen.

                                        mickymM Online
                                        mickymM Online
                                        mickym
                                        Most Active
                                        schrieb am zuletzt editiert von mickym
                                        #23

                                        @rieders Hab ich gar nicht, da ich deinen Flow ja nicht importieren konnte (nicht in CodeTags), aber Du hast ja die Daten zum Glück bzw. das Objekt gepostet und so habe ich es einfach in die Inject Node geschrieben. Du kannst übrigens direkt in ein Objekt wandeln lassen, dann kannst du das direkt nach der mqtt-In Node machen, in dem Du Dir ein analysiertes Objekt ausgeben lässt.

                                        0784168f-bbda-49ee-a717-c84130207778-image.png

                                        Dann brauchst nach der mqtt-In auch nichts mehr konvertieren.

                                        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.

                                        frankthegreatF 1 Antwort Letzte Antwort
                                        0
                                        • mickymM mickym

                                          @rieders Hab ich gar nicht, da ich deinen Flow ja nicht importieren konnte (nicht in CodeTags), aber Du hast ja die Daten zum Glück bzw. das Objekt gepostet und so habe ich es einfach in die Inject Node geschrieben. Du kannst übrigens direkt in ein Objekt wandeln lassen, dann kannst du das direkt nach der mqtt-In Node machen, in dem Du Dir ein analysiertes Objekt ausgeben lässt.

                                          0784168f-bbda-49ee-a717-c84130207778-image.png

                                          Dann brauchst nach der mqtt-In auch nichts mehr konvertieren.

                                          frankthegreatF Offline
                                          frankthegreatF Offline
                                          frankthegreat
                                          schrieb am zuletzt editiert von
                                          #24

                                          @mickym
                                          Sorry, das ich mich hier mit ranhänge. Mein Problem ist denk mal ähnlich.
                                          Ich möchte relatives Dimmen von KNX auf Zigbee umsetzen.
                                          Dazu müßte wohl auch der Payload zerlegt werden :thinking_face:

                                          Hier die Ausgaben vom KNX.

                                          Taster ist gedrückt und soll runterdimmen:

                                          {"topic":"1/4/26","devicename":"","payload":{"decr_incr":0,"data":1},"payloadmeasureunit":"unknown","payloadsubtypevalue":"unknown","knx":{"event":"GroupValue_Write","dpt":"3.007","dptdesc":"Dimming control","source":"1.1.4","destination":"1/4/26","rawValue":[1]},"previouspayload":{"decr_incr":0,"data":0},"_msgid":"34735868e6770bd1"}
                                          

                                          Taster losgelassen, dimmen soll stoppen:

                                          {"topic":"1/4/26","devicename":"","payload":{"decr_incr":0,"data":0},"payloadmeasureunit":"unknown","payloadsubtypevalue":"unknown","knx":{"event":"GroupValue_Write","dpt":"3.007","dptdesc":"Dimming control","source":"1.1.4","destination":"1/4/26","rawValue":[0]},"previouspayload":{"decr_incr":0,"data":1},"_msgid":"a4982ca3e5461702"}
                                          

                                          Taster ist gedrückt und soll hochdimmen:

                                          {"topic":"1/4/26","devicename":"","payload":{"decr_incr":1,"data":1},"payloadmeasureunit":"unknown","payloadsubtypevalue":"unknown","knx":{"event":"GroupValue_Write","dpt":"3.007","dptdesc":"Dimming control","source":"1.1.4","destination":"1/4/26","rawValue":[9]},"previouspayload":{"decr_incr":0,"data":0},"_msgid":"12ada754ecbda05f"}
                                          

                                          Taster losgelassen, dimmen soll stoppen:

                                          {"topic":"1/4/26","devicename":"","payload":{"decr_incr":0,"data":0},"payloadmeasureunit":"unknown","payloadsubtypevalue":"unknown","knx":{"event":"GroupValue_Write","dpt":"3.007","dptdesc":"Dimming control","source":"1.1.4","destination":"1/4/26","rawValue":[0]},"previouspayload":{"decr_incr":1,"data":1},"_msgid":"dabb632a5c74b60d"}
                                          

                                          Änderungen sehe ich hier jeweils bei :
                                          {"decr_incr":x,"data":x}

                                          Die Befehle für die Zigbee Leuchtmittel hab ich getestet, bei direktem schicken auf den DP funktionieren die schonmal.
                                          z.B.
                                          hochdimmen={"brightness_move": 40}
                                          runterdimmen={"brightness_move": -40}
                                          stoppen={"brightness_move": 0}

                                          Hab schon etliche Stunden mit der "Change" Node rumprobiert, allerdings ohne Erfolg :disappointed:

                                          Wie muß ich vorgehen, um die KNX Befehle auf Zigbee umzusetzen?

                                          1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          430

                                          Online

                                          32.6k

                                          Benutzer

                                          81.9k

                                          Themen

                                          1.3m

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

                                          • Du hast noch kein Konto? Registrieren

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