M1 Programming Question

gacevich

Member
i am looking to improve the control of my home alarm and could use some help on programming a rule.

as background, i built a rule in elk-rp that said at midnight arm night instant and at 6a disarm. this worked fine until one night when i was out of town and my wife asked how to keep the alarm from automatially setting since she was going to come home after midnight. well, as you can imagine, asking her to open elk rp and disable the rule that set the alarm automatically at midnight was not a good idea. we got thru that episode but it got me thinking...how can i make it easy for someone in my family to easily control the automatic setting of the nightime alarm. this might frame my issue.
nightalarm.png


so i did the following. i have integrated my M1 with CQC so that i can control when the M1 alarm is set via a user interface in CQC. i have one button in CQC that is a toggle for whether or not the alarm should be allowed to set. when set to allow the alarm to set, it turns on Output 21. in CQC i have built an interface for a timer that allows the user to determine what time of day/night the alarm should come on and when it should automatically disarm. when set time of day hits the "arm time" Output 22 is turned on. when time of day hits the "disarm time" Output 22 is turned off.


then i built the following rule in elk rp

whenever output 021 (out 21) state is turned on
and output 022 (out 22) state is turned on
then arm area(s) 1 to night instant immediately

now here is my problem. the alarm did not set. the house was ready to arm and i verified that both output 21 and output 22 were on, but the house did not arm. is there something wrong with my elk rp rule that would prevent the alarm from coming on?

i don't know if it matters, but my disarm rule is:

whenever output 22 (out 22) state is turned off
then disarm area(s) 1 immediately

arming and disarming used to work fine when instead of using outputs as the triggers i used a whenever time trigger.

appreciate your thoughts.
 
why have this done in the ELK with rules? can you send the ELK the arm instant command from CQC? I know I can from the J9AE software

Dont forget about the logic when already armed dont change state, and when armed away dont disarm
 
why have this done in the ELK with rules? can you send the ELK the arm instant command from CQC?
Agreed this is probably better.

BUT, if you have some reason to use the rules you already have, I think it is not working because your first rule is backwards. If, as you describe, Output 22 is the "trigger" and Output 21 is the "condition," then you have them reversed in the rule.
 
why have this done in the ELK with rules? can you send the ELK the arm instant command from CQC?
Agreed this is probably better.

BUT, if you have some reason to use the rules you already have, I think it is not working because your first rule is backwards. If, as you describe, Output 22 is the "trigger" and Output 21 is the "condition," then you have them reversed in the rule.

thanks for feedback. i'll first try swapping the order of the rules. if this works then i'll try to figure out how to set the alarm directly from cqc. i think i would use an InvokeCmd function but i'll investigate tomorrow.
 
Back
Top