drprm1 Posted January 20 Posted January 20 (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 January 20 by drprm1
paulbates Posted January 20 Posted January 20 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 gzahar Posted January 20 Solution Posted January 20 (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 January 20 by gzahar
drprm1 Posted January 20 Author Posted January 20 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?
gzahar Posted January 20 Posted January 20 (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 January 20 by gzahar
drprm1 Posted January 20 Author Posted January 20 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')
drprm1 Posted January 20 Author Posted January 20 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
Recommended Posts