One-stop linking a KeypadLinc button to a plugin device

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Sun May 05, 2013 12:18 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

One-stop linking a KeypadLinc button to a plugin device

I need to make plugin devices turn on or off from a KeypadLinc button. Since Insteon knows nothing about plugin devices, I must write triggers:

button on -> device on
button off -> device off
device turns on -> turn button LED on
device turns off -> turn button LED off
(and some additional gunk for dimmers)

Is there anything that lets me do this without writing an exploding number of individual triggers? Something that lets me link "state of this device" to "state of this KeypadLinc button", in both directions, in one fell swoop?

Cheers
-- perry

Posted on
Sun May 05, 2013 9:52 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: One-stop linking a KeypadLinc button to a plugin device

There is no magic to make it easy, but you could subscribe to all device changes via indigo.devices.subscribeToChanges() then have your plugin monitor for when a particular KPL button changes its state value via deviceUpdated() callbacks, which you would then internally have mapped to whatever plugin action you need.

Image

Posted on
Sun May 05, 2013 2:52 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: One-stop linking a KeypadLinc button to a plugin device

There is no magic to make it easy, but you could subscribe to all device changes via indigo.devices.subscribeToChanges() then have your plugin monitor for when a particular KPL button changes its state value via deviceUpdated() callbacks, which you would then internally have mapped to whatever plugin action you need.


Yes, I could do that. I was sort of hoping that someone else had already written a nice plugin for this, actually... :-)

Cheers
-- perry

Posted on
Sun May 05, 2013 5:50 pm
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: One-stop linking a KeypadLinc button to a plugin device

This is a major reason why I've got close to 600 triggers :/

It would be nice to be able to have the KPL button able to be assigned a separate device or sub device and simply have any change drive the main controller and vice versa...

Posted on
Sun May 05, 2013 6:17 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: One-stop linking a KeypadLinc button to a plugin device

600? Ouch. Yeah, there is definitely a need here for a better solution...

Image

Posted on
Sun May 05, 2013 6:21 pm
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: One-stop linking a KeypadLinc button to a plugin device

Having an alarm kpl button and play/pause kpl button on every kpl linc in the house adds a lot. Not saying all the triggers are related to those, but a large handful is.

Posted on
Mon May 06, 2013 9:35 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: One-stop linking a KeypadLinc button to a plugin device

Having an alarm kpl button and play/pause kpl button on every kpl linc in the house adds a lot. Not saying all the triggers are related to those, but a large handful is.

If each KPL button was a distinct device, then Indigo's shiny new device groups feature could take care of "if any of these buttons is pressed, pause audio" and such. In general, device groups ought to be able to deal with "all of these do the same thing" kinds of situations, as long as "these" are devices.

I'm just saying... :-)

The only "big bang" solution I can see, is to add a programming-language level pattern matching facility. I might do that for myself eventually (right before my trigger army rises up to crush me :-)), but I don't see that being useful for beginners...

Cheers
-- perry

Posted on
Mon May 06, 2013 9:38 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: One-stop linking a KeypadLinc button to a plugin device

I'm hoping to have a solution for this by Indigo 6 GM but we're still in the process of defining what and when.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon May 06, 2013 1:34 pm
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: One-stop linking a KeypadLinc button to a plugin device

jay (support) wrote:
I'm hoping to have a solution for this by Indigo 6 GM but we're still in the process of defining what and when.


Fully expecting the canned answer of wait and see here, but will this solution just work for KPL buttons and other switches, or could it also encompass variables and plugin states?

Posted on
Mon May 06, 2013 2:13 pm
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: One-stop linking a KeypadLinc button to a plugin device

jay (support) wrote:
we're still in the process of defining what and when.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Jun 16, 2013 11:03 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: One-stop linking a KeypadLinc button to a plugin device

along those lines,
with the 6 button version: depending on state of the button led it is brighter or dimmer (on/off)

I have tried to control the led brightness of each button, sometimes it changes with the set led brightness insteon action (both device options), sometimes not and there is no error message in the event log.

Can i just set them to one level, independent of the state?

In the device setup one can set the background brightness, but it seems to only set the average on/off-state led brightness level.


thanks

Karl

Posted on
Sun Jun 16, 2013 11:11 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: One-stop linking a KeypadLinc button to a plugin device

just found a way:

on trigger button 3 on
do your action action
set button 3 off

the button will always be in off mode.

that also solves the the issue that one could get an off signal from the button. it only goes from off to on, never on to off.

Posted on
Mon Jun 17, 2013 5:34 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: One-stop linking a KeypadLinc button to a plugin device

You can change a button into non-toggle mode so that it only sends ON (or OFF), never the other, and the button will remain on (or off). Use Interfaces->INSTEON/X10 Power Line->Set KeypadLinc Button Toggle Mode. This is better because it will decrease the amount of INSTEON traffic.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jun 18, 2013 11:30 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: One-stop linking a KeypadLinc button to a plugin device

there is still a lot of undiscovered land left .. :D

thanks

Posted on
Wed Jun 19, 2013 9:33 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: One-stop linking a KeypadLinc button to a plugin device

You can change a button into non-toggle mode so that it only sends ON (or OFF), never the other, and the button will remain on (or off). Use Interfaces->INSTEON/X10 Power Line->Set KeypadLinc Button Toggle Mode. This is better because it will decrease the amount of INSTEON traffic.

If we do that, will subscribeToChanges still see the button press? (Arguably it doesn't change the state of the KPL device anymore...)

Cheers
-- perry

Who is online

Users browsing this forum: No registered users and 1 guest