You probably need to monitor a number of sensors (motion, contact, etc.) and if neither of them is activated within specified period of time, trigger an alert (Push message, SMS, etc.). The easiest way to accomplish this IMHO, is to have a periodic task that runs say every 10 minutes and checks all the sensors in the group to see when the last state change has occurred.
initialize sets a runIn for n*3600 for handler “timeoutFunc”
events for whatever motion sensors to call an event handler “motionEvent.” That event handler just resets the runIn for n*3600 on handler timeoutFunc.
timeoutFunc sends the notification.
The problem with this is that ST tends to lose it’s mind on occasion, and timeoutFunc might never run. I suppose a cron-type schedule should also run that ensures that timeoutFunc is still scheduled. That should handle the case of the timeoutFunc disappearing.
I hope you are monitoring this topic, just noodling around with custom coding ways to solve the use case you described. If you aren’t yourself a coder, no problem, just answer the use case questions that come up and the coders can get into the techie stuff.
BTW, here’s some of the code I was remembering that uses unschedule, but I don’t know if the author still participates in the community, this is from the old archives. It’s a “lights off” reset where the lights are supposed to go off after a certain period without motion, but if you move again, it delays the lights off request.
In this case, change “lights off” to some kind of notification process.
Perhaps you could schedule a task however often you like (once an hour?) that checks all of your desired sensors for events over the last hour using myDevice.eventsSince() and if none have triggered, then send notification.
Thank you for your response. Last coding I did was either speakeasy or fortran IV ;^) Sorry for the long delay. I am using 2 ECO pirz motion sensors. They have a 4 min reset time.
I found an app for motion sensors on the smartphone app under eldercare that is designed to do what I want, i.e., notify if someone leaves one area for another area and doesnt return to the first area in a specific period of time. I tried to set it up and tested it but could not get it to send a signal. It appears that the sensors are sensors are seeing/not seeing appropriately. I opened a support ticket and am slowly working through the process. Expecting a live chat later this week which i hope will resolve it. I will post a followup when/if resolved.