Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keypadlinc support for radio style buttons #18

Open
TD22057 opened this issue Dec 25, 2017 · 10 comments
Open

Add keypadlinc support for radio style buttons #18

TD22057 opened this issue Dec 25, 2017 · 10 comments

Comments

@TD22057
Copy link
Owner

TD22057 commented Dec 25, 2017

Keypadlinc buttons can be set up as radio buttons. For example, the middle 4 buttons can be a fan controller where only 1 of the buttons is "on" at a time. Or it could be button 3 is off and 4 is on to act like a single, horizontal two button switch (or button 3 is on and 5 is off for a vertical two button switch).

  1. Support controlling the buttons to allow for this type of behavior
  2. Make sure the classes and mqtt system work when this mode is active.

Found a good write up here: http://forum.micasaverde.com/index.php?topic=10611.0

The first is "set_led_follow_mask" and the second is "set_led_off_mask". The "set_led_follow_mask" command sets which buttons should follow the specified one, and the "set_led_off_mask" indicates which buttons should be off when the specified button is on. To get the full radio button effect, you will need to set the follow mask and the off mask for each of the buttons in the group.

So, if I wanted to set buttons 6 & 5 to be off when I press 4, I would figure the binary for the buttons (commands are decimal to Alsteon)
87654321 <- button numbers in bit order
00110000 <- binary to indicate I want to control buttons 5 & 6.

aa.bb.cc set_led_follow_mask 4 48
aa.bb.cc set_led_off_mask 4 48

To set the four middle buttons as radio buttons, we need to calculate the bit values for every other button.

For button 3, we need 00111000 as the binary, or 56 in decimal.
For button 4, we need 00110100 as the binary, or 52 in decimal.
For button 5, we need 00101100 as the binary, or 44 in decimal.
For button 6, we need 00011100 as the binary, or 28 in decimal.

For each button, we need to set the associated value to both the follow mask, and the off mask. So, the commands you would need to send to your kpl would be as follows (assuming a 6 button kpl, and you want the 4 scene buttons to act as radio buttons).

aa.bb.cc set_led_follow_mask 3 56
aa.bb.cc set_led_off_mask 3 56

aa.bb.cc set_led_follow_mask 4 52
aa.bb.cc set_led_off_mask 4 52

aa.bb.cc set_led_follow_mask 5 44
aa.bb.cc set_led_off_mask 5 44

aa.bb.cc set_led_follow_mask 6 28
aa.bb.cc set_led_off_mask 6 28

Once you have entered these commands, you should only have one of the 4 buttons light up at a time.

@bfranske
Copy link

FWIW I think this is essentially how the on/off buttons on the 6 button controller work since the group numbers are otherwise the same as the 8 button controller.

@TD22057
Copy link
Owner Author

TD22057 commented Dec 27, 2017

Here's another good write up on this: http://wiki.indigodomo.com/doku.php?id=fanlinc_and_keypadlinc
Might have some decent ideas on a simpler UI for controlling this.

@mooshee
Copy link
Contributor

mooshee commented Feb 7, 2019

I'd love to see this feature. I have 3 6-button keypads each linked to a fanlinc using radio style buttons. It's a pain to get it right using the manual process (I think I only ever got around to making one of them working flawlessly). I'll see if I can spit out the link database on the one that actual works as expected to confirm the byte sequences above.

If I remember correctly, the Indigo UI was ok for this. It's a little confusing, and honestly, this is such a standard configuration that - from an interface standpoint - should be reduced to a single command (which does all the linking).

I'm a developer by trade, but I don't have a ton of Python under my belt. I hope to contribute where/when I can.

FYI I just got my Insteon-MQTT setup this morning with HassIO, on RPI 3 B+ and PLM - THANK YOU SO MUCH. This is a VAST improvement over my previous hub and hub pro solutions. I started about a decade ago with Indigo+PLM, but switched to the hub when I didn't feel like paying an arm and leg for Indigo. Bringing back the PLM and this plugin has been amazing for reliability/compatibility/speed ... and I only have a couple devices linked so far. I'm basically starting from scratch to rethink my entire home automation setup.

@TD22057
Copy link
Owner Author

TD22057 commented Feb 7, 2019

Well you're in luck, I believe @jrevans is working on this feature right now.

@house97
Copy link

house97 commented Jun 3, 2019

Is this anywhere close to being a thing?
Also, if I also use a mini-remote to control the fanlink that a KPL is controlling, and have the KPL buttons defined as responders to the remotelinc buttons, does this method still hold up, or do we have to do things the hard way?

@house97
Copy link

house97 commented Nov 15, 2019

I read through the description of how this is done in the micasaverde link @TD22057 posted, and it certainly makes sense. If I'm correct, we just don't have the functionality to configure the mask, correct? This is not something that the insteon-mqtt "set-button-led" handles, for example.
@jrevans are you still looking into this?

@house97
Copy link

house97 commented Nov 16, 2019

Is it possible that there could be a workaround to the seemingly elegant solution this enhancement was created for- specifically creating scenes where (for instance) button 3 is a controller, and buttons 4,5,6 are responders, and their status when 3 is ON is to be OFF? That would allow for button 3 to be turned off, unlike the radio button scenario, but if button discipline is maintained, wouldn't that kinda work? Or am I missing something else?

@house97
Copy link

house97 commented Nov 18, 2019

I feel like a complete and utter dolt. It never occurred to me that the radio button functionality could be done without software. Having RTFM, I see that a workaround indeed exists. For anyone that may benefit from this info, check pages 15-16:
https://cache.insteon.com/pdf/2486D.pdf

@mooshee
Copy link
Contributor

mooshee commented Jan 2, 2020

#116 was merged that adds support for radio style buttons on the keypad. There's more work to be done. I took the manual route as well.

@kpfleming
Copy link
Contributor

#116 was not merged, it was closed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants