I'm trying to figure out what the best, simplest (really just fewest triggers & config steps) way to handle keeping several buttons in sync, both when used physically and when used via Indigo.
For KPL buttons that control 'scenes', groups of lights/devices that would be turned on/off in unison. Examples of 'scenes' (not INSTEON groups/scenes) like this are stuff like "Party Mode", "Night Mode", "Away Mode", "Watch Movie", etc...
My process right now for this is:
-Use INSTEON Device Links to sync the appropriate KPL buttons via INSTEON; keeps physical button pushes instantly in-sync.
-Create 2 Indigo 'Action Groups' per desired Indigo "scene" / button action (1 for ON, 1 for OFF) which:
a) does the actual actions to turn the "scene" on/off
b) turns on/off the proper KPL buttons as needed; ensures that Indigo-fired 'scenes' keep buttons in-sync
-Create 2 "INSTEON command-received" triggers for EACH of the appropriate KPL buttons (ie two per KPL button that controls the same 'scene'), each of which which calls the appropriate ON or OFF action group for the scene.
This seems to work just fine at the physical buttons, and from Indigo as long as I only use the Action Groups to turn the scene on/off which for scenes is no issue. Obviously if I manually change stuff at each device (or via Indigo for each device), the KPL LEDs don't reflect that status, but that's expected and just fine. Worst case, I can change to non-toggle mode and have a double-tap be OFF and a single-tap be ON and then button LED states are a non-issue but typically I'm OK with having a "Party" button that toggles, off just turning off the relevant lights if they happened to still be on...
Some Qs:
1) One downside here I think, is that the Action Groups update ALL the KPL button states -- but most of the time at least 1 of the KPLs is already "in sync" (ie it was a physical button push), so this may be adding extraneous INSTEON traffic to my network which could be avoided?
2) KPL buttons that control a single device [whether it be a virtual device, an X10 device, or an INSTEON device] -- these work fine if controlled physically but if controlled from Indigo and NOT via the respective Action Group, then things get out of sync. One solution is to add yet another trigger based on Device State which then calls the appropriate Action Group to sync things up. Some potential issues I see with this:
A) It's potentially a hell of a lot of triggers to setup if you've got a couple of different ways/devices that control the device.
B) I am concerned that I could end up with an 'infinte loop', especially for virtual & X10 devices. The KPL-button-press trigger fires, action group changes device state, then the device-state-based trigger fires as well... I suppose I could use two additional triggers here that instead set a variable, then change my proposed "onDeviceStateChange" trigger to instead be a "onVariableChange" trigger, but again then I'm yet again adding more triggers which I'd like to avoid given 8 KPLs -- my goal is largely to not require hundreds of triggers just to keep my KPLs in sync...
What's the best practice for setting something like this up? I'm close to just jumping into Python for a day or two and writing up some classes but was really hoping to get majority of my stuff done without it, and have gotten probably ~30% of my stuff done already, though do have some "gaps/issues" remaining related to state & esp. WRT my concerns about extraneous INSTEON traffic & infinite loops...
Hrmmmm -- any advice for this semi newbie Indigo/HA user would be appreciated! FWIW, I'm a software engineer by trade! =D
-AD