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. ShellyPlug / NodeRed / Werte zu einem Objekt

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.2k

ShellyPlug / NodeRed / Werte zu einem Objekt

Geplant Angeheftet Gesperrt Verschoben Node-Red
8 Beiträge 2 Kommentatoren 395 Aufrufe 2 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.
  • F Offline
    F Offline
    Frank86
    schrieb am zuletzt editiert von Frank86
    #1

    Hallo,

    ich möchte einzelne Werte des Shelly in ein Objekt ohne die Topics zusammenfassen:

    {"shellies/shellyplug-s-1/relay/0/power":0,"shellies/shellyplug-s-1/relay/0/energy":3846,"shellies/shellyplug-s-1/temperature":15.37,"shellies/shellyplug-s-1/overtemperature":0,"shellies/shellyplug-s-1/relay/0":0}
    

    nach

    {"power":0,"energy":3846,"temperature":15.37,"overtemperature":0,"relay":0}
    

    Ich weiß nicht, wie ich die Topics entfernen kann. Wer kann mir da weiterhelfen ?

    mickymM 1 Antwort Letzte Antwort
    0
    • F Frank86

      Hallo,

      ich möchte einzelne Werte des Shelly in ein Objekt ohne die Topics zusammenfassen:

      {"shellies/shellyplug-s-1/relay/0/power":0,"shellies/shellyplug-s-1/relay/0/energy":3846,"shellies/shellyplug-s-1/temperature":15.37,"shellies/shellyplug-s-1/overtemperature":0,"shellies/shellyplug-s-1/relay/0":0}
      

      nach

      {"power":0,"energy":3846,"temperature":15.37,"overtemperature":0,"relay":0}
      

      Ich weiß nicht, wie ich die Topics entfernen kann. Wer kann mir da weiterhelfen ?

      mickymM Offline
      mickymM Offline
      mickym
      Most Active
      schrieb am zuletzt editiert von mickym
      #2

      7cdfdff0-b68f-4b41-a8ed-c2502c69fb2a-image.png

      [
         {
             "id": "b4a1b3637509ca38",
             "type": "inject",
             "z": "5cf927401246e0e8",
             "name": "",
             "props": [
                 {
                     "p": "payload"
                 }
             ],
             "repeat": "",
             "crontab": "",
             "once": false,
             "onceDelay": 0.1,
             "topic": "",
             "payload": "{\"shellies/shellyplug-s-1/relay/0/power\":0,\"shellies/shellyplug-s-1/relay/0/energy\":3846,\"shellies/shellyplug-s-1/temperature\":15.37,\"shellies/shellyplug-s-1/overtemperature\":0,\"shellies/shellyplug-s-1/relay/0\":0}",
             "payloadType": "json",
             "x": 130,
             "y": 460,
             "wires": [
                 [
                     "3d5f65021e23ca15",
                     "aa0be2b314d54fd5"
                 ]
             ]
         },
         {
             "id": "3d5f65021e23ca15",
             "type": "debug",
             "z": "5cf927401246e0e8",
             "name": "Objekt",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": false,
             "complete": "payload",
             "targetType": "msg",
             "statusVal": "",
             "statusType": "auto",
             "x": 310,
             "y": 420,
             "wires": []
         },
         {
             "id": "aa0be2b314d54fd5",
             "type": "split",
             "z": "5cf927401246e0e8",
             "name": "",
             "splt": "\\n",
             "spltType": "str",
             "arraySplt": 1,
             "arraySpltType": "len",
             "stream": false,
             "addname": "topic",
             "x": 310,
             "y": 460,
             "wires": [
                 [
                     "cdb9aaf8487e83ed"
                 ]
             ]
         },
         {
             "id": "cdb9aaf8487e83ed",
             "type": "change",
             "z": "5cf927401246e0e8",
             "name": "",
             "rules": [
                 {
                     "t": "change",
                     "p": "parts.key",
                     "pt": "msg",
                     "from": ".*\\/(.*)$",
                     "fromt": "re",
                     "to": "$1",
                     "tot": "str"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 500,
             "y": 460,
             "wires": [
                 [
                     "9f1260104cd7e37c"
                 ]
             ]
         },
         {
             "id": "9f1260104cd7e37c",
             "type": "join",
             "z": "5cf927401246e0e8",
             "name": "",
             "mode": "auto",
             "build": "object",
             "property": "payload",
             "propertyType": "msg",
             "key": "topic",
             "joiner": "\\n",
             "joinerType": "str",
             "accumulate": true,
             "timeout": "1",
             "count": "",
             "reduceRight": false,
             "reduceExp": "",
             "reduceInit": "",
             "reduceInitType": "",
             "reduceFixup": "",
             "x": 670,
             "y": 460,
             "wires": [
                 [
                     "62c5c9f9e2e7cbda"
                 ]
             ]
         },
         {
             "id": "e72b4078cf0357f4",
             "type": "debug",
             "z": "5cf927401246e0e8",
             "name": "new Object",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": false,
             "complete": "payload",
             "targetType": "msg",
             "statusVal": "",
             "statusType": "auto",
             "x": 1050,
             "y": 460,
             "wires": []
         },
         {
             "id": "62c5c9f9e2e7cbda",
             "type": "change",
             "z": "5cf927401246e0e8",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload ~>|$|{\"relay_0\" : $lookup($,\"0\"),\"relay_1\" : $lookup($,\"1\")},[\"0\",\"1\"]|",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 850,
             "y": 460,
             "wires": [
                 [
                     "e72b4078cf0357f4"
                 ]
             ]
         }
      ]
      

      So hier obigen Flow in JSONATA:

      01361eb9-d41d-4f9e-873e-2fa1ca43f062-image.png

      [
         {
             "id": "06c72fe6fdb0a916",
             "type": "inject",
             "z": "5cf927401246e0e8",
             "name": "",
             "props": [
                 {
                     "p": "payload"
                 }
             ],
             "repeat": "",
             "crontab": "",
             "once": false,
             "onceDelay": 0.1,
             "topic": "",
             "payload": "{\"shellies/shellyplug-s-1/relay/0/power\":0,\"shellies/shellyplug-s-1/relay/0/energy\":3846,\"shellies/shellyplug-s-1/temperature\":15.37,\"shellies/shellyplug-s-1/overtemperature\":0,\"shellies/shellyplug-s-1/relay/0\":0}",
             "payloadType": "json",
             "x": 290,
             "y": 220,
             "wires": [
                 [
                     "f9a7b5a98fe966b1",
                     "338f39c5e5f67428"
                 ]
             ]
         },
         {
             "id": "f9a7b5a98fe966b1",
             "type": "debug",
             "z": "5cf927401246e0e8",
             "name": "Objekt",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": false,
             "complete": "payload",
             "targetType": "msg",
             "statusVal": "",
             "statusType": "auto",
             "x": 470,
             "y": 180,
             "wires": []
         },
         {
             "id": "338f39c5e5f67428",
             "type": "change",
             "z": "5cf927401246e0e8",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "$each(payload, function($v, $k) {$. {$replace($k,/.*\\/(.*)$/,\"$1\"):$v}}) ~> $merge()~>|$|{\"relay_0\" : $lookup($,\"0\"),\"relay_1\" : $lookup($,\"1\")},[\"0\",\"1\"]|",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 490,
             "y": 220,
             "wires": [
                 [
                     "4a5ee4bc626bb7d9"
                 ]
             ]
         },
         {
             "id": "4a5ee4bc626bb7d9",
             "type": "debug",
             "z": "5cf927401246e0e8",
             "name": "new Object",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": false,
             "complete": "payload",
             "targetType": "msg",
             "statusVal": "",
             "statusType": "auto",
             "x": 690,
             "y": 220,
             "wires": []
         }
      ]
      

      Hier der JSONATA-Code aus der Change Node:

      $each(payload, function($v, $k) {$. {$replace($k,/.*\/(.*)$/,"$1"):$v}}) ~> $merge()~>|$|{"relay_0" : $lookup($,"0"),"relay_1" : $lookup($,"1")},["0","1"]|
      

      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.

      F 1 Antwort Letzte Antwort
      0
      • mickymM mickym

        7cdfdff0-b68f-4b41-a8ed-c2502c69fb2a-image.png

        [
           {
               "id": "b4a1b3637509ca38",
               "type": "inject",
               "z": "5cf927401246e0e8",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "{\"shellies/shellyplug-s-1/relay/0/power\":0,\"shellies/shellyplug-s-1/relay/0/energy\":3846,\"shellies/shellyplug-s-1/temperature\":15.37,\"shellies/shellyplug-s-1/overtemperature\":0,\"shellies/shellyplug-s-1/relay/0\":0}",
               "payloadType": "json",
               "x": 130,
               "y": 460,
               "wires": [
                   [
                       "3d5f65021e23ca15",
                       "aa0be2b314d54fd5"
                   ]
               ]
           },
           {
               "id": "3d5f65021e23ca15",
               "type": "debug",
               "z": "5cf927401246e0e8",
               "name": "Objekt",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 310,
               "y": 420,
               "wires": []
           },
           {
               "id": "aa0be2b314d54fd5",
               "type": "split",
               "z": "5cf927401246e0e8",
               "name": "",
               "splt": "\\n",
               "spltType": "str",
               "arraySplt": 1,
               "arraySpltType": "len",
               "stream": false,
               "addname": "topic",
               "x": 310,
               "y": 460,
               "wires": [
                   [
                       "cdb9aaf8487e83ed"
                   ]
               ]
           },
           {
               "id": "cdb9aaf8487e83ed",
               "type": "change",
               "z": "5cf927401246e0e8",
               "name": "",
               "rules": [
                   {
                       "t": "change",
                       "p": "parts.key",
                       "pt": "msg",
                       "from": ".*\\/(.*)$",
                       "fromt": "re",
                       "to": "$1",
                       "tot": "str"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 500,
               "y": 460,
               "wires": [
                   [
                       "9f1260104cd7e37c"
                   ]
               ]
           },
           {
               "id": "9f1260104cd7e37c",
               "type": "join",
               "z": "5cf927401246e0e8",
               "name": "",
               "mode": "auto",
               "build": "object",
               "property": "payload",
               "propertyType": "msg",
               "key": "topic",
               "joiner": "\\n",
               "joinerType": "str",
               "accumulate": true,
               "timeout": "1",
               "count": "",
               "reduceRight": false,
               "reduceExp": "",
               "reduceInit": "",
               "reduceInitType": "",
               "reduceFixup": "",
               "x": 670,
               "y": 460,
               "wires": [
                   [
                       "62c5c9f9e2e7cbda"
                   ]
               ]
           },
           {
               "id": "e72b4078cf0357f4",
               "type": "debug",
               "z": "5cf927401246e0e8",
               "name": "new Object",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 1050,
               "y": 460,
               "wires": []
           },
           {
               "id": "62c5c9f9e2e7cbda",
               "type": "change",
               "z": "5cf927401246e0e8",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload ~>|$|{\"relay_0\" : $lookup($,\"0\"),\"relay_1\" : $lookup($,\"1\")},[\"0\",\"1\"]|",
                       "tot": "jsonata"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 850,
               "y": 460,
               "wires": [
                   [
                       "e72b4078cf0357f4"
                   ]
               ]
           }
        ]
        

        So hier obigen Flow in JSONATA:

        01361eb9-d41d-4f9e-873e-2fa1ca43f062-image.png

        [
           {
               "id": "06c72fe6fdb0a916",
               "type": "inject",
               "z": "5cf927401246e0e8",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "{\"shellies/shellyplug-s-1/relay/0/power\":0,\"shellies/shellyplug-s-1/relay/0/energy\":3846,\"shellies/shellyplug-s-1/temperature\":15.37,\"shellies/shellyplug-s-1/overtemperature\":0,\"shellies/shellyplug-s-1/relay/0\":0}",
               "payloadType": "json",
               "x": 290,
               "y": 220,
               "wires": [
                   [
                       "f9a7b5a98fe966b1",
                       "338f39c5e5f67428"
                   ]
               ]
           },
           {
               "id": "f9a7b5a98fe966b1",
               "type": "debug",
               "z": "5cf927401246e0e8",
               "name": "Objekt",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 470,
               "y": 180,
               "wires": []
           },
           {
               "id": "338f39c5e5f67428",
               "type": "change",
               "z": "5cf927401246e0e8",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "$each(payload, function($v, $k) {$. {$replace($k,/.*\\/(.*)$/,\"$1\"):$v}}) ~> $merge()~>|$|{\"relay_0\" : $lookup($,\"0\"),\"relay_1\" : $lookup($,\"1\")},[\"0\",\"1\"]|",
                       "tot": "jsonata"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 490,
               "y": 220,
               "wires": [
                   [
                       "4a5ee4bc626bb7d9"
                   ]
               ]
           },
           {
               "id": "4a5ee4bc626bb7d9",
               "type": "debug",
               "z": "5cf927401246e0e8",
               "name": "new Object",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 690,
               "y": 220,
               "wires": []
           }
        ]
        

        Hier der JSONATA-Code aus der Change Node:

        $each(payload, function($v, $k) {$. {$replace($k,/.*\/(.*)$/,"$1"):$v}}) ~> $merge()~>|$|{"relay_0" : $lookup($,"0"),"relay_1" : $lookup($,"1")},["0","1"]|
        
        F Offline
        F Offline
        Frank86
        schrieb am zuletzt editiert von
        #3

        @mickym : Vielen Dank ! Sieht nach einer Lösung aus, probiere ich morgen 👍🏻

        mickymM 1 Antwort Letzte Antwort
        0
        • F Frank86

          @mickym : Vielen Dank ! Sieht nach einer Lösung aus, probiere ich morgen 👍🏻

          mickymM Offline
          mickymM Offline
          mickym
          Most Active
          schrieb am zuletzt editiert von mickym
          #4

          @frank86 Ja ich musste noch was ändern - da gerade wenn Du 2 Relais hast - das 0 als Integer und nicht als Key interpretiert wurde. Den JSONATA Code habe ich schon angepasst.

          So ich habe beide Lösungen angepasst. Statt relay - habe ich jetzt relay_0 und relay_1 genommen, dann passt es auch für Shellies 2.5. Falls Du das nicht willst, musst es halt wieder ändern.

          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.

          F mickymM 2 Antworten Letzte Antwort
          0
          • mickymM mickym

            @frank86 Ja ich musste noch was ändern - da gerade wenn Du 2 Relais hast - das 0 als Integer und nicht als Key interpretiert wurde. Den JSONATA Code habe ich schon angepasst.

            So ich habe beide Lösungen angepasst. Statt relay - habe ich jetzt relay_0 und relay_1 genommen, dann passt es auch für Shellies 2.5. Falls Du das nicht willst, musst es halt wieder ändern.

            F Offline
            F Offline
            Frank86
            schrieb am zuletzt editiert von Frank86
            #5

            @mickym
            Funktioniert !

            Jetzt stelle ich mir die Frage, warum ich nicht nur ein mqtt-Node benutzen kann mit Auswahl aller Nachrichten-Objekte ("shellies/shellyplug-s-1/#") , ich baue einen Nachricht ja zunächst auf :confused:

            [{"id":"eda5f77f7c8eed8d","type":"mqtt in","z":"c9969210232b94da","name":"mqtt-shellyplug-s-1","topic":"shellies/shellyplug-s-1/overtemperature","qos":"0","datatype":"auto-detect","broker":"c34b10c04573881a","nl":false,"rap":true,"rh":0,"inputs":0,"x":110,"y":360,"wires":[["c87fc064918d6540"]]},{"id":"c34b10c04573881a","type":"mqtt-broker","name":"mqtt-fhem","broker":"192.168.178.212","port":"1883","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":""}]! 
            

            Unbenannt1.JPG

            1 Antwort Letzte Antwort
            0
            • mickymM mickym

              @frank86 Ja ich musste noch was ändern - da gerade wenn Du 2 Relais hast - das 0 als Integer und nicht als Key interpretiert wurde. Den JSONATA Code habe ich schon angepasst.

              So ich habe beide Lösungen angepasst. Statt relay - habe ich jetzt relay_0 und relay_1 genommen, dann passt es auch für Shellies 2.5. Falls Du das nicht willst, musst es halt wieder ändern.

              mickymM Offline
              mickymM Offline
              mickym
              Most Active
              schrieb am zuletzt editiert von mickym
              #6

              @mickym Kannst Du doch - ich würde einfach shellies/shellyplug-s-1/# nehmen und den ersten Teil aus dem Topic einfach entfernen - ist doch easy. Da muss man doch nicht so Riesenverrenkungen machen:

              e722dc13-4076-4f17-a662-6ecd7cbd65e8-image.png

              [
                 {
                     "id": "ed30cdc3fbacb298",
                     "type": "mqtt in",
                     "z": "578345f4956c7a57",
                     "name": "",
                     "topic": "shellies/schalter/kueche/licht_abzug/#",
                     "qos": "2",
                     "datatype": "auto-detect",
                     "broker": "03fc28fd5e3d0913",
                     "nl": false,
                     "rap": true,
                     "rh": 0,
                     "inputs": 0,
                     "x": 350,
                     "y": 2640,
                     "wires": [
                         [
                             "1abae9f5e394107f",
                             "5cca889ca2bc40af"
                         ]
                     ]
                 },
                 {
                     "id": "1abae9f5e394107f",
                     "type": "debug",
                     "z": "578345f4956c7a57",
                     "name": "Shelly Küche",
                     "active": false,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": false,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "",
                     "statusType": "auto",
                     "x": 650,
                     "y": 2600,
                     "wires": []
                 },
                 {
                     "id": "5cca889ca2bc40af",
                     "type": "change",
                     "z": "578345f4956c7a57",
                     "name": "",
                     "rules": [
                         {
                             "t": "change",
                             "p": "topic",
                             "pt": "msg",
                             "from": "shellies/schalter/kueche/licht_abzug/",
                             "fromt": "str",
                             "to": "",
                             "tot": "str"
                         }
                     ],
                     "action": "",
                     "property": "",
                     "from": "",
                     "to": "",
                     "reg": false,
                     "x": 650,
                     "y": 2640,
                     "wires": [
                         [
                             "760564b613d352a4",
                             "35d92b645c892d53"
                         ]
                     ]
                 },
                 {
                     "id": "760564b613d352a4",
                     "type": "debug",
                     "z": "578345f4956c7a57",
                     "name": "Shelly Küche ohne Pfad",
                     "active": false,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": false,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "",
                     "statusType": "auto",
                     "x": 890,
                     "y": 2680,
                     "wires": []
                 },
                 {
                     "id": "35d92b645c892d53",
                     "type": "join",
                     "z": "578345f4956c7a57",
                     "name": "",
                     "mode": "custom",
                     "build": "object",
                     "property": "payload",
                     "propertyType": "msg",
                     "key": "topic",
                     "joiner": "\\n",
                     "joinerType": "str",
                     "accumulate": true,
                     "timeout": "1",
                     "count": "",
                     "reduceRight": false,
                     "reduceExp": "",
                     "reduceInit": "",
                     "reduceInitType": "",
                     "reduceFixup": "",
                     "x": 850,
                     "y": 2640,
                     "wires": [
                         [
                             "29a8632928735825"
                         ]
                     ]
                 },
                 {
                     "id": "29a8632928735825",
                     "type": "debug",
                     "z": "578345f4956c7a57",
                     "name": "Shelly Objekt",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": false,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "",
                     "statusType": "auto",
                     "x": 1030,
                     "y": 2640,
                     "wires": []
                 },
                 {
                     "id": "03fc28fd5e3d0913",
                     "type": "mqtt-broker",
                     "name": "MWHome - mosquitto",
                     "broker": "mwhome.fritz.box",
                     "port": "1883",
                     "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": ""
                 }
              ]
              

              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.

              F 1 Antwort Letzte Antwort
              0
              • mickymM mickym

                @mickym Kannst Du doch - ich würde einfach shellies/shellyplug-s-1/# nehmen und den ersten Teil aus dem Topic einfach entfernen - ist doch easy. Da muss man doch nicht so Riesenverrenkungen machen:

                e722dc13-4076-4f17-a662-6ecd7cbd65e8-image.png

                [
                   {
                       "id": "ed30cdc3fbacb298",
                       "type": "mqtt in",
                       "z": "578345f4956c7a57",
                       "name": "",
                       "topic": "shellies/schalter/kueche/licht_abzug/#",
                       "qos": "2",
                       "datatype": "auto-detect",
                       "broker": "03fc28fd5e3d0913",
                       "nl": false,
                       "rap": true,
                       "rh": 0,
                       "inputs": 0,
                       "x": 350,
                       "y": 2640,
                       "wires": [
                           [
                               "1abae9f5e394107f",
                               "5cca889ca2bc40af"
                           ]
                       ]
                   },
                   {
                       "id": "1abae9f5e394107f",
                       "type": "debug",
                       "z": "578345f4956c7a57",
                       "name": "Shelly Küche",
                       "active": false,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 650,
                       "y": 2600,
                       "wires": []
                   },
                   {
                       "id": "5cca889ca2bc40af",
                       "type": "change",
                       "z": "578345f4956c7a57",
                       "name": "",
                       "rules": [
                           {
                               "t": "change",
                               "p": "topic",
                               "pt": "msg",
                               "from": "shellies/schalter/kueche/licht_abzug/",
                               "fromt": "str",
                               "to": "",
                               "tot": "str"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 650,
                       "y": 2640,
                       "wires": [
                           [
                               "760564b613d352a4",
                               "35d92b645c892d53"
                           ]
                       ]
                   },
                   {
                       "id": "760564b613d352a4",
                       "type": "debug",
                       "z": "578345f4956c7a57",
                       "name": "Shelly Küche ohne Pfad",
                       "active": false,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 890,
                       "y": 2680,
                       "wires": []
                   },
                   {
                       "id": "35d92b645c892d53",
                       "type": "join",
                       "z": "578345f4956c7a57",
                       "name": "",
                       "mode": "custom",
                       "build": "object",
                       "property": "payload",
                       "propertyType": "msg",
                       "key": "topic",
                       "joiner": "\\n",
                       "joinerType": "str",
                       "accumulate": true,
                       "timeout": "1",
                       "count": "",
                       "reduceRight": false,
                       "reduceExp": "",
                       "reduceInit": "",
                       "reduceInitType": "",
                       "reduceFixup": "",
                       "x": 850,
                       "y": 2640,
                       "wires": [
                           [
                               "29a8632928735825"
                           ]
                       ]
                   },
                   {
                       "id": "29a8632928735825",
                       "type": "debug",
                       "z": "578345f4956c7a57",
                       "name": "Shelly Objekt",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 1030,
                       "y": 2640,
                       "wires": []
                   },
                   {
                       "id": "03fc28fd5e3d0913",
                       "type": "mqtt-broker",
                       "name": "MWHome - mosquitto",
                       "broker": "mwhome.fritz.box",
                       "port": "1883",
                       "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": ""
                   }
                ]
                

                F Offline
                F Offline
                Frank86
                schrieb am zuletzt editiert von
                #7

                @mickym Habe es nochmals versucht, jetzt habe ich wieder relay/0/ drin. Der Versuch mit den oben gezeigten Nodes nur "relay" stehen zu lassen schlägt fehl, ich lasse es nun so, danke.

                [
                    {
                        "id": "8dfc8447eab4b4d7",
                        "type": "tab",
                        "label": "Flow 5",
                        "disabled": false,
                        "info": "",
                        "env": []
                    },
                    {
                        "id": "ed30cdc3fbacb298",
                        "type": "mqtt in",
                        "z": "8dfc8447eab4b4d7",
                        "name": "",
                        "topic": "shellies/shellyplug-s-1/#",
                        "qos": "0",
                        "datatype": "auto-detect",
                        "broker": "c34b10c04573881a",
                        "nl": false,
                        "rap": true,
                        "rh": 0,
                        "inputs": 0,
                        "x": 140,
                        "y": 140,
                        "wires": [
                            [
                                "1abae9f5e394107f",
                                "886f94224123013e"
                            ]
                        ]
                    },
                    {
                        "id": "1abae9f5e394107f",
                        "type": "debug",
                        "z": "8dfc8447eab4b4d7",
                        "name": "Shelly Küche",
                        "active": false,
                        "tosidebar": true,
                        "console": false,
                        "tostatus": false,
                        "complete": "payload",
                        "targetType": "msg",
                        "statusVal": "",
                        "statusType": "auto",
                        "x": 390,
                        "y": 60,
                        "wires": []
                    },
                    {
                        "id": "886f94224123013e",
                        "type": "change",
                        "z": "8dfc8447eab4b4d7",
                        "name": "Relais - string to int",
                        "rules": [
                            {
                                "t": "change",
                                "p": "payload",
                                "pt": "msg",
                                "from": "on",
                                "fromt": "str",
                                "to": "1",
                                "tot": "num"
                            },
                            {
                                "t": "change",
                                "p": "payload",
                                "pt": "msg",
                                "from": "off",
                                "fromt": "str",
                                "to": "0",
                                "tot": "num"
                            }
                        ],
                        "action": "",
                        "property": "",
                        "from": "",
                        "to": "",
                        "reg": false,
                        "x": 390,
                        "y": 140,
                        "wires": [
                            [
                                "e7cfa2110d433df8"
                            ]
                        ]
                    },
                    {
                        "id": "e7cfa2110d433df8",
                        "type": "change",
                        "z": "8dfc8447eab4b4d7",
                        "name": "",
                        "rules": [
                            {
                                "t": "change",
                                "p": "topic",
                                "pt": "msg",
                                "from": "shellies/shellyplug-s-1/",
                                "fromt": "str",
                                "to": "",
                                "tot": "str"
                            }
                        ],
                        "action": "",
                        "property": "",
                        "from": "",
                        "to": "",
                        "reg": false,
                        "x": 590,
                        "y": 140,
                        "wires": [
                            [
                                "46377bffe56d4ecc",
                                "f105ba5467a7b184"
                            ]
                        ]
                    },
                    {
                        "id": "46377bffe56d4ecc",
                        "type": "debug",
                        "z": "8dfc8447eab4b4d7",
                        "name": "Shelly Küche ohne Pfad",
                        "active": false,
                        "tosidebar": true,
                        "console": false,
                        "tostatus": false,
                        "complete": "payload",
                        "targetType": "msg",
                        "statusVal": "",
                        "statusType": "auto",
                        "x": 830,
                        "y": 60,
                        "wires": []
                    },
                    {
                        "id": "f105ba5467a7b184",
                        "type": "join",
                        "z": "8dfc8447eab4b4d7",
                        "name": "",
                        "mode": "custom",
                        "build": "object",
                        "property": "payload",
                        "propertyType": "msg",
                        "key": "topic",
                        "joiner": "\\n",
                        "joinerType": "str",
                        "accumulate": true,
                        "timeout": "1",
                        "count": "",
                        "reduceRight": false,
                        "reduceExp": "",
                        "reduceInit": "",
                        "reduceInitType": "",
                        "reduceFixup": "",
                        "x": 770,
                        "y": 140,
                        "wires": [
                            [
                                "4a297d0aef5f7b54"
                            ]
                        ]
                    },
                    {
                        "id": "4a297d0aef5f7b54",
                        "type": "debug",
                        "z": "8dfc8447eab4b4d7",
                        "name": "Shelly Objekt",
                        "active": true,
                        "tosidebar": true,
                        "console": false,
                        "tostatus": false,
                        "complete": "payload",
                        "targetType": "msg",
                        "statusVal": "",
                        "statusType": "auto",
                        "x": 930,
                        "y": 140,
                        "wires": []
                    },
                    {
                        "id": "c34b10c04573881a",
                        "type": "mqtt-broker",
                        "name": "mqtt-fhem",
                        "broker": "192.168.178.212",
                        "port": "1883",
                        "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": ""
                    }
                ]
                

                Unbenannt.JPG

                mickymM 1 Antwort Letzte Antwort
                0
                • F Frank86

                  @mickym Habe es nochmals versucht, jetzt habe ich wieder relay/0/ drin. Der Versuch mit den oben gezeigten Nodes nur "relay" stehen zu lassen schlägt fehl, ich lasse es nun so, danke.

                  [
                      {
                          "id": "8dfc8447eab4b4d7",
                          "type": "tab",
                          "label": "Flow 5",
                          "disabled": false,
                          "info": "",
                          "env": []
                      },
                      {
                          "id": "ed30cdc3fbacb298",
                          "type": "mqtt in",
                          "z": "8dfc8447eab4b4d7",
                          "name": "",
                          "topic": "shellies/shellyplug-s-1/#",
                          "qos": "0",
                          "datatype": "auto-detect",
                          "broker": "c34b10c04573881a",
                          "nl": false,
                          "rap": true,
                          "rh": 0,
                          "inputs": 0,
                          "x": 140,
                          "y": 140,
                          "wires": [
                              [
                                  "1abae9f5e394107f",
                                  "886f94224123013e"
                              ]
                          ]
                      },
                      {
                          "id": "1abae9f5e394107f",
                          "type": "debug",
                          "z": "8dfc8447eab4b4d7",
                          "name": "Shelly Küche",
                          "active": false,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 390,
                          "y": 60,
                          "wires": []
                      },
                      {
                          "id": "886f94224123013e",
                          "type": "change",
                          "z": "8dfc8447eab4b4d7",
                          "name": "Relais - string to int",
                          "rules": [
                              {
                                  "t": "change",
                                  "p": "payload",
                                  "pt": "msg",
                                  "from": "on",
                                  "fromt": "str",
                                  "to": "1",
                                  "tot": "num"
                              },
                              {
                                  "t": "change",
                                  "p": "payload",
                                  "pt": "msg",
                                  "from": "off",
                                  "fromt": "str",
                                  "to": "0",
                                  "tot": "num"
                              }
                          ],
                          "action": "",
                          "property": "",
                          "from": "",
                          "to": "",
                          "reg": false,
                          "x": 390,
                          "y": 140,
                          "wires": [
                              [
                                  "e7cfa2110d433df8"
                              ]
                          ]
                      },
                      {
                          "id": "e7cfa2110d433df8",
                          "type": "change",
                          "z": "8dfc8447eab4b4d7",
                          "name": "",
                          "rules": [
                              {
                                  "t": "change",
                                  "p": "topic",
                                  "pt": "msg",
                                  "from": "shellies/shellyplug-s-1/",
                                  "fromt": "str",
                                  "to": "",
                                  "tot": "str"
                              }
                          ],
                          "action": "",
                          "property": "",
                          "from": "",
                          "to": "",
                          "reg": false,
                          "x": 590,
                          "y": 140,
                          "wires": [
                              [
                                  "46377bffe56d4ecc",
                                  "f105ba5467a7b184"
                              ]
                          ]
                      },
                      {
                          "id": "46377bffe56d4ecc",
                          "type": "debug",
                          "z": "8dfc8447eab4b4d7",
                          "name": "Shelly Küche ohne Pfad",
                          "active": false,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 830,
                          "y": 60,
                          "wires": []
                      },
                      {
                          "id": "f105ba5467a7b184",
                          "type": "join",
                          "z": "8dfc8447eab4b4d7",
                          "name": "",
                          "mode": "custom",
                          "build": "object",
                          "property": "payload",
                          "propertyType": "msg",
                          "key": "topic",
                          "joiner": "\\n",
                          "joinerType": "str",
                          "accumulate": true,
                          "timeout": "1",
                          "count": "",
                          "reduceRight": false,
                          "reduceExp": "",
                          "reduceInit": "",
                          "reduceInitType": "",
                          "reduceFixup": "",
                          "x": 770,
                          "y": 140,
                          "wires": [
                              [
                                  "4a297d0aef5f7b54"
                              ]
                          ]
                      },
                      {
                          "id": "4a297d0aef5f7b54",
                          "type": "debug",
                          "z": "8dfc8447eab4b4d7",
                          "name": "Shelly Objekt",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 930,
                          "y": 140,
                          "wires": []
                      },
                      {
                          "id": "c34b10c04573881a",
                          "type": "mqtt-broker",
                          "name": "mqtt-fhem",
                          "broker": "192.168.178.212",
                          "port": "1883",
                          "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": ""
                      }
                  ]
                  

                  Unbenannt.JPG

                  mickymM Offline
                  mickymM Offline
                  mickym
                  Most Active
                  schrieb am zuletzt editiert von
                  #8

                  @frank86 warum stört dich der /? Du kannst die / ja auch noch weg lassen.

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

                  1 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

                  680

                  Online

                  32.6k

                  Benutzer

                  82.2k

                  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