Jump to content

Need Help Creating a Garage Door Program


Stagehand
Go to solution Solved by Guy Lavoie,

Recommended Posts

Posted

Hello,

I am in need of help creating a garage door program in my Polisy.

I have a garage door with a ZWave tilt sensor on it. The Garage door opener is a Chamberlain brand opener with a pushbutton wall switch. I have a Zooz Zen16 relay wired directly to the pushbutton wall switch.

My Polisy is connected to Alexa and I have a simple program that momentarily closes contact to the pushbutton wall switch in both "Then' and "Else" fields. I can use the commands "Alexa, open the garage door." or "Alexa close the garage door".

Here is my problem. In reality, it does not matter if I command Alexa to "open" or "close" the garage door. Essentially the pushbutton wall switch is activated and the garage door will travel to the opposite of it's current position. Therefore, if I forget that the garage door is closed and I command Alexa to "Close" the door, it will open. 

I have set up the tilt sensor to create a state variable. "Off" if the door is closed and "On" if the door is open.

Here is where I am stuck. I want to command Alexa to "Close" the garage door and in the program check to see if the door is open or closed. If it is already close it should do nothing. If it is "open" then it activates the pushbutton. And I want the same to happen if I command Alexa to "Close" the garage door.

I would greatly appreciate any help.

Thanks for your time.

Posted

This is where AND statements come in. Here is generic logic that you could use to create two programs:

If Alexa open door command

    And Tilt sensor variable = "closed"

      Then Open door

 

If Alexa close door command

    And Tilt sensor variable = "open"

        Then Close door

 

You wouldn't have anything for Else statements.

 

Posted

Thank you Guy for your quick response. I am looking through the Universal Devices Administrative Console and cannot find any sort of condition for "Alexa close door command". Where is that located? 

Thanks again

  • Solution
Posted
Just now, Stagehand said:

Thank you Guy for your quick response. I am looking through the Universal Devices Administrative Console and cannot find any sort of condition for "Alexa close door command". Where is that located? 

Thanks again

Well that would be whatever the actual command you are using would be. I was assuming that you had this set up already and that you had noticed that the door would activate no matter if you asked it to open or close.

If you haven't really set anything up yet, I would suggest that you set up the garage door device in the portal to set a variable, to make it single triggering. It would be something like this: Make the Alexa Open command set (let's call it the Door_command_variable) to 1, and the Alexa Close command set it to 2. Now the program logic would go like this:

If Door_command_variable = 1

    And Tilt sensor variable = "closed"

      Then Open door

      Then Door_command_variable = 0

 

If Door_command_variable = 2

    And Tilt sensor variable = "open"

        Then Close door

        Then Door_command_variable = 0

 

Setting the variable back to 0 makes sure that nothing will happen until a new, valid command is issued. 

Posted

Thank you very much Guy for having the patience to explain, to me, a very simple concept that I could not grasp on my own. I have created the exact garage door program that I wanted. 

All the best,

 

  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...