Hello there,
As a new Indigo user I'm finding that there are probably a hundred ways to accomplish the same objective so I'd like to gather some insight on the best way to accomplish my particular objective.
What I'm trying to accomplish is to use data provided by my motion sensors (connected via AD2USB Plugin) to provide a representation of whether a room is occupied or not. I'll then use this information to deal with further automation such as turning off lights in unoccupied rooms as well as to simply have a visualization of areas of my home that are occupied.
The problem is that my motion sensors clear immediately after faulting and go into a 3 minute battery preservation mode before they have the opportunity to fault again meaning that if you aren't looking at Indigo at the exact moment of the fault it's nearly impossible to tell if the room is occupied or not.
To get started, I've managed to accomplish my objective but in order to do so I've had to create 2 Triggers (3 if you count my bonus trigger), 1 timer and 1 variable...and that is just for one room. Not so bad I suppose but after replicating this across every room in my house it's going to be a bit of a maintenance nightmare...not to mention that looking at the variables list isn't the most intuitive way of checking if a room is occupied...
So here is what I have done so far:
1. Created a room specific variable: occupiedGuestRoom (bool)
2. Created a room specific timer: occupiedGuestRoomTimer (3 mins)
3. Created a trigger that fires when the Guest Room Motion sensor faults that sets the respective variable to true and restarts the timer.
4. Created a trigger that fires when the occupiedGuestRoomTimer finishes that sets the respective variable to false.
5. As a bonus, I created an additional trigger that turns off the Guest Room Light when the occupiedGuestRoom variable becomes false.
My plan is to replicate this functionality across all rooms of the house but as you can see, I'm going to have a giant mess of triggers and timers and variables so I'm thinking that there has to be a better way of accomplishing this.
I've been researching a ton of different options to reduce the footprint a bit such as ActionGroups, GroupTrigger Plugin, Virtual Devices, etc, but I'm still not entirely clear on which route to pursue.
Hoping that someone with a little more Indigo experience might be able to point me in the right direction so that I at least can focus my exploration efforts on a path that won't lead to a dead end.
Thanks in advance for any direction anyone can offer!