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
2 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.
Luis,
One question regarding links vs group setup in insteon.
If i understand correctly, All tap-methods create specific links between devices. I’m assuming this would just be where the switchlinc/keypad linc, could be inputted for the controller (in place of PLC)?
Is there a command that can list the links by device. So can I call a command that will query out to say a switchlinc and it will send back all the links?
Thanks…
Comment by Mark — April 3, 2009 #
Yes that is correct, Just swap the PLC address to the one you want and it will respond to it. The cool thing about insteon that any device can be a controller and/or responder.
Lets say you want to see all the links from a device, the best utility out there is the one from Simplehomenet / https://sourceforge.net/project/showfiles.php?group_id=201472
For the command itself there is one that is referenced here
http://efundies.com/guides/insteon/software/insteon_device_manager_commands/insteon_device_manager_commands_page_1.htm
The command is ‘getRemoteRecord’
Basically once you ‘list’ the links of a device, with the new version (I think the screen shots are outdated) you can modify them and update them. For the keylink it uses the last digit to know which button is pressed. I usually do the link manually first then go in and change it.
Comment by lgarcia4617 — April 3, 2009 #