will this event work?

dogbone

Member
I'm trying to keep the notification from occurring in a short time frame 5:30-6:20am, but work all other times
 

 
WHEN DRIVEWAY SENSOR NOT READY
   AND IF TIME IS GREATER THAN 12:01 AM 
   AND IF TIME IS LESS THAN 5:30 AM 
OR
  AND IF TIME IS GREATER THAN 6:20 AM 
THEN SHOW CAR ON DRIVEWAY WITH BEEP
 
 
I also think I need something to remove the message from the console.
 
 
 
 
dogbone said:
I'm trying to keep the notification from occurring in a short time frame 5:30-6:20am, but work all other times
 

 
WHEN DRIVEWAY SENSOR NOT READY
   AND IF TIME IS GREATER THAN 12:01 AM 
   AND IF TIME IS LESS THAN 5:30 AM 
OR
  AND IF TIME IS GREATER THAN 6:20 AM 
THEN SHOW CAR ON DRIVEWAY WITH BEEP
 
 
I also think I need something to remove the message from the console.
Should work.  There are a few ways to do this. You didn't give your model number, but you probably have three timers you can use as well.  You set the start time and the end time, and the timers turn off and on. You could use one to control is your message is displayed or not.
 
As you get more things going, you will find your code is more readable and easier to maintain using flags instead of using times for each actions.  For example, you could create a flag called "DriveMon" or something like that, and have the flag turn on and off at the appropriate time every day. Then you can just test for the flag in your action.  It may not make your code any shorter, especially if you just test for this time condition once, but it makes it easier to debug when you have lots going on.
 
I agree with Ano.  I would use a flag.
Timed 6:20 AM MTWTFSS 
      Then Driveway Sensor Flag on
Timed 5:30 AM MTWTFSS
       Then Driveway Sensor Flag off
When Driveway Sensor Zone NOT READY
        And if Driveway Sensor Flag on
        Then Show Car on Driveway with Beep
 
 
 
Thank you for your replies. I have not used flags much but see how they can be very useful. I have reworked my code in order to turn a driveway flag on at 12am, then turn it off for one hour at 5:30 am. Then have the message and beep occur if the the sensor is not ready and the flag is on. 
 
the purpose is to keep the message and beep from occurring when my son leaves for work between 5:45 and 6:15 am. I'll find out tonight if it works.
 
It worked great! 
 
I have my system set up to beep when a perimeter door is opened. Is there any way to have that bypassed during this same one hour period? The only way I can think of doing it would be to turn off the HAI notification setting and simply write a line of code for each zone that is on a perimeter door. Then use a similar code as the driveway sensor.
 
Back
Top