I’m glad this topic is getting more attention.
Here’s my take:
Mode = A State (Lights On, Motion Detection Armed, etc…)
I use the current mode for two things. The first is when a mode changes, I trigger changes in the state (turn lights on). The second is that when an event happens, I select the modes in which I want an action to happen (mode determines if motion detection is sent as an alert).
The kludgy part of this is that I am forced to have multiple aspect modes: Away - Day, Away - Night, Home - Day; Home - Night; Home - Asleep.
I drew up a little finite state diagram and figured out the triggers that move me from one mode to another. The key was to figure out the trigger and use the current mode to figure out the transition. For example, it is after sunset…you have to have to transitions…the first is restrict to the current mode being Away - Day, which would transitions to Away - Night. The second is restricted to the current mode being Home - Day, which would transition to Home - Night.
When the mode changes, that is what triggers the lights to come on.
I think this is better than spreading everything over multiple apps. When you do that, you run into problems like what foneguy2 is running into…YOU CAN’T FIGURE OUT WHAT IS TRIGGERING AN UNWANTED CHANGE.
I think this gets unwieldy if you add things like weather conditions. Can you imagine multiplying the number of modes by four weather conditions??? (Sunny, Rainy, Snowy, Cold) If you had 3 groups with 2, 3 and 4 modes respectively, then you need 24 modes to express every combination!!
I think you have to allow users to define groups of modes and apps to trigger or one or more of the groups, it would make setting things up much easier.