[ANSWERED]:Distinguishing 6-button from 8-button KeypadLincs

Posted on
Sat Jan 23, 2016 2:03 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

[ANSWERED]:Distinguishing 6-button from 8-button KeypadLincs

Could someone please provide sample code or instructions on how to distinguish the 6-button version from the 8-button version of the KeypadLinc device? My INSTEON-Fu is insufficiently powerful. :-)

Thanks
-- perry

Posted on
Sat Jan 23, 2016 7:47 am
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Distinguishing 6-button from 8-button KeypadLincs

They are actually the same device, just shopped with six or eight buttons on the face. Indigo is able to set the device to six or eight buttons as part of the device configuration.

If set for six buttons, buttons 2 and 7 are inactive.

If your question is how can you tell programmatically from within Indigo which way the device is set, I don't think that is possible. That doesn't appear as a device state that can be triggered.

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Sat Jan 23, 2016 1:17 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Distinguishing 6-button from 8-button KeypadLincs

If you want to query from the device what mode it is in, then INSTEON-Fumaster says:

Code: Select all
reply = indigo.insteon.sendRaw(devAddr, [0x1F, 0x00], waitUntilAck=True)
if reply.cmdSuccess:
   if (reply.ackValue & 0x08):
      indigo.server.log("device is in 8 button mode")
   else:
      indigo.server.log("device is in 6 button mode")

When you can take the pebble from my hand, it will be time for you to leave.

Image

Posted on
Sat Jan 23, 2016 6:46 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: [ANSWERED]:Distinguishing 6-button from 8-button KeypadL

Thank you, Kind Sir! This is working most excellently.

Quick follow-on question: my existing INSTEON raw commands pass a waitForReply parameter, but your code (and the current docs) say to use waitUntilAck. Was there a name change at some point, and is there any backward-compatibility concern with just switching to waitUntilAck everywhere? (Or did I just use the wrong parameter, and luck out because the default for waitUntilAck happens to be True?)

Cheers
-- perry

Posted on
Sat Jan 23, 2016 6:57 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]:Distinguishing 6-button from 8-button KeypadL

Those parms are independent of one another. For some commands the ACK packet contains reply data (1 byte), but for others a follow-up command is transmitted by the module back to the PowerLinc (can be multiple bytes for extended commands). Unfortunately, there isn't a lot of consistency in how it works...

Image

Posted on
Sat Jan 23, 2016 8:27 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: [ANSWERED]:Distinguishing 6-button from 8-button KeypadL

Great, got it. Have I mentioned lately how nice it is that I don't usually have to use raw INSTEON commands? :-)

Cheers
-- perry

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests