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

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    • Save The Date: ioBroker@Smart Living Forum Solingen, 14.06.

    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 So, ich habe jetzt mal was eingebaut in den Flow. Idee ist das ich einen zusätzlichen Schalter habe der bei true die Bewegungsmelder nur einschalten soll wenn es dunkel ist und bei false immer. Davor gibt es noch einen Schalter der dafür sorgen soll ob die Bewegungsmelder überhaupt aktiviert worden sind.

      121c55d6-842e-40d3-bf06-9458687dfa48-image.png

      [
         {
             "id": "d61506de1954395b",
             "type": "trigger",
             "z": "692f3cf44001c136",
             "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": 1130,
             "y": 420,
             "wires": [
                 [
                     "aea976760342a7ca",
                     "b31a1ad723458b20",
                     "cdde801771054bfd"
                 ]
             ]
         },
         {
             "id": "13f2741ac766c270",
             "type": "switch",
             "z": "692f3cf44001c136",
             "name": "",
             "property": "payload.motion",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "true"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 590,
             "y": 600,
             "wires": [
                 [
                     "cb40f947f82f67aa"
                 ]
             ]
         },
         {
             "id": "cb40f947f82f67aa",
             "type": "ioBroker get",
             "z": "692f3cf44001c136",
             "name": "Schalter",
             "topic": "0_userdata.0.hausautomation.bewegungsmelder_treppenhaus",
             "attrname": "payload",
             "payloadType": "value",
             "errOnInvalidState": "nothing",
             "x": 740,
             "y": 600,
             "wires": [
                 [
                     "a7f6db04440edd6b"
                 ]
             ]
         },
         {
             "id": "a7f6db04440edd6b",
             "type": "switch",
             "z": "692f3cf44001c136",
             "name": "Schalter = true?",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "true"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 920,
             "y": 600,
             "wires": [
                 [
                     "1c6a8158f2b8126a"
                 ]
             ]
         },
         {
             "id": "dc7cb1f29dd48123",
             "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": 290,
             "y": 360,
             "wires": [
                 [
                     "6a2f9b58c826dbf9"
                 ]
             ]
         },
         {
             "id": "d6a73f6b14cae279",
             "type": "mqtt in",
             "z": "692f3cf44001c136",
             "name": "",
             "topic": "shellies/licht/treppenhaus/oben/command/switch:0",
             "qos": "2",
             "datatype": "auto-detect",
             "broker": "b22fc4d3e3f172bb",
             "nl": false,
             "rap": true,
             "rh": 0,
             "inputs": 0,
             "x": 270,
             "y": 420,
             "wires": [
                 [
                     "6a2f9b58c826dbf9"
                 ]
             ]
         },
         {
             "id": "e520634c4d127742",
             "type": "mqtt in",
             "z": "692f3cf44001c136",
             "name": "",
             "topic": "shellies/licht/treppenhaus/unten/command/switch:0",
             "qos": "2",
             "datatype": "auto-detect",
             "broker": "b22fc4d3e3f172bb",
             "nl": false,
             "rap": true,
             "rh": 0,
             "inputs": 0,
             "x": 270,
             "y": 480,
             "wires": [
                 [
                     "6a2f9b58c826dbf9"
                 ]
             ]
         },
         {
             "id": "453d4b0e34fa74da",
             "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": 320,
             "y": 540,
             "wires": [
                 [
                     "13f2741ac766c270"
                 ]
             ]
         },
         {
             "id": "cb8976790deb4942",
             "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": 320,
             "y": 600,
             "wires": [
                 [
                     "13f2741ac766c270"
                 ]
             ]
         },
         {
             "id": "4f5732168c07a0ab",
             "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": 320,
             "y": 660,
             "wires": [
                 [
                     "13f2741ac766c270"
                 ]
             ]
         },
         {
             "id": "cdde801771054bfd",
             "type": "mqtt out",
             "z": "692f3cf44001c136",
             "name": "",
             "topic": "shellies/licht/treppenhaus/keller/rpc",
             "qos": "",
             "retain": "",
             "respTopic": "",
             "contentType": "",
             "userProps": "",
             "correl": "",
             "expiry": "",
             "broker": "b22fc4d3e3f172bb",
             "x": 1420,
             "y": 480,
             "wires": []
         },
         {
             "id": "b31a1ad723458b20",
             "type": "mqtt out",
             "z": "692f3cf44001c136",
             "name": "",
             "topic": "shellies/licht/treppenhaus/oben/rpc",
             "qos": "",
             "retain": "",
             "respTopic": "",
             "contentType": "",
             "userProps": "",
             "correl": "",
             "expiry": "",
             "broker": "b22fc4d3e3f172bb",
             "x": 1420,
             "y": 420,
             "wires": []
         },
         {
             "id": "aea976760342a7ca",
             "type": "mqtt out",
             "z": "692f3cf44001c136",
             "name": "",
             "topic": "shellies/licht/treppenhaus/unten/rpc",
             "qos": "",
             "retain": "",
             "respTopic": "",
             "contentType": "",
             "userProps": "",
             "correl": "",
             "expiry": "",
             "broker": "b22fc4d3e3f172bb",
             "x": 1420,
             "y": 360,
             "wires": []
         },
         {
             "id": "ce80c62e18617a11",
             "type": "ioBroker in",
             "z": "692f3cf44001c136",
             "name": "",
             "topic": "0_userdata.0.hausautomation.zeitdauer_licht_treppenhaus",
             "payloadType": "value",
             "onlyack": "",
             "func": "all",
             "gap": "",
             "fireOnStart": "true",
             "outFormat": "MQTT",
             "x": 250,
             "y": 300,
             "wires": [
                 [
                     "7489466fabc808bb"
                 ]
             ]
         },
         {
             "id": "7489466fabc808bb",
             "type": "change",
             "z": "692f3cf44001c136",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "delay",
                     "pt": "msg",
                     "to": "payload * 60 *1000",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 920,
             "y": 300,
             "wires": [
                 [
                     "d61506de1954395b"
                 ]
             ]
         },
         {
             "id": "4de2c4fe8b51e654",
             "type": "light-scheduler",
             "z": "692f3cf44001c136",
             "settings": "4b848ab17ecfd60b",
             "events": "[{\"start\":{\"dow\":0,\"mod\":595},\"end\":{\"dow\":0,\"mod\":605}}]",
             "topic": "",
             "name": "",
             "onPayload": "true",
             "onPayloadType": "bool",
             "offPayload": "false",
             "offPayloadType": "bool",
             "onlyWhenDark": true,
             "scheduleRndMax": 0,
             "sunElevationThreshold": "3",
             "sunShowElevationInStatus": false,
             "outputfreq": "output.statechange.startup",
             "x": 980,
             "y": 680,
             "wires": [
                 [
                     "2002136e01a05254"
                 ]
             ]
         },
         {
             "id": "814349e7d60ec173",
             "type": "switch",
             "z": "692f3cf44001c136",
             "name": "Schalter = true?",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "true"
                 },
                 {
                     "t": "false"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 2,
             "x": 760,
             "y": 720,
             "wires": [
                 [
                     "4de2c4fe8b51e654"
                 ],
                 [
                     "2002136e01a05254"
                 ]
             ]
         },
         {
             "id": "1c6a8158f2b8126a",
             "type": "ioBroker get",
             "z": "692f3cf44001c136",
             "name": "Schalter",
             "topic": "0_userdata.0.hausautomation.bewegungsmelder_aktiv_nachts",
             "attrname": "payload",
             "payloadType": "value",
             "errOnInvalidState": "nothing",
             "x": 600,
             "y": 720,
             "wires": [
                 [
                     "814349e7d60ec173"
                 ]
             ]
         },
         {
             "id": "6a2f9b58c826dbf9",
             "type": "junction",
             "z": "692f3cf44001c136",
             "x": 540,
             "y": 420,
             "wires": [
                 [
                     "d61506de1954395b"
                 ]
             ]
         },
         {
             "id": "2002136e01a05254",
             "type": "junction",
             "z": "692f3cf44001c136",
             "x": 1100,
             "y": 760,
             "wires": [
                 [
                     "d61506de1954395b"
                 ]
             ]
         },
         {
             "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": ""
         },
         {
             "id": "4b848ab17ecfd60b",
             "type": "light-scheduler-settings",
             "name": "my settings",
             "latitude": "48.8924",
             "longitude": "9.1876"
         }
      ]
      

      Nun würde ich noch gerne das Licht, wenn es dunkel ist, aktivieren wenn jemand an einer der beiden Türklingeln (unten und oben) klingelt. Da stellt sich mir noch die Frage ob ich irgendwie die vorhandene Node Light Scheduler ebenfalls nutzen kann und keine zweite Flow einfügen muss. Das wird aber dann vermutlich über das Thema global Payload passieren, oder?

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

        @hotspot_2 Also Du hast den falschen Node genutzt beim LightScheduler. Den Du genutzt hast, der triggert.

        Du brauchst aber die Filter node. Ich finde es zwar mit deinen Schalter langsam übertrieben. Du musst ein bisschen auf Ästhetik achten - und das ganze etwas auseinander ziehen - dann kannst Du oben auch noch Deinen anderen Geräte in den Filter laufen lassen:

        e5f4c71c-2648-4807-982b-b0742976e8d8-image.png

        [
           {
               "id": "175f30df96275374",
               "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": 1710,
               "y": 2580,
               "wires": [
                   [
                       "433430a1daf7bfcf",
                       "f8e58410f9532511",
                       "3d427bcbd9d3748a"
                   ]
               ]
           },
           {
               "id": "0e94e2277ef2e2c9",
               "type": "switch",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "property": "payload.motion",
               "propertyType": "msg",
               "rules": [
                   {
                       "t": "true"
                   }
               ],
               "checkall": "true",
               "repair": false,
               "outputs": 1,
               "x": 550,
               "y": 2740,
               "wires": [
                   [
                       "2d80433bb10dac6b"
                   ]
               ]
           },
           {
               "id": "2d80433bb10dac6b",
               "type": "ioBroker get",
               "z": "2e7d4cac81c671e3",
               "name": "Schalter",
               "topic": "0_userdata.0.hausautomation.bewegungsmelder_treppenhaus",
               "attrname": "payload",
               "payloadType": "value",
               "errOnInvalidState": "nothing",
               "x": 700,
               "y": 2740,
               "wires": [
                   [
                       "4f70dc2ebd50bed3"
                   ]
               ]
           },
           {
               "id": "4f70dc2ebd50bed3",
               "type": "switch",
               "z": "2e7d4cac81c671e3",
               "name": "Schalter = true?",
               "property": "payload",
               "propertyType": "msg",
               "rules": [
                   {
                       "t": "true"
                   }
               ],
               "checkall": "true",
               "repair": false,
               "outputs": 1,
               "x": 880,
               "y": 2740,
               "wires": [
                   [
                       "3f5134f664a1560b"
                   ]
               ]
           },
           {
               "id": "f51133ee161cc15a",
               "type": "mqtt in",
               "z": "2e7d4cac81c671e3",
               "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": 2500,
               "wires": [
                   [
                       "7988a035aa866cc7"
                   ]
               ]
           },
           {
               "id": "7039b340f9031c6c",
               "type": "mqtt in",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/licht/treppenhaus/oben/command/switch:0",
               "qos": "2",
               "datatype": "auto-detect",
               "broker": "b22fc4d3e3f172bb",
               "nl": false,
               "rap": true,
               "rh": 0,
               "inputs": 0,
               "x": 230,
               "y": 2560,
               "wires": [
                   [
                       "7988a035aa866cc7",
                       "2451e8e5eec3974f"
                   ]
               ]
           },
           {
               "id": "363c3739240f060e",
               "type": "mqtt in",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/licht/treppenhaus/unten/command/switch:0",
               "qos": "2",
               "datatype": "auto-detect",
               "broker": "b22fc4d3e3f172bb",
               "nl": false,
               "rap": true,
               "rh": 0,
               "inputs": 0,
               "x": 230,
               "y": 2620,
               "wires": [
                   [
                       "7988a035aa866cc7"
                   ]
               ]
           },
           {
               "id": "3097c993fb9ba0ab",
               "type": "mqtt in",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/sonstiges/bwm_keller/status",
               "qos": "2",
               "datatype": "auto-detect",
               "broker": "b22fc4d3e3f172bb",
               "nl": false,
               "rap": true,
               "rh": 0,
               "inputs": 0,
               "x": 280,
               "y": 2680,
               "wires": [
                   [
                       "0e94e2277ef2e2c9"
                   ]
               ]
           },
           {
               "id": "3f99ccd3c170d98f",
               "type": "mqtt in",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/sonstiges/bwm_oben/status",
               "qos": "2",
               "datatype": "auto-detect",
               "broker": "b22fc4d3e3f172bb",
               "nl": false,
               "rap": true,
               "rh": 0,
               "inputs": 0,
               "x": 280,
               "y": 2740,
               "wires": [
                   [
                       "0e94e2277ef2e2c9"
                   ]
               ]
           },
           {
               "id": "d6acc88db262e895",
               "type": "mqtt in",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/sonstiges/bwm_unten/status",
               "qos": "2",
               "datatype": "auto-detect",
               "broker": "b22fc4d3e3f172bb",
               "nl": false,
               "rap": true,
               "rh": 0,
               "inputs": 0,
               "x": 280,
               "y": 2800,
               "wires": [
                   [
                       "0e94e2277ef2e2c9"
                   ]
               ]
           },
           {
               "id": "3d427bcbd9d3748a",
               "type": "mqtt out",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/licht/treppenhaus/keller/rpc",
               "qos": "",
               "retain": "",
               "respTopic": "",
               "contentType": "",
               "userProps": "",
               "correl": "",
               "expiry": "",
               "broker": "b22fc4d3e3f172bb",
               "x": 2000,
               "y": 2640,
               "wires": []
           },
           {
               "id": "f8e58410f9532511",
               "type": "mqtt out",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/licht/treppenhaus/oben/rpc",
               "qos": "",
               "retain": "",
               "respTopic": "",
               "contentType": "",
               "userProps": "",
               "correl": "",
               "expiry": "",
               "broker": "b22fc4d3e3f172bb",
               "x": 2000,
               "y": 2580,
               "wires": []
           },
           {
               "id": "433430a1daf7bfcf",
               "type": "mqtt out",
               "z": "2e7d4cac81c671e3",
               "name": "",
               "topic": "shellies/licht/treppenhaus/unten/rpc",
               "qos": "",
               "retain": "",
               "respTopic": "",
               "contentType": "",
               "userProps": "",
               "correl": "",
               "expiry": "",
               "broker": "b22fc4d3e3f172bb",
               "x": 2000,
               "y": 2520,
               "wires": []
           },
           {
               "id": "c937f514cee2bae6",
               "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": 210,
               "y": 2440,
               "wires": [
                   [
                       "aefab38101674dfc"
                   ]
               ]
           },
           {
               "id": "aefab38101674dfc",
               "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": 880,
               "y": 2440,
               "wires": [
                   [
                       "175f30df96275374"
                   ]
               ]
           },
           {
               "id": "e4b6c617ddedb818",
               "type": "switch",
               "z": "2e7d4cac81c671e3",
               "name": "Schalter = true?",
               "property": "payload",
               "propertyType": "msg",
               "rules": [
                   {
                       "t": "true"
                   },
                   {
                       "t": "false"
                   }
               ],
               "checkall": "true",
               "repair": false,
               "outputs": 2,
               "x": 1240,
               "y": 2740,
               "wires": [
                   [
                       "2451e8e5eec3974f"
                   ],
                   [
                       "b74937efbbbc0c04"
                   ]
               ]
           },
           {
               "id": "3f5134f664a1560b",
               "type": "ioBroker get",
               "z": "2e7d4cac81c671e3",
               "name": "Schalter",
               "topic": "0_userdata.0.hausautomation.bewegungsmelder_aktiv_nachts",
               "attrname": "payload",
               "payloadType": "value",
               "errOnInvalidState": "nothing",
               "x": 1060,
               "y": 2740,
               "wires": [
                   [
                       "e4b6c617ddedb818"
                   ]
               ]
           },
           {
               "id": "2451e8e5eec3974f",
               "type": "light-scheduler-filter",
               "z": "2e7d4cac81c671e3",
               "settings": "",
               "events": "[]",
               "name": "",
               "onlyWhenDark": true,
               "scheduleRndMax": 0,
               "sunElevationThreshold": 6,
               "sunShowElevationInStatus": false,
               "x": 1480,
               "y": 2660,
               "wires": [
                   [
                       "b74937efbbbc0c04"
                   ],
                   []
               ]
           },
           {
               "id": "7988a035aa866cc7",
               "type": "junction",
               "z": "2e7d4cac81c671e3",
               "x": 500,
               "y": 2560,
               "wires": [
                   [
                       "175f30df96275374"
                   ]
               ]
           },
           {
               "id": "b74937efbbbc0c04",
               "type": "junction",
               "z": "2e7d4cac81c671e3",
               "x": 1680,
               "y": 2680,
               "wires": [
                   [
                       "175f30df96275374"
                   ]
               ]
           },
           {
               "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 Ich mag mein VIS (jarvis) und meine Schalter da drin. Nutze sie nicht sehr oft, das stimmt, aber einfach "nice to have" für mich ;-).

          So, jetzt sollte es passen. Funktioniert echt sehr gut mit Node RED. Bin total begeistert.

          28a499f9-f6c1-441b-8be5-040ae3294276-image.png

          [
             {
                 "id": "d61506de1954395b",
                 "type": "trigger",
                 "z": "692f3cf44001c136",
                 "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": 1410,
                 "y": 420,
                 "wires": [
                     [
                         "aea976760342a7ca",
                         "b31a1ad723458b20",
                         "cdde801771054bfd"
                     ]
                 ]
             },
             {
                 "id": "13f2741ac766c270",
                 "type": "switch",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "property": "payload.motion",
                 "propertyType": "msg",
                 "rules": [
                     {
                         "t": "true"
                     }
                 ],
                 "checkall": "true",
                 "repair": false,
                 "outputs": 1,
                 "x": 590,
                 "y": 600,
                 "wires": [
                     [
                         "cb40f947f82f67aa"
                     ]
                 ]
             },
             {
                 "id": "cb40f947f82f67aa",
                 "type": "ioBroker get",
                 "z": "692f3cf44001c136",
                 "name": "Schalter",
                 "topic": "0_userdata.0.hausautomation.bewegungsmelder_treppenhaus",
                 "attrname": "payload",
                 "payloadType": "value",
                 "errOnInvalidState": "nothing",
                 "x": 740,
                 "y": 600,
                 "wires": [
                     [
                         "a7f6db04440edd6b"
                     ]
                 ]
             },
             {
                 "id": "a7f6db04440edd6b",
                 "type": "switch",
                 "z": "692f3cf44001c136",
                 "name": "Schalter = true?",
                 "property": "payload",
                 "propertyType": "msg",
                 "rules": [
                     {
                         "t": "true"
                     }
                 ],
                 "checkall": "true",
                 "repair": false,
                 "outputs": 1,
                 "x": 920,
                 "y": 600,
                 "wires": [
                     [
                         "1c6a8158f2b8126a"
                     ]
                 ]
             },
             {
                 "id": "dc7cb1f29dd48123",
                 "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": 290,
                 "y": 360,
                 "wires": [
                     [
                         "6a2f9b58c826dbf9"
                     ]
                 ]
             },
             {
                 "id": "d6a73f6b14cae279",
                 "type": "mqtt in",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "shellies/licht/treppenhaus/oben/command/switch:0",
                 "qos": "2",
                 "datatype": "auto-detect",
                 "broker": "b22fc4d3e3f172bb",
                 "nl": false,
                 "rap": true,
                 "rh": 0,
                 "inputs": 0,
                 "x": 270,
                 "y": 420,
                 "wires": [
                     [
                         "6a2f9b58c826dbf9"
                     ]
                 ]
             },
             {
                 "id": "e520634c4d127742",
                 "type": "mqtt in",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "shellies/licht/treppenhaus/unten/command/switch:0",
                 "qos": "2",
                 "datatype": "auto-detect",
                 "broker": "b22fc4d3e3f172bb",
                 "nl": false,
                 "rap": true,
                 "rh": 0,
                 "inputs": 0,
                 "x": 270,
                 "y": 480,
                 "wires": [
                     [
                         "6a2f9b58c826dbf9"
                     ]
                 ]
             },
             {
                 "id": "453d4b0e34fa74da",
                 "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": 320,
                 "y": 540,
                 "wires": [
                     [
                         "13f2741ac766c270"
                     ]
                 ]
             },
             {
                 "id": "cb8976790deb4942",
                 "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": 320,
                 "y": 600,
                 "wires": [
                     [
                         "13f2741ac766c270"
                     ]
                 ]
             },
             {
                 "id": "4f5732168c07a0ab",
                 "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": 320,
                 "y": 660,
                 "wires": [
                     [
                         "13f2741ac766c270"
                     ]
                 ]
             },
             {
                 "id": "cdde801771054bfd",
                 "type": "mqtt out",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "shellies/licht/treppenhaus/keller/rpc",
                 "qos": "",
                 "retain": "",
                 "respTopic": "",
                 "contentType": "",
                 "userProps": "",
                 "correl": "",
                 "expiry": "",
                 "broker": "b22fc4d3e3f172bb",
                 "x": 1680,
                 "y": 480,
                 "wires": []
             },
             {
                 "id": "b31a1ad723458b20",
                 "type": "mqtt out",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "shellies/licht/treppenhaus/oben/rpc",
                 "qos": "",
                 "retain": "",
                 "respTopic": "",
                 "contentType": "",
                 "userProps": "",
                 "correl": "",
                 "expiry": "",
                 "broker": "b22fc4d3e3f172bb",
                 "x": 1680,
                 "y": 420,
                 "wires": []
             },
             {
                 "id": "aea976760342a7ca",
                 "type": "mqtt out",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "shellies/licht/treppenhaus/unten/rpc",
                 "qos": "",
                 "retain": "",
                 "respTopic": "",
                 "contentType": "",
                 "userProps": "",
                 "correl": "",
                 "expiry": "",
                 "broker": "b22fc4d3e3f172bb",
                 "x": 1680,
                 "y": 360,
                 "wires": []
             },
             {
                 "id": "ce80c62e18617a11",
                 "type": "ioBroker in",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "0_userdata.0.hausautomation.zeitdauer_licht_treppenhaus",
                 "payloadType": "value",
                 "onlyack": "",
                 "func": "all",
                 "gap": "",
                 "fireOnStart": "true",
                 "outFormat": "MQTT",
                 "x": 250,
                 "y": 300,
                 "wires": [
                     [
                         "7489466fabc808bb"
                     ]
                 ]
             },
             {
                 "id": "7489466fabc808bb",
                 "type": "change",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "rules": [
                     {
                         "t": "set",
                         "p": "delay",
                         "pt": "msg",
                         "to": "payload * 60 *1000",
                         "tot": "jsonata"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 1180,
                 "y": 300,
                 "wires": [
                     [
                         "d61506de1954395b"
                     ]
                 ]
             },
             {
                 "id": "814349e7d60ec173",
                 "type": "switch",
                 "z": "692f3cf44001c136",
                 "name": "Schalter = true?",
                 "property": "payload",
                 "propertyType": "msg",
                 "rules": [
                     {
                         "t": "true"
                     },
                     {
                         "t": "false"
                     }
                 ],
                 "checkall": "true",
                 "repair": false,
                 "outputs": 2,
                 "x": 920,
                 "y": 480,
                 "wires": [
                     [
                         "f85c9f2e9c8f2c44"
                     ],
                     []
                 ]
             },
             {
                 "id": "1c6a8158f2b8126a",
                 "type": "ioBroker get",
                 "z": "692f3cf44001c136",
                 "name": "Schalter",
                 "topic": "0_userdata.0.hausautomation.bewegungsmelder_aktiv_nachts",
                 "attrname": "payload",
                 "payloadType": "value",
                 "errOnInvalidState": "nothing",
                 "x": 760,
                 "y": 480,
                 "wires": [
                     [
                         "814349e7d60ec173"
                     ]
                 ]
             },
             {
                 "id": "f85c9f2e9c8f2c44",
                 "type": "light-scheduler-filter",
                 "z": "692f3cf44001c136",
                 "settings": "0235e1e58e1f63fb",
                 "events": "[]",
                 "name": "Dunkel?",
                 "onlyWhenDark": true,
                 "scheduleRndMax": 0,
                 "sunElevationThreshold": "3",
                 "sunShowElevationInStatus": false,
                 "x": 1220,
                 "y": 600,
                 "wires": [
                     [
                         "d61506de1954395b"
                     ],
                     []
                 ]
             },
             {
                 "id": "77905b7b0ada129c",
                 "type": "mqtt in",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "shellies/sonstiges/klingel_oben/command/switch:0",
                 "qos": "2",
                 "datatype": "auto-detect",
                 "broker": "b22fc4d3e3f172bb",
                 "nl": false,
                 "rap": true,
                 "rh": 0,
                 "inputs": 0,
                 "x": 270,
                 "y": 720,
                 "wires": [
                     [
                         "f1cab755275289c6"
                     ]
                 ]
             },
             {
                 "id": "83b0d265a7f475aa",
                 "type": "mqtt in",
                 "z": "692f3cf44001c136",
                 "name": "",
                 "topic": "shellies/sonstiges/klingel_unten/command/switch:0",
                 "qos": "2",
                 "datatype": "auto-detect",
                 "broker": "b22fc4d3e3f172bb",
                 "nl": false,
                 "rap": true,
                 "rh": 0,
                 "inputs": 0,
                 "x": 270,
                 "y": 780,
                 "wires": [
                     [
                         "f1cab755275289c6"
                     ]
                 ]
             },
             {
                 "id": "f1cab755275289c6",
                 "type": "ioBroker get",
                 "z": "692f3cf44001c136",
                 "name": "Schalter",
                 "topic": "0_userdata.0.hausautomation.licht_an_klingel_treppenhaus",
                 "attrname": "payload",
                 "payloadType": "value",
                 "errOnInvalidState": "nothing",
                 "x": 580,
                 "y": 740,
                 "wires": [
                     [
                         "b74ff5a798e07ecc"
                     ]
                 ]
             },
             {
                 "id": "b74ff5a798e07ecc",
                 "type": "switch",
                 "z": "692f3cf44001c136",
                 "name": "Schalter = true?",
                 "property": "payload",
                 "propertyType": "msg",
                 "rules": [
                     {
                         "t": "true"
                     }
                 ],
                 "checkall": "true",
                 "repair": false,
                 "outputs": 1,
                 "x": 760,
                 "y": 740,
                 "wires": [
                     [
                         "f85c9f2e9c8f2c44"
                     ]
                 ]
             },
             {
                 "id": "6a2f9b58c826dbf9",
                 "type": "junction",
                 "z": "692f3cf44001c136",
                 "x": 540,
                 "y": 420,
                 "wires": [
                     [
                         "d61506de1954395b"
                     ]
                 ]
             },
             {
                 "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": ""
             },
             {
                 "id": "0235e1e58e1f63fb",
                 "type": "light-scheduler-settings",
                 "name": "my settings",
                 "latitude": "48.8924",
                 "longitude": "9.1876"
             }
          ]
          

          Nachher noch das Mosquito Thema erledigen und dann ist das ne runde Sache insgesamt.

          Gibt es eine Möglichkeit nach dem Ende des Triggers noch ein paar Aktionen zu machen? z.B. einen Wert in ein iobroker out zu schreiben?

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

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

            Gibt es eine Möglichkeit nach dem Ende des Triggers noch ein paar Aktionen zu machen? z.B. einen Wert in ein iobroker out zu schreiben?

            Soviel du willst - die Möglichkeiten sind nahezu unbegrenzt. 😁

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

              @mickym Ich meine wenn die vorgebene Zeit abgelaufen ist (also die zweite Nachricht abgeschickt wird) noch ein paar Aktionen zu machen. z.b. einen Wert in ein iobroker out zu schreiben. Aber erst dann wenn quasi das Licht wieder ausgeschalten wird.

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

                @hotspot_2 Klar Du musst halt nach den Ausschaltnachrichten filtern, wie das geht mit dem Filtern und dem Pfad habe ich Dir ja gezeigt.

                Wenn Du nicht mehr weißt, wie Du filtest Debug Node dran und Pfad kopieren:

                4956e264-5b24-49ed-b135-b4a56c260b5d-image.png

                und dann in der switch node danach filtern:

                15506d3f-4956-4cee-987b-20970d6a835b-image.png

                Du musst in jedem Fall lernen mit Objekten umzugehen. 😁

                Es gäbe noch die Möglichkeit ohne Filtern zu arbeiten, in dem Du die 2. Nachricht über einen getrennten Ausgang schickst. Dann musst aber den 2. Ausgang auch mit allen Lampen verbinden.

                652a7ef3-a950-475b-83be-c9ea231c20ca-image.png

                Aber Du sollst schon lernen, wie man mit Objekten umgeht. 😉

                S 1 Reply Last reply Reply Quote 0
                • S
                  SabineT @mickym last edited by

                  Um zu schaun, was z.B. die Shellys so über MQTT senden oder auch selber MQTT-Topics zu schicken, verwende ich den MQTT Explorer.

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

                    @sabinet Ja da ist nichts gegen einzuwenden, aber ich kann gerade nicht den Zusammenhang mit dem aktuellen Flow hier herstellen.

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

                      @mickym Ich bräuchte nochmal einen Tipp. Wie kann ich den am einfachsten eine Objekt auf einen Wert setzen so einfach zwischendrin wenn ich das gerne machen möchte also wenn z.B. eine bestimmte Bedingung erfüllt ist nach einem Flow ein Objekt im ioBroker auf true setzen oder auch mal false.

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

                        @hotspot_2 Mit einer Change Node die payload entsprechend Deinen Wünschen anpassen und dann via iobroker-Out Node in den Datenpunkt feuern. 😉

                        Erinnere Dich doch an die elegante Lösung: https://forum.iobroker.net/post/970788

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

                          @mickym So, mosquitto läuft mit dem gleichen User und Passwort wie vorher der MQTT Adapter als er noch Broker war. Den MQTT Adapter habe ich jetzt auf Client / Subscriber gestellt und auch die Credentials des mosquitto mqtt brokers eingegeben. Jetzt sieht beim Adapter alles so aus wie vorher.

                          Dann sollte das doch jetzt auch passen.

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

                            @hotspot_2 Ja - Du siehst ja dass Deine Flows noch funktionieren. 😉

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

                              @mickym Das mit der Dunkelheit klappt nicht so wie es aussieht.

                              c29a85b9-c0de-490f-8089-fe80120e35e6-image.png

                              Im Moment ist es schon deutlich dunkler geworden, aber egal was ich da einstelle der Status geht nicht auf "On".

                              2dcaa616-6208-4403-a6ac-65a4e144658c-image.png

                              Ich teste mal den Time-Range-Switch Node.

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

                                @hotspot_2 Nein - Du hast das nicht richtig konfiguriert.

                                Du musst alles blau machen, was ON sein soll. Also ein allumfassende Zeit. Ich würde alles ab 16 Uhr on machen bist 8 Uhr in der Früh. Wenn es auf Dunkeleinheit eingestellt ist beginnt es halt nicht um 16 Uhr aber es muss dunkel sein.

                                b8e6abeb-7a68-41ea-be55-03805210267b-image.png

                                a64b3890-963d-44c2-a655-0e7dbebf3ff6-image.png

                                Und das halt für jeden Wochentag. Also das blaue ist der maximale Zeitraum - bei Dir hast Du ja gar nichts eingestellt.

                                Ich finde die Nodes toll, weil Du halt grafisch mehrer ON Zeiträume definieren kannst.

                                b3dce5b4-1f66-45bc-89f3-fd5097f4b7ca-image.png

                                Du kannst sogar die Grad des Sonnenstandes einstellen.

                                Wenn Du den Haken unten set Show sun evaluation status siehst Du im Status der Node sogar den aktuellen Sonnenstand.

                                Immer die Hilfe lesen:
                                45935d44-bf27-480b-a444-390a6dacdf98-image.png

                                Du legst also mit den blau markierten Zeiten die ON Zeiten fest und diese werden dann überschrieben, dass diese nur aktiv sind, wenn es dunkel ist. Sprich wenn Du ab 16 Uhr einträgst, dann wird es erst auf on wenn es nach 16 Uhr dunkel ist.

                                Wenn Du ab 20 Uhr machst und es wird schon um 18 Uhr dunkel, geht es trotzdem erst am 20 Uhr on - ich hoffe das war verständlich erklärt. Insofern ist da in meinen Augen eine sehr feine Justierung möglich.

                                so sieht es dann aus:

                                5b45f664-f1bc-482e-a6f0-79a941e74979-image.png

                                25656346-bc52-43af-9fec-cb209d77045d-image.png

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

                                  @mickym Ok. Sehr gut erklärt! Wie immer!

                                  a924a085-95a9-4650-8afe-eca83fb0a310-image.png

                                  Hab noch was gefunden, der Haken bei msg.delay überschreiben muss gesetzt sein. Sonst übernimmt er die Zeit nicht.

                                  Was mir gerade noch etwas Sorge bereitet ist das ich durch Knopfdruck der Shellys das Licht nicht mehr einschalten kann. Das geht nur über den Bewegungsmelder aktuell. Nachtrag: Ich hab's es gibt zwei Switch:0 im mqtt des Shellys. Einmal unter command und einmal unter status. Ich brauche den unter status und hatte den im Ordner command ;-).

                                  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:

                                    Na das hatte ich aber geschrieben: https://forum.iobroker.net/post/971763 lies Dir das mal aufmerksam durch. 😉 Mit Screenshots.

                                    Was mir gerade noch etwas Sorge bereitet ist das ich durch Knopfdruck der Shellys das Licht nicht mehr einschalten kann. Das geht nur über den Bewegungsmelder aktuell

                                    Na dann mit Debug Nodes ob aus den Schaltern was rauskommt.

                                    Ich brauche den unter status und hatte den im Ordner command ;-).

                                    Warum hast Du denn das geändert - das hatte ich doch alles schon im Flow gehabt?

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

                                      @mickym Ja, habe ich auch gerade gesehen. Keine Ahnung wie das passieren konnte. Aber jetzt ist alles wieder richtig eingetragen.

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

                                        @hotspot_2 Mit dem command war wohl meine Schuld - hatte ich verkehrt in die topics eingetragen- sorry.

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

                                          @mickym Ich glaub ich habe noch was gefunden.

                                          Seitdem die beiden Shellys nun korrekt konfiguriert sind passiert folgendes: Licht geht an (egal ob über Schalter oder Bewegungsmelder) und nach Ablauf der Zeit geht das Licht kurz aus und gleich wieder an. Laut Debug wird ein JSON mit false bei On als erstes gesendet und dann danach eins mit true. Ich glaube wir müssen doch bei den beiden Shellys auch auf die Eingänge "true" filtern.

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

                                            Generell für Die Zeit und Datumsverarbeitung mit Standardnodes - kann ich Dir meinen Thread zur Lektüre empfehlen:
                                            https://forum.iobroker.net/topic/50086/datum-und-zeitverarbeitung-mit-nodered

                                            Für Blockly Umsteiger habe ich das entsprechend verglichen.

                                            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

                                            1.0k
                                            Online

                                            31.6k
                                            Users

                                            79.4k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            512
                                            60214
                                            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