ZigBee Vs Philips Hue motion sensors?

Hi All,

What’s your opinion mostly in terms of reliability between Philips Hue & Zigbee motion sensors?

I’ve been playing around with Zigbee motion sensor (SNZB-03) and want a basic rule that turns on a light when motion detected and to turn off after x minutes when no motion is detected.

My process flow should turn on the kitchen light when motion is detected and trigger a 3 minutes timer before switching it back off which gets reset each time the state changes to on. So this way it should only turn off after 3 minutes of no motion detected.

However I’ve noticed if permanently hovering around sensor the light still turns off after 3 minutes. Which I think is caused by ZigBee sensor or home assistant no changing the state back to off so it can go back to on and trigger process flow again.

I’m using Sonoff bridge with tasmota

Would I have more luck getting a Philip Hue sensor (with bridge integrated to home assistant). Since to my understanding they have the feature when no motion detected?

Video asking question in more detail

Move everything but the turn on kitchen light node to the lower “off” output of the motion sensor. Actually attach them to both outputs except the kitchen light turn on.

I worked with these Sonoff motion sensors too.

Your problem seems to be that when the motion sensor is permanently detecting motion it never gets the chance to re-load the timer.
In my understanding you should load the timer when there is no motion.

I’m not that familiar with Nodered, but here is my shot at it. Split it in two flows:

Kitchen Sensor (ON) - - > light on

Seperate flow:
Kitchen sensor (OFF) (in properties of your Box: FOR 3 MIN) - - > light off

1 Like

I think this doesn’t work when he re-enters the kitchen and stays there…?

It creates the same problem on the other side:

No motion - - > off after 3 mins, even if you are in the kitchen because the timer only gets reloaded after you leave.

2 Likes

Good idea. I’ll change that and see what happens

It depends if it latches the entire time someone is present then yes, you’re correct.

Op is looking for the event state node. Set it like so

Edit state type should be string if payload is off.

1 Like

Ok thank you guys

Fingers crossed I’ve solved it by changing the process flow as advised.

When the state changes to on light turns on and when the state changes to off 3 minute timer kicks in before turning lights off.

I’ll leave reset node to action when state changes to on to cancel the timer otherwise the light would still turn off because the timer is still running.

The output from the top is when the settings are true. Use this

[{"id":"4442cf40.eaa19","type":"api-call-service","z":"35b293a2.b5aafc","name":"","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.1","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":850,"y":800,"wires":[[]]},{"id":"7abb9054.747c6","type":"server-state-changed","z":"35b293a2.b5aafc","name":"","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.back_yard_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":420,"y":800,"wires":[["4442cf40.eaa19"],[]]},{"id":"f78b5fca.d47718","type":"api-call-service","z":"35b293a2.b5aafc","name":"","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.1","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":850,"y":900,"wires":[[]]},{"id":"2794e130.51b776","type":"server-state-changed","z":"35b293a2.b5aafc","name":"","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.back_yard_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"3","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":420,"y":900,"wires":[["f78b5fca.d47718"],[]]}]

1 Like

The top output is when the settings are true.