Peek/poke?

Posted on
Sat Feb 21, 2009 12:19 am
gabbas offline
Posts: 39
Joined: Jun 22, 2008

Peek/poke?

Hello Indigo haxors. I know there's no support yet for linking KPL buttons to each other, so I'd like to program them myself by poking data into KPL memory locations. Is there any way to write a program (Python, AppleScript, whatever) that'll ask Indigo to send peek & poke messages to a Indigo device (the KPL) and report the results back to the caller?

Posted on
Sat Feb 21, 2009 9:25 pm
matt (support) offline
Site Admin
User avatar
Posts: 21421
Joined: Jan 27, 2003
Location: Texas

Re: Peek/poke?

I presume you mean KPL buttons linking internally to other buttons on the same KPL, correct? Indigo currently does support remote linking between KPL buttons as long as they are different KPLs.

You can use AppleScript to remotely poke bytes in the KPL. There currently is not a way to remotely peek/read the bytes out via AppleScript. That is a bit more difficult because all the INSTEON communication happen in an asynchronous fashion so there isn't currently a good mechanism to get the peeked result back to the AppleScript caller.

Here is a poke example:
Code: Select all
tell app "IndigoServer"
   send insteon remote poke to address "0e.60.2f" at memory location MEM_ADDR_HERE byte list {1, 2, 3, 4, 5}
end tell

Be careful! :-)

Image

Posted on
Mon Feb 23, 2009 9:36 pm
pjeski offline
Posts: 36
Joined: Nov 21, 2008

Re: Peek/poke?

support wrote:
There currently is not a way to remotely peek/read the bytes out via AppleScript. That is a bit more difficult because all the INSTEON communication happen in an asynchronous fashion so there isn't currently a good mechanism to get the peeked result back to the AppleScript caller.


Why couldn't you set up a "peek" command to use a couple if Indigo variables that could be updated when the asynchronous response comes in and could be checked in the script for the update?

Posted on
Tue Feb 24, 2009 7:51 am
matt (support) offline
Site Admin
User avatar
Posts: 21421
Joined: Jan 27, 2003
Location: Texas

Re: Peek/poke?

pjeski wrote:
Why couldn't you set up a "peek" command to use a couple if Indigo variables that could be updated when the asynchronous response comes in and could be checked in the script for the update?

That is a possible solution. It would require some overhead in the script (polling of the variables), but that would probably be the easiest solution to implement.

Image

Posted on
Tue Feb 24, 2009 9:22 am
pjeski offline
Posts: 36
Joined: Nov 21, 2008

Re: Peek/poke?

support wrote:
pjeski wrote:
Why couldn't you set up a "peek" command to use a couple if Indigo variables that could be updated when the asynchronous response comes in and could be checked in the script for the update?

That is a possible solution. It would require some overhead in the script (polling of the variables), but that would probably be the easiest solution to implement.


Can variables cause triggers? Could the availability of the peek data trigger a script?

Posted on
Tue Feb 24, 2009 9:25 am
matt (support) offline
Site Admin
User avatar
Posts: 21421
Joined: Jan 27, 2003
Location: Texas

Re: Peek/poke?

pjeski wrote:
Can variables cause triggers? Could the availability of the peek data trigger a script?

Yes. Still would then require some synchronization to enable/disable the Trigger in cases where multiple scripts peek information.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron