Jump to content

Automation Cancelation


knctrnl

Recommended Posts

I have a program that turns off the bathroom light after its been on for a while. I did not want it to just turn off while someone could be in the shower or bath so I have it wait 30 minutes then run another program that proceeds to beep the keypad for a while to give the person a chance to cancel it. 

I cant for the life of me wrap my head around how to cancel the action. I imagine i would want it where someone can double tap the button and it would stop the program. I have though about a variable that I enable when the program runs and I could have another program look for double tap and but not sure how to have the ISY stop the program and leave the light on.

 

Any ideas would be appreciated. 

Program:  Hallway Bathroom Light Auto Off 1

Hallway Bathroom Light Auto Off - [ID 001F][Parent 0030]

If
        'Inside / Hallway / Hallway Bathroom Light' is switched On
     Or 'Inside / Hallway / Hallway Bathroom Light' is switched Fast On
     Or 'Inside / Hallway / Hallway Bathroom Light' is switched Fade Up
     Or 'Inside / Hallway / Hallway Bathroom Light' is switched Off
 
Then
        Wait  30 minutes 
        Run Program 'Hallway Bathroom Light Auto Off 2' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

Program: Hallway Bathroom Light Auto Off 2

Hallway Bathroom Light Auto Off 2 - [ID 0031][Parent 0030][Not Enabled]

If
        'Inside / Hallway / Hallway Bathroom Light' Status is On
 
Then
        Repeat 60 times
           Wait  1 second
           Set 'Inside / Hallway / Hallway Bathroom Light' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Off
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' On
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Off
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' On
        Repeat 1 times
           Wait  3 minutes 
        Repeat 60 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

 

 

Link to comment
6 hours ago, knctrnl said:

Any ideas would be appreciated. 

I'm confused by things you currently have in both programs.  First Program #1 - why do you check for the "switched Off" condition.  If the light is switched off, there's no reason to run the 30 minute wait.  Now Program #2 - does it even work as is?  I ask because the IF condition looks at the status of "Inside / Hallway / Hallway Bathroom Light" and then you change that status within the THEN.  The first time you set the status to "Off" and then hit a WAIT or REPEAT the program should reevaluate the IF and execute the ELSE because the status is now OFF.  So I can see it beeping 60 times, but does it actually blink the light?

If you want to implement exactly what you specified above (beeping but no blinking), you simply take out all the blinking code from Program #2 and add a "Set 'Inside / Hallway / Hallway Bathroom Light' On" and "Stop program 'Hallway Bathroom Light Auto Off 2'" as the first two lines of Program #1 THEN.  That way after Program #1 has handed off to Program #2, Program #1 will take control again if the person in the bathroom touches the light switch in any way.

If you want to be able to blink the light, then I think you'll need to get rid of the IF condition for Program #2.  This would also mean that you need to get rid of the check for "switched Off" in Program #1 as you won't be checking the status before running Program #2 and you would end up with beeping and blinking 30 minutes after someone turned Off the light.  Getting rid of the check for "switched Off" would mean the person in the bathroom would need to flip the switch ON to keep the light On.  Since you'd be getting rid of the IF condition in Program #2, in Program #1 you'd want to execute the THEN section of Program #2 instead of the IF.  Finally, perhaps you want the person to be able to stop the beeping and blinking because they are leaving the bathroom and want to turn Off the light.  In that case, instead of getting rid of the "switched Off" in the IF of Program #1, you would change it to "not switched Off".  That would mean that if the person actually did flip the switch Off, the ELSE of Program #1 would run, so you'd want to also put the "Stop program 'Hallway Bathroom Light Auto Off 2'" line in the ELSE of Program #1.

 

Link to comment
7 hours ago, knctrnl said:

I cant for the life of me wrap my head around how to cancel the action.

Neither do I understand why you have a "'Inside / Hallway / Hallway Bathroom Light' is switched Off" in the first program.

Regardless, simply pressing the switch ON again would cancel the wait condition and restart the program 30 minute count.

Did you say that this was a keypad button?  (I was not certain.)  If so, is it a six-button or eight?  Is the button triggering the program the primary (load controlling) button or one of the secondary buttons?

Link to comment

One thing I learned is to keep things simple. If you dont want to integrate sensors into your system to check for occupancy, I would use the double tap method. A single tap turns on the light for 30 minutes and a double tap can be an hr or indefinitely.

For the bathrooms in my house, I extended the lights on period during the hours most people take baths/showers (morning and evening). This will disable the motion sensors so that the lights will not turn the lights off on any one. For me, this system has worked out well since anyone can turn the lights on normally without worrying about them turning it off or remembering extra steps.

Link to comment
4 minutes ago, lilyoyo1 said:

One thing I learned is to keep things simple. If you dont want to integrate sensors into your system to check for occupancy, I would use the double tap method. A single tap turns on the light for 30 minutes and a double tap can be an hr or indefinitely.

For the bathrooms in my house, I extended the lights on period during the hours most people take baths/showers (morning and evening). This will disable the motion sensors so that the lights will not turn the lights off on any one. For me, this system has worked out well since anyone can turn the lights on normally without worrying about them turning it off or remembering extra steps.

100%

Nothing is worse than to go into someones home and nothing operates in a natural and intuitive manner. When people fail to follow basic human ergonomics the long term satisfaction of the family unit just goes down the toilet. There's nothing I do in my home where the *Average Joe* wouldn't know how to operate or understand the causal effect. The only exception to this rule is with respect to security measures implemented in the home.

Nothing complicated but some extra steps are in place to ensure life and safety and 100% fail over and redundancy.  

Link to comment

I agree with those above regarding ergonomics, expectations, etc.  And double that for bathrooms.  Bathrooms are private places, people are nervous about sensors and the like to begin with.  Consider also that people are often motionless in bathrooms for considerable periods of time -- especially if they ate something that didn't agree with them the night before, for example.

Something simple like an occupancy sensor would be as far as I'd go for automation in a bathroom.  I've chosen to avoid even that -- the only "automation" is a manual timer on the fan itself (so it doesn't run all day).  If you turn on the lights in the bathroom here, you have every expectation that they will stay on until you turn them off.  No arm waving, no commotion, no odd-looking sensors on the wall, no privacy issues.

"Oh my goodness mwester, your electric bill must be sky high from all the lights left on unnecessarily!'  No, LED bulbs really don't take much energy, especially in a small room like a bathroom where you don't need (or want) a 100-watt-equivalent even!

(Illustrative story:  Some years back, I finished the bathroom in the basement -- because I was cheap, I bought a distressed mirror, and then stupidly drilled too far when I re-affixed the back to it, leaving a small round-ish chip out of the front of the frame.  It's a basement bath, what do I care -- a little black paint to match the frame, and it's all good...  So, my daughter came by for a visit... her comment on my handiwork (paraphrasing): Nice, Dad -- except it looks a lot like someone put a spy camera into the mirror frame.  Lesson learned: bathrooms are sensitive places, and even careless workmanship can freak people out, much less big Insteon motion sensors!)

Conclusion: Install LED lights and a timer for the fan, and leave the room off-limits for home automation.

Link to comment

Lights going off in the bathroom is never a fun experience and can freak out guests that don't know the house is automated.  I went through many trials of automating the lights in the bathroom.  It's very easy to turn them on but when to turn them off is the trick.

As rooms are of various sizes and layouts and people have different habits motion alone was not an option.  You realize how still people are putting on make-up?  Amazing.  Anyways I went with a dual approach that works for me but may not work for others based on household practices.

In our house the bathroom door is always left open when not occupied.  So if the door is closed someone is in there.  This made it easy for occupancy determination.  I used a two sensor approach.

  1. Motion sensor turns on the lights
  2. Door sensor starts the countdown to turn off the lights.

When someone enters the room the lights turn on and a state variable is set and a timer to recheck that variable.  If that variable has changed to NO motion AND the door is OPEN then the lights turn off.  However if the door is CLOSED then nothing happens and the wait checks again later.  Only if there's no motion and the door is open then a countdown is started and when that ends only then does the light turn off.

Flaws to this are that someone turns off the light and someone then walks in.  Well if the sensor hasn't reset then the lights don't turn on.  The sensor is set with a fairly quick reset time so not usually a problem.  Flaw two is when guest leave the bathroom and close the door.  This will keep the light on forever.  Not really a big deal as someone else always needs to use the bathroom and then the guessing game begins if anyone is in there and the knocking on the door or people counting begins :)

 

Link to comment
48 minutes ago, mwester said:

No arm waving, no commotion, no odd-looking sensors on the wall, no privacy issues.

"Oh my goodness mwester, your electric bill must be sky high from all the lights left on unnecessarily!'  No, LED bulbs really don't take much energy, especially in a small room like a bathroom where you don't need (or want) a 100-watt-equivalent even!

I've got ten bulbs above the vanity in the master bath, so I'm a bit motivated to manage the lights, even though they're LED bulbs.  I use a PIR Kumosensor to manage turning them off, specifically because it doesn't draw attention, both by it's design and where I've been able to locate it within the room.  The light switch for this room in conveniently located by the entry, so there is no obvious automation used in this space, other than the fan being on a timer.

Link to comment
2 hours ago, simplextech said:

Lights going off in the bathroom is never a fun experience and can freak out guests that don't know the house is automated.  I went through many trials of automating the lights in the bathroom.  It's very easy to turn them on but when to turn them off is the trick.

As rooms are of various sizes and layouts and people have different habits motion alone was not an option.  You realize how still people are putting on make-up?  Amazing.  Anyways I went with a dual approach that works for me but may not work for others based on household practices.

In our house the bathroom door is always left open when not occupied.  So if the door is closed someone is in there.  This made it easy for occupancy determination.  I used a two sensor approach.

  1. Motion sensor turns on the lights
  2. Door sensor starts the countdown to turn off the lights.

When someone enters the room the lights turn on and a state variable is set and a timer to recheck that variable.  If that variable has changed to NO motion AND the door is OPEN then the lights turn off.  However if the door is CLOSED then nothing happens and the wait checks again later.  Only if there's no motion and the door is open then a countdown is started and when that ends only then does the light turn off.

Flaws to this are that someone turns off the light and someone then walks in.  Well if the sensor hasn't reset then the lights don't turn on.  The sensor is set with a fairly quick reset time so not usually a problem.  Flaw two is when guest leave the bathroom and close the door.  This will keep the light on forever.  Not really a big deal as someone else always needs to use the bathroom and then the guessing game begins if anyone is in there and the knocking on the door or people counting begins :)

 

I do the same in my half baths when it comes to using motion and door sensors together. The only difference is that the motion doesnt turn on the lights and if the door is closed with the lights off then the lights will automatically turn on (unless manually turned off when leaving bathroom. If the lights are somehow left on with the door closed, they will time out at some point without any motion. 

I also connected my fans to the lights. If the lights are off for more than 15 minutes and fans are on, then the fans will turn off

Link to comment
13 hours ago, oberkc said:

Regardless, simply pressing the switch ON again would cancel the wait condition and restart the program 30 minute count.

The way the OP has written the program, I don't think simply pressing the ON again would cancel the waits in Program #2.  It would restart Program #1, but it wouldn't stop Program #2.  Certainly not before the 60 seconds of beeping ended because pressing ON will make the status of the light ON which is what the second program evaluates in its IF and going from ON to ON doesn't retrigger a program that is looking at STATUS.

Link to comment
21 hours ago, knctrnl said:

but not sure how to have the ISY stop the program and leave the light on.

After evaluating all the feedback, if you still want to implement your two programs, here is what they would look like with my suggested changes, and a couple more:

Bathroom Light Auto Off 1 - [ID 00B7][Parent 0001]

If
        'Inside / Hallway / Hallway Bathroom Light' is switched On
     Or 'Inside / Hallway / Hallway Bathroom Light'' is not switched Off
 
Then
        Stop program 'Bathroom Light Auto Off 2'
        Set 'Inside / Hallway / Hallway Bathroom Light' On
        Wait  30 minutes 
        Run Program 'Bathroom Light Auto Off 2' (Then Path)
 
Else
        Stop program 'Bathroom Light Auto Off 2'
        Set 'Inside / Hallway / Hallway Bathroom Light' Off
Bathroom Light Auto Off 2 - [ID 00B6][Parent 0001]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Repeat 60 times
           Wait  1 second
           Set 'Inside / Hallway / Hallway Bathroom Light' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast Off
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast On
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast Off
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast On
        Repeat 1 times
           Wait  3 minutes 
        Repeat 60 times
           Wait  1 second
           Set 'Inside / Hallway / Hallway Bathroom Light' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Off
 
Else
   - No Actions - (To add one, press 'Action')

I did find another bug in your original Program #2 - you didn't have a WAIT 1 SECOND during the second round of 60 beeps.  I also used FAST OFF and FAST ON for the light blinking to avoid any local ramp rates that might be associated with the bathroom light.  Finally, I avoided using a double tap because my guests have enough trouble with my paddle switches let alone learning to double tap.  Also, I understand the need for all the "Repeat 1 times" after programming this myself.  ?

Link to comment
1 hour ago, kclenden said:

After evaluating all the feedback, if you still want to implement your two programs, here is what they would look like with my suggested changes, and a couple more:


Bathroom Light Auto Off 1 - [ID 00B7][Parent 0001]

If
        'Inside / Hallway / Hallway Bathroom Light' is switched On
     Or 'Inside / Hallway / Hallway Bathroom Light'' is not switched Off
 
Then
        Stop program 'Bathroom Light Auto Off 2'
        Set 'Inside / Hallway / Hallway Bathroom Light' On
        Wait  30 minutes 
        Run Program 'Bathroom Light Auto Off 2' (Then Path)
 
Else
        Stop program 'Bathroom Light Auto Off 2'
        Set 'Inside / Hallway / Hallway Bathroom Light' Off

Bathroom Light Auto Off 2 - [ID 00B6][Parent 0001]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Repeat 60 times
           Wait  1 second
           Set 'Inside / Hallway / Hallway Bathroom Light' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast Off
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast On
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast Off
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast On
        Repeat 1 times
           Wait  3 minutes 
        Repeat 60 times
           Wait  1 second
           Set 'Inside / Hallway / Hallway Bathroom Light' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Off
 
Else
   - No Actions - (To add one, press 'Action')

I did find another bug in your original Program #2 - you didn't have a WAIT 1 SECOND during the second round of 60 beeps.  I also used FAST OFF and FAST ON for the light blinking to avoid any local ramp rates that might be associated with the bathroom light.  Finally, I avoided using a double tap because my guests have enough trouble with my paddle switches let alone learning to double tap.  Also, I understand the need for all the "Repeat 1 times" after programming this myself.  ?

What are the extra Repeat 1 Times lines for? A time slice surrender technique so the I/O can run?

Link to comment
3 minutes ago, larryllix said:

What are the extra Repeat 1 Times lines for? A time slice surrender technique so the I/O can run?

They are the only way I could find to get out of the previous "Repeat", but they do have the added benefit of being a time slice surrender.

Link to comment
6 minutes ago, kclenden said:

They are the only way I could find to get out of the previous "Repeat", but they do have the added benefit of being a time slice surrender.

BTW:To get out of any repeat loop, only one "repeat 1 times" is needed to terminate all loops.

"Repeat X times" is a syntax error but it is too late for UDI to correct it and be backward compatible.
"Repeat 1 times" really means "Repeat 0 Times" or "Execute 1 Times" or  "do not repeat at all".

Link to comment
14 minutes ago, larryllix said:

BTW:To get out of any repeat loop, only one "repeat 1 times" is needed to terminate all loops.

Well duh!  Seems pretty obvious now that you say it.  ?  So I could get rid of four repeats:

Bathroom Light Auto Off 2 - [ID 00B6][Parent 0001][Not Enabled]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Repeat 60 times
           Wait  1 second
           Set 'Inside / Hallway / Hallway Bathroom Light' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast Off
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast On
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast Off
           Set 'Inside / Hallway / Hallway Bathroom Light' Fast On
           Wait  3 minutes 
        Repeat 60 times
           Wait  1 second
           Set 'Inside / Hallway / Hallway Bathroom Light'' Beep
        Repeat 1 times
           Set 'Inside / Hallway / Hallway Bathroom Light' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

Although doing it this way prevents you from canceling in between light blinks, but they happen pretty quickly so not really an issue.

Link to comment
15 minutes ago, kclenden said:

Well duh!  Seems pretty obvious now that you say it.  ?  So I could get rid of four repeats:

Although doing it this way prevents you from canceling in between light blinks, but they happen pretty quickly so not really an issue.

I typically use
Fast On
Fast Off
Wait 1 second or 0 second
Fast On
Fast Off.
Wait 0/1 second
The technique may make a good fast slice surrender though. Seems we need something to allow Insteon to be processed or the cache can clog up or you see erratic flashing.

I like my flux net bulbs as I can send the built-in flash codes without any I/o bog down.
 

Link to comment
9 hours ago, kclenden said:

The way the OP has written the program, I don't think simply pressing the ON again would cancel the waits in Program #2.  It would restart Program #1, but it wouldn't stop Program #2. 

Yes, I was focusing mostly on program 1.  You may be correct regarding program 2.  Perhaps adding a command at the beginning of program 1 to halt program 2 would solve that problem?

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...