This object is in archive! 

Help with a motion activated light when alarm is armed

Stian Sele shared this question 7 years ago
Need Answer

I trying to make a rule work, im still fairly new on the rule creator.


My goal with this rule is to have motion activated lights turned on if its dark and the alarm is armed (outside)

Ive tried several options it seems i cant get it to work.

so if anyone can help me i wil be very happy ad993be2f1bbd8078dd7a75823551c73

Replies (7)

photo
1

Hi,


Try separating alarm and dusk sensor into two IF's. I had to do this to make a similar rule work.

Drop the second JOIN also. So three IF's should work.


Reidar

photo
1

I think my rule in in here, but it's not with a alarm partition but with 2 dependencies.


https://community.zipato.com/topic/rule-examples-that-work-and-ideas-how-to-further-develop-them

photo
1

Ok I wil try that..

Thanks.

photo
1

So i think i did what you sayd,


it work ok now when the alarm is armed and the dusk/dawn sensor says dusk.


the problem with this rule is that if the dusk/dawn sensor while the light is on changes to dawn the light stays on.

This is not i big issue, if someone suddenly moves out side and triggers the rule just when its about to get light outside..


I tested with the lights are of and its light outside, then its ok.


Maybe i should have one less if and put a operator block with both sensors in and use the "and"


But i guess this wil do for now..


a84ebc97fbe821d1a152a1d285b1bf4f

photo
1

Create two variables that are set with simple rules, I called them DarkTimes and AlarmArmed. These can have the values 1 or 0, they act like a flag. (My DarkTimes is set using the sunset/sunrise scheduler). Now it becomes quite easy to test with an IF statement for all kind of rules.

I guess the reason why your rule isn't working is because the IF statement with Partition 1 is only going to work at the time of arming, not when it is already armed before.

photo
1

It seems like its working when it is armed.


But if the lights are on when it gets light it stays on..

Its not a big deal.

The light is not for me. but to warn neighbours about intruders and get better picture of them.


Im not quite sure what you mean of dark times etc do you have an example of the rule?

photo
1

Here are some of my rules.

20: Sets the variable DarkTimes to 1 on sunset.

21: Sets the variable DarkTimes to 0 on sunrise.

22: Runs when arming the alarm to set the variable AlarmArmed to 1 and also puts on the backdoor light if it is dark.

17: Runs at sunset, if the alarm is ON then it will put the BackDoor light on.

24: Runs every 15 minutes, if it is dark and the alarm is on between 17:30 - 23:00 it will run two scenes at random.

photo
photo
1

Stian,

I think the problem is that you are trying to use and event as a meter. I see you are using IF Alarm is ARM, but that only is true when you change from disarmed to armed. You need to use a meter block with an "equal to" operator and then drag the alarm so you can choose if you want ARMED HOME or ARMED AWAY. Other than that your first rule should work I think.

photo
1

Ok Im not sure what Block you are talking about ( pretty New to this)

Leave a Comment
 
Attach a file