Advancement made on working with KeypadLincs

Posted on
Fri Feb 18, 2011 6:35 pm
dstrickler offline
User avatar
Posts: 340
Joined: Oct 08, 2010
Location: Boston, MA

Advancement made on working with KeypadLincs

On the advice from Jay into looking into attachments to create what I would call "functions" in a programming language, I uncovered part of the puzzle in working KPLs (KeypadLincs). I have created code as an attachment with allows you to call it as such:

Code: Select all
Keypad_Controller(KeypadName, ButtonLetter, Scene, NewState)


So you might call it like this below to tell the kitchen keypad to light up button "B" and turn on the PowerLinc group called "Dinner Lights".
Code: Select all
Keypad_Controller("Kitchen Keypad", "B", "Dinner Lights", TRUE)


This works well, put in a "push" mode - it makes an event happen from code. Great for AppleScript where you want to simulate someone pushing a button on a keypad. But there's a problem - I need to also trap when someone presses the real button. I need to "poll" they KPL.

Now I could just write a bunch of Triggers that trap for button presses and go from there, but I am trying to do this in automated way so that the Indigo user doesn't have a lot to fuss with. And it occurs to me this can be done with the command:
Code: Select all
on receive insteon event instnStatusChanged for address switchAddress


What I am trying to do is have an Attachment script that say 'I see someone pushed a button "B" on "Kitchen Keypad"'. I think from there I can create some code that will link of of this together.

Has anyone solved this other side of the problem - the poll via an Attachment?

Dave

Posted on
Sat Feb 19, 2011 7:50 am
dstrickler offline
User avatar
Posts: 340
Joined: Oct 08, 2010
Location: Boston, MA

Re: Advancement made on working with KeypadLincs

I think this new post just gave me my answer - Thanks (again) Jay!
viewtopic.php?f=9&t=6567

Dave

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests