Keypadlinc "multiway" switch... action group or scene?

Posted on
Tue Dec 16, 2014 9:49 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Keypadlinc "multiway" switch... action group or scene?

I have a question that surely has come up before, but all my searches keep returning thousands of off topic results; If I have, for example, 3 keypadlincs, (one at the front door, one at the back door, and one in the kitchen) each with a button controlling the living room light switchlinc and want all the button leds to toggle on and off in sync with the light when any one of them is hit, should I set up a scene in the 2412 which includes the switchlinc and all the button groups and then two triggers (actions scene off and scene on) on insteon command received from each button as well as the switchlinc, or is there a reason to set up two action groups (one for all items on, and the other for all items off) tu use as the action in the triggers?

Or is there an easier way to do this without (eventually) having to set up 16 triggers for each 8 button keypadlinc? I had originally planned to link each button as a controller to each scene that I created, but that does not appear to be an option in Indigo.

Posted on
Tue Dec 16, 2014 5:03 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Keypadlinc "multiway" switch... action group or scene?

There are a bunch of different ways to accomplish this. What I would do is create a PowerLinc scene with all the buttons in them - you can use this scene from Indigo to turn them all on/off with a single command to the scene.

Then, you'll need triggers to catch each button press - and have that execute whatever action group you want to control the scene. If possible, I'd use a Device Group because you can then just turn on/off the Device Group directly. Finally, trigger off of the Device Group having a Device State Change of ON and turn on (using the PowerLinc scene) and another to turn them off.

But that's just one of many options.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Dec 17, 2014 6:25 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Keypadlinc "multiway" switch... action group or scene?

I was afraid that might be the case; I had been hoping there would be some way to avoid having to have two triggers (on or off) per button or to make the buttons direct controllers of the scenes... Or I guess I could use a Python script as the action on an " \on any change" trigger... Do the Powerlinc scenes have Indigo IDs and a command to execute "Scene On" or "Scene Off"?

Posted on
Wed Dec 17, 2014 11:01 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Keypadlinc "multiway" switch... action group or scene?

Yeah, you could reduce it to one trigger with a Python script. You can execute PowerLinc Scenes from Python. Their IDs are separate from Indigo object IDs but clear on the PowerLinc Links dialog.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Dec 17, 2014 11:16 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Keypadlinc "multiway" switch... action group or scene?

Thanks, that's exactly what I was looking for, since once I create the template, I can just dup it as many times as needed, changing the device, button group, and target scene in each new copy.

Posted on
Sun Dec 21, 2014 6:32 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Keypadlinc "multiway" switch... action group or scene?

Well, that ALMOST works the way I want... The script that I implemented (many times) looks like:
Triggered off of "Device State Changed"->"Front Spot Lights" ->"Keypad Button LED 3"->"Has Any Change":
Code
Code: Select all
myDict = indigo.Dict()
TheScene =10 # Living Room Light
TheButton = 2 # one less than (Python is 0 based)
TheDevice = indigo.devices[22822082] # "Front Spot Lights"
if (TheDevice.ledStates[TheButton]) :
   indigo.insteon.sendSceneOn(TheScene, sendCleanUps=False)
else:
   indigo.insteon.sendSceneOff(TheScene, sendCleanUps=False)


I can't use Insteon Command Received for two reasons:

First, I only have "On" or "Off" on the button or "Any Change" on the entire 8 button array, and
Second, My control page Icons do not generate an "Insteon Command Received" when they toggle a main load.

The glitch is that this causes is that the scene gets retriggered for every button that controls the main light, firing 4 times in this case (triggered by a slave switchlinc in this case):
    Received INSTEON "Back Door Living Room Switch" on
    Trigger Back Door LR Light
    Sent INSTEON "PowerLinc Interface" on (scene 10 - Living Room Light)
    Trigger Front Hall LR Light
    Trigger Front Spots 3 (Living Room)
    Trigger Side Door Light 6 (living Room)
    PowerLinc Unexpected command 02 62 (flushing)
    Sent INSTEON "PowerLinc Interface" on (scene 10 - Living Room Light)
    Sent INSTEON "PowerLinc Interface" on (scene 10 - Living Room Light)
    Sent INSTEON "PowerLinc Interface" on (scene 10 - Living Room Light)


Furthermore, an issue that showed up before I added the "sendCleanUps=false" to the script was that if someone hit the wrong button and realized it immediately and hit the button AGAIN, the cleanup in progress caused Indigo to go into an infinite loop toggling the light (and all the buttons) on and off in a two second cycle until all the triggers driving that scene were disabled. So far (fingers crossed) the problem doesn't occur with the cleanups disabled, but it does seem like there's still a lot of extra traffic that I should be able to eliminate; Is there something I am missing?

Posted on
Tue Dec 23, 2014 10:43 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Keypadlinc "multiway" switch... action group or scene?

Perhaps I'm not understanding the original question, but what I would do is create a pair of Triggers using Device State Changed (one for change to ON, one for change to OFF) on the load itself (living room light SwitchLinc). The actions would be to execute a PowerLinc group/scene that targets all the LED buttons to mirror the state of the load. So now you have it so that whenever the load changes, however it might change (direct control, Indigo Touch, Control Page action, etc.) the LEDs stay in sync.

You will then need additional Triggers for each KeypadLinc button to have it toggle the SwitchLinc load, OR you can create a direct link between the button on the KPL and the SwitchLinc.

Image

Posted on
Tue Dec 23, 2014 11:27 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Keypadlinc "multiway" switch... action group or scene?

The original issue was to avoid having to keep track of 150 to 200 triggers (one for each button on, each button off, each load on, each load off for (at the moment) 7 8 button keypadlincs, and a couple of dozen swtichlincs and micromodules) by using a scene for each button group controlling a common load and a single trigger for each button to trigger the scene on or off depending on the state of the button.

And I don't see how your approach is going to fix the issue that I am having... consider the case where a button on a keypadlinc fires the trigger to turn on the load, which fires the trigger to set ALL the buttons controlling that load to ON, but while the scene is in the process of setting all the buttons to on, the guy who hit the original button realizes he hit the wrong one and turns it off as other buttons are being turned on (and firing their "device changed" triggers to turn on the load that's already on). The "turn off the load" trigger sends a Turn off message to the load in between some of the "turn on the load" from the other triggers, which causes the load to trigger the "turn off the scene" command, followed by a "turn on the scene" command due to the original triggers from the process of turning on the buttons... and the load begins turning on and off forever as the green bar in the lower corner of the Indigo main window continues to grow wider as the insteon messages pile up in the powerlinc. I was hoping that if I used an action group rather than a scene to set the buttons, I could set a variable to true at the beginning of the group and false at the end of the group and if indigo would wait for confirmation of each "turn on (or off) button"command before moving to the next and if the triggers for the group had a condition of that variable being false to fire, the secondary triggers telling the load to turn on due to the action group (rather than scene) execution would be eliminated, breaking the loop, since the turn off in the middle of the turn on execution would also be conditionaled out (that button might end up out of sync, but that's a small price compared to the alternative).

Posted on
Tue Dec 23, 2014 12:12 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Keypadlinc "multiway" switch... action group or scene?

As I said above, you can use direct links between the KPL buttons and the load to avoid some of those triggers. The only triggers you have to have are to monitor the ON/OFF Device State Changes for the loads themselves.

The loop you are having won't happen. The KPL buttons directly control (are linked to) the load. The load turns ON/OFF, then the Trigger pushes that change to the KPL buttons *only*. Not to the load. So the Trigger will only fire when the load changes. The PowerLinc Group/Scene that changes the LED states will NOT cause the KPL to broadcast out the command to the load. Links are 1-way and do not cascade. No looping.

Image

Posted on
Tue Dec 23, 2014 12:37 pm
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Keypadlinc "multiway" switch... action group or scene?

OK, I'll try that when I get home; as I understand it, I
Hard link each button as a controller of the appropriate load, deleting the trigger to fire the scene as I go.
Remove the load from the Powerlinc scene
Confirm the trigger on the load fires the scene off/scene on appropriately on device status changed....

And if I add more keypadlincs (I am looking at putting in 3 more in strategic locations), just add them to the correct scenes and make the loads responders to the appropriate controller buttons.


Now, one last question related to links and I'll get out of your hair; I recently moved and most of these modules were scavanged from the old house (which I restored to it's original dumb switch state because I wasn't leaving a controller behind), which may have something to do with it. Since the modules were being retasked, I went into the link dialogs and deleted all the old links when I created the new database for the new house, since none of them really applied any more. However, about half the modules were linked to the Powerlinc on "group 0" or random group numbers mostly in the 200-250 range sometimes as controllers and sometimes as responders, although none of those links appeared in the powerlinc link dialog (the 200-250 links are all empty and group 0 doesn't appear at all). Should those links be deleted?

Also, a number of the appliancelincs from the old house were not needed at the new place and thus never entered in the new database, and any links to those devices in the keypadlincs and switchlincs are listed as to "unknown device" and noneditable (or deletable)... Is there any way to get rid of the links without actually adding the appliancelincs into the new database or doing a hard factory reset followed by a resync on the active devices?

Posted on
Fri Dec 26, 2014 12:14 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Keypadlinc "multiway" switch... action group or scene?

I'd highly recommend factory resetting the modules. You can force Indigo to manually allow deleting of links by holding down the OPTION key when opening the link editor dialog, but if you have lots of orphaned links I'd recommend a clean start.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests