Jump to content

Program Help...Let Dog Out


jmed999

Recommended Posts

When I let my dog out, he and I walk out the back door into the screened in deck and let him out the screened door on the deck which is about 10 ft away from the back door of the house. Currently my deck and backyard flood lights turn on after sunset and when the back door sensor is violated. The light stays on for 5 minutes then turns off.

 

I'm trying to get the light to also turn off when we come back in the house.

 

So far I have these programs.

 

Elk-Back CFLs and Deck Lights1

If
       Status  'Deck Motion-Sensor' is Off
   And Elk Zone 'Back Door' is Violated
   And Status  'Deck Lights' is Off
   And $i.Let.Bristol.Out is 0
   And From    Sunset 
       To      Sunrise (next day)

Then
       Run Program 'Elk-Back CFLs and Deck Lights2' (Then Path)

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

 

Elk-Back CFLs and Deck Lights2

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Set Scene 'Back Lights' Fast On
       Wait  10 seconds
       $i.Let.Bristol.Out  = 1
       Wait  5 minutes 
       Set Scene 'Back Lights' Fast Off
       $i.Let.Bristol.Out  = 0

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

 

Elk-Back CFLs and Deck Lights3

If
       Status  'Deck Motion-Sensor' is On
   And Elk Zone 'Back Door' is Violated
   And $i.Let.Bristol.Out is 1
   And From    Sunset 
       To      Sunrise (next day)

Then
       Set Scene 'Back Lights' Fast Off
       $i.Let.Bristol.Out  = 0

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

 

The problem is sometimes it doesn't work and sometimes it does. I don't want it to run if I have manually turned the lights on before I walk out the back door via the wall switch (switchlinc).

 

Please proofread my programs and let me know how they could be improved. I'm not sure how to remove the issue of the lights being turned off during the 5 minute wait which wouldn't allow the variable to change back to 0.

 

Thanks in advance for the suggestions! :)

Link to comment

How confident that the motion sensor becomes "violated" when Bristol goes out? Is it possible that the third program fails to run at times because of this inconsistency?

 

Why set the bristol variable to zero after five minutes (second program)? Why not wait until the door is violated (third program)? If the dog is out more than five minutes, what happens? (lights go off?)

 

In general, I suspect it is going to be difficult to keep the variable synced with reality. Might not this program get triggered by someone other than the dog entering or leaving? What happens when the dog is out before sunset, but comes in after?

Link to comment
How confident that the motion sensor becomes "violated" when Bristol goes out? Is it possible that the third program fails to run at times because of this inconsistency?

 

Why set the bristol variable to zero after five minutes (second program)? Why not wait until the door is violated (third program)? If the dog is out more than five minutes, what happens? (lights go off?)

 

In general, I suspect it is going to be difficult to keep the variable synced with reality. Might not this program get triggered by someone other than the dog entering or leaving? What happens when the dog is out before sunset, but comes in after?

 

Those are outstanding questions! I have some of the same concerns and I'm hoping to program my way out of those problem areas.

 

-I'm very confident that the motion will get violated (turned on) when the dog and I walk out the back door.

 

-I don't think that part will fail and it's really no concern.

 

-I set the bristol variable to 0 after 5 minutes in the 2nd program in case the 3rd program doesn't get used. I may change this like you suggest and see what happens/test it.

 

-I plan to adjust the time to cover 99% of the durations...maybe 10 minutes.

 

-My main concern is the door and program getting out of sync. For example, if my dog and I walk out the back door onto the screened in deck and I let him out of the screened in deck via the screen door and while I'm waiting, my wife walks out the back door and onto the deck. In that scenario the light would turn off while we are on the deck and would be very annoying. These kind of problems are what I'm concerned about. With that said, my wife and I are the only ones that live here and these programs turn off if we have company.

 

-If Bristol goes out before sunset then comes back in after sunset, it shouldn't be a problem. He is only out for about 5 minutes at a time to go potty. We walk him daily for exercise and we have no fence in our yard so when he goes out after sunset in the backyard, he is only out for a few minutes.

 

Any suggestions on how to improve the programs to avoid some concerns about the door becoming unsyced?

 

Thanks!

Link to comment
Any suggestions on how to improve the programs to avoid some concerns about the door becoming unsyced?

 

I think becoming unsynced is inevitable. I wonder if it would be a good idea to have a keypad button or something to indicate Bristol status, so that you could manually correct when needed.

 

Alternatively, why keep track of dog in or out? Why not simplify things, and use a combination of door and motion sensor exclusively, such as:

 

if 
from sunset 
to sunrise (next day)
and
(
elk zone 'back door' is violated
or control deck motion sensor is turned on
)
then
set scene back lights on
wait xx minutes
set scene back lights off
else

 

if you need a way to manually control the lights and override the motion/door program, add a status program such as:

 

if
control deck lights is switched on
and control deck lights is not switched off
then
else

 

Add this program status to the first program:

 

if 
from sunset 
to sunrise (next day)
and
status 'status program' is false
and
(
elk zone 'back door' is violated
or control deck motion sensor is turned on
)
....

 

finally, I think you will have to create a third program to turn the lights off at sunrise, for the (hopefully rare) case when you are taking the dog out within xx minutes of sunrise.

 

if
time is sunrise
then
turn off deck scene

 

I am sure I don't have all the syntax correct, but maybe there are some ideas in there you could use.

Link to comment
Any suggestions on how to improve the programs to avoid some concerns about the door becoming unsyced?

 

I think becoming unsynced is inevitable. I wonder if it would be a good idea to have a keypad button or something to indicate Bristol status, so that you could manually correct when needed.

 

Alternatively, why keep track of dog in or out? Why not simplify things, and use a combination of door and motion sensor exclusively, such as:

 

if 
from sunset 
to sunrise (next day)
and
(
elk zone 'back door' is violated
or control deck motion sensor is turned on
)
then
set scene back lights on
wait xx minutes
set scene back lights off
else

 

if you need a way to manually control the lights and override the motion/door program, add a status program such as:

 

if
control deck lights is switched on
and control deck lights is not switched off
then
else

 

Add this program status to the first program:

 

if 
from sunset 
to sunrise (next day)
and
status 'status program' is false
and
(
elk zone 'back door' is violated
or control deck motion sensor is turned on
)
....

 

finally, I think you will have to create a third program to turn the lights off at sunrise, for the (hopefully rare) case when you are taking the dog out within xx minutes of sunrise.

 

if
time is sunrise
then
turn off deck scene

 

I am sure I don't have all the syntax correct, but maybe there are some ideas in there you could use.

 

Thanks for your time and suggestions! I'll try some of your ideas! Thanks again!

Link to comment

Archived

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


×
×
  • Create New...