# Motion Light with Timer

**URL:** <https://discourse.nodered.org/t/motion-light-with-timer/90411>\
**Category:** General\
**Created:** [25 August 2024 08:10 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411 "2024-08-25T08:10:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 08:10 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/1 "2024-08-25T08:10:50Z")

</div>

I have a light control with a motion detector that doesn't do what it's supposed to. It should come on with movement and come on again with movement again. If the vacuum robot has a value of 5, the motion detector should not work. When you press the light switch, the motion detector should also be inactive. Then the light should be on for 45 minutes. When the robot is on the move it only works, the lamps go crazy and go on and off 2 to 3 times per second. I don't know why that is. Maybe one of you can take a look at my circuit and maybe find the error.

 ![Screenshot 2024-08-25 100729](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f219f483529aa208738212976523b365145246f6.png)

```auto
 [
    {
        "id": "f40fbc4eb5ac4f7a",
        "type": "tab",
        "label": "Küche",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "63524b08cb45c082",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 310,
        "y": 370,
        "wires": [
            [
                "bbe47e797e5bd352",
                "8dbccd4f1d2e0ecb"
            ]
        ]
    },
    {
        "id": "8dbccd4f1d2e0ecb",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 940,
        "y": 370,
        "wires": [
            [
                "36517556eea614c2",
                "e2635897a5b4a26d",
                "7bbc1e6a458c30a4"
            ]
        ]
    },
    {
        "id": "b4d58094fea6da65",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 260,
        "y": 430,
        "wires": [
            [
                "63524b08cb45c082"
            ]
        ]
    },
    {
        "id": "40480422abea98ad",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 190,
        "y": 70,
        "wires": [
            [
                "75ca0135796c93c8"
            ]
        ]
    },
    {
        "id": "ae24e45f243802bf",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 920,
        "y": 190,
        "wires": [
            [
                "c01b7af31e635058",
                "79b702de70404090",
                "e265b3e669cabbed"
            ]
        ]
    },
    {
        "id": "cc199f24c2162a7f",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 920,
        "y": 240,
        "wires": [
            [
                "c01b7af31e635058",
                "79b702de70404090",
                "e265b3e669cabbed"
            ]
        ]
    },
    {
        "id": "33cf5d23a026b4a3",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 190,
        "y": 220,
        "wires": [
            [
                "37235a98bb0b252e",
                "f708a16c2d734ba2"
            ]
        ]
    },
    {
        "id": "f708a16c2d734ba2",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 220,
        "y": 190,
        "wires": [
            [
                "ae8811169c3918eb"
            ]
        ]
    },
    {
        "id": "0f00586703c4c5f8",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 930,
        "y": 520,
        "wires": [
            [
                "8654777b67aeb594",
                "036ee8eb38e50f46",
                "2427ca2ff9b108e4"
            ]
        ]
    },
    {
        "id": "19254570a6e12680",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 930,
        "y": 670,
        "wires": [
            [
                "d3a21dfe403ed866",
                "712fa614b26118a7",
                "536b6e0abd5fb919"
            ]
        ]
    },
    {
        "id": "75ca0135796c93c8",
        "type": "junction",
        "z": "f40fbc4eb5ac4f7a",
        "x": 950,
        "y": 70,
        "wires": [
            [
                "745d8681a3f9f06e",
                "0ce50d653966b0d0",
                "7724c8fa02d0eb36"
            ]
        ]
    },
    {
        "id": "9108a39567622628",
        "type": "ioBroker in",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche",
        "attrname": "payload",
        "topic": "tuya.0.bfa31f81841589e9aerhgk.1",
        "payloadType": "value",
        "onlyack": "",
        "func": "rbe",
        "gap": "",
        "fireOnStart": "false",
        "outFormat": "MQTT",
        "x": 100,
        "y": 110,
        "wires": [
            [
                "40480422abea98ad"
            ]
        ]
    },
    {
        "id": "e9b338134fd47b01",
        "type": "inject",
        "z": "f40fbc4eb5ac4f7a",
        "name": "true",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 100,
        "y": 30,
        "wires": [
            [
                "40480422abea98ad"
            ]
        ]
    },
    {
        "id": "9eba54f2d3f608ae",
        "type": "inject",
        "z": "f40fbc4eb5ac4f7a",
        "name": "false",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 100,
        "y": 70,
        "wires": [
            [
                "40480422abea98ad"
            ]
        ]
    },
    {
        "id": "bbe47e797e5bd352",
        "type": "change",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche true",
        "rules": [
            {
                "t": "set",
                "p": "Schalter.Kueche",
                "pt": "flow",
                "to": "true",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 410,
        "y": 400,
        "wires": [
            [
                "4d88bc3dbe17d4a0"
            ]
        ]
    },
    {
        "id": "4d88bc3dbe17d4a0",
        "type": "trigger",
        "z": "f40fbc4eb5ac4f7a",
        "name": "30 min.",
        "op1": "",
        "op2": "false",
        "op1type": "nul",
        "op2type": "bool",
        "duration": "20",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "Schalter.Kueche",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 560,
        "y": 400,
        "wires": [
            [
                "0be12e6bd4e8e8b0"
            ]
        ]
    },
    {
        "id": "0be12e6bd4e8e8b0",
        "type": "change",
        "z": "f40fbc4eb5ac4f7a",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "Schalter.Kueche",
                "pt": "flow",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 760,
        "y": 400,
        "wires": [
            [
                "8dbccd4f1d2e0ecb"
            ]
        ]
    },
    {
        "id": "bc31192270462750",
        "type": "inject",
        "z": "f40fbc4eb5ac4f7a",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 100,
        "y": 410,
        "wires": [
            [
                "b4d58094fea6da65"
            ]
        ]
    },
    {
        "id": "e081bb71ad5f804e",
        "type": "inject",
        "z": "f40fbc4eb5ac4f7a",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 100,
        "y": 460,
        "wires": [
            [
                "b4d58094fea6da65"
            ]
        ]
    },
    {
        "id": "f0e98b2901027f4e",
        "type": "ioBroker in",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche",
        "attrname": "payload",
        "topic": "tuya.0.bfa31f81841589e9aerhgk.1",
        "payloadType": "value",
        "onlyack": "",
        "func": "rbe",
        "gap": "",
        "fireOnStart": "false",
        "outFormat": "MQTT",
        "x": 100,
        "y": 370,
        "wires": [
            [
                "63524b08cb45c082"
            ]
        ]
    },
    {
        "id": "5810b23825401f18",
        "type": "ioBroker in",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Alexa Küche Licht an",
        "attrname": "payload",
        "topic": "alexa2.0.Echo-Devices.G0913L06031202PA.Routines.b3634834-802f-48e1-b1b2-6e460623c7f3",
        "payloadType": "value",
        "onlyack": "update",
        "func": "all",
        "gap": "",
        "fireOnStart": "false",
        "outFormat": "MQTT",
        "x": 110,
        "y": 520,
        "wires": [
            [
                "0f00586703c4c5f8"
            ]
        ]
    },
    {
        "id": "393c547d48209b0e",
        "type": "ioBroker in",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Alexa Küche Licht aus",
        "attrname": "payload",
        "topic": "alexa2.0.Echo-Devices.G090LV0371040175.Routines.983e658a-504a-44fb-9fbb-8b17eb377f8c",
        "payloadType": "value",
        "onlyack": "command",
        "func": "all",
        "gap": "",
        "fireOnStart": "false",
        "outFormat": "MQTT",
        "x": 110,
        "y": 670,
        "wires": [
            [
                "19254570a6e12680"
            ]
        ]
    },
    {
        "id": "da7126dab2db34ac",
        "type": "ioBroker get",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Status",
        "topic": "mihome-vacuum.1.info.state",
        "attrname": "roborock",
        "payloadType": "value",
        "errOnInvalidState": "nothing",
        "x": 660,
        "y": 240,
        "wires": [
            [
                "cfd8c9bf0c7f6348"
            ]
        ]
    },
    {
        "id": "cfd8c9bf0c7f6348",
        "type": "switch",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Robi nicht 5",
        "property": "roborock",
        "propertyType": "msg",
        "rules": [
            {
                "t": "neq",
                "v": "5",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 800,
        "y": 240,
        "wires": [
            [
                "cc199f24c2162a7f"
            ]
        ]
    },
    {
        "id": "3dc8e25bc8ecd68c",
        "type": "trigger",
        "z": "f40fbc4eb5ac4f7a",
        "name": "2 min. warten bevor false",
        "op1": "",
        "op2": "false",
        "op1type": "nul",
        "op2type": "bool",
        "duration": "10",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 720,
        "y": 190,
        "wires": [
            [
                "ae24e45f243802bf"
            ]
        ]
    },
    {
        "id": "57de54256f54f3d4",
        "type": "ioBroker in",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Motion",
        "attrname": "payload",
        "topic": "hue.0.Küche_Motion_Sensor.presence",
        "payloadType": "value",
        "onlyack": "",
        "func": "all",
        "gap": "",
        "fireOnStart": "true",
        "outFormat": "MQTT",
        "x": 80,
        "y": 190,
        "wires": [
            [
                "33cf5d23a026b4a3"
            ]
        ]
    },
    {
        "id": "ae8811169c3918eb",
        "type": "switch",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Bewegung ?",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 470,
        "y": 190,
        "wires": [
            [
                "da7126dab2db34ac",
                "3dc8e25bc8ecd68c"
            ]
        ]
    },
    {
        "id": "37235a98bb0b252e",
        "type": "switch",
        "z": "f40fbc4eb5ac4f7a",
        "name": "",
        "property": "Schalter.Kueche",
        "propertyType": "flow",
        "rules": [
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 290,
        "y": 220,
        "wires": [
            [
                "ae8811169c3918eb"
            ]
        ]
    },
    {
        "id": "29956a1191d5a375",
        "type": "inject",
        "z": "f40fbc4eb5ac4f7a",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 100,
        "y": 240,
        "wires": [
            [
                "33cf5d23a026b4a3"
            ]
        ]
    },
    {
        "id": "c01b7af31e635058",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. rechts",
        "topic": "sonoff.0.kueche_unterschrank_rechts.POWER",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1090,
        "y": 220,
        "wires": []
    },
    {
        "id": "e265b3e669cabbed",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Decke",
        "topic": "tuya.0.bfa31f81841589e9aerhgk.1",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1060,
        "y": 270,
        "wires": []
    },
    {
        "id": "79b702de70404090",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. links",
        "topic": "hue.0.Küche_Unterschr_Links.on",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1080,
        "y": 170,
        "wires": []
    },
    {
        "id": "36517556eea614c2",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. rechts",
        "topic": "sonoff.0.kueche_unterschrank_rechts.POWER",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1090,
        "y": 370,
        "wires": []
    },
    {
        "id": "7bbc1e6a458c30a4",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Decke",
        "topic": "tuya.0.bfa31f81841589e9aerhgk.1",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1060,
        "y": 420,
        "wires": []
    },
    {
        "id": "e2635897a5b4a26d",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. links",
        "topic": "hue.0.Küche_Unterschr_Links.on",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1080,
        "y": 320,
        "wires": []
    },
    {
        "id": "036ee8eb38e50f46",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. rechts",
        "topic": "sonoff.0.kueche_unterschrank_rechts.POWER",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1090,
        "y": 520,
        "wires": []
    },
    {
        "id": "2427ca2ff9b108e4",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Decke",
        "topic": "tuya.0.bfa31f81841589e9aerhgk.1",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1060,
        "y": 570,
        "wires": []
    },
    {
        "id": "8654777b67aeb594",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. links",
        "topic": "hue.0.Küche_Unterschr_Links.on",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1080,
        "y": 470,
        "wires": []
    },
    {
        "id": "712fa614b26118a7",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. rechts",
        "topic": "sonoff.0.kueche_unterschrank_rechts.POWER",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1090,
        "y": 670,
        "wires": []
    },
    {
        "id": "536b6e0abd5fb919",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Decke",
        "topic": "tuya.0.bfa31f81841589e9aerhgk.1",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1060,
        "y": 720,
        "wires": []
    },
    {
        "id": "d3a21dfe403ed866",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. links",
        "topic": "hue.0.Küche_Unterschr_Links.on",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1080,
        "y": 620,
        "wires": []
    },
    {
        "id": "0ce50d653966b0d0",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. rechts",
        "topic": "sonoff.0.kueche_unterschrank_rechts.POWER",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1090,
        "y": 70,
        "wires": []
    },
    {
        "id": "7724c8fa02d0eb36",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Decke",
        "topic": "tuya.0.bfa31f81841589e9aerhgk.1",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1060,
        "y": 120,
        "wires": []
    },
    {
        "id": "745d8681a3f9f06e",
        "type": "ioBroker out",
        "z": "f40fbc4eb5ac4f7a",
        "name": "Küche Unters. links",
        "topic": "hue.0.Küche_Unterschr_Links.on",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 1080,
        "y": 20,
        "wires": []
    }
]

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 09:03 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/2 "2024-08-25T09:03:24Z")

</div>

It is hard to see what is happening in your flow, as we do not have your IObroker node installed and your injects are not clearly labeled with what device they are.

What i can say is if you can collect all the data from sensor and robvac and then do your logic. You can do this with a join node. This will make the logic simpler.  
here is an example.

```auto
[{"id":"e9b338134fd47b01","type":"inject","z":"f40fbc4eb5ac4f7a","name":"robo 5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"robo","payload":"5","payloadType":"num","x":132.78945261240005,"y":72.07592633366585,"wires":[["dd7bb2df8706ecda"]]},{"id":"dd7bb2df8706ecda","type":"join","z":"f40fbc4eb5ac4f7a","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":350,"y":120,"wires":[["d9a99b73419913fb"]]},{"id":"9eba54f2d3f608ae","type":"inject","z":"f40fbc4eb5ac4f7a","name":"robo 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"robo","payload":"1","payloadType":"num","x":132.78945261240005,"y":112.07592633366585,"wires":[["dd7bb2df8706ecda"]]},{"id":"29956a1191d5a375","type":"inject","z":"f40fbc4eb5ac4f7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"sensor","payload":"true","payloadType":"bool","x":120,"y":200,"wires":[["dd7bb2df8706ecda"]]},{"id":"766fa150dadb60ed","type":"inject","z":"f40fbc4eb5ac4f7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"sensor","payload":"false","payloadType":"bool","x":130,"y":240,"wires":[["dd7bb2df8706ecda"]]},{"id":"d9a99b73419913fb","type":"switch","z":"f40fbc4eb5ac4f7a","name":"Robi nicht 5","property":"payload.robo","propertyType":"msg","rules":[{"t":"neq","v":"5","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":120,"wires":[["cfd8c9bf0c7f6348"],["63405b7bb4a8cab2"]]},{"id":"cfd8c9bf0c7f6348","type":"switch","z":"f40fbc4eb5ac4f7a","name":"Robi nicht 5","property":"payload.sensor","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":120,"wires":[["3dc8e25bc8ecd68c"]]},{"id":"63405b7bb4a8cab2","type":"change","z":"f40fbc4eb5ac4f7a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":180,"wires":[["3dc8e25bc8ecd68c","ad27a9dc76102e04"]]},{"id":"3dc8e25bc8ecd68c","type":"trigger","z":"f40fbc4eb5ac4f7a","name":"2 min. warten bevor false","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"10","extend":true,"overrideDelay":false,"units":"s","reset":"false","bytopic":"all","topic":"topic","outputs":1,"x":930,"y":120,"wires":[["ad27a9dc76102e04"]]},{"id":"ad27a9dc76102e04","type":"rbe","z":"f40fbc4eb5ac4f7a","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1110,"y":120,"wires":[["f3b1250a388b0239"]]},{"id":"f3b1250a388b0239","type":"debug","z":"f40fbc4eb5ac4f7a","name":"debug 2566","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":750,"y":240,"wires":[]}]

```

[edit] Applied filter to all topics.

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 09:23 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/3 "2024-08-25T09:23:29Z")

</div>

That sounds good and The control works, only the tricky thing is that the switch actuation and motion detector should work together. So if the robot doesn't clean, movement can work. When he drives, movement shouldn't work. This only works so far, movement should be deactivated when the physical light switch is activated and should then go off after 45 minutes and movement should then be active again or when the physical light switch is turned off again.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 09:26 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/4 "2024-08-25T09:26:06Z")

</div>

You can add the input of the physical switch to the join and add logic for that too.  
I have edited the above example as i had an error in the filter.

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 09:31 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/5 "2024-08-25T09:31:58Z")

</div>

That's how I have it now and it works, I just don't know how to add the condition with the light switch.

 ![Screenshot 2024-08-25 113057](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/65bb2d4b2f3e2068470bfc989bf027625c6bca58.png)

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 09:37 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/6 "2024-08-25T09:37:41Z")

</div>

and the data point from robo state is not in the control where did the control know the value state from robo cleaner

```auto
[
    {
        "id": "3f26791e8df59369",
        "type": "ioBroker in",
        "z": "f0e5e77f31801433",
        "d": true,
        "name": "Robo Status",
        "attrname": "payload",
        "topic": "mihome-vacuum.1.info.state",
        "payloadType": "value",
        "onlyack": "",
        "func": "all",
        "gap": "",
        "fireOnStart": "false",
        "outFormat": "MQTT",
        "x": 110,
        "y": 160,
        "wires": [
            [
                "5c77b7701e51401f"
            ]
        ]
    }
]

```

  

_Admin edit. Please use the code block not the quote block for code._

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 09:45 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/7 "2024-08-25T09:45:57Z")

</div>

Not sure if physical switch should turn on/off light as well, have taken that it should.  
Something like this

```auto
[{"id":"e9b338134fd47b01","type":"inject","z":"f40fbc4eb5ac4f7a","name":"robo 5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"robo","payload":"5","payloadType":"num","x":132.78945261240005,"y":72.07592633366585,"wires":[["dd7bb2df8706ecda"]]},{"id":"dd7bb2df8706ecda","type":"join","z":"f40fbc4eb5ac4f7a","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":350,"y":120,"wires":[["fc7e56f8ce28a7d6"]]},{"id":"9eba54f2d3f608ae","type":"inject","z":"f40fbc4eb5ac4f7a","name":"robo 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"robo","payload":"1","payloadType":"num","x":132.78945261240005,"y":112.07592633366585,"wires":[["dd7bb2df8706ecda"]]},{"id":"29956a1191d5a375","type":"inject","z":"f40fbc4eb5ac4f7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"sensor","payload":"true","payloadType":"bool","x":120,"y":200,"wires":[["dd7bb2df8706ecda"]]},{"id":"766fa150dadb60ed","type":"inject","z":"f40fbc4eb5ac4f7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"sensor","payload":"false","payloadType":"bool","x":130,"y":240,"wires":[["dd7bb2df8706ecda"]]},{"id":"7e35716958ae32fd","type":"inject","z":"f40fbc4eb5ac4f7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"switch","payload":"true","payloadType":"bool","x":120,"y":320,"wires":[["dd7bb2df8706ecda"]]},{"id":"2b152233fbdbc042","type":"inject","z":"f40fbc4eb5ac4f7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"switch","payload":"false","payloadType":"bool","x":130,"y":360,"wires":[["dd7bb2df8706ecda"]]},{"id":"fc7e56f8ce28a7d6","type":"switch","z":"f40fbc4eb5ac4f7a","name":"","property":"payload.switch","propertyType":"msg","rules":[{"t":"false"},{"t":"true"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":220,"wires":[["d9a99b73419913fb","676b909789c5556d"],["40142e2886079bf4","e8f31370a0089e04"]]},{"id":"40142e2886079bf4","type":"change","z":"f40fbc4eb5ac4f7a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":300,"wires":[["ad27a9dc76102e04"]]},{"id":"e8f31370a0089e04","type":"change","z":"f40fbc4eb5ac4f7a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":260,"wires":[["3dc8e25bc8ecd68c"]]},{"id":"d9a99b73419913fb","type":"switch","z":"f40fbc4eb5ac4f7a","name":"Robi nicht 5","property":"payload.robo","propertyType":"msg","rules":[{"t":"neq","v":"5","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":120,"wires":[["cfd8c9bf0c7f6348"],["63405b7bb4a8cab2"]]},{"id":"676b909789c5556d","type":"change","z":"f40fbc4eb5ac4f7a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":220,"wires":[["ad27a9dc76102e04"]]},{"id":"ad27a9dc76102e04","type":"rbe","z":"f40fbc4eb5ac4f7a","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1110,"y":120,"wires":[["f3b1250a388b0239"]]},{"id":"3dc8e25bc8ecd68c","type":"trigger","z":"f40fbc4eb5ac4f7a","name":"2 min. warten bevor false","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"10","extend":true,"overrideDelay":false,"units":"s","reset":"false","bytopic":"all","topic":"topic","outputs":1,"x":930,"y":120,"wires":[["ad27a9dc76102e04"]]},{"id":"cfd8c9bf0c7f6348","type":"switch","z":"f40fbc4eb5ac4f7a","name":"Robi nicht 5","property":"payload.sensor","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":120,"wires":[["3dc8e25bc8ecd68c"]]},{"id":"63405b7bb4a8cab2","type":"change","z":"f40fbc4eb5ac4f7a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":180,"wires":[["3dc8e25bc8ecd68c","ad27a9dc76102e04"]]},{"id":"f3b1250a388b0239","type":"debug","z":"f40fbc4eb5ac4f7a","name":"debug 2566","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1070,"y":240,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 15:44 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/8 "2024-08-25T15:44:39Z")

</div>

I don't know exactly how to set the input node. So that the status of the robot is available and how I set the Tuya device at the beginning node  
Vacuum Roboter In Node

 ![Screenshot 2024-08-25 174107](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/058695108ae0aa352f6ac89c66a934b3299cb81c.png)  
is Attribute what you fill in "robo" ?

Motion Sensor In Node

 ![Screenshot 2024-08-25 174124](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/2/d21a1aa1bf3c227b84fe2b7a19c2e057d29f350f.png)  
is Attribute from the Wall Switch then mean not payload then named switch  
What do I have to set for this to work?

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 15:45 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/9 "2024-08-25T15:45:11Z")

</div>

Wall switch In Node

 ![Screenshot 2024-08-25 174311](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/3/033468cea9bde7c7f8e145080348379cc9156150.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 15:56 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/10 "2024-08-25T15:56:56Z")

</div>

If I understand what you are asking correctly.

You need to set the msg.topic after each of these nodes. Add change nodes after each and set msg.topic to robo , sensor and switch. This will allow the join node to join the incoming payloads.

I do not use IObroker so what the input of those nodes are I have no idea , can you provide debug output info, set the debug nodes to show the complete message objects. Use the copy value option in the debug nodes to copy the msg object and post here.

help full info follows

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path/value for any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 16:08 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/11 "2024-08-25T16:08:42Z")

</div>

> [@E1cid](#):
>
> d. Können Sie Debug-A

Data point from the Tuya light switch returns true and false  
The data point from the motion sensor delivers true and false the vacuum cleaner delivers numbers. e.g. 5 is when charging, 8 is when cleaning, etc.  
When I click on the button, only Switch and Robo deliver a result and the formula is still missing the fact that when the switch is pressed, the light turns on, for example. 45 minutes out.

 ![Screenshot 2024-08-25 180411](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/f/df2848188168b7ed496e20a3c7f0cb31ff008ca9.png)  
I think in the picture you can see what get as object arrays

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 16:11 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/12 "2024-08-25T16:11:36Z")

</div>

If the image is the 3 devices, then you have two robo msg.topics. One of them should be sensor.

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 16:12 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/13 "2024-08-25T16:12:06Z")

</div>

```auto
{"_msgid":"1be0e4edac2e440a","payload":true,"topic":"switch"}

```

```auto
{"_msgid":"8e8b9076a74dbc9e","payload":5,"topic":"robo"}

```

```auto
{"topic":"robo","switch":true,"acknowledged":false,"timestamp":1724601787564,"lastchange":1724601787564,"from":"system.adapter.node-red.0","_msgid":"8e8b9076a74dbc9e","payload":true}

```

It can't hurt if the code can also be seen

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 16:13 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/14 "2024-08-25T16:13:12Z")

</div>

this is when I push the inject nodes you created

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 16:13 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/15 "2024-08-25T16:13:32Z")

</div>

> [@AphofisX](#):
>
> It can't hurt if the code can also be seen

In fact it is always superior, as images can not be copied.

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 16:14 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/16 "2024-08-25T16:14:44Z")

</div>

_laughs_ yes, that’s true

when i run into the motion sensor the script do nothing normally is under the node a blue square  
that goes away after the time is out

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 16:17 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/17 "2024-08-25T16:17:39Z")

</div>

> [@AphofisX](#):
>
> this is when I push the inject nodes you created

my injects have 3 different topics set, so would not produce 2 robo topics

As said previously above you need to set the IOBroker nodes messages to have the same 3 topics.

> [@E1cid](#):
>
> You need to set the msg.topic after each of these nodes. Add change nodes after each and set msg.topic to robo , sensor and switch. This will allow the join node to join the incoming payloads.

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [25 August 2024 16:20 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/18 "2024-08-25T16:20:01Z")

</div>

I have set the nodes so that only robo, switch and sensor are set as attributes.

see here:

> [@Motion Light with Timer](https://discourse.nodered.org/t/motion-light-with-timer/90411/8):
>
> I don't know exactly how to set the input node. So that the status of the robot is available and how I set the Tuya device at the beginning node Vacuum Roboter In Node is Attribute what you fill in "robo" ? Motion Sensor In Node is Attribute from the Wall Switch then mean not payload then named switch What do I have to set for this to work?

I can't answer you I've reached message answers

No reached write end  
must I do anythink  
I get these popup window

```auto
An error occurred: We appreciate your enthusiasm, keep it up! However, to ensure the safety of our community, we have set a limit - you have reached the maximum number of replies a new user can create on their first day. Please wait 16 hours before you can post further answers.

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 August 2024 16:27 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/19 "2024-08-25T16:27:10Z")

</div>

No you leave the IObroker nodes as you always had them, you just add change nodes after each IObroker node to set the msg.topic .

example like this just add IObroker nodes where the inject nodes connect to the change nodes.

```auto
[{"id":"c86af00aac7fd74b","type":"change","z":"0df28c03098e1a7f","name":"set robo topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"robo","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":120,"wires":[["dd7bb2df8706ecda"]]},{"id":"e9b338134fd47b01","type":"inject","z":"0df28c03098e1a7f","name":"robo 5","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":90,"y":100,"wires":[["c86af00aac7fd74b"]]},{"id":"9eba54f2d3f608ae","type":"inject","z":"0df28c03098e1a7f","name":"robo 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"robo","payload":"1","payloadType":"num","x":90,"y":140,"wires":[["c86af00aac7fd74b"]]},{"id":"dd7bb2df8706ecda","type":"join","z":"0df28c03098e1a7f","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":407.21054738759995,"y":147.92407366633415,"wires":[["fc7e56f8ce28a7d6"]]},{"id":"2ae8d60e31ca8e4e","type":"change","z":"0df28c03098e1a7f","name":"set sensor topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"sensor","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":240,"wires":[["dd7bb2df8706ecda"]]},{"id":"48bb827282da1f43","type":"change","z":"0df28c03098e1a7f","name":"set switch topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"switch","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":320,"wires":[["dd7bb2df8706ecda"]]},{"id":"fc7e56f8ce28a7d6","type":"switch","z":"0df28c03098e1a7f","name":"","property":"payload.switch","propertyType":"msg","rules":[{"t":"false"},{"t":"true"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":220,"wires":[["d9a99b73419913fb","676b909789c5556d"],["40142e2886079bf4","e8f31370a0089e04"]]},{"id":"766fa150dadb60ed","type":"inject","z":"0df28c03098e1a7f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":70,"y":260,"wires":[["2ae8d60e31ca8e4e"]]},{"id":"29956a1191d5a375","type":"inject","z":"0df28c03098e1a7f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":70,"y":220,"wires":[["2ae8d60e31ca8e4e"]]},{"id":"7e35716958ae32fd","type":"inject","z":"0df28c03098e1a7f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":90,"y":340,"wires":[["48bb827282da1f43"]]},{"id":"2b152233fbdbc042","type":"inject","z":"0df28c03098e1a7f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":90,"y":380,"wires":[["48bb827282da1f43"]]},{"id":"d9a99b73419913fb","type":"switch","z":"0df28c03098e1a7f","name":"Robi nicht 5","property":"payload.robo","propertyType":"msg","rules":[{"t":"neq","v":"5","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":607.2105473876,"y":147.92407366633415,"wires":[["cfd8c9bf0c7f6348"],["63405b7bb4a8cab2"]]},{"id":"676b909789c5556d","type":"change","z":"0df28c03098e1a7f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":260,"wires":[["ad27a9dc76102e04"]]},{"id":"40142e2886079bf4","type":"change","z":"0df28c03098e1a7f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":340,"wires":[["ad27a9dc76102e04"]]},{"id":"e8f31370a0089e04","type":"change","z":"0df28c03098e1a7f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":300,"wires":[["3dc8e25bc8ecd68c"]]},{"id":"cfd8c9bf0c7f6348","type":"switch","z":"0df28c03098e1a7f","name":"Robi nicht 5","property":"payload.sensor","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":787.2105473876,"y":147.92407366633415,"wires":[["3dc8e25bc8ecd68c"]]},{"id":"63405b7bb4a8cab2","type":"change","z":"0df28c03098e1a7f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":200,"wires":[["3dc8e25bc8ecd68c","ad27a9dc76102e04"]]},{"id":"ad27a9dc76102e04","type":"rbe","z":"0df28c03098e1a7f","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1167.2105473876,"y":147.92407366633415,"wires":[["f3b1250a388b0239"]]},{"id":"3dc8e25bc8ecd68c","type":"trigger","z":"0df28c03098e1a7f","name":"2 min. warten bevor false","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"10","extend":true,"overrideDelay":false,"units":"s","reset":"false","bytopic":"all","topic":"topic","outputs":1,"x":987.2105473876,"y":147.92407366633415,"wires":[["ad27a9dc76102e04"]]},{"id":"f3b1250a388b0239","type":"debug","z":"0df28c03098e1a7f","name":"debug 2566","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1127.2105473876,"y":267.92407366633415,"wires":[]}]

```

[edit]  
@AphofisX I have increased your trust level, you should be able to post again.

---

<div class="post-metadata">

**Author:** ![AphofisX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aphofisx/32/93843_2.png) [@AphofisX](https://discourse.nodered.org/u/AphofisX)\
**Post date:** [26 August 2024 15:51 UTC](https://discourse.nodered.org/t/motion-light-with-timer/90411/20 "2024-08-26T15:51:36Z")

</div>

So that I understand this correctly, even if you have an in node then it doesn't matter what comes in whether true/false or 0/1 if you have a change node behind it, the entered payload is taken as a trigger even if e.g. an in node with a device that switches true/false is activated by the change node if in the change node e.g. Entered robo, everything that goes through is treated with payload robo!?

[Next page](https://discourse.nodered.org/t/motion-light-with-timer/90411.md?page=2)
