Jump to content

Program help please!


Go to solution Solved by gzahar,

Recommended Posts

Posted (edited)

Have written tons of programs but this is getting me...

Issue:  I have a patio overhead door that I'd like to have automatically close at certain temp and open at certain temp. I made two programs to set a variable to cold  $sPatioGarageDoor=1   or warm $sPatioGarageDoor=2  and use these in my program to open or close the door.Here is the close program. (PatioGD Relay YL is my use of Yolink to control door over MyQ. Works great!)

Patio Garage Door Therm Close - [ID 0028][Parent 0001]

If
        $sPatio_garage_door is 1
    And 'Patio Garage Door YL' Door State is open
 
Then
        Set 'Patio GD Relay YL' ON command
        Wait  5 seconds
        Set 'Patio GD Relay YL' OFF command
 
Else
   - No Actions - (To add one, press 'Action')
 

My issue is that if I want to let the dog out for some business when it's cold out the door opens and the close program shuts it immediately. I've written a few programs to try and get around it but need help...........

Thanks!!

Edited by drprm1
Posted

One option: Is there a keypad nearby with an extra key? Pressing it could change another variable for the "business" at that time and override for x minutes

Another option: is "business" at known time windows? Program exceptions for those times

  • Solution
Posted (edited)

You need to create an integer variable the represents the state of the door.  Update this variable based on YL Door State (in separate program).

Use this variable in the IF statement of your open and close programs and not the direct YL Door State.

 

Edited by gzahar
Posted
Just now, gzahar said:

You need to create an integer variable the represents the state of the door.  Update this variable based on YL Door State (in separate program).

Use this variable in your open and close programs.

 

Was thinking about that. Why would that work?

Posted (edited)
4 minutes ago, drprm1 said:

Was thinking about that. Why would that work?

Because when you open and close the door manually it updates the integer variable which will not trigger your open and close programs.  Obviously you will need to manually close the door after you have opened it (and vice versa).  Your auto open and close programs will only trigger based on the temperature state variable changes.

Edited by gzahar
Posted
4 minutes ago, paulbates said:

One option: Is there a keypad nearby with an extra key? Pressing it could change another variable for the "business" at that time and override for x minutes

Another option: is "business" at known time windows? Program exceptions for those times

no keypad available...

Tried this for a business window of 5 min but it would never change the variable back to 1

Patio Garage Door Therm Close - [ID 0028][Parent 0001]

If
        $sPatio_garage_door is 1
    And 'Patio Garage Door YL' Door State is open
 
Then
        $sPatio_garage_door  = 0
        Set 'Patio GD Relay YL' ON command
        Wait  5 seconds
        Set 'Patio GD Relay YL' OFF command
        Wait  5 minutes and 20 seconds
        $sPatio_garage_door  = 1
 
Else
   - No Actions - (To add one, press 'Action')
 

 

 

Posted
Just now, gzahar said:

Because when you open and close the door manually it updates the integer variable which will not trigger you open and close programs.  Obviously you will need to manually close the door after you have opened it (and vice versa).  Your auto open and close programs will only trigger based on the temperature state variable changes.

I'll try this

Guest
This topic is now closed to further replies.

×
×
  • Create New...