"Advanced" Automations with multiple presence sensors

Hello,

've run into what I feel are limitations, but seem like I’m just missing something in the flexibility of triggers.

For instance, I have 3 presence monitors: Spouse, Child, and Self.

I want to create for 8 different presence scenarios:

No one is home, then Child comes home. (Done utilizing away)
No one is home, then Spouse comes home. (Done utilizing away)
No one is home, then Self comes home. (Done utilizing away)

These are fails because of he lack of granularity:

Spouse is home, then Child comes home.
Spouse is home, then Self comes home.
Self is home, then Child comes home.
Self is home, then Spouse comes home.
Spouse AND Self are home, then Child comes home.

If I could add multiple presence IFs it would be great:

If
  Spouse is NOT home (precondition)
  Self is NOT home (precondition)
  Child is home
then
  Setup the house like Child wants

When looking up solutions, I run into mentions of webcore, groovy ide, etc… but all of these things seem to be deprecated (or on the verge of it). The latest thing I see seems to be Edge… but I’ve had no luck in finding clear documentation on how it works or how to utilize it.

Any advice on avenues to achieve this?

Edge will be the replacement for device controllers, but it’s still in Beta. (The topic title is a clickable link.)

There is a community-created edge driver available that has a virtual presence sensor if you want to go ahead and try that but that doesn’t solve your question about how to set up the rules.

As far as the replacements for rules, there is increasing complexity being built into the default rules engine when you create a routine through the smartthings app, or there is something new called the rules API, but I will leave it to others to discuss that option.

@Automated_House may know if there’s a way to do what you want using the default rules engine.

If it’s not possible to have multiple presence tested in an If, I would think it would be possible to use a virtual sensor which is both a Switch and a Presence sensor (the edge driver I linked to is one of these) and then test for the switch portion being on or off.

So

If
self switch is off
Spouse switch is off
Child switch is on

Then set up house the way the child wants.

But I don’t know for sure that that works, others should be able to say. That’s how I used to use presence when I used a virtual presence sensor, but it’s been a while since I’ve tried to set up a routine in the smartthings app. (It’s not voice navigable, so I can’t do much with it.)

1 Like

You may also wish to investigate if the Rules Engine in Sharptools can manage what you want.

Tagging @joshua_lyon

2 Likes

You need to escape from the confines of ‘Member Location’ and get back to having a single presence sensor for each person.

What I would do is have a virtual presence sensor for each of Spouse, Child and Self and set those based on mobile presence. If you are using Routines that does mean six Routines but they would be so worth it.

That will give you the granularity you need.

As a bonus it also allows you to be more flexible with presence. So, for example, if you have two phones you can determine your presence on the one you take with you. You can also set the virtual presence sensors manually when required to override what mobile presence is telling you.

You could just use virtual switches if you wanted to but I find sticking to the presence capability can make things easier. It tends to be easier to implement ‘if any of these devices are present’ than ‘if any of these devices or present or any of those ones are on’.

You don’t have to go virtual though. You could use a physical switch / outlet / bulb to represent your presence. Anything with a binary state that you can set remotely will do.

The above applies however you choose to do things (I use the Rules API).

2 Likes

You can use multiple presence comparisons in a SharpTools.io If Condition (and mix and match other comparisons and nested conditions as needed).

2 Likes

I had similar issues with the built-in automations. I’ve been a long-time Webcore user, and I’ve found the Webcore automations to be very powerful and flexible. I could do many things in one automation.

My experience with the built-in Automations or Routines or whatever they’re called now is that you could probably achieve the same, but you need many independent automations. No way to nest them and put enough preconditions to avoid some unpredictable behavior.

This was my situation:

But just a reminder to users… webcore would only be a short-term solution at this point and you would need to find another solution once webcore is shut down. Once ST ends support for groovy… webcore will cease.

Additionally, webcore can no longer manage STHM.

1 Like

Yes, agree. I was trying to use more built-in Routines/Automations to move away from Webcore, but I couldn’t make it work. I’m probably going to need to ride it out at this point.

Hey @orangebucket - Thanks for the advice. I linked the presence sensors to virtual switches and I’m able to get the granularity I wanted. I had looked a virtual switches prior, but didn’t recognize their usefulness… now I know. Thanks!

1 Like

Hello @jkp … that was part of my concern as well… I didn’t want to go through the effort of setting up something new if that thing was going away (like webcore)

1 Like

i’m trying to avoid going to a third party for this… part of all of the changes I’m making has to do with me eliminating the hodge podge duct tape version of home automations using 17 app, and trying to tie them all together. I will definitely keep sharptools in mind as I move forward or run into other issues.

1 Like

@JDRoberts Thanks for all the information. The virtual sensor is what solved my issue… it allowed me the flexibility i was looking for.

I need to dig into the edge stuff.

1 Like