Getting / Setting Insteon information from the Venstar T1700 thermostat
March 1, 2009 at 3:29 pm | In General, Hardware setup, Software Setup | 4 CommentsTags: cool on, fan off, Fan on, getting T1700 Insteon Data, heat on, Home Automation, Insteon, Insteon T1700, Insteon Thermostat, PLC, SDM, sdmserver, vb2008, X10
We’ll after receiving back some of my hard earned money thru 2008. I shelved out the $159 for the Insteon T1700 thermostat.
It can be found here.
The device is quite small, which is fine and thinner that my orginary Honeywell one which was a real plus. To install was also very simple.
And technical support was awesome!!! Who expects to call a company and receive a live person and be able to troubleshoot on the phone in less that 3 min. And to top it off the rep even called me back since he had to leave. At the end it was a simple dip switch due to my model. So if after you install it and when you turn on cool and heat comes out and vice-versa, just turn on dip switch two and your set! Thats Again Mike from Venstar!!!!
The only thing would be the ‘light’ on the side of the Insteon module. so in dark areas it does stand out.
Like mentioned above the device is very small and the insteon module even smaller.
For example check out the image in comparison to my hand
Setting Mode, Getting Temperature of Thermostat
Ok, enough Pictures and talk, lets see how to control this device.
First forget about sending ON/OFF commands, for me they didnt work, nor did they do anything. What we will be using is the 0×02 command instead of 0×11 for on or 0×13 for OFF. What I has able to find was the higher numbers after that worked. I’ll show you what
Ive got and show examples after. In my case I couldnt send request using the regular PLC commands so I ended using the low level calls using the sendhex function, that article can be found here
More ways to speak to your Insteon Devices
For the examples my PLC is # “0D 51 32” and my Thermostat is “01 02 03“.
0×6b – Bit 2 – Get Thermostat Mode (Returned is 00=off,01=Heat,02=Cool,03=Auto,04=Fan)
'Send Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 02") Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command 'You should get the reponse on the Last Bit of your reponse. For example 04 01 02 03 0D 51 32 26 6B 02 So in this case 0x02 Means the device is on COOL.
0×6b – Bit 3 - Get Temperature (Returned is the temperature, you convert to decimal and divide by two)
'Send Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 03") Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command 'You should get the reponse on the Last Bit of your reponse. For example 04 01 02 03 0D 51 32 26 6B 9A So in this case 0x9A Converted to decimal is 154 divide that by two and you get 77 degrees!!0x6b - Bit 4 - Set to Heat
'SendSm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 04")
Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command
0x6b - Bit 5 - Set to Cool
'SendSm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 05")
Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command
0×6b – Bit 6 – Set to Auto (To switch automatically from Cool to Heat depending on your settings)
'Send
Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 06")
Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command
0×6b – Bit 7 - Fan on
'Send
Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 07")
Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command
0×6b – Bit 8 – Fan off
'Send
Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 08")
Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command
0×6b – Bit 9 – All Off
'Send
Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6B 09")
Sm.SendPLCHex("02 46 01 42 10 9F") ' Execute my command
Setting the Cool / Heat Thermostat Temperature
Here insteon of 0×6B we will be using the 0×6C for Cool and 0×6D for HEAT. So lets say you’ve set your device to Cool and want to lower it to 75 Degrees. Just like when we read the temperature, when we set it we need to multiply the requested value * 2 and convert it to HEX. In the sample below the variable Set_Temp holds what we want it to. The next statement converts it to HEX and *2 and presto!
'This is the temperature we want to set Cool to!
Set_Temp="75"
Dim Temp As String = Hex(Set_Temp * 2)
Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6C " + Temp)
Sm.SendPLCHex("02 46 01 42 10 9F")
'This is the temperature we want to set heat to!
Set_Temp="70"
Dim Temp As String = Hex(Set_Temp * 2)
Sm.SendPLCHex("02 40 01 A1 00 09 FD 9B 0D 51 32 01 02 03 05 6D " + Temp)
Sm.SendPLCHex("02 46 01 42 10 9F")
Hope this works for you and its working great for me. Each hour I poll the temperature and as part of that routine I poll my thermostat to keey the information up to date. I’ll post more as I find out!
Insteon I/O Linc for Garage
January 14, 2009 at 10:48 am | In General, Hardware setup | Leave a CommentTags: garage, Insteon, IO LINC, open garage door, SDM, sdmserver, System.net
Hurray, My I/O linc arrived on Saturday 10th!!!
The good news is that its setup and in place. Setup was a breeze since I’m literally replacing two X10 products for one. I love it!
So the wiring is the same
Here is my Garage contact I purchased separately before, now as part as a kit.
Installed
Since the top part is so light I ended up using Velcro so I didn’t need to drill holes.
Now the I/O Link
Here are the official instructions
As for the hook-up its very straight forward and the on-line manual has a very good description of this. My recommendation is use the individual strands of a CAT 5 cable, they fit perfect.
Here i’ve connected in my garage door sensor. (Click to magnify) – Green cables
Below I’ve connected my ‘momentary’ switch to the back of the garage opener. (You do have to setup your I/O linc to do the momentary relay before which is the “C” setup).
This is done by pressing the ‘SET” button 3 times x 3 times for a total of 9 times. Double check on-line just to be sure.
Orange is my Open/Close wires to the Garage and the green are my sensors
Here is the box setup next to the Garage opener. Since there is no space for the I/O linc I had to set it up next to the opener. Plus I didn’t want to put it flush with the device since it vibrates a lot.
Now each time the device Open’s I get the “11 FF” message and when it closes the “13 FF” message. But i still haven’t figured out
how to read the sensor yet. Once I get those details I’ll post part 2.
Here is how the linking process works. It’s done both ways (like a 3-way switch)
* If you want to monitor the garage status AND use a keylink button you NEED to link then both ways,
1.First open your garage door.
2.Starting linking your I/O link to the KeyLink Key or switch
3.to have the switch control your garage then Link Keylink key and then then I/O.
4. This way when you press the key it open/closes as well as the button lights up when you open the door and close it.
More ways to speak to your Insteon Devices
January 5, 2009 at 6:55 pm | In Software Setup | 1 CommentTags: groups, Home Automation, Insteon, Insteon code, SDM, sdmserver, turn off device, turn on device, vb code, XP
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.
- Software: Get Insteon / Talking to your PC – Part 2
- Software: Get Insteon / Talking to your PC – Part 1
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…
Setting up Insteon groups via SDM or ’soft linking’ commands
July 1, 2008 at 7:45 pm | In Software Setup | 2 CommentsTags: controller, creating insteon groups, groups, Insteon, insteon group commands, insteon groups, linking, on levels, ramp rates, responder, SDM, sdmserver, setting up insteon groups, soft linking, vb, vb 2005
If your looking to create groups using the simplehome.net utility click on the link below.
Setting up Insteon groups via software or ’soft linking’ using Simplehome.nets utility
Lets say you want to be able to link and create groups without having to use the Simplehome.net utility, this is how its done.
Lets assume with the previous post that you already have your PLC talking to your PC so you know you can use the Intellisense in VB to see the SDM commands available
setOnLevelText=<INSTEONid>,<onLevelCmdOrValue>[,<hops>] for example
Sm.SetOnLevelText(“0D.39.61″, “10%”) or even or
Sm.SetOnLevelText(“0D.39.61″, 255) for 100%
A good link and my reference I used to the SDM commands can be found here
Live Example
For the example let’s say you have two devices (Lamplincs, or dimmers) and want to create a group where both of them have a 19 second ramp rate and turn on 100 percent.
The first devices address is 01.02.03
The second device is 05.06.07.
Since we are using the native SDM commands we can use decimals numbers. Here is a break down of the command / “SetupLink”
SetupLink (“<Device to Modify>” , <True for Responder / False for Controller>, <Group #>, “<My PLC Address>”, <onlevel>, <RampRate>)
<Device to Modify> would be entered with the dots and quotes, in this case “02.03.04″
<True> for Responder for both of them since the PLC will be controlling them.
<Group #>, entered in Decimal for this example we will use #34
<My PLC address>, entered the same as above, with dots and in quotes
<onLevel>, using from 0-255, 0=off thru 255 = 100% on.
<rampRate> using one of the 32 ramp rates., use the chart below, for example 31 is .1 seconds. I like to use either #23 or #24.
| 31 | 0.1 | Seconds |
| 30 | 0.2 | . |
| 29 | 0.3 | . |
| 28 | 0.5 | . |
| 27 | 2 | . |
| 26 | 4.5 | . |
| 25 | 6.5 | . |
| 24 | 8.5 | . |
| 23 | 19 | . |
| 22 | 21.5 | . |
| 21 | 23.5 | . |
| 20 | 26 | . |
| 19 | 28 | . |
| 18 | 30 | . |
| 17 | 32 | . |
| 16 | 34 | . |
| 15 | 38.5 | . |
| 14 | 43 | . |
| 13 | 47 | . |
| 12 | 1 | Minutes |
| 11 | 1.5 | . |
| 10 | 2 | . |
| 9 | 2.5 | . |
| 8 | 3 | . |
| 7 | 3.5 | . |
| 6 | 4 | . |
| 5 | 4.5 | . |
| 4 | 5 | . |
| 3 | 6 | . |
| 2 | 7 | . |
| 1 | 8 | . |
| 0 | 9 | . |
Here is the command below
Sm.SetupLink(“01.02.03″, True, 34, “0D.51.32″, 255, 23, 0)
Simple right?. I recommend testing this with a external device jsut to be sure, the best thing of this is that when the command is executed it automatically creates the controller link on your PLC, so basically you dont have to do anything else!! When you run the command make sure you dont have other stuff going on, like motion sensors, X10 data, it tends to not act nice. If you look at the data comming in you will see a confirmation string at the end like this.
7/1/2008 8:30:49 PM receiveinsteonraw=04 01 02 03 0D 51 32 22 2B 17
7/1/2008 8:30:50 PM setupLinc=true,01.02.03,34,0D.51.32,1,255,23,C,0xA2,0,08.B6.6C[7]0×0FC8,[0]0×0000
and our set, now if we want to setup the second one we do the same thing but change the first address. Like this,
Sm.SetupLink(“04.05.06″, True, 34, “0D.51.32″, 255, 23, 0)
Now using our group commands both will turn on at the same time using the defined ramp ramp to the specified value, But you can define different ramp rates and on levels to different device on the same group have a really neat effect, if that is what you want. For example you can have two devices on the same group but one with 50% on and the over 100% and with one command you set up a scene!!! neat!.
Here is the command I use to turn on group #34, since im using the sendtext to the SDM directly the values will need to be entered in HEX for #34 is the equivalent to #22.
Sm.SendINSTEONRaw(“0D 51 32 00 00 22 CF 11 FF”, 3) ‘ sEND broadcast group 17 ON!
#22 is the equpvalent of #34 in Hex and you already know #11 is the on command, to turn off its #13, You can see a breakdown of the commands here. You can brighten, dim all the devices at once also!!
Only down side of the groups is that you wont get a feedback on the individual devices. So you may need to poll them individually.
Before you ask, yes there is a way to confirm the record was created but that will be for another post.
Enjoy!
Luis
Setting up Insteon groups via software or ’soft linking’ using Simplehome.nets utility
June 27, 2008 at 1:28 am | In Software Setup | 4 CommentsTags: controller, creating insteon groups, groups, Insteon, insteon group commands, insteon groups, on levels, ramp rates, responder, SDM, sdmserver, setting up insteon groups, vb, vb 2005
Insteon is great and is extremely fast when turning on / off devices, but lets say you want to turn on 10 lights all at the same time?
This is what they call groups. Groups allow you to store in each individual device settings such as turn on, ramp rate commands, for a specific group #.
Let me give you a example, Let say you want to be able to turn on all your master bedroom lights with one command. What we would do is create a group number and all the devices which will be affected will have this same number and respond as (Responder) to the person sending the command. Don’t worry its easier than it sounds. Let me go thru the basics and you’ll see how its done.
First for starters easiest way is to use some sort of spreadsheet, place all your device from left to right and then fill out what you want to turn on. Here is a example (I’ll explain what the numbers mean shortly). This way I know what group will do what and who will be ‘affected’. Then its very easy to program going down the list.

In my case I have for example, Group #15 (Its HEX) called “End of Day” and what it does is turn off all lights but and turn on the kitchen sink all with one command. So I mapped out all my devices and put how they are to be affected.
On Level
As you can see my values are two sets of numbers (I’ll select #15 the 2nd value of (FF/1B)
The first stands for the OnLevel (In the case of the dimmers (0-100%) but note its a HEX value, and it runs from 0-255. Here is a quick list which I use.
| HEX | BRIGHTNESS |
| FF | 255 |
| F0 | 240 |
| DC | 220 |
| C8 | 200 |
| BE | 190 |
| B9 | 185 |
| AF | 175 |
| A5 | 165 |
| 9B | 155 |
| 8C | 140 |
| 78 | 120 |
| 64 | 100 |
| 50 | 80 |
| 4E | 78 |
| 4D | 77 |
| 4B | 75 |
| 3C | 60 |
| 1E | 30 |
| 00 | 0 |
This way if I want to do a 50% I would use the A5 value, since im using FF it stands I want full blast, 100%!.
You will have to play with these to get the best ’setting’ for your environment.
You can set a device to turn on to a 0% value which is the same as off, for example I have a group setup to turn on the sink night light but all other devices in the group are set to a ONVALUE of 0! NEAT!. But OFF is OFF, no mater what you set it to. You can see the VB samples below. Basically the commands are the same instead of calling a device you call a group.
So with group #15 you can see the first value of all the devices is 00 with the exception of the kitchen sink which is FF so when the group command is sent all devices are dimmed while the Kitchen sink is turned on, all at the same time, the effect is very cool.
Ramp Rate’s
The second value is the RAMP rate (This only applies to devices which can ‘DIM’, and sadly its not included on the ICON dimmers, this is one of the reasons of the price difference.) These special devices have 32 levels of Ramp rates, from .1 second (which is what it is on the Icon dimmers, to 9 minutes!!) Here is the conversion of the HEX value to the RAMP time
| RAMP RATE | TIME | Factor |
| 1F | 0.1 | Seconds |
| 1E | 0.2 | . |
| 1D | 0.3 | . |
| 1C | 0.5 | . |
| 1B | 2 | . |
| 1A | 4.5 | . |
| 19 | 6.5 | . |
| 18 | 8.5 | . |
| 17 | 19 | . |
| 16 | 21.5 | . |
| 15 | 23.5 | . |
| 14 | 26 | . |
| 13 | 28 | . |
| 12 | 30 | . |
| 11 | 32 | . |
| 10 | 34 | . |
| 0F | 38.5 | . |
| 0E | 43 | . |
| 0D | 47 | . |
| 0C | 1 | Minutes |
| 0B | 1.5 | . |
| 0A | 2 | . |
| 9 | 2.5 | . |
| 8 | 3 | . |
| 7 | 3.5 | . |
| 6 | 4 | . |
| 5 | 4.5 | . |
| 4 | 5 | . |
| 3 | 6 | . |
| 2 | 7 | . |
| 1 | 8 | . |
| 0 | 9 | . |
So a value of 1F is instant on, a value of 0C is 1 minute, and a value of 08 is 3 minutes!!! The effect is awesome! Note that once you send the command to the device to turn on with a specific RAMP rate it will go on its own and you can send more commands to other devices… NEAT! Better yet you can have different device in the same group with different ramp rates. You know where im going with that!! What i’ve read on the post that a slow ramp rate will prolong the life of certain lights, in my case all are CFL’s so I only use RAMP rates for external decorations and maybe a light or two.
Lets setup a group!
Lets show you some screens so you can see how its done.
Like all other things Im suspecting there are other ways of doing this, but this the way ive learned to do it and has always worked for me.
- Download Simplehome.net’s program which you can find under my “Programs to have” and install it. Im suspecting its free since its right off their support page. Once installed go ahead and fire it up.
- I’ve found that the program works better if there isnt any activiting on the network, also if my dryer isnt ok. Lol,. So please disconnect any X10 transievers or other information which may confuse the program.
- Since the utility is used to program many devices lets make sure we select that we are programming our PLC, select the USE PLC followed by ‘Connect’
If you get an error, make sure you SDM driver is loaded, it should load automatically if not. This is also available from the ‘Programs to have’ page.

- Select the “Manage Device Links”
- Now hit your caps lock as all values need to be capital and the devices ID need to have (.) between them, like in the sample. (Here we go!)
- In the first red square you will be entering the device you want to control (or in this case add to the group)
- In the green square, we need to add what device will be controlling it or responding to it. If the device is going to respond its command we would select ‘Responder Below’, so this means when I call the group command from the device in the green box, the device in the RED box will respond. In the case of a Controller its backwards.Since Im using my PC to send out group commands, we can assume that the ‘Second Insteon ID’ field will always be my computer PLC address. This of course can be any other item, this way you can have one device control another or vice-versa! In the case of 3 way switches this is where you would have two entries on both devices, and each is a responder and controller of each other!!
- In the Yellow box is where we 1st define the On Level (In HEX) , followed by the 2nd box contains the RAMP rate, 3rd box .
- Enter a group number in HEX.
- The last option as mentioned before its a responder or controller. For the sake of this example its Responder.
- Hit the ‘Create New Link’

11. And your SET!.
Now from your Code you can send a group ON command and watch the magic happen. Here is example using the SendInsteonRaw command to turn on group #16
Sm.SendINSTEONRaw(“0D 51 32 00 00 16 CF 11 FF“, 3) ‘ sEND broadcast group 16 ON (Command is #11)
Sm.SendINSTEONRaw(“0D 51 32 00 00 16 CF 13 00“, 3) ‘ sEND broadcast group 16 OFF! (Command is #13)
Just replace the MAC address with the group number and presto, you can DIM you whole house, For example
Sm.SendINSTEONRaw(“0D 51 32 00 00 16 CF 16 00“, 3) ‘ sEND broadcast group 16 DIM! (Command is #16)
Sm.SendINSTEONRaw(“0D 51 32 00 00 16 CF 15 00“, 3) ‘ sEND broadcast group 16 Brighten! (Command is #15)
NEAT!
There is a catch to group commands, that they WONT RETURN THE STATUS OF THE INDIVIDUAL ITEMS, you will only get a response that the command to the group was sent successfully. In my case I usually send the command twice to make sure they all are hit.
The first 3 sets of digits are my PLC, the next three are the group number
CF = ?
11 = the On Command
FF = the On Value
Like mentioned before, depending on your device and your RAMP rate settings the device will fade on, ICON switches will just jump to the level you have then set to.
For my program I have groups setup for
- Turn on/OFF all house lights
- Turn on/off both children’s room
- Turn on/off all external/indoor decorations
- Turn off all bathroom lights
- Turn off all lights but turn kitchen sink on
- Movie scenes Dim lights etc.
- Turn on/off all fans (We’ll get to that later using the Inline Linc’s)
- The sky’s the limit
You are of course limited to the amount of groups, depending on the device, for example the ICON’s will hold less groups but I doubt you’ll use them all.
Using this program is where I also link the device to the PLC so I can catch the commands coming in if I cant use the TAP/TAP method, for example I want to see when someone turns off a device, I would do everything the same except I would select ‘Controller’. Even thought the switch really doesn’t turn on anything on my PLC I need to have that ‘group’ setup so I can capture it in my code.
Good luck!
Good free must have Insteon programs
June 27, 2008 at 12:39 am | In Software Setup | Leave a CommentTags: Insteon, insteon freeware, insteon groups, insteon programs, SDM, tools, X10
A Quick list of good Insteon Programs
SmartLabs Device Manager for the PLC (USB and Serial) – Install this one first.
Contains the Windows drivers for USB / Serial devices for the PLC.

InHomeFre – INSTEON Home Control Freeware
Excellent tool for setting up new items for the PLC to recognize it, also excellent for monitoring your Insteon traffic, I used this program to capture the commands
which I eventually incorporated into my code. The program also is great for Serial / or USB devices which can save timers, and set other device settings.
For my project I bypass them since I basically use my PC, but for starters this is a must have. Also does the same for X10 devices and full monitoring of all the data A++
Simplehome.net’s utility

Another priceless utility, this one I used for setting up, or modifying my groups or scenes. Another neat tool is the ability to checking on what devices are linked. This is also used for setting up all the simplehome.net’s devices.
Software: Get Insteon / Talking to your PC – Part 2
June 20, 2008 at 12:51 pm | In Software Setup | 6 CommentsTags: Home Automation, Insteon, PLC, SDM, Talking to PC, X10
Part 2.
As requested, here are some live examples, this is of course using the SDM library in VB 2005, the same works for VB6.
Since my blog is really about my home project, a VERY GOOD site, which is the one I used to start which has lots of specs and examples in VB6 about these commands. Its called Efundies.com, I wouldn’t like to re-invent the wheel.
My examples are using the SDM.SendinsteonRaw command, I find them faster since you don’t wait for a return. For our examples we can use the source as “00 00 00″ or the actually # on the PLC and the
rate is the actual intensity of the command. you can also use the sm.SendINSTEON(Device ID,command 1, command 2,hops) but it will wait for a reply. I like to catch the response on the way back. And example using that command would be
sm.SetOnLevelText(“07.B1.12″, “100%”) – And here you DO have to use the dots.
A list of most of the commands that can be used when the SDM is properly load are here
We’ll use as examples for our program that the device we want to control is
In our program previously defined,
You can download the SDM device manager here. Also some information regarding the PLC can be found here (This is the one I have) – worth every $
Option Explicit on
Friend WithEvents Sm As SDM3Server.SDM3
Public Sub MainMenu_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Sm = New SDM3Server.SDM3 - Create a instance of the SDM using (SM)
Dim Mac as string = "11 22 BB"
Dim Rate as integer = 255
Mac = “11 22 BB”
Rate = Intensity of the device (Since we are using raw commands this runs from 0,256 and needs to be converted to HEX”
The last #3, which is the Hops= I keep as 3 (Always works for me.)
Notes: All values are in HEX, also you need to put spaces in your device address, in my case I pull them off a SQL Database but they come in as “11 22 33″ if you put (.) dots or any other characters the command wont work.
Turn on – Sm.SendINSTEONRaw(“00 00 00 ” + Mac + ” 05 11 ” + Hex(Rate), 3) – Turn on device to the desired rate to 255 is the same as Sm.SendINSTEONRaw(“00 00 00 ” + Mac + ” 05 11 FF“), 3) – Turn on 100%
This will turn on the device at the predefined RAMP rate so if you have setup a slow ramp rate this is the one to use. For example ICON Dimmers have no ramp rate (options) so this will turn on at .1 seconds
Turn on fast- Sm.SendINSTEONRaw(“00 00 00 ” + Mac + ” 05 12 ” + Hex(Rate), 3) – Turn on device to the desired rate to 255 is the same as Sm.SendINSTEONRaw(“00 00 00 ” + Mac + ” 05 11 FF“), 3) - Turn on 100%
This will turn on the device at fast redgardless of the predefined RAMP rate.
Turn off – Sm.SendINSTEONRaw(“00 00 00 ” + Mac + ” 05 13 00″, 3)
This will turn off the device at the predefined RAMP rate so if you have setup a slow ramp rate this is the one to use.
Turn off fast- Sm.SendINSTEONRaw(“00 00 00 ” + Mac + ” 05 14 ” + Hex(Rate), 3) – Turn on device to the desired rate to 255 is the same as Sm.SendINSTEONRaw(“00 00 00 ” + Mac + ” 05 11 FF“), 3) – Turn on 100%
This will turn on the device at fast redgardless of the predefined RAMP rate. For example ICON Dimmers have no ramp rate (options) so this will turn off at .1 seconds
Brighten up one step - sm.SendINSTEONRaw(“00 00 00 “+Mac+” 05 15 00″, 3)
Each device has 32 levels of so this will just bump down or up one. Good for dimming without knowing the previous value. You can dim to 0.
Dim down one step - sm.SendINSTEONRaw(“00 00 00 “+Mac+” 05 16 00″, 3)
Each device has 32 levels of so this will just bump down or up one. Good for dimming without knowing the previous value. You can dim to 0.
Get status of device – sm.SendINSTEONRaw(“00 00 00 11 22 BB 05 19 00″, 3)
Using Alternet command sm.GetOnLevelText “11.22.BB”
Sending a Inteson group message; Groups allow you to send messages to a set of devices (1,2,10,100,200 with one command) Only bad things is you dont get a reply from the devices
I have found I had to run this twice sometimes but (We’ll get to groups later) .
Turn off group #20 (Remember HEX!) – sm.SendINSTEONRaw(“00 00 00 00 00 20 CF 13 00″, 3) ‘ SEND broadcast group 20 OFF!
Turn on group #20 – sm.SendINSTEONRaw(“00 00 00 00 00 20 CF 11 FF”, 3) ‘ SEND broadcast group 20 ON
The PLC also send X10 commands, for this I use theSendX10 command, this command WILL pause and wait for a response. For example
Sm.SendX10(“D02,DON”) ‘ TURN ON Device D02
Sm.SendX10(“D02,DOFF”) ‘ TURN ON Device D02
Software: Get Insteon / Talking to your PC – Part 1
June 15, 2008 at 3:17 pm | In Software Setup | 1 CommentTags: Home Automation, Insteon, SDM, Smarthome, X10
Ok, Ive got switches turning on and off, but I want more!. More googling and browsing around the sites I found that there is even devices to talk and read what the insteon network is doing. This is also available for X10 but what really interested me was the ability to get the status of the device, for example when you turned it on, you can get a confirmation that it really was received and really ‘on’.? After saving up a little I ended up purchasing the serial interface. They come also in USB and even modem versions. But what interested me was I like to be able to get the direct connection with the device and bypass all the usb stuff plus I had the ability to download ‘timers’ if the PC wasn’t going to be used all the time. Below is a picture of the unit. It includes all the necessary hardware. including the rj45 to serial cable.

The best part is you can download the PC software (referred to as SDM) , and all is done thru COM objects. The way COM objects work is that you can reference the device by any programming language it and it automatically sorts strings back to you (In a sort of way). A very good site which has even examples that got me started can be found here. I’ve even posted some of the code below which I expanded for VB 2005 so I’ll put some example referencing the object. It you look at any of the switch and even the external ones you’ll see the 3 Hex characters, each unique to each device. So once you start see the data flow you will see these addresses inside of them, some as responding and some as replying. Once you plug in the code you will see what I mean, I have found using a excel sheet to keep all these addresses makes like much easier.
1st you Google “Smarthome SDM” and you’ll find direct downloads to it. Its a regular windows install package
2nd Reference the object in your program, its called ‘Smarthome Device Manager’
3rd Add to your code to reference it as well as to be able to catch the events, example
Class MainMenu
Friend WithEvents Sm As SDM3Server.SDM3
When I load my mainmenu even I have the following
Public Sub MainMenu_Load(...... ) Sm =New SDM3Server.SDM3
Try Sm.IsResponding() Catch MsgBox("SDM NOT LOADED try AGAIN") End Try
Now you can catch events from the device, the main event to catch and look for is.
Public Sub sm_OnText(ByVal strInsteonStatus As String) Handles Sm.OnText
var = Split(strInsteonStatus, "=") Select Case LCase(var(0)) Case "setonleveltext" data = Split(var(1), ",") device = data(0) value = data(1) Case "receiveinsteonraw" data = var(1) bytes = Split(data," ") If LBound(bytes) = 0 And UBound(bytes) = 9 Then AddrFrom = bytes(1) & bytes(2) & bytes(3) AddrTo = bytes(4) & bytes(5) & bytes(6) Flags = bytes(7) Command1 = bytes(8) Command2 = bytes(9) If AddrFrom="05BBAF" And AddrTo="05FB8E" And Command1="11" Then MsgBox "Received Button 4 On" ElseIf AddrFrom="05BBAF" And AddrTo="05FB8E" And Command1="13" Then MsgBox "Received Button 4 Off" End If End If Case Else End Select
This will bring back all the sent,received strings, you later then have to sort them out.
I used some of the previous mentioned wepage’s code and expanded from that.
Best way is to watch the strings go by.Here is a pic of mine installed and ready to go.
* Note that you do need to ‘link’ the switches to your PLC or computer interface, even though you aren’t really turning it on but its the only way I was able to get it to see the commands.
Here are some examples (Lets say a switch has the id AA.BB.CC and my PLC (Computer interface is ) “11.22.33″
#receiveinsteonraw=02 AA BB CC 11 22 33 45 11 01 —- device acknowledging its been turned on (Notice 11 for on)
#receiveinsteonraw=02 AA BB CC 11 22 33 45 12 01 —- device acknowledging its been turned on double pressed up(Notice 12 for FAST on)
#receiveinsteonraw=04 AA BB CC 11 22 33 25 13 00 – device acknowledging its been turned off (notice the #13)
#receiveinsteonraw=04 AA BB CC 11 22 33 25 14 00 – device acknowledging its been turned off with double tap down (notice the #14)

2nd Part here. MORE HERE
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.











