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
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
-
Perry The Cynic
- Posts: 857
- Joined: Mon Apr 07, 2008 9:46 pm
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
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
- matt (support)
- Site Admin
- Posts: 21542
- Joined: Mon Jan 27, 2003 1:17 pm
- Location: Texas
- Contact:
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.
-
Perry The Cynic
- Posts: 857
- Joined: Mon Apr 07, 2008 9:46 pm
Re: One-stop linking a KeypadLinc button to a plugin device
Yes, I could do that. I was sort of hoping that someone else had already written a nice plugin for this, actually...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.
Cheers
-- perry
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...
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...
- matt (support)
- Site Admin
- Posts: 21542
- Joined: Mon Jan 27, 2003 1:17 pm
- Location: Texas
- Contact:
Re: One-stop linking a KeypadLinc button to a plugin device
600? Ouch. Yeah, there is definitely a need here for a better solution...
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.
-
Perry The Cynic
- Posts: 857
- Joined: Mon Apr 07, 2008 9:46 pm
Re: One-stop linking a KeypadLinc button to a plugin device
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.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.
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
Cheers
-- perry
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
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.
Re: One-stop linking a KeypadLinc button to a plugin device
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?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.
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
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.
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
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
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.
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.
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
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.
Re: One-stop linking a KeypadLinc button to a plugin device
there is still a lot of undiscovered land left ..
thanks
thanks
-
Perry The Cynic
- Posts: 857
- Joined: Mon Apr 07, 2008 9:46 pm
Re: One-stop linking a KeypadLinc button to a plugin device
If we do that, will subscribeToChanges still see the button press? (Arguably it doesn't change the state of the KPL device anymore...)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.
Cheers
-- perry
