Jump to content

My First Program


cash70

Recommended Posts

Posted

I am working on creating my first program(s).  This is what I am trying to accomplish:

 

- Hidden door sensor 2845-222 on basement door controls dimmer switch 2477D.  Lights are turned on when door is opened.

- When door is closed, lights wait 2 minutes before turning off.

- Motion sensor 2842-222 in basement keeps lights on when motion is sensed, even if door is closed.

 

This is what I have:

 

 

Program 1

 

If
        From    12:00:00AM
        To      12:00:00AM (next day)
    And Status  'Basement / 2B.30.5F.1 - Door Sensor' is On
 
Then
        Set 'Basement / Basement - Light Switch' On
 
Else
   - No Actions - (To add one, press 'Action')
 
 
Program 2
 
If
        Control 'Basement / 2B.30.5F.1 - Door Sensor' is switched On
 
Then
        Set 'Basement / Basement - Light Switch' On
        Wait  2 minutes 
        Set 'Basement / Basement - Light Switch' Off
 
Else
   - No Actions - (To add one, press 'Action')
 
 
Program 3

 

If
        Control 'Basement / Basement - Motion Sensor-Sens' is switched On
 
Then
        Set 'Basement / Basement - Light Switch' On
 
Else
   - No Actions - (To add one, press 'Action')
 
 
I did some testing and it appears to be working ok.  Does this look ok or is there a better way to implement it?  Right now if the door is open for more than 2 minutes and no motion is sensed then the lights go out.  I like it since it allows for the lights to go off if the door is left open.  However, if someone is going to come back into the room, the motion sensor does not pick up motion at the top of the stairs.  I am thinking that I will need another motion sensor.  Or is there a better way to program this?
 
Thanks in advance!
 
Cassius
 
Posted

Welcome.  I am no expert but usually try to read threads like these to learn more. 

I have the hidden door sensor for my basement door.  I have this set for two nodes.  When the door opens, the light for the stairs turn on, but do not turn off when the door closes.  I'll have to check my ISY when I get home to make sure I have the terminology for the two node is correct, but have some thoughts.

You should always try to use a scene when possible rather than a program.  I would suggest setting the door sensor in two node mode. Have the on/open as a controller of a scene and the switch as a responder. When you open the door you should get a faster response for the lights since communication will be from device to device without going thru an ISY program.

Then use the door close node to activate a program.  Something like this:

 

If control door closed in on (I think)

and motion sensor is not on

 

Then

wait 2 minutes

set scene basement lights off.

 

I would not set the device off directly, since you may want to have additional controllers of the basement lights.  I have a kpl in the hallway with a basement lights button and can easily se if the basement lights are on without opening the door.

Eric

Posted (edited)

Welcome.  I am no expert but usually try to read threads like these to learn more. 

I have the hidden door sensor for my basement door.  I have this set for two nodes.  When the door opens, the light for the stairs turn on, but do not turn off when the door closes. 

<snipped>

Eric

There are many places that advise against putting automatic lighting in stairwells without other lighting. If the lights go out in the middle of a descent it could be disastrous  for some.

Edited by larryllix
Posted

I am curious as to your intentions here with program 1 compared to program 2.  Also, why did you choose "status" rather than "control" in program 1?  Also, 12AM to 12AM (next day) sounds a lot like "anytime".  Did you intend to say 12PM (next day)?

 

Program 1 will turn on the light any time the door sensor changes from OFF to ON.  That seems fine to me.  But, program 2 will do the same thing, then turn it off 2 minutes later.  It seems that program 1 is redundant.

 

Program 3, on the other hand, has the potential to cause the light to come on and stay on indefinitely.  Is this what you want?

Posted

Here is what I think you should work with, the two node mode for the door sensor.  Use a program like this for the door closed part.  I don't have a motion sensor so I am not sure about the code for it.

If
        Control 'Basement / Basement Devices / Basement Door.2 - Door Closed' is switched On
    And motion sensor is not on


Then
        Wait  2 minutes 
        Set Scene 'Basement / Basement Door Sensor Lights' Off


Else
   - No Actions - (To add one, press 'Action')
 
I understand Larry's concern about the safety issue.  You do not want someone to get caught in the dark if the door is closed and someone is still in the basement.  That is why I went two node.  I sometimes want the door closed but need the lights for the stairs on.  Keep working on it, you will get great help from oberkc and other experts.
Posted (edited)

 

I understand Larry's concern about the safety issue.  You do not want someone to get caught in the dark if the door is closed and someone is still in the basement.  That is why I went two node.

 

It not just getting caught in the dark basement. Most people can feel their way to a light switch up steps or just yelling for somebody else..  The main problem is  going down the stairs and it suddenly goes black. People's feet tend to freeze while your body motion continues forward, reaching for the handrail, and you can't see, blinding half  your sense of balance,  at the same time.

 

I believe this warning is on every wired-in motion detector information enclosed with the device.

Edited by larryllix
Posted

Thanks oberkc and EricK!  I didn't have much time to play with it this weekend.  But I will be working on it today and tomorrow.  I did some additional reading on programs and scenes.  To answer your questions:

 

- I now realize that there was no reason to write 3 programs.  I started by following the basic program instructions on the Wiki, which stated to use "status".  But now I see that I should be using "control".  Also, I want the program to work 24/7.  I did not see an option for "anytime", so I am assuming I just don't need to specify a time.

 

The basement lights just need to be controlled by the door sensor to turn on as soon as the door is opened.  If the door is left open or closed, I want a delay of 2 minutes before the lights are turned off.  Because my wife works out in the basement, I want the motion sensors so the lights stay on while motion is detected.  I figured that I should add a delay of 2 minutes for the lights to be turned off if no motion is detected.

 

Yesterday I got 2 additional motion sensors.  I think that with 3 I should have good coverage in that area.  I will work on this tonight and will post what I come up with.

 

Thanks again!

 

Cassius

Posted

You WAF will go way down if the lights turn off while she is working out.  (WAF=wife approval factor).  I would consider increasing the two minutes significantly.  People have posted timers where the switch will beep or the lights flash before they turn off for good.  Allows time to go to the switch to reset the timer .  Good luck. 

Posted

The basement lights just need to be controlled by the door sensor to turn on as soon as the door is opened.  If the door is left open or closed, I want a delay of 2 minutes before the lights are turned off.  Because my wife works out in the basement, I want the motion sensors so the lights stay on while motion is detected.  I figured that I should add a delay of 2 minutes for the lights to be turned off if no motion is detected.

 

 

OK.  Yes, you can get rid of your first program.  You are correct that for your program to trigger at all times, the omission of a time constraint is the best way to specify this.

 

A couple of things to watch out for in this:

 

a) yes, control and status are different in subtle ways.  I recall that the wiki described this, and suggest you check it out for your own edification.  In this case, I believe "control" is a better option

B) the motion sensors, themselves, configurable by combinations of internal switches, and software such as the ISY.  I think you have to configure switch 5 to enable software control.  From there, check out the ISY-based options, looking for the "occupancy" mode (I think).  This will allow the sensor to send ON commands each time motion is sensed, without the need to wait for a time-out period.

 

Once done, you should be able to handle this with a single program if timeout periods for door and motion are the same, or two programs if different.

 

Consider:

 

if

control motion sensorA is set on

or control motion sensorB is set on

or control motion sensorC is set on

or control doorsensor is set on

then

turn on light

wait a few minutes

turn off light

else

nothing

Posted

You WAF will go way down if the lights turn off while she is working out.  (WAF=wife approval factor).  I would consider increasing the two minutes significantly.  People have posted timers where the switch will beep or the lights flash before they turn off for good.  Allows time to go to the switch to reset the timer .  Good luck. 

 

Yeah!  It did happen, but I was able to get away with "it's the testing phase".  I also got a lightbulb for the lamp on her nightstand and a mini remote.  I created some scenes for her and I am back on the plus side.  Yes, I do get the beep.  So that helps.  I also installed 3 motion sensors.  We should now have full coverage.

 

OK.  Yes, you can get rid of your first program.  You are correct that for your program to trigger at all times, the omission of a time constraint is the best way to specify this.

 

A couple of things to watch out for in this:

 

a) yes, control and status are different in subtle ways.  I recall that the wiki described this, and suggest you check it out for your own edification.  In this case, I believe "control" is a better option

B) the motion sensors, themselves, configurable by combinations of internal switches, and software such as the ISY.  I think you have to configure switch 5 to enable software control.  From there, check out the ISY-based options, looking for the "occupancy" mode (I think).  This will allow the sensor to send ON commands each time motion is sensed, without the need to wait for a time-out period.

 

Once done, you should be able to handle this with a single program if timeout periods for door and motion are the same, or two programs if different.

 

Consider:

 

if

control motion sensorA is set on

or control motion sensorB is set on

or control motion sensorC is set on

or control doorsensor is set on

then

turn on light

wait a few minutes

turn off light

else

nothing

 

This is what I have and it is running smoothly with 3 motion sensors:

 

If
        Control 'Basement / Basement - Left MS-Sens' is switched On
     Or Control 'Basement / Basement - Center MS-Sens' is switched On
     Or Control 'Basement / Basement - Right MS-Sensor' is switched On
     Or Control 'Basement / Basement - Door Sensor' is switched On
 
Then
        Set 'Basement / Basement - Light Switch' On
        Wait  3 minutes 
        Set 'Basement / Basement - Light Switch' Off
 
Else
   - No Actions - (To add one, press 'Action')
 
As EricK pointed out, we get a beep just before the lights are going to turn off.  So it gives us time to trigger the motion sensor.  That should not happen very often with 3.  But we now have time to play with them and adjust as necessary.
 
Thanks to both for your help!  I feel better now about the programs and scenes and will be moving to setup the outside lights in the next few days.
Posted

Does the switch itself need to be a trigger for the program. Not sure where your switch is. For instance, the door is open, but the lights are off and you turn on the lights with the switch. The lights will remain on unless someone turns them off manually or the program is triggered by a motion sensor. I still thin 3 minutes is a bit short.

Glad you got this working, makes me want to get a motion sensor to play with for our pantry.

Posted

The switch is at the top of the stairs.  So if I am going from the family room down to the basement, I have to open the door first and the door sensor turns the lights on.  The switch is just to the right after I have opened the door.  One of the motion sensors is placed at the top of the stairs pointed towards the door.  If I have left the basement and the door was open, then the lights will go out.  But when I return the motion sensor will pick me up before I get to the first step.  I was initially going to do just motion sensors and not the door sensor.  But what I like about the door sensor is that by the time the door is wide open, the lights are immediately on.  In fact, my wife initially thought that the lights were staying on.  Seems a bit redundant, but I prefer it that way with our little boy going downstairs on his own.

 

I am still playing with the time and will most likely adjust as we go.  I will probably end up somewhere between 5 and 10 minutes.

Guest
This topic is now closed to further replies.

×
×
  • Create New...