Garage door closes automatically after 3 alerts


#1

1) Give a description of the problem
I would like to close my garage door automatically after 3 messages are sent to my cell phone. I have a motion sensor that detects if there is someone inside the garage and it would stop the whole process until there is no one inside the garage and the door is still opened.

2) What is the expected behavior?
I would receive 3 messages before the garage door is closed automatically.

3) What is happening/not happening?
I’m receiving just one message and the garage door is not closed automatically.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)


#2

My first observation is you are telling your contact sensor to close your door.
Is that even possible? I would think that another device would close the door


#3

I’m using an Iris Universal Garage Door Internet Gateway. It’s a garage door controler/door sensor.


#4

This may be a dumb question, but have you ever tested a ultra basic piston with no other command except this?

temp

What happens when you Save and then Test. Does your garage door close?


#5

Not sure about the contact sensor controlling the door . . .

But separate of that, I think there is an issue with your counter. It starts off at 0 and then increments to 1 when the first set of conditions are met. So now that your counter is at 1, the first THEN statement is skipped because the counter is not =3.

So the logic proceeds to your ELSE statement, which is where I think the logic goes into a black hole. At this point your door is still open and there probably isn’t motion, so neither of those test as true, and you’re done . . .

Off the top of my head I’d say that you need to test for counters equaling 1, 2 and 3 and provide appropriate actions for each.

Also, you may find that in your last IF statement, the contact should be IS closed, not changes to closed.


#6

Hi!
I did and it worked :slight_smile:


#7

I changed the order of execution. Could you please take a look? I’m going to test it tonight.


#8

This one made my head hurt, lol. I’m thinking it might work but I’m not sure.

It may be more complicated than you need. You are using counters and loops to get you multiple text messages that I THINK could be done in one block with some waits in between. Just check for motion again before you shut the door.

Give it a shot and let’s see what happens.


#9

Just if anyone has the same issue I did, this is the final code provided by eibyer. Thank you eibyer!