Securifi Community Forum

Sensors and Home Automation => Home automation => Topic started by: Fire69 on February 23, 2015, 11:39:46 am

Title: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 23, 2015, 11:39:46 am
Hi,

I was testing the Securifi SZ-PIR02 that was delivered together with my Almond+ and either my logic is flawed, or the sensor's design is...

When it detects motion, the led goes on for 1 second and it sends a 'motion' signal to the Almond+.  So far nothing weird. But...
When the led goes out, it immediately sends a 'no motion' signal!
That's not supposed to happen, is it?

I set up a rule:
If motion - light on.  Works OK (little slow, 2 second delay...)

I set up another rule:
When no motion - wait 60 seconds - light off

The problem now is that it turns on the light and 60 seconds later, the light is turned off. Even is motion is detected at that moment, resulting in a light turning off and immediately back on!  :o

Do all PIR sensors work like this, or is something work with the Securifi sensor?
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: mparadis on February 23, 2015, 01:07:19 pm
I think they all work this way. Mine, not Securifi branded, work that way too.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 23, 2015, 01:45:40 pm
Weird...
Wouldn't it be more logical if they send the 'no motion' at the preset detection interval?

So how do you go about making rules for controlling a light with a motion detector?
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: mparadis on February 23, 2015, 06:12:25 pm
Most PIR sensors can't detect motion again for a set period of time. I am not sure what Securifi's is. This is normal so that you don't waste a ton of battery and don't get motion activations every second. Mine are 4 minutes so my lights turn off after that period runs out. By then I can turn the lights on manually (through the app not through rules) if I need them or let them go off if I don't.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 24, 2015, 02:22:56 am
Most PIR sensors can't detect motion again for a set period of time. I am not sure what Securifi's is. This is normal so that you don't waste a ton of battery and don't get motion activations every second. Mine are 4 minutes so my lights turn off after that period runs out.

That's totally logical and how Securifi's sensor should work too, but it doesn't...
There is a selectable interval on the sensor, 5 seconds to 3 minutes, to set 'redetection' interval.
Mine is set to 1 minute, and when it detects motion, it does wait 1 minute before detecting again.
But.... when it detects motion, it sends a 'motion' signal and IMMEDIATELY after that, it sends a 'no motion' signal.
And after 1 minute, when it should redetect if there is motion, it does NOT send anything when there is no motion.

You get the problem?  :)

Quote
By then I can turn the lights on manually (through the app not through rules) if I need them or let them go off if I don't.

That's ok for a living room or bedroom or whatever, but I'm using it in the bathroom (toilet only) and I want it to turn on when you enter and turn off automatically after you leave.  :)
That is working now, if you don't stay in there longer than 60 seconds, otherwise the light starts going on and off.  ::)
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: coderunner on February 24, 2015, 09:27:13 am
Consider adding a door sensor.  Don't turn the light off until the door is opened.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 24, 2015, 09:31:34 am
How would that work?  Door opens => light on, door opens again, light goes off. Can you do that in rules?
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: fillibar on February 24, 2015, 10:21:32 am
I would think you could have the light be part of the conditions. If the light is off and the door opens, turn the light on. If the light is on and the door opens, turn the light off.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: mparadis on February 24, 2015, 11:33:06 am
Interesting. Try not using the no motion part, i.e. whenlight isn't off and motion is sensed turn on light then wait x minutes then turn off. Bypassing the no motion. Not ideal but perhaps a temporary work around.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: coderunner on February 24, 2015, 01:36:09 pm
How would that work?  Door opens => light on, door opens again, light goes off. Can you do that in rules?

I was thinking that you could use the motion sensor to turn the light on (if the door is usually open when the room is not in use).
Yes the light state would have to be used in the condition.  If light is on and door opens, turn light off. 
If you wanted to use only the door sensor, I recommend as fillibar suggested.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 24, 2015, 02:45:34 pm
Interesting. Try not using the no motion part, i.e. whenlight isn't off and motion is sensed turn on light then wait x minutes then turn off. Bypassing the no motion. Not ideal but perhaps a temporary work around.

That's how I have it set now.
1 rule:
Motion > light on > wait 120sec > light off.

If you need to go number 1, that's fine.  For number 2 it's a bit short and you end up sitting in the dark  ;D

I was thinking that you could use the motion sensor to turn the light on (if the door is usually open when the room is not in use).
Yes the light state would have to be used in the condition.  If light is on and door opens, turn light off. 
If you wanted to use only the door sensor, I recommend as fillibar suggested.


It's a toilet in the downstairs hallway so the door is always closed.
IMHO, attaching a doorsensor in a toilet is a little over the top, so I'll just wait until they fix this strange behaviour :)
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: coderunner on February 24, 2015, 04:25:34 pm
attaching a doorsensor in a toilet is a little over the top

Lid open - light on  :)
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 24, 2015, 04:27:15 pm
 Lol, that would be hilarious! ;D
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Ohiomedic on February 24, 2015, 06:56:08 pm
That's how I have it set now.
1 rule:
Motion > light on > wait 120sec > light off.

If you need to go number 1, that's fine.  For number 2 it's a bit short and you end up sitting in the dark  ;D

It's a toilet in the downstairs hallway so the door is always closed.
IMHO, attaching a doorsensor in a toilet is a little over the top, so I'll just wait until they fix this strange behaviour :)

If I wanted to automate the lights in my bathroom I'd probably go with the door sensor if the door is always closed. Just seems better price wise since you can get two of the trippers for $40, cheapest motion detector I've seen is $30. Also seems like motion detector take a little longer to trigger then the door sensor.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 25, 2015, 04:58:53 am
If I wanted to automate the lights in my bathroom I'd probably go with the door sensor if the door is always closed. Just seems better price wise since you can get two of the trippers for $40, cheapest motion detector I've seen is $30. Also seems like motion detector take a little longer to trigger then the door sensor.

Got a link to those sensors?
Unfortunately, I'm in Europe and everything is way more expensive over here  :(
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: mparadis on February 25, 2015, 09:22:35 am
These are the trippers he mentions. http://www.amazon.com/Quirky-PTRPR-WH01-Tripper-Window-Sensor/dp/B00P7RURIG/ref=sr_1_1?ie=UTF8&qid=1424874100&sr=8-1&keywords=quirky+tripper I am not sure how you can get them shipped out to you but they are zigbee based which I don't believe has regional differences so they should work if you can get your hands on them.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 25, 2015, 02:50:58 pm
So... I tried turning on the light on or off with a door sensor.
Not a huge success  :P

Rule 1:
Door sensor open + light off => light on
Rule 2:
Door sensor open + light on => light off

Result:
Light starts flashing because it detects the light is off and then on and then off and then on and then.... well, you get the picture  ;D

Wrong logic in my rules or ... ?
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: bwainscott on February 25, 2015, 03:14:52 pm
So... I tried turning on the light on or off with a door sensor.
Not a huge success  :P

Rule 1:
Door sensor open + light off => light on
Rule 2:
Door sensor open + light on => light off

Result:
Light starts flashing because it detects the light is off and then on and then off and then on and then.... well, you get the picture  ;D

Wrong logic in my rules or ... ?

Unfortunately, I think that is just a limitation on the way they have set up the rules.  I suggested to Lars that another level of switch logic be added so that you could do a rule like:

When the door opens:
   IF the light is on then
      turn the light off

so that the light being on cannot initiate the rule, but can be a condition to the action.  So then you'd have rule initiation, then additional conditions, then the action.  There is still a LOT that I'd like to be able to do that is far beyond that (hopefully general scripts as actions, and a way for scripts to trigger rules or have some kind of sensor API).  But as things stand now nothing like that exists, so I think you are out of luck.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 25, 2015, 03:22:35 pm
Unfortunately, I think that is just a limitation on the way they have set up the rules.  I suggested to Lars that another level of switch logic be added so that you could do a rule like:

When the door opens:
   IF the light is on then
      turn the light off

so that the light being on cannot initiate the rule, but can be a condition to the action.  So then you'd have rule initiation, then additional conditions, then the action.  There is still a LOT that I'd like to be able to do that is far beyond that (hopefully general scripts as actions, and a way for scripts to trigger rules or have some kind of sensor API).  But as things stand now nothing like that exists, so I think you are out of luck.

That would indeed be a nice solution.  We'll see what the future brings in terms of possibilities for the rules.

So I guess I'm back to my initial question then, is there a problem with the Securifi motion sensor?
Title: Suggestion for new rule type
Post by: bwainscott on February 25, 2015, 04:00:39 pm
That would indeed be a nice solution.  We'll see what the future brings in terms of possibilities for the rules.

So I guess I'm back to my initial question then, is there a problem with the Securifi motion sensor?

No idea.  I don't have any motion sensors yet.  But I see the problem. It would definitely be nice if the motion sensor had the delay, so it reported motion, and then didn't report anything until there had been no motion for X minutes (at which point it reports "no motion").  That seems like the reasonable way to do things.  Maybe Securifi can build some special motion detector code into the rules for this.

Actually, this could solve another problem I have.  If they could have a rule that reads "If sensor X has been in state Y for N seconds, then..."

Then you could have "motion -> light on.  No motion for 120 seconds -> light off"  and it wouldn't flash the lights in weird ways.  I'd use it for "If my door has been closed for 300 seconds -> lock the door" and this would avoid the current problem I have of it locking the door when it is open (because someone opened it just before it was going to lock).

So Lars/Securifi -- how about adding that to your list of suggestions for rules?  Pretty please?
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Ohiomedic on February 26, 2015, 01:53:21 am
Don't know which would be the best for you to check since your in Europe, or if they even have them in a Freq. that would work for you.

https://www.quirky.com/shop
http://www.amazon.com/Quirky-PTRPR-WH01-Tripper-Window-Sensor/dp/B00P7RURIG/ref=sr_1_1?ie=UTF8&qid=1424933460&sr=8-1&keywords=quirky+tripper
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: LGNilsson on February 26, 2015, 04:47:46 am
I've asked the guys in the software team to read through this thread, as I think they haven't really thought about some of these scenarios.

That said, the SZ-PIR02 is working as intended, what you want is a presence sensor, not a motion sensor. The two are similar, but not the same, as the presence sensor will keep something on until there's no movement in the room, whereas a PIR simply detects movement. We might be able to solve this in software and I know the guys are working on something, so let's see.
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on February 26, 2015, 05:30:30 pm
Lars,

Thanks for having them take a look at it.

Concerning the sensor, to be honest, I don't get how it's intended that it sends a motion/no motion signal at the same time. It detects motion, but sends it doesn't.
When I activate the notification for this sensor, I always get 2 notifications at once, 1 for motion detected, 1 for motion stopped.  That can't be how it's supposed to be, right?
Also, in the rules UI, you can use 'No motion' as a condition, but the way the sensor is working, I don't see how you would be able to use that...
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Blueiris8 on February 27, 2015, 10:18:06 am
I use the Aeon Labs multi-sensor.  It has a built in 4 minute delay.  So it won't send a no-motion message to the almond unless there has been no-motion for 4 minutes.  Technically, the delay can be adjusted, but it has to be done via the almond (functionality hasn't built to my knowledge).  right now only the Motion and Temperature features work with the almond, but it's a great price for all you get.

http://www.amazon.com/Aeon-Labs-Aeotec-Z-Wave-Multi-Sensor/dp/B008D5TYGU (http://www.amazon.com/Aeon-Labs-Aeotec-Z-Wave-Multi-Sensor/dp/B008D5TYGU)
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on March 11, 2015, 04:50:05 pm
The last couple of days I've been trying to come up with rules that can use the 'No motion'-trigger for this PIR.
But since it only sends this signal when it DETECTS MOTION I don't see how this can be used in any useful way...  >:(
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: Fire69 on April 02, 2015, 03:49:08 pm
Too bad there is no feedback on this anymore, I am still convinced there is a design flaw with this sensor...
Title: Re: Securifi SZ-PIR02 design flawed?
Post by: LGNilsson on April 03, 2015, 11:09:41 am
Sadly there's nothing we can do about it. There's no way to push a firmware update to these, as they don't have enough flash memory for it and they can't be manually updated either  :-\
There's really nothing wrong with the sensor as such, they just don't work the way you're expecting them to.