I’m about to attempt to build my first PISTON. I’ve studied some of the topic but still a bit confused.

In classic-app, they had modes AWAY/HOME/NIGHT. I’m still confused about those modes. Are the modes XOR modes? In other words, can I have only one mode ON at a time (away OR home OR night)?

Or can I share modes? (away AND night) OR (home AND night)?
Are the modes consider enumerations or is each treated as a constant?

I was thinking about setting up two different XOR modes
mode1: (daylight, evening, asleep)
mode2: (home, away)

Any insight?


The ‘location mode’ (as it tends to be referred to in the new environment to avoid confusion with the ‘security mode’ which is internal to the SmartThings Home Monitor) is an attribute of the SmartThings ‘location’. It is an enumeration with the default enumerators being ‘home’, ‘away’ and ‘night’. You can add additional enumerators as required.

So it is not a case of a number of modes being ‘on’ or ‘off’, but a single mode having a particular value.


There is only one location mode variable. It can take one value at a time, such as home, away, Or custom values like “guest,” or “movie night.” At any one time, It is a single value in a single variable. Many people create custom mode values like “away night” but you still only get to have one value at a time.

There is a second separate variable, security.mode, which is used to indicate the armed state of the official security features.

The following FAQ should help, it has a lot of examples:

FAQ: Armed/Disarmed states vs Away/Home modes confusion (Classic app)

Thanks Orangebucket and JDRoberts,

Most of what you said makes sense.
I still need to do some more reading before I attempt my first piston.

Thanks again, Mike