Recreating the old elder care bathroom fall monitor?

I’m late to the party here… trying to replace an automation in the old system that did the following:

If motion starts and stops in the bathroom, send an alert if there is NO motion in the bedroom within 30 minutes. That is, if someone goes into the bathroom and never comes back out, there is a problem.

I have poked around a bit in the phone app, and also signed up for Sharp Tools, but I’m trying to learn two new systems while I solve a problem so it’s slow going.

I’m hoping someone has already figured this out or has some hints. Thanks!

[ETA: I am a software developer and had Groovy code running on the hub previously, but have not delved into the new custom coding options yet. That’s an option though if it’s the best solution here!]

Tagging @joshua_lyon

Something maybe using routines on the basis of @TAustin 's Counter Utility as explained by him here.

My needs are not so crucial here but I do like to keep an eye on a member of the household while I’m out and it works quite well for me.


Thank you! The counter is working well enough. I have the bathroom motion sensor turning it on, and then motion in every other room turning it off. I don’t know if it’s because the person moves slowly or if the sensor is just old and not working correctly, but it seems they can sneak by the one in the bedroom and never trigger motion there before returning to the living room.