Jump to content

My bathroom motion lights program


edokid

Recommended Posts

Hey everyone, so I got my ISY back again and I actually got my programs working, even doing more than originally planned.  I feel like it might be a bit long though so thought I'd post to see if there's tips on making it more efficient, or if not at least helping out people in the future.  Everything works, there's just a bit of a delay turning the shower light on, maybe 1-2 seconds so not sure if that can be fixed.

 

The set up is I have a Switchlinc in my ensuite bathroom which controls the main lights in there, and then I have a Insteon LED in the shower and leave that switch always on.  Here's what it should do:

 

Between 9am to 12pm if motion is detected, turn both of the lights on for 15 minutes, resetting that every time there's more motion, then turn both of them off.  If someone walks in the bathroom and hits on, the lights still come on as normal, and if they hit off as they leave, the lights go off, and motion is disabled for 10 seconds, so that it doesn't turn the lights on again as they leave.  If someone does a Fast Off on the switch, it turns the lights off and disables motion for 2 hours.  You can still press up on the switch to manually turn both on, and press off to turn them off, without resetting the motion.  If you press Fast On on the switch, the lights come on, and the motion program is reset, should you wish to enable motion sooner than 2 hours.  If the time is between midnight and 9am, then everything is the same, except motion only turns the shower LED on and only to 10% so that it doesn't flood you with lights walking in. 

 

Here's the programs:

 

Disable Motion

If

        $sMasterMotion is 3

Then

        Wait  2 hours

        $sMasterMotion  = 0

Else

   - No Actions - (To add one, press 'Action')

 

Fast Off

If

        Control 'Master Bath Light' is switched Fast Off

Then

        $sMasterMotion  = 3

        Set 'Master Bath Light' Fast Off

        Set 'Shower LED' Fast Off

 

Else

   - No Actions - (To add one, press 'Action')

 

Fast On

If

        Control 'Master Bath Light' is switched Fast On

Then

        Set 'Shower LED' Fast On

        Set 'Master Bath Light' Fast On

        $sMasterMotion  = 0

 

Else

   - No Actions - (To add one, press 'Action')

 

Motion Off

If

        Control 'Master Bath Sensor-Sensor' is switched Off

    And $sMasterMotion is not 3

 

Then

        Wait  15 minutes

        Set 'Master Bath Light' Off

        Set 'Shower LED' Off

Else

   - No Actions - (To add one, press 'Action')

 

Motion On Day

If

        Control 'Master Bath Sensor-Sensor' is switched On

    And $sMasterMotion is not 3

    And From     9:00:00AM

        To      11:59:00PM (same day)

 

Then

        Set 'Master Bath Light' On

        Set 'Shower LED' Fast On

 

Else

   - No Actions - (To add one, press 'Action')

 

Motion On Night

If

        Control 'Master Bath Sensor-Sensor' is switched On

    And $sMasterMotion is not 3

    And From    12:00:00AM

        To       9:00:00AM (same day)

 

Then

        Set 'Shower LED' 10%

Else

   - No Actions - (To add one, press 'Action')

 

Switch Off 1

If

        Control 'Master Bath Light' is switched Off

    And $sMasterMotion is not 3

 

Then

        Set 'Master Bath Light' Off

        Set 'Shower LED' Fast Off

        Disable Program 'Motion On Day'

        Disable Program 'Motion On Night'

        Wait  10 seconds

        Enable Program 'Motion On Night'

        Enable Program 'Motion On Day'

Else

   - No Actions - (To add one, press 'Action')

 

Switch Off 2

If

        Control 'Master Bath Light' is switched Off

    And $sMasterMotion is 3

 

Then

        Set 'Shower LED' Fast Off

        Set 'Master Bath Light' Off

 

Else

   - No Actions - (To add one, press 'Action')

 

Switch On

If

        Control 'Master Bath Light' is switched On

Then

        Set 'Master Bath Light' Fast On

        Set 'Shower LED' Fast On

Else

   - No Actions - (To add one, press 'Action')

 

 

So that's it, and it seems to work so far!  There's 2 Switch Off programs because I wasn't sure how to do that all in 1.  Basically switching the light off disables motion for 10 seconds, but I needed to write 2 programs to account for what happens when the switch is turned off while the 2 hour motion delay happens, as the default program would reenable motion.

 

Also the shower light does Fast Off/On vs On/Off just because I had the local ramp level set wrong so On/Off wouldn't work only Fast On/Off, but there's no purpose for it otherwise.

 

The only issue I have is that motion triggers the bathroom lights immediately, but the shower lights are sometimes delayed 1 second or if you make lots of changes fast the ISY can't keep up I guess due to the length of the program, so the odd time pressing fast up to reenable motion will cause the lights to go on, but then the main one flashes off and immediately back on and it's done, only once in awhile though.  I'd love to hear feedback though on what I could maybe change or improve or make more efficient since I think it seems like a lot of programs to accomplish this.  Glad I didn't give up though, biggest trick is writing out every possible scenario first and then figuring out how to deal with it.  Thanks!

Link to comment

How do I do the scene test?  I know on HomeSeer I could see status of links but I don't have any scenes made here, just right clicked ISY in admin page and clicked Scene Test but nothing happened, not sure where I see the results.  It's not really bad, like the light comes on almost instantly, then the shower LED is just a second behind.  You press off on the wall, the light immediately goes off, then the shower takes a second and does also.

Link to comment

I think it's just the nature of the program, because if you have the admin console open on your laptop when you walk in, you can see it running through the program and doing different things.  It's really no issue, maybe a 1 second delay for the LED to come on vs the rest.  As I was just walking in there now though I'm realizing it's prob much better to get a KPL in a place like this where there's times you want one light on vs the other or disable motion etc instead of using fast off to disable it and so on.  That would be handy maybe in a guest bath if you wanted to disable it for 3 hours because you're doing work or something.  I think a KPL in this situation is better since I can have the big On/Off for both lights, a button to turn just one on vs the other, a button that just straight up disables motion and one that reenables it and so on.  

 

I def would love to hear feedback on my program though in terms of how it's written, if this is generally the right idea of if this is less than ideal etc!

Link to comment

Some thoughts without completely understanding your programs.

 

For the motion detectors in my bedrooms I use scenes to turn the lamps on and off. The advantage to this is I can change the brightness settings and the ramp speeds twice per day (or more if desired) so that the responding units respond quickly when motion is detected. This has worked well and the response is much quicker.

 

The bathroom lights could be ramped on very slowly (using above technique) for quick-on blindness prevention while the shower light is turned on slowly, in the middle of the night while ramped very quickly during the day.

 

Lights can be brought up to medium level and if motions is seen again, indicating you are extending your stay in the bathroom, brighten the lights to 100% for mirror usage. This logic gets tricky.

 

A one minute warning by dimming the shower light slightly (and back?), could be used so that the showeree knows to cause some motion, resetting the timer, or he/she will be in the dark soon. This may also be used as a self-timer to encourage shorter showers or pickup time is approaching.

 

The SwitchLinc dimming command could be used to provide preset dimming levels for bath soaking mood lighting.

Link to comment

Archived

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


×
×
  • Create New...