Garage door open notification and time array


#1

1) Give a description of the problem
I am not sure that my TimeArray is working
2) What is the expected behavior?
Check every 60 minutes to see if someone might have turned on the
Stop Garage Door Announcement switch (the wife) but a garage door is still open.
3) What is happening/not happening?
Not sure it is even valid code

4) Post a Green Snapshot of the pistonimage


REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

To check if your TimeArray is working, I suggest log to console count(TimeArray) and maybe TimeArray[1] (should be 120).

As for the rest of your logic, I’m not sure it will work as desired. As soon as one of the contacts change to closed, you will get a new trigger which will go through as false on your top if and you will never see the all doors closed message. Also, if two doors are opened and then one gets closed, this will similarly stop messaging because one changed to closed.


#3

@guxdude, excellent suggestions. I’ll make some modifications.


#4

I’m trying to do something similar, but was really only wanting one notification if a door was left open after 30 minutes. I was trying to consolidate a generic door open notification during certain modes and a left open notification. It appears that the door left open is always firing in this configuration. Is it better to use this time array approach? Attached is what I currently have - was trying to keep it simple.


#5

This will send you one notification for each sensor but don’t expect to get one when the door opens. That portion of code won’t be executed until the door has been open for 30 minutes and this piston gets triggered. If you want both an open and a left open notification, I suggest you separate these two ifs and make the first a trigger as well by looking for ‘changes to open’ instead of ‘is open’. Then you will get a message when the door first opens and another if it is left open for 30 minutes.


#6

Thanks @guxdude! Sorry @Pantheon for the hijack. I like the idea of retriggering, I may give that a shot in the future.


#7

Here is what I’m using:

Step 1:

This causes Alexa to make an announcement “The garage door has been open for 30 minutes, please check the garage door”.

Step 2: (This is where you can put the SMS message)

Certain lights in the house turn RED and 100% for 5 minutes.

I use the ‘stays open for’…

You can add a variable to the AND (and Variable01 is false).

Use your Stop Garage Door Announcement as the Variable.


#8

Sorry…forgot to mention…

I get a push notification from ST when the garage door opens, and another when Contact Sensor 7 opens…

I have a second setup for 60 minutes.


#9

@mobiz, no problem with the hijack. We are all learning here. :smile: My piston works well as originally posted. However, the TimeArray section did not seem to be functioning properly. That was my initial question.

So I updated to this and it works well.


#10

Yes, sorry, I meant to mention: If you change your time array variable to type ‘String’ rather than integer, then you can define it as you did in your final version at use the variable. Essentially, webcore treats any string with commas as a comma separated list.

The string list is much easier to work with than any of the array types. I haven’t really figured out how to use them as easily yet.