Smartapps and routines (overlapping)

I programmed some smartapps using the multipurpose sensors to work at specific time frame at night.(doors open) Now i also want to set a smartapp with activation when away. Can i do this combining the smartapps with the coloured routines, so that i can easily switch between smartapp settings?
The night routine is a fixed setting but could overlap a temporary home, away or back routine. It confuses me.
Thank you

I’m not sure I understand what you’re trying to do.

But do you mean you want to be alerted if one of your doors opens at night, or when you’re away?

Do you have the regular smartthings hub or the ADT/smartthings security panel?

I have regular smartthings hub.

Wat i want to realize:
Phase 1.
A few sensors have a fixed night time open and vibration setting. (Burglary)
Programmed through custom smart apps.
Phase 2.
Now i also want a simple on/off setting (also open and vibration for when we are not at home).
So setting will/ can overlap each other.
Wat is the best way to go.
Phase 3.
Later i want to add smart plugs, light routines and cameras.

Thank you

These kind of overlapping rules can happen in any home automation system. There are always several different ways to approach the issue.

In SmartThings, there are two ways that people typically use when they would have two conflicting rules being triggered at the same time.

One Example

For example, suppose I have a rule which says if The front door opens I want the entryway light to turn on 100% between sunset and sunrise every day.

Then I create a second rule which says that if I turn on the television in the living room after sunset, I want to dim the entryway light to 25%.

So now I have two conflicting rules applying to the same device, the entryway light. How should I resolve the conflict?

The first important thing to note is that different people will have different desired outcomes. Some people will want the door open rule to take priority. Others will want the television rule to take priority. So the first thing you need to do is be very clear in your own mind what you want the outcome to be when both rules are eligible at the same time.

Let’s say that for this example we want the television rule to take priority. If I am watching a movie on the television in the living room I don’t want my housemate coming in through the front door to suddenly turn that light on to 100%. :rage:

SmartThings Method 1: Use Modes

The first method which is popular in SmartThings is to use modes so that we actually separate these two rules to ensure that only one will fire at a time.

Smartthings calls the mode a “behavior filter.” That’s a fancy way of saying it’s a condition for when rules will fire.

So let’s say I started with the SmartThings default modes of home (day), away, and night.

I can add a new custom mode called “TV time.”

Now I can change my two rules. I can make my rule to turn the light on to 100% run only in “night” mode. And I can make my new rule, to set the entryway light to 25% between sunset and sunrise, run when the Mode is “TV time.”

Now all I have to do when I am ready to watch TV is change the mode to “TV time.” Note that that will do two things. It will change the entry light to 25% but it will also mean that the door open rule will not trigger. Conflict solved. :sunglasses:

Some people go really crazy and have 15 or 20 custom modes to handle all kinds of combinations of behavior filters, like “guests are home at night” etc. Some people only need one or two special ones, like the TV time example. It’s totally up to you.

To read more about modes, see the following:

https://support.smartthings.com/hc/en-us/articles/200962880-How-do-Modes-work-

SmartThings Method 2: Make a Smarter Rule with Webcore

Another approach is to remove the conflict by making the rule itself smarter through the use of “stacked conditionals” like “unless,” “only when,” “but not if.”

Webcore is a very sophisticated rules engine created by the community which can handle these type of complicated rules. Setup can be a little tricky, but there are many community members who will be glad to help either with a specific rule or with the general set up. They even have their own forum.

So to go back to our example, we could create a single rule (which web core calls a “piston”) which said:

“if the front door opens and it is between sunset and sunrise , turn the entry light on to 100% unless The TV is on except if my father is visiting, still turn the Entry light on to 100%.”

These rules can get really complex, this is just an example. But you get the idea: with webcore, you can make the rule itself handle a number of different possibilities. :sunglasses:

So those are the two basic methods in SmartThings for resolving the kind of conflict you described. You can also write your own code for specific situations, but these days most people just use webcore if modes are not enough to do what they want.

p.s. Several community members, myself included, rely on text to speech software. And others live in other parts of the world and have English as a second language. When you use weird spellings like “WAT” it can be very difficult for us to understand what you are saying, and you will get fewer responses. It’s up to you, but in general you will get the most feedback if you use standard English, as more community members will be able to easily understand you. :sunglasses:

1 Like

Wasn’t just a misspelling of “what”? A special acronym?

I don’t know what other people will hear. My voice reader tried to read it as a word and ended up sounding like “lad.” At first I thought maybe it was LED.

Anyway, I had to listen to it three or four times just to figure out what that one word was, and then again to get the actual meaning of the post.

I’m not sure what a translator would do with it. :sunglasses: