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: