Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Shellys ("Alt und Plus") über MQTT Adapter

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    Shellys ("Alt und Plus") über MQTT Adapter

    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hotspot_2 @mickym last edited by

      @mickym Na klar, völlig ok. Das Ding ist gewachsen mit Unterstützung von verschiedenen Seiten am Anfang und ich hab dann einfach weitergebastelt bis es funktioniert.

      Ich habe im Skript noch nicht alle Datenpunkte angepasst, daher funktioniert es gerade nicht.

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

        @hotspot_2 Gut.

        Dann meine 1. Frage:

        Die Dauer, wie lange das Licht brennt nach Aktivierung lässt sich einstellen in JARVIS.

        So dass heißt - dass ist die zentrale Instanz die das Licht ausschalten kann. Alle Buttons, Lichtschalter und Bewegungsmelder schalten immer ein - aber nie aus?

        H 1 Reply Last reply Reply Quote 0
        • H
          hotspot_2 @mickym last edited by hotspot_2

          @mickym Ja, alle Schalter, Buttons und Bewegungsmelder schalten immer ein, aber nie aus. Das ist so korrekt. Aus geht immer dann wenn die Zeit, die einstellbar ist, abgelaufen ist. Möchte man es wieder hell haben muss man Schalter /Button drücken oder sich bewegen ;-).

          Wenn dann trotzdem ein Schalter gedrückt wird, habe ich es abgefangen und den Shelly bzw. das Licht wieder angeschalten. Der Shelly schaltet ja nach der Betätigung des Schalters das Licht erstmal aus.

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

            @hotspot_2 Noch eine blöde Frage - warum konfigurierst Du dann die Shellies nicht im detached Mode - so dass die nicht mehr physisch schalten können also nicht mehr ausschalten können? Das wäre nicht nur einfacher zu implementieren, sondern würde auch Dein Licht schonen.

            913f278a-396a-4820-86b0-a2a7bf88d36a-image.png

            oder

            Activation Switch - der schaltet immer ein? - Das ist so hardwaremässig so eine Treppenhausfunktion auch wenn Du sie nicht nutzt.

            29894a00-6826-4ca9-9ce2-b53a6d743173-image.png

            H 1 Reply Last reply Reply Quote 0
            • H
              hotspot_2 @mickym last edited by hotspot_2

              @mickym Ich habe die Firmware 0.14.1 drauf. Da finde ich das Detached nicht. Ich sehe aktuell nur Follow oder Flip als Modus.

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

                @hotspot_2 Ich hab gerade nachgelesen, dass muss es geben:

                https://kb.shelly.cloud/knowledge-base/shelly-plus-1-device-page#Applicationmanualcommonparts-Input/OutputSettings

                f8819f7d-c18c-4fcd-b0f1-754b478fda6f-image.png

                H 1 Reply Last reply Reply Quote 0
                • H
                  hotspot_2 @mickym last edited by

                  @mickym sagte in Shellys ("Alt und Plus") über MQTT Adapter:

                  @hotspot_2 Das gab schon ewig - aber ich kenne die Seiten bei den Plus Web Interface nicht. Da muss es auch einen Button Type geben.

                  Ja, gibt es aber nur zwei.

                  5a39dcaf-309b-4b43-ac5f-b134eb2e2462-image.png

                  Ich habe das mal im Shelly Forum angefragt. Mal schauen ob da jemand helfen kann.

                  Bisher habe ich bei den Plus1 diesen Modus noch nicht gesehen.

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

                    Nee ich habs:
                    https://kb.shelly.cloud/knowledge-base/shelly-plus-1pm-web-interface-guide

                    Also Input Settings

                    a83a230b-51b2-4511-abd8-8330b7b2cfd0-image.png

                    attached to output kann auf true und false wahrscheinlich konfigurieren

                    DAmit bekommst Du weiterhin Tastendrücke mit aber wird nicht mehr geschaltet.

                    Mit der APP und Iobroker kannst natürlich weiter schalten - aber Du schaltest nicht mehr über das Relais

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      hotspot_2 @mickym last edited by

                      @mickym c3ed97fb-3948-4365-9188-9191ab43ed4b-image.png

                      Jupp. Geht hier. Stehen momentan auf Attached.

                      Damit wäre das Problem gelöst mit dem Thema wieder einschalten müssen wenn jemand drauf drückt vermutlich.

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

                        @hotspot_2 Genau. 🙂 - Also ich würde alles auf detached schalten und dann können wir uns nun um die Logik kümmern. 😉 und brauchen nicht mehr fehlerhaft ausgeschaltetes Licht wieder einschalten. 😉

                        So und nun nehmen wir einfach den vorhanden Flow, um das zu implementieren.

                        Also wir nehmen wieder eine trigger NOde - und machen das erst mal wieder mit einer fixen Zeit von 2 Minuten.

                        Auf der linken Seite ordnest Du mal alles was trigger an an.

                        H mickym 2 Replies Last reply Reply Quote 0
                        • H
                          hotspot_2 @mickym last edited by

                          @mickym Sehr guter Ansatz ;-). War mir bisher so nicht bekannt das es diese Funktion gibt. Aber natürlich perfekt für diese Szenario. Ist schon bei allen drei Shellys so eingestellt.

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

                            @mickym

                            @hotspot_2 sagte in Shellys ("Alt und Plus") über MQTT Adapter:

                            @mickym Sehr guter Ansatz ;-). War mir bisher so nicht bekannt das es diese Funktion gibt. Aber natürlich perfekt für diese Szenario. Ist schon bei allen drei Shellys so eingestellt.

                            e6c992a8-493f-487a-a03e-0293420877c4-image.png

                            Also ganz links also alles was triggern einschalten soll

                            [
                               {
                                   "id": "397e721c8443f53e",
                                   "type": "mqtt in",
                                   "z": "2e7d4cac81c671e3",
                                   "d": true,
                                   "name": "BWM oben",
                                   "topic": "shellies/sonstiges/bwm_wk/status",
                                   "qos": "2",
                                   "datatype": "auto-detect",
                                   "broker": "b22fc4d3e3f172bb",
                                   "nl": false,
                                   "rap": true,
                                   "rh": 0,
                                   "inputs": 0,
                                   "x": 360,
                                   "y": 1600,
                                   "wires": [
                                       [
                                           "f37773770cc10a69"
                                       ]
                                   ]
                               },
                               {
                                   "id": "4e9de718a2e77470",
                                   "type": "mqtt in",
                                   "z": "2e7d4cac81c671e3",
                                   "d": true,
                                   "name": "BWM mitte",
                                   "topic": "shellies/sonstiges/bwm_flur_keller/status",
                                   "qos": "2",
                                   "datatype": "auto-detect",
                                   "broker": "b22fc4d3e3f172bb",
                                   "nl": false,
                                   "rap": true,
                                   "rh": 0,
                                   "inputs": 0,
                                   "x": 360,
                                   "y": 1640,
                                   "wires": [
                                       [
                                           "f37773770cc10a69"
                                       ]
                                   ]
                               },
                               {
                                   "id": "800abea06f19a103",
                                   "type": "trigger",
                                   "z": "2e7d4cac81c671e3",
                                   "name": "",
                                   "op1": "{\"id\":123,\"src\":\"hotspot_2\",\"method\":\"Switch.Set\",\"params\":{\"id\":0,\"on\":true}}",
                                   "op2": "{\"id\":123,\"src\":\"hotspot_2\",\"method\":\"Switch.Set\",\"params\":{\"id\":0,\"on\":false}}",
                                   "op1type": "json",
                                   "op2type": "json",
                                   "duration": "2",
                                   "extend": true,
                                   "overrideDelay": false,
                                   "units": "min",
                                   "reset": "",
                                   "bytopic": "all",
                                   "topic": "topic",
                                   "outputs": 1,
                                   "x": 990,
                                   "y": 1540,
                                   "wires": [
                                       [
                                           "b122e2e77c6da325"
                                       ]
                                   ]
                               },
                               {
                                   "id": "c7a2538582f26f99",
                                   "type": "switch",
                                   "z": "2e7d4cac81c671e3",
                                   "name": "active = true?",
                                   "property": "active",
                                   "propertyType": "global",
                                   "rules": [
                                       {
                                           "t": "true"
                                       }
                                   ],
                                   "checkall": "true",
                                   "repair": false,
                                   "outputs": 1,
                                   "x": 800,
                                   "y": 1540,
                                   "wires": [
                                       [
                                           "800abea06f19a103"
                                       ]
                                   ]
                               },
                               {
                                   "id": "85adc04bab696758",
                                   "type": "mqtt in",
                                   "z": "2e7d4cac81c671e3",
                                   "d": true,
                                   "name": "BWM unten",
                                   "topic": "shellies/sonstiges/bwm_wk/status",
                                   "qos": "2",
                                   "datatype": "auto-detect",
                                   "broker": "b22fc4d3e3f172bb",
                                   "nl": false,
                                   "rap": true,
                                   "rh": 0,
                                   "inputs": 0,
                                   "x": 350,
                                   "y": 1680,
                                   "wires": [
                                       [
                                           "f37773770cc10a69"
                                       ]
                                   ]
                               },
                               {
                                   "id": "8e92ad87f1753886",
                                   "type": "mqtt in",
                                   "z": "2e7d4cac81c671e3",
                                   "d": true,
                                   "name": "Schalter 1",
                                   "topic": "shellies/sonstiges/bwm_flur_keller/status",
                                   "qos": "2",
                                   "datatype": "auto-detect",
                                   "broker": "b22fc4d3e3f172bb",
                                   "nl": false,
                                   "rap": true,
                                   "rh": 0,
                                   "inputs": 0,
                                   "x": 400,
                                   "y": 1420,
                                   "wires": [
                                       [
                                           "fc6fb44b1d1d608a"
                                       ]
                                   ]
                               },
                               {
                                   "id": "f37773770cc10a69",
                                   "type": "switch",
                                   "z": "2e7d4cac81c671e3",
                                   "name": "",
                                   "property": "payload.motion",
                                   "propertyType": "msg",
                                   "rules": [
                                       {
                                           "t": "true"
                                       }
                                   ],
                                   "checkall": "true",
                                   "repair": false,
                                   "outputs": 1,
                                   "x": 550,
                                   "y": 1640,
                                   "wires": [
                                       [
                                           "77e70e12f14594fe"
                                       ]
                                   ]
                               },
                               {
                                   "id": "9cbbb699f5a355ef",
                                   "type": "mqtt in",
                                   "z": "2e7d4cac81c671e3",
                                   "d": true,
                                   "name": "Schalter 2",
                                   "topic": "shellies/sonstiges/bwm_flur_keller/status",
                                   "qos": "2",
                                   "datatype": "auto-detect",
                                   "broker": "b22fc4d3e3f172bb",
                                   "nl": false,
                                   "rap": true,
                                   "rh": 0,
                                   "inputs": 0,
                                   "x": 400,
                                   "y": 1460,
                                   "wires": [
                                       [
                                           "fc6fb44b1d1d608a"
                                       ]
                                   ]
                               },
                               {
                                   "id": "8f34eb2c75697e59",
                                   "type": "mqtt in",
                                   "z": "2e7d4cac81c671e3",
                                   "d": true,
                                   "name": "Button",
                                   "topic": "shellies/sonstiges/bwm_flur_keller/status",
                                   "qos": "2",
                                   "datatype": "auto-detect",
                                   "broker": "b22fc4d3e3f172bb",
                                   "nl": false,
                                   "rap": true,
                                   "rh": 0,
                                   "inputs": 0,
                                   "x": 410,
                                   "y": 1500,
                                   "wires": [
                                       [
                                           "fc6fb44b1d1d608a"
                                       ]
                                   ]
                               },
                               {
                                   "id": "b122e2e77c6da325",
                                   "type": "debug",
                                   "z": "2e7d4cac81c671e3",
                                   "name": "Schalten",
                                   "active": true,
                                   "tosidebar": true,
                                   "console": false,
                                   "tostatus": false,
                                   "complete": "payload",
                                   "targetType": "msg",
                                   "statusVal": "",
                                   "statusType": "auto",
                                   "x": 1180,
                                   "y": 1540,
                                   "wires": []
                               },
                               {
                                   "id": "77e70e12f14594fe",
                                   "type": "junction",
                                   "z": "2e7d4cac81c671e3",
                                   "x": 680,
                                   "y": 1540,
                                   "wires": [
                                       [
                                           "c7a2538582f26f99"
                                       ]
                                   ]
                               },
                               {
                                   "id": "fc6fb44b1d1d608a",
                                   "type": "junction",
                                   "z": "2e7d4cac81c671e3",
                                   "x": 580,
                                   "y": 1460,
                                   "wires": [
                                       [
                                           "77e70e12f14594fe"
                                       ]
                                   ]
                               },
                               {
                                   "id": "b22fc4d3e3f172bb",
                                   "type": "mqtt-broker",
                                   "name": "iobroker mqtt adapter",
                                   "broker": "localhost",
                                   "port": "1883",
                                   "clientid": "mqttin_nodered",
                                   "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": ""
                               }
                            ]
                            

                            H 1 Reply Last reply Reply Quote 0
                            • H
                              hotspot_2 @mickym last edited by hotspot_2

                              @mickym So, hab mal etwas gearbeitet ;-).

                              Bei dem Shelly Button bin ich mir nicht ganz so sicher wie man das richtig auswertet. Wenn man den Button drückt dann kommt da (richtiger Pfad zum Objekt ist drin) ein JSON mit event und event_cnt. event ist dann z.B. S für einen kurzen Druck, SS für zwei kurze Drücker und L für einen langen Druck auf den Button. event_cnt zählt immer hoch.

                              [
                                 {
                                     "id": "86408d5662226c61",
                                     "type": "mqtt in",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "topic": "shellies/sonstiges/bwm_keller/status",
                                     "qos": "2",
                                     "datatype": "auto-detect",
                                     "broker": "b22fc4d3e3f172bb",
                                     "nl": false,
                                     "rap": true,
                                     "rh": 0,
                                     "inputs": 0,
                                     "x": 220,
                                     "y": 340,
                                     "wires": [
                                         [
                                             "e74cb961cfd52dca"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "218e611097615166",
                                     "type": "mqtt in",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "topic": "shellies/sonstiges/bwm_unten/status",
                                     "qos": "2",
                                     "datatype": "auto-detect",
                                     "broker": "b22fc4d3e3f172bb",
                                     "nl": false,
                                     "rap": true,
                                     "rh": 0,
                                     "inputs": 0,
                                     "x": 220,
                                     "y": 400,
                                     "wires": [
                                         [
                                             "e74cb961cfd52dca"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "d4bdac625b4b90f5",
                                     "type": "mqtt in",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "topic": "shellies/sonstiges/bwm_oben/status",
                                     "qos": "2",
                                     "datatype": "auto-detect",
                                     "broker": "b22fc4d3e3f172bb",
                                     "nl": false,
                                     "rap": true,
                                     "rh": 0,
                                     "inputs": 0,
                                     "x": 220,
                                     "y": 460,
                                     "wires": [
                                         [
                                             "e74cb961cfd52dca"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "e74cb961cfd52dca",
                                     "type": "switch",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "property": "payload.motion",
                                     "propertyType": "msg",
                                     "rules": [
                                         {
                                             "t": "true"
                                         }
                                     ],
                                     "checkall": "true",
                                     "repair": false,
                                     "outputs": 1,
                                     "x": 870,
                                     "y": 520,
                                     "wires": [
                                         []
                                     ]
                                 },
                                 {
                                     "id": "411794847503e83f",
                                     "type": "mqtt in",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "topic": "shellies/licht/treppenhaus/unten/status/switch:0",
                                     "qos": "2",
                                     "datatype": "auto-detect",
                                     "broker": "b22fc4d3e3f172bb",
                                     "nl": false,
                                     "rap": true,
                                     "rh": 0,
                                     "inputs": 0,
                                     "x": 260,
                                     "y": 540,
                                     "wires": [
                                         [
                                             "d1c3e09e7243a899"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "d1c3e09e7243a899",
                                     "type": "change",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.output",
                                             "tot": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 550,
                                     "y": 540,
                                     "wires": [
                                         [
                                             "e74cb961cfd52dca"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "0a50ecf858e5f5fd",
                                     "type": "mqtt in",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "topic": "shellies/licht/treppenhaus/oben/status/switch:0",
                                     "qos": "2",
                                     "datatype": "auto-detect",
                                     "broker": "b22fc4d3e3f172bb",
                                     "nl": false,
                                     "rap": true,
                                     "rh": 0,
                                     "inputs": 0,
                                     "x": 250,
                                     "y": 600,
                                     "wires": [
                                         [
                                             "b59a624bcc1d2dde"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "b59a624bcc1d2dde",
                                     "type": "change",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.output",
                                             "tot": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 550,
                                     "y": 600,
                                     "wires": [
                                         [
                                             "e74cb961cfd52dca"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "0fedf4e255e04e63",
                                     "type": "mqtt in",
                                     "z": "692f3cf44001c136",
                                     "name": "",
                                     "topic": "shellies/sonstiges/button_keller/input_event/0",
                                     "qos": "2",
                                     "datatype": "auto-detect",
                                     "broker": "b22fc4d3e3f172bb",
                                     "nl": false,
                                     "rap": true,
                                     "rh": 0,
                                     "inputs": 0,
                                     "x": 250,
                                     "y": 660,
                                     "wires": [
                                         []
                                     ]
                                 },
                                 {
                                     "id": "b22fc4d3e3f172bb",
                                     "type": "mqtt-broker",
                                     "name": "iobroker mqtt adapter",
                                     "broker": "localhost",
                                     "port": "1883",
                                     "clientid": "mqttin_nodered",
                                     "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": ""
                                 }
                              ]
                              

                              Hab gerade nochmal was korrigiert.

                              mickym 2 Replies Last reply Reply Quote 0
                              • mickym
                                mickym Most Active @hotspot_2 last edited by

                                @hotspot_2 Ich hab mal einen Flow gemacht noch basierend auf dem vorigen. Im Prinzip ist doch egal was aus dem Button rauskommt. Du willst ja nur das geschaltet wird wenn gedrückt wird.

                                Also da brauchst nichts auswerten einfach alles was bei Betätigung triggert in die trigger Node - der Inhalt interessiert nicht.

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

                                  @hotspot_2 sagte in Shellys ("Alt und Plus") über MQTT Adapter:

                                  @mickym So, hab mal etwas gearbeitet ;-).

                                  Bei dem Shelly Button bin ich mir nicht ganz so sicher wie man das richtig auswertet. Wenn man den Button drückt dann kommt da (richtiger Pfad zum Objekt ist drin) ein JSON mit event und event_cnt. event ist dann z.B. S für einen kurzen Druck, SS für zwei kurze Drücker und L für einen langen Druck auf den Button. event_cnt zählt immer hoch.

                                  [
                                     {
                                         "id": "86408d5662226c61",
                                         "type": "mqtt in",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "topic": "shellies/sonstiges/bwm_keller/status",
                                         "qos": "2",
                                         "datatype": "auto-detect",
                                         "broker": "b22fc4d3e3f172bb",
                                         "nl": false,
                                         "rap": true,
                                         "rh": 0,
                                         "inputs": 0,
                                         "x": 220,
                                         "y": 340,
                                         "wires": [
                                             [
                                                 "e74cb961cfd52dca"
                                             ]
                                         ]
                                     },
                                     {
                                         "id": "218e611097615166",
                                         "type": "mqtt in",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "topic": "shellies/sonstiges/bwm_unten/status",
                                         "qos": "2",
                                         "datatype": "auto-detect",
                                         "broker": "b22fc4d3e3f172bb",
                                         "nl": false,
                                         "rap": true,
                                         "rh": 0,
                                         "inputs": 0,
                                         "x": 220,
                                         "y": 400,
                                         "wires": [
                                             [
                                                 "e74cb961cfd52dca"
                                             ]
                                         ]
                                     },
                                     {
                                         "id": "d4bdac625b4b90f5",
                                         "type": "mqtt in",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "topic": "shellies/sonstiges/bwm_oben/status",
                                         "qos": "2",
                                         "datatype": "auto-detect",
                                         "broker": "b22fc4d3e3f172bb",
                                         "nl": false,
                                         "rap": true,
                                         "rh": 0,
                                         "inputs": 0,
                                         "x": 220,
                                         "y": 460,
                                         "wires": [
                                             [
                                                 "e74cb961cfd52dca"
                                             ]
                                         ]
                                     },
                                     {
                                         "id": "e74cb961cfd52dca",
                                         "type": "switch",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "property": "payload.motion",
                                         "propertyType": "msg",
                                         "rules": [
                                             {
                                                 "t": "true"
                                             }
                                         ],
                                         "checkall": "true",
                                         "repair": false,
                                         "outputs": 1,
                                         "x": 870,
                                         "y": 520,
                                         "wires": [
                                             []
                                         ]
                                     },
                                     {
                                         "id": "411794847503e83f",
                                         "type": "mqtt in",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "topic": "shellies/licht/treppenhaus/unten/status/switch:0",
                                         "qos": "2",
                                         "datatype": "auto-detect",
                                         "broker": "b22fc4d3e3f172bb",
                                         "nl": false,
                                         "rap": true,
                                         "rh": 0,
                                         "inputs": 0,
                                         "x": 260,
                                         "y": 540,
                                         "wires": [
                                             [
                                                 "d1c3e09e7243a899"
                                             ]
                                         ]
                                     },
                                     {
                                         "id": "d1c3e09e7243a899",
                                         "type": "change",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "rules": [
                                             {
                                                 "t": "set",
                                                 "p": "payload",
                                                 "pt": "msg",
                                                 "to": "payload.output",
                                                 "tot": "msg"
                                             }
                                         ],
                                         "action": "",
                                         "property": "",
                                         "from": "",
                                         "to": "",
                                         "reg": false,
                                         "x": 550,
                                         "y": 540,
                                         "wires": [
                                             [
                                                 "e74cb961cfd52dca"
                                             ]
                                         ]
                                     },
                                     {
                                         "id": "0a50ecf858e5f5fd",
                                         "type": "mqtt in",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "topic": "shellies/licht/treppenhaus/oben/status/switch:0",
                                         "qos": "2",
                                         "datatype": "auto-detect",
                                         "broker": "b22fc4d3e3f172bb",
                                         "nl": false,
                                         "rap": true,
                                         "rh": 0,
                                         "inputs": 0,
                                         "x": 250,
                                         "y": 600,
                                         "wires": [
                                             [
                                                 "b59a624bcc1d2dde"
                                             ]
                                         ]
                                     },
                                     {
                                         "id": "b59a624bcc1d2dde",
                                         "type": "change",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "rules": [
                                             {
                                                 "t": "set",
                                                 "p": "payload",
                                                 "pt": "msg",
                                                 "to": "payload.output",
                                                 "tot": "msg"
                                             }
                                         ],
                                         "action": "",
                                         "property": "",
                                         "from": "",
                                         "to": "",
                                         "reg": false,
                                         "x": 550,
                                         "y": 600,
                                         "wires": [
                                             [
                                                 "e74cb961cfd52dca"
                                             ]
                                         ]
                                     },
                                     {
                                         "id": "0fedf4e255e04e63",
                                         "type": "mqtt in",
                                         "z": "692f3cf44001c136",
                                         "name": "",
                                         "topic": "shellies/sonstiges/button_keller/input_event/0",
                                         "qos": "2",
                                         "datatype": "auto-detect",
                                         "broker": "b22fc4d3e3f172bb",
                                         "nl": false,
                                         "rap": true,
                                         "rh": 0,
                                         "inputs": 0,
                                         "x": 250,
                                         "y": 660,
                                         "wires": [
                                             []
                                         ]
                                     },
                                     {
                                         "id": "b22fc4d3e3f172bb",
                                         "type": "mqtt-broker",
                                         "name": "iobroker mqtt adapter",
                                         "broker": "localhost",
                                         "port": "1883",
                                         "clientid": "mqttin_nodered",
                                         "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": ""
                                     }
                                  ]
                                  

                                  Hab gerade nochmal was korrigiert.

                                  Ich hab Dir einen Flow geschickt - nimm einfach den. Bei den Bewegungsmelder musst Du motion true ausfiltern, bei den Schaltern und Button interessiert der Inhalt nicht, da sollen die ja nur triggern - egal was da geschaltet wird.

                                  H 1 Reply Last reply Reply Quote 0
                                  • H
                                    hotspot_2 @mickym last edited by hotspot_2

                                    @mickym Alles klar, verstanden. Das mit den Inhalten und filtern bei BWM.

                                    Ich seh schon das wird deutlich einfacher wie mit Blockly. Und vor allem irgendwie auch viel logischer.

                                    Welche Möglichkeit habe ich den die Zeit des Triggers nun über einen Wert in einem ioBroker Objekt zu ändern?

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

                                      @hotspot_2 Gleich ich pass das nur gerade an - gib mir einfach eine iobroker In Node - wo der Wert drin steht, wie lange das Licht brennen soll und sind das ms oder s ?

                                      H 1 Reply Last reply Reply Quote 0
                                      • H
                                        hotspot_2 @mickym last edited by

                                        @mickym

                                        Der Wert steht in "0_userdata.0.hausautomation.zeitdauer_licht_treppenhaus" und die Zeitdauer in Minuten (number) ist da drin. Aktuell steht der Wert z.B. auf 3.

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

                                          @hotspot_2 sagte in Shellys ("Alt und Plus") über MQTT Adapter:

                                          0_userdata.0.hausautomation.zeitdauer_licht_treppenhaus

                                          So der Flow ist fertig 😉

                                          bf72b1d1-f69b-467f-82ad-dd478b9e2ac5-image.png

                                          Ich hab mal alle Topics der Buttons, Schalter und BWM angepasst. Kernpunkt ist wieder die trigger Node - schau Dir auch immer die Hilfe zu den Nodes an:

                                          Das alles was triggert den Zeitraum verlängert hatten wir ja schon - neu ist nun das wir mit msg.delay die Verzögerung in der Node überschreiben. 😉

                                          01f29344-c864-4d27-823c-f8ff21ab1d64-image.png

                                          Da dein Datenpunkt in Minuten angibt - muss die msg.delay Eigenschaft auf eine umgerechnete payload gesetzt werden.

                                          Beim Setzen der delay rechnen wir also von Minuten noch in ms um:

                                          0c544fc6-4653-4bf6-b161-9b31a64f6c1c-image.png

                                          und fertig ist der Flow . Hier zum Import:

                                          [
                                             {
                                                 "id": "397e721c8443f53e",
                                                 "type": "mqtt in",
                                                 "z": "2e7d4cac81c671e3",
                                                 "d": true,
                                                 "name": "",
                                                 "topic": "shellies/sonstiges/bwm_oben/status",
                                                 "qos": "2",
                                                 "datatype": "auto-detect",
                                                 "broker": "b22fc4d3e3f172bb",
                                                 "nl": false,
                                                 "rap": true,
                                                 "rh": 0,
                                                 "inputs": 0,
                                                 "x": 460,
                                                 "y": 1600,
                                                 "wires": [
                                                     [
                                                         "f37773770cc10a69"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "4e9de718a2e77470",
                                                 "type": "mqtt in",
                                                 "z": "2e7d4cac81c671e3",
                                                 "d": true,
                                                 "name": "",
                                                 "topic": "shellies/sonstiges/bwm_unten/status",
                                                 "qos": "2",
                                                 "datatype": "auto-detect",
                                                 "broker": "b22fc4d3e3f172bb",
                                                 "nl": false,
                                                 "rap": true,
                                                 "rh": 0,
                                                 "inputs": 0,
                                                 "x": 460,
                                                 "y": 1640,
                                                 "wires": [
                                                     [
                                                         "f37773770cc10a69"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "800abea06f19a103",
                                                 "type": "trigger",
                                                 "z": "2e7d4cac81c671e3",
                                                 "name": "",
                                                 "op1": "{\"id\":123,\"src\":\"hotspot_2\",\"method\":\"Switch.Set\",\"params\":{\"id\":0,\"on\":true}}",
                                                 "op2": "{\"id\":123,\"src\":\"hotspot_2\",\"method\":\"Switch.Set\",\"params\":{\"id\":0,\"on\":false}}",
                                                 "op1type": "json",
                                                 "op2type": "json",
                                                 "duration": "2",
                                                 "extend": true,
                                                 "overrideDelay": true,
                                                 "units": "min",
                                                 "reset": "",
                                                 "bytopic": "all",
                                                 "topic": "topic",
                                                 "outputs": 1,
                                                 "x": 1130,
                                                 "y": 1540,
                                                 "wires": [
                                                     [
                                                         "b122e2e77c6da325"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "c7a2538582f26f99",
                                                 "type": "switch",
                                                 "z": "2e7d4cac81c671e3",
                                                 "name": "active = true?",
                                                 "property": "active",
                                                 "propertyType": "global",
                                                 "rules": [
                                                     {
                                                         "t": "true"
                                                     }
                                                 ],
                                                 "checkall": "true",
                                                 "repair": false,
                                                 "outputs": 1,
                                                 "x": 940,
                                                 "y": 1540,
                                                 "wires": [
                                                     [
                                                         "800abea06f19a103"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "85adc04bab696758",
                                                 "type": "mqtt in",
                                                 "z": "2e7d4cac81c671e3",
                                                 "d": true,
                                                 "name": "",
                                                 "topic": "shellies/sonstiges/bwm_keller/status",
                                                 "qos": "2",
                                                 "datatype": "auto-detect",
                                                 "broker": "b22fc4d3e3f172bb",
                                                 "nl": false,
                                                 "rap": true,
                                                 "rh": 0,
                                                 "inputs": 0,
                                                 "x": 460,
                                                 "y": 1680,
                                                 "wires": [
                                                     [
                                                         "f37773770cc10a69"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "8e92ad87f1753886",
                                                 "type": "mqtt in",
                                                 "z": "2e7d4cac81c671e3",
                                                 "d": true,
                                                 "name": "",
                                                 "topic": "shellies/licht/treppenhaus/oben/status/switch:0",
                                                 "qos": "2",
                                                 "datatype": "auto-detect",
                                                 "broker": "b22fc4d3e3f172bb",
                                                 "nl": false,
                                                 "rap": true,
                                                 "rh": 0,
                                                 "inputs": 0,
                                                 "x": 450,
                                                 "y": 1420,
                                                 "wires": [
                                                     [
                                                         "fc6fb44b1d1d608a"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "f37773770cc10a69",
                                                 "type": "switch",
                                                 "z": "2e7d4cac81c671e3",
                                                 "name": "",
                                                 "property": "payload.motion",
                                                 "propertyType": "msg",
                                                 "rules": [
                                                     {
                                                         "t": "true"
                                                     }
                                                 ],
                                                 "checkall": "true",
                                                 "repair": false,
                                                 "outputs": 1,
                                                 "x": 690,
                                                 "y": 1640,
                                                 "wires": [
                                                     [
                                                         "77e70e12f14594fe"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "9cbbb699f5a355ef",
                                                 "type": "mqtt in",
                                                 "z": "2e7d4cac81c671e3",
                                                 "d": true,
                                                 "name": "",
                                                 "topic": "shellies/licht/treppenhaus/unten/status/switch:0",
                                                 "qos": "2",
                                                 "datatype": "auto-detect",
                                                 "broker": "b22fc4d3e3f172bb",
                                                 "nl": false,
                                                 "rap": true,
                                                 "rh": 0,
                                                 "inputs": 0,
                                                 "x": 440,
                                                 "y": 1460,
                                                 "wires": [
                                                     [
                                                         "fc6fb44b1d1d608a"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "8f34eb2c75697e59",
                                                 "type": "mqtt in",
                                                 "z": "2e7d4cac81c671e3",
                                                 "d": true,
                                                 "name": "",
                                                 "topic": "shellies/sonstiges/button_keller/input_event/0",
                                                 "qos": "2",
                                                 "datatype": "auto-detect",
                                                 "broker": "b22fc4d3e3f172bb",
                                                 "nl": false,
                                                 "rap": true,
                                                 "rh": 0,
                                                 "inputs": 0,
                                                 "x": 450,
                                                 "y": 1500,
                                                 "wires": [
                                                     [
                                                         "fc6fb44b1d1d608a"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "b122e2e77c6da325",
                                                 "type": "debug",
                                                 "z": "2e7d4cac81c671e3",
                                                 "name": "Schalten",
                                                 "active": true,
                                                 "tosidebar": true,
                                                 "console": false,
                                                 "tostatus": false,
                                                 "complete": "payload",
                                                 "targetType": "msg",
                                                 "statusVal": "",
                                                 "statusType": "auto",
                                                 "x": 1320,
                                                 "y": 1540,
                                                 "wires": []
                                             },
                                             {
                                                 "id": "3f983bcf654e4ce8",
                                                 "type": "change",
                                                 "z": "2e7d4cac81c671e3",
                                                 "name": "",
                                                 "rules": [
                                                     {
                                                         "t": "set",
                                                         "p": "delay",
                                                         "pt": "msg",
                                                         "to": "payload * 60 *1000",
                                                         "tot": "jsonata"
                                                     }
                                                 ],
                                                 "action": "",
                                                 "property": "",
                                                 "from": "",
                                                 "to": "",
                                                 "reg": false,
                                                 "x": 920,
                                                 "y": 1360,
                                                 "wires": [
                                                     [
                                                         "800abea06f19a103"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "c8a98f98d67408e0",
                                                 "type": "ioBroker in",
                                                 "z": "2e7d4cac81c671e3",
                                                 "name": "",
                                                 "topic": "0_userdata.0.hausautomation.zeitdauer_licht_treppenhaus",
                                                 "payloadType": "value",
                                                 "onlyack": "",
                                                 "func": "all",
                                                 "gap": "",
                                                 "fireOnStart": "true",
                                                 "outFormat": "MQTT",
                                                 "x": 530,
                                                 "y": 1360,
                                                 "wires": [
                                                     [
                                                         "3f983bcf654e4ce8"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "77e70e12f14594fe",
                                                 "type": "junction",
                                                 "z": "2e7d4cac81c671e3",
                                                 "x": 820,
                                                 "y": 1540,
                                                 "wires": [
                                                     [
                                                         "c7a2538582f26f99"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "fc6fb44b1d1d608a",
                                                 "type": "junction",
                                                 "z": "2e7d4cac81c671e3",
                                                 "x": 720,
                                                 "y": 1460,
                                                 "wires": [
                                                     [
                                                         "77e70e12f14594fe"
                                                     ]
                                                 ]
                                             },
                                             {
                                                 "id": "b22fc4d3e3f172bb",
                                                 "type": "mqtt-broker",
                                                 "name": "iobroker mqtt adapter",
                                                 "broker": "localhost",
                                                 "port": "1883",
                                                 "clientid": "mqttin_nodered",
                                                 "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": ""
                                             }
                                          ]
                                          

                                          Eigentlich easy, wenn man es logisch durchdacht hat. Nun gut das mit dem detached Mode - konnten wir uns ja das wiedereinschalten sparen. 😉

                                          Achso ist noch das Abprüfen auf die globale Variable drin - musst halt ggf. wieder raus nehmen.

                                          H 1 Reply Last reply Reply Quote 0
                                          • H
                                            hotspot_2 @mickym last edited by

                                            @mickym Super!

                                            Kurze Frage noch: Der Switch "active=true" ist der der die globale Variable prüft (ob Treppenhauslicht aktiv oder nicht) ? Oder wird der für die Zusammenführung der ganzen Nodes gebraucht?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            481
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            512
                                            61609
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo