More ways to speak to your Insteon Devices

Posted: January 5, 2009 in Software Setup
Tags: , , , , , , , , ,

Like many programs there is always more ways to do one thing.

Here is another way I found to talk to my PLC what I’ve been able to get is that i’m sending the direct HEX (PLM) commands to the PLC. Which in turn makes  the processing faster. In my environment it helped a little but had its down sides.

My initial articles using the regular Insteon commands are here.

Turn on a group (SM is your VB PLC Object) Using the PLCHEX command

Im suspecting the first HEX codes are the address and command we are sending to the PLC

Example #1,

My PLC ID is 0D.51.32
Group I want on is “1A
Groups use :C5
Command: Turn on (11=On,12=Fast On,13=Off,14 = Fast Off,19=Poll, 10=Ping)
Power:Full (The last FF for 255 HEX)

Code;

Sm.SendPLCHex("02 40 01 A1 00 09 FD CB 0D 51 32 00 00 1A C5 11 FF)
Sm.SendPLCHex("02 46 01 42 10 9F") ' - Execute Command?

Advantages is that there is no ‘sendtxt’ echo coming back or even a echo of my text going out, which for me makes the command process faster.  And you still get the ‘echo’ in the same format coming in so no change to your program is needed if you are already capturing th text comming back.

Cons:There is no place to define the HOPS?. Sometimes can fail is you send to many commands one right after the other, Im suspecting that since you we are cutting the initial ack on the start it choke after too many commands.  My solution to this was to pause between each command I sent to it.  A good 1 seconds did more than just fine.

* BTW, I like to send the group commands twice since I dont do Group clean-up’s so I basically execute the second line twice.

Turn on a single device (SM is your VB PLC Object) Using the PLCHEX command

Example #2,

My PLC ID is 0D.51.32
Device I want on is :0A.0B.0C
Single Devices use  :05
Command: Turn on (11=On,12=Fast On,13=Off,14 = Fast Off,19=Poll, 10=Ping)
Power:Full (The last FF for 255 HEX)

Code;

Sm.SendPLCHex("02 40 01 A1 00 09 FD CB 0D 51 32 0A 0B 0C  C5 11 FF)
Sm.SendPLCHex("02 46 01 42 10 9F") - ' - Execute Command?

Hope this helps in your development, and drop me a line if this helps you…

Advertisements
Comments
  1. Mike says:

    Just passing by.Btw, your website have great content!

    _________________________________

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s