HAI Programing

Hi, I am using a flag to tell when my garage doors are open and closed. I want to have a timer so if either garage door has been open for 15 min it sends a message. Anyone know how to accomplish this? Here is what I have so far. 
 
Screen Shot 2013-09-06 at 1.39.15 PM.png
 
 
OK, so you want to know 2 things.... is there a door open or not... and if one has been open for longer than 15 minutes, send a message... does this sound right?
 
If so, do something like this....
 
Program a flag as "GarageDoorTimer" or something similar.
 
Then, in programming:
 
When Large Garage Not Ready
When Small Garage Not Ready
then GarageDoorTimer ON for 15 minutes
 
When GarageDoorTimer OFF
AND Large Garage Not Ready
OR
AND Small Garage Not Ready
Then Message Show "Garage Door Open" with beep
 
What this will do is activate your flag, but only for 15 minutes.  After the 15 minutes expires, it turns off on its own.  Then we use that event to evaluate if either door is still open, if so we send the message.  Note that if one door is open, and the other door opens within that 15 minutes, the timer will start over.  Also, if the 15 minutes has long lapsed and then you open the second door, the timer will start again and you will get a second message.
 
If you want a recurring reminder every 15 minutes until both doors are shut, I would modify neillt's code as follows:


Code:
WHEN Large Garage NOT READY
WHEN Small Garage NOT READY
    THEN GarageDoorTimer ON for 15 minutes
 
WHEN GarageDoorTimer OFF
AND Large Garage NOT READY
OR
AND Small Garage NOT READY
    THEN Message Show "Garage Door Open" with beep
    THEN GarageDoorTimer ON for 15 minutes


If you want to keep using your flag as you have it set up above to track the number of doors open, then you could do something like this:

Code:
WHEN Large Garage NOT READY
WHEN Small Garage NOT READY
    THEN INCREMENT GarageDoor

WHEN Large Garage SECURE
WHEN Small Garage SECURE
    THEN DECREMENT GarageDoor

WHEN GarageDoor ON
    THEN GarageDoorTimer ON for 15 minutes
 
WHEN GarageDoorTimer OFF
AND IF GarageDoor ON
    THEN Message Show "Garage Door Open" with beep
    THEN GarageDoorTimer ON for 15 minutes
 
Now I am trying to have the timer for the flag be a user setting. Is that possible? It looks as if the user setting cannot put a number in for a flag timer. 
 
Edit.... I misread your question.... I don't think you can specify a time programatically like that, let me play with it for a minute.
 
Why a user setting?
Is there sometimes you want 15 minute warnings and sometimes you want an hour?
What scenario are you thinking of?
 
Desert_AIP said:
Why a user setting?
Is there sometimes you want 15 minute warnings and sometimes you want an hour?
What scenario are you thinking of?
I guess what I can do is have a button control and flag to disable the notification. Now that I think about it more, I don't need it to be a user setting since I will not be changing it often.
 
Thanks
 
You DEFINITELY can use a user setting for this if you want. With the latest firmware in your panel, define a user setting as a duration. Then when you set the variable to the time, under duration you will see that user setting on the list. Pick it, and your done. What ever duration the user setting is set to, will be the duration the variable uses. I do it all the time. 
 
I'm not saying a button is not a better solution, but user settings allow lots of flexibility and learning to use them will save you lots of hassle.
 
ano said:
You DEFINITELY can use a user setting for this if you want. With the latest firmware in your panel, define a user setting as a duration. Then when you set the variable to the time, under duration you will see that user setting on the list. Pick it, and your done. What ever duration the user setting is set to, will be the duration the variable uses. I do it all the time. 
 
I'm not saying a button is not a better solution, but user settings allow lots of flexibility and learning to use them will save you lots of hassle.
Thank you! That's exactly what I wanted.
 
ano said:
You DEFINITELY can use a user setting for this if you want. With the latest firmware in your panel, define a user setting as a duration. Then when you set the variable to the time, under duration you will see that user setting on the list. Pick it, and your done. What ever duration the user setting is set to, will be the duration the variable uses. I do it all the time. 
 
I'm not saying a button is not a better solution, but user settings allow lots of flexibility and learning to use them will save you lots of hassle.
 
Wow... how did this not show up for me when I went to go test it?  Not enough caffeine in I guess.
 
Sorry for the bum scoop e2djonline.....
 
Back
Top