Motion sensors and trigger delays advice

Hi all

I'm debugging some odd behaviour but looking for the best method of using motion sensors and trigger delays to turn a socket on followed by a delay followed by off if no further motion - if there was motion then the delay is extended.

I use events:state nodes to pick up the input from the sensor so i have two outputs - on and off. Is it best to use the 'on' output to trigger the switch on followed by the off to turn it off, or just use the on output to do both using the trigger output to turn off.

Seems there are many ways here but some better than others, motion sensors seem a bit finnicky :slight_smile:

I was charmed by this one

You can probably extend to suit your own needs :innocent:

Thats interesting, thanks.

It uses some node icons i've not seen before - the green little ones, what are they?

They are ordinary change nodes (with a custom icon though :wink: )


I think i have found the cause of my odd flow behaviour :slight_smile:

I'm using a Tuya PIR & 24Ghz radar presence detector; it has multiple outputs with "Occupancy" and "State". I was using the occupancy alone as that was the one i used with other plain PIR sensors but I should have been using both outputs to keep my trigger node reset so the lights stay on.

It spits out many more state outputs than it does occupancy ones and it's all working better now.