SmartApp "Left it Open" modified for use multiple Contact Sensors

In case anyone is interested:
I have modified the “Left it open” smartapp, which warns if a door or window has been left open for a specified period of time.
In the original smartapp you can only select one sensor of a door or window. If you need to control more sensors, you have to create a new app for each sensor to control.
As I did not find another app to control several open sensors, it may exist, so I made a modified SmartApp “Left it Open-Multicontacts”:

  • You can select the door or window sensors you want to control from all the ones you have installed in your location.
  • A separate message is sent for each sensor when the set time is exceeded.
  • In the successive messages, if any contact is still open, the total time that each sensor has been open is reported.
    In the original smartapp, the message only reports that the time defined in settings was exceeded.
  • If a contact is closed, the time for that contact is reset, for the rest that remain open, its total counter continues adding.
  • Send a message confirming that “All selected sensors are closed now and the warning time is reset to the specified time”, when all selected contacts are closed after one or more have been open for longer than the setting time.
  • If all contacts are closed, everything is reset and it is waiting for any other “open” event
    Everything else remains the same as in the original smartApp.

You can see how the app works by following live logging in IDE

I put some screenshots and the smart app link:





5 Likes

Added for send a message confirming that “All selected sensors are closed now and the warning time is reset to the specified time”, when all selected contacts are closed after one or more have been open for longer than the setting time.

This is working well, thank you!

1 Like

I’ve always received the initial “Left it Open” notification from this app and always go ahead and close the door pretty quickly. Today was the first time the door was left open for an extended period of time, however, I did not receive the incremental notification (5 mins). Not sure why but I’ve increased the incremental to 10 mins and will see what happens.

It works well for me.
it may have to do with the server incident yesterday

1 Like