Stagehand Posted Wednesday at 08:11 PM Posted Wednesday at 08:11 PM 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. Quote
Guy Lavoie Posted Wednesday at 08:33 PM Posted Wednesday at 08:33 PM 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. Quote
Stagehand Posted Wednesday at 09:15 PM Author Posted Wednesday at 09:15 PM 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 Quote
Solution Guy Lavoie Posted Wednesday at 09:23 PM Solution Posted Wednesday at 09:23 PM 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. Quote
Stagehand Posted Wednesday at 09:43 PM Author Posted Wednesday at 09:43 PM Thanks Guy. I think I understand. I'm a bit slow at these things. I'm going to explore the portal a little more. Quote
Stagehand Posted 20 hours ago Author Posted 20 hours ago 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, 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.