Relaying continuing changes (aka: smooth dim buttons)

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
Wed Jul 03, 2013 10:22 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Relaying continuing changes (aka: smooth dim buttons)

We have actions and Python methods for incrementally dimming devices. Those are of the form "make this brighter by 10" - it's a one-time deal.

Some users like to press a button and hold it down until the device looks right. That's how native INSTEON dimming links work - if you link a KeypadLinc button to an INSTEON light and hold down the button, the light gets brighter (or dimmer) until you let go. But this is all INSTEON specific - I don't see the support framework for plugins (or Z-wave devices, for that matter). Let's unpack this:

1. There seems no INSTEON-agnostic way of recognizing "double tap" or "hold down". I'm currently dealing with KeypadLincs, and I know how to listen to INSTEON specific commands expressing these. But if I wrote a plugin for, say, another type of pushbutton thingie that has a notion of double-tap and/or hold-down, how would I express this to Indigo?

2. Conversely, I don't see any way to tell a generic dimmable Indigo device, "Keep getting brighter until I tell you to stop." (Deluxe version: "... or until you reach this value.") Of course I can send repeated "brighten by 3" commands, but that is bound to jam something and it's also likely to be jerky and overshoot. I might also note that some devices have natural continuing motion rates (say, ahem, shade motors) that really need to be told, "start moving" rather than "move by 5".

3. Is there SDK or other sample code for making a dimmable device dim smoothly even if it's not INSTEON?

Or am I just looking at this all wrong, and there's a perfectly fine way of doing this?

Okay, okay: The actual, practical application here is to link a KeypadLinc button to a Lutron shade controller. I want "hold down this button to move the shades; stop when I let go." (Lutron has "start moving" and "stop moving" commands. It doesn't have "move by 5.") But that plugin is actually about linking a KPL button to any device that can dim, so I want it to be as Indigo-generic as possible.

Cheers
-- perry

Posted on
Wed Jul 03, 2013 1:20 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Relaying continuing changes (aka: smooth dim buttons)

Perry The Cynic wrote:
1. There seems no INSTEON-agnostic way of recognizing "double tap" or "hold down". I'm currently dealing with KeypadLincs, and I know how to listen to INSTEON specific commands expressing these. But if I wrote a plugin for, say, another type of pushbutton thingie that has a notion of double-tap and/or hold-down, how would I express this to Indigo?

There is no way to do this currently. Z-Wave support for double (and triple) taps and start/release touch is all over the map. Some dimmers don't support them, some support them via different associations (association 1 for single press, 2 for double, etc.), and most multi-button controllers use scene commands for button presses. We might add generic trigger definition types to abstract this at some point, but given all of the different implementation differences it isn't a high priority.

Perry The Cynic wrote:
2. Conversely, I don't see any way to tell a generic dimmable Indigo device, "Keep getting brighter until I tell you to stop." (Deluxe version: "... or until you reach this value.") Of course I can send repeated "brighten by 3" commands, but that is bound to jam something and it's also likely to be jerky and overshoot. I might also note that some devices have natural continuing motion rates (say, ahem, shade motors) that really need to be told, "start moving" rather than "move by 5".

We do need to add a way, at least for a plugin to send these broadcasts. Note they aren't direct INSTEON commands, but rather a type of scene/group broadcast command. Indigo currently sends the Scene On and Scene Off commands for a given PowerLinc Scene, and what you are looking for are the Scene Start Dim/Brighten and Scene Stop Dim/Brighten commands. However, they are timing sensitive. There is no max/cap value specified in the command, so you have to send the stop command at the correct time if you are trying to impose a max/cap value. The timing sensitivity is one reason we've not implemented support for these commands directly into Indigo itself, but I do think we should expose the functionality at least for plugins.

Perry The Cynic wrote:
3. Is there SDK or other sample code for making a dimmable device dim smoothly even if it's not INSTEON?

Nope. :-)

Image

Posted on
Wed Jul 03, 2013 3:51 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Relaying continuing changes (aka: smooth dim buttons)

We do need to add a way, at least for a plugin to send these broadcasts. Note they aren't direct INSTEON commands, but rather a type of scene/group broadcast command.

Are you saying that we can't actually tell an INSTEON responder to "start dimming until told to stop" unless it's linked to a scene on some controller? And then we'd have to essentially send it a scene cleanup command pretending to be the cleanup for a scene broadcast it missed? (Ugh.)

(I'm beginning to understand how the Lutron folks get away with selling thousands of dollars worth of equipment to dim some lights and move a few curtains, but make it all look smooth and natural and synchronized...)

Cheers
-- perry

Posted on
Wed Jul 03, 2013 11:17 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Relaying continuing changes (aka: smooth dim buttons)

Perry The Cynic wrote:
Okay, okay: The actual, practical application here is to link a KeypadLinc button to a Lutron shade controller. I want "hold down this button to move the shades; stop when I let go." (Lutron has "start moving" and "stop moving" commands. It doesn't have "move by 5.") But that plugin is actually about linking a KPL button to any device that can dim, so I want it to be as Indigo-generic as possible.

Hi Perry.

My Dimmer Extender plugin provides trigger-able events for INSTEON Start/Stop Brightening and Dimming commands. You can select which device and which scene number (1 to 8 ) from which to trigger the event. I use the plugin to capture and trigger dimming events from a pair of RemoteLinc 2's to start/stop dimming events on my Hue lights. I think the plugin would work perfectly for your specific use case because you can create a trigger and corresponding shade control action for each event (INSTEON Start Brightening -> start moving up, INSTEON Stop Brightening -> stop moving up, INSTEON Start Dimming -> start moving down, INSTEON Stop Dimming -> stop moving down).

Posted on
Thu Jul 04, 2013 12:13 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Relaying continuing changes (aka: smooth dim buttons)

Perry The Cynic wrote:
Are you saying that we can't actually tell an INSTEON responder to "start dimming until told to stop" unless it's linked to a scene on some controller?

Correct. The INSTEON protocol appears, IMO, to be optimized for the case where you have a controller modules (say KeypadLinc) manually linked with other modules. In that case when you press/hold a KPL button it sends out a scene broadcast to start a dim/brighten, and when you release it sends the commands to stop the dim/brighten. A PowerLinc can emulate this, but it will be timing sensitive and require a PowerLinc scene to be defined beforehand (via links).

Perry The Cynic wrote:
And then we'd have to essentially send it a scene cleanup command pretending to be the cleanup for a scene broadcast it missed? (Ugh.)

The cleanup commands isn't really related to this. We would be sending a PowerLinc Scene Start Dim/Brighten command, followed (after a delay) by a Powerlinc Scene Stop command. The cleanup command is a direct command and in this case isn't really needed, I believe.

Image

Posted on
Thu Jul 04, 2013 12:14 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Relaying continuing changes (aka: smooth dim buttons)

nsheldon wrote:
Perry The Cynic wrote:
Okay, okay: The actual, practical application here is to link a KeypadLinc button to a Lutron shade controller. I want "hold down this button to move the shades; stop when I let go." (Lutron has "start moving" and "stop moving" commands. It doesn't have "move by 5.") But that plugin is actually about linking a KPL button to any device that can dim, so I want it to be as Indigo-generic as possible.

Hi Perry.

My Dimmer Extender plugin provides trigger-able events for INSTEON Start/Stop Brightening and Dimming commands. You can select which device and which scene number (1 to 8 ) from which to trigger the event. I use the plugin to capture and trigger dimming events from a pair of RemoteLinc 2's to start/stop dimming events on my Hue lights.


Great tip, Nathan.

Image

Posted on
Thu Jul 04, 2013 11:22 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Relaying continuing changes (aka: smooth dim buttons)

nsheldon wrote:
My Dimmer Extender plugin provides trigger-able events for INSTEON Start/Stop Brightening and Dimming commands. You can select which device and which scene number (1 to 8 ) from which to trigger the event. I use the plugin to capture and trigger dimming events from a pair of RemoteLinc 2's to start/stop dimming events on my Hue lights.

Nathan,
That is a neat plugin. How are your triggers different from Indigo's built-in INSTEON Command Received trigger type?

Cheers
-- perry

Posted on
Thu Jul 04, 2013 11:31 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Relaying continuing changes (aka: smooth dim buttons)

The cleanup commands isn't really related to this. We would be sending a PowerLinc Scene Start Dim/Brighten command, followed (after a delay) by a Powerlinc Scene Stop command. The cleanup command is a direct command and in this case isn't really needed, I believe.

So if the start-dimming broadcast gets lost, it just stays lost? I'm amazed that INSTEON thing is working as well as it does. Well, I'm glad we've got you as the expert to order those devices around.

I was thinking of using a cleanup command because it's a direct command. If we use broadcast, each device needs its own scene, right?

To sum up my understanding of reality: right now, there's no way to tell INSTEON devices to "start dimming," and there's no generic Indigo way to tell a device to do so. You're thinking of adding the ability for a plugin to order an INSTEON device (though it will require linking it to a dedicated scene, so it will require user assistance to set up). And there's no way for a plugin to advertise a "start dimming/start brightening" capability that doesn't require plugin actions (and thus makes it plugin specific).

Have I got it right?

Cheers
-- perry

Posted on
Thu Jul 04, 2013 11:48 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Relaying continuing changes (aka: smooth dim buttons)

Perry The Cynic wrote:
Nathan,
That is a neat plugin. How are your triggers different from Indigo's built-in INSTEON Command Received trigger type?

Cheers
-- perry

Thanks. :-D The built-in INSTEON Command Received event does not have an option to look for the Start Brightening, Stop Brightening, Start Dimming, or Stop Dimming INSTEON scene broadcast messages so there's no way to trigger off of them directly without a plugin.

Posted on
Thu Jul 04, 2013 12:58 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Relaying continuing changes (aka: smooth dim buttons)

nsheldon wrote:
The built-in INSTEON Command Received event does not have an option to look for the Start Brightening, Stop Brightening, Start Dimming, or Stop Dimming INSTEON scene broadcast messages so there's no way to trigger off of them directly without a plugin.

Ah, yes: Indigo's "brighten" command trigger is actually for the End Brighten event. Totally not confusing. :-)

Thanks
-- perry

Posted on
Thu Jul 04, 2013 1:10 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Relaying continuing changes (aka: smooth dim buttons)

Perry The Cynic wrote:
So if the start-dimming broadcast gets lost, it just stays lost?

I believe that is correct.

Perry The Cynic wrote:
I was thinking of using a cleanup command because it's a direct command.

The cleanup command is for use after a scene is activated (button tapped). When a responder receives it, it checks its links database to see what brightness value it should go to (it is likely already at that brightness from the initial scene broadcast, but if it missed that then the cleanup acts as a backup). So if you send a cleanup command after a start/stop dim/brighten sequence, then I believe the module will go its scene programmed (link database) brightness state, which won't be what you really want.

Perry The Cynic wrote:
If we use broadcast, each device needs its own scene, right?

Correct.

Perry The Cynic wrote:
To sum up my understanding of reality: right now, there's no way to tell INSTEON devices to "start dimming," and there's no generic Indigo way to tell a device to do so. You're thinking of adding the ability for a plugin to order an INSTEON device (though it will require linking it to a dedicated scene, so it will require user assistance to set up). And there's no way for a plugin to advertise a "start dimming/start brightening" capability that doesn't require plugin actions (and thus makes it plugin specific).

Have I got it right?

Yes.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest