Door contact open then close notifications. help!


#1

1) Give a description of the problem
Need help with a contact open and check every 5 minutes and if still open send push noticiations, but want to end with a push notification once door is closed.

2) What is the expected behaviour?
contact door open/ refresh every 5 minutes sending an alert, and then a notification once the contact is closed.

3) What is happening/not happening?
can not get the part to send a push once the contact is closed.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

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


#2

you forgot to add “and store in Messages” but still not sure that part will work :slight_smile:


#3


#4

Enable Advance Statements if you haven’t done so already while in Edit mode and then use While Loop or Repeat to keep checking the door contact.


#5

I agree

See this note (specifically the contact stays example)

The true side of stays is a one time event. If you need repeating, it needs to be a while in true side of the if statement with stays


#6

This is what I have now. can someone review?


#7

Looking at it with tired eyes, I’d expect that when the freezer door opens you will get a notification saying it has closed. If it stays open you will get notifications after 1 and 6 minutes saying it is open. When it closes you’ll get a notification saying so.

The stays command doesn’t wait to see if the door stays open. It returns false immediately. That’s why it will say it is closed. It also sets a timer so if it stays open for a minute it will fire up and return true to the stays.


#8

how about now


#9

Try something like this one, adjust the times as necessary. It doesn’t notify when the door gets closed though.