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: Simple VB Caller ID program and Flash lights
June 22, 2008 at 9:39 pm | In Non Insteon Programming | 2 CommentsTags: caller id, get caller info, Insteon, modem, us robotics, vb 2005, vb code, X10

One thing I was always interested was being able to notify me when a certain person calls. And in this case flash a inteson light or two.
My code is in VB 2005, for a VB6 Sample you can go here and basically requires only some little coding. In the case of VB6 I think you only need to add the Serial object and adjust the port via the objects property settings.
What I used,
- Analog phone with Caller ID (Vonage actually)
- Internal / External Modem – Mine is a 56k External modem and have caller Id capability.
- Hook them up, from the wall to the modem, to the modem to the handset.
The best way to see if it does is to open Hyper terminal and type the following command AT #CID=1 if it respond’s ok your set. This of course if for the modem i’m using, depending on your device it may be different. This page includes how you can check for Caller ID capability on your modem
Here is a example of what the modem will pickup and we will parse.
RING
DATE = 0621
TIME = 1113
NMBR = 1407xxxxxxxxx
NAME = Carlos Cobol
If you modem is external like mine you need to make sure AutoAwnser is disabled this is done by the DIP switches, For the US robotics its Dip switch #5 as down. In the case its internal you will need to add the command to disable auto answer. This is done with the command ATS0=0.

My Dip settings are as follows,
1-DOWN
2-UP
3-DOWN
4-UP
5-DOWN
6-UP
7-UP
8-DOWN
Since the code below allows to send some strings up startup, just add the in there if you need to.
Note: I do make reference to textbox called txtDataReceived in my form which will include the output.
First we make our imports include the serial devices (My program writes to a SQL database so some lines may not be needed)
Imports System.IO
Imports System.IO.Ports
Imports System.Net
Imports System.Data
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports System.ComponentModel
Imports System.Threading
In our Class definitions we include the reference to the serial port and we’ll call it ‘Modem’
Public Class Form1
Dim WithEvents Modem As New IO.Ports.SerialPort
In our Load event we will attach to the serial port and give it the basic settings, Here is where you would also add any initialization commands
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Modem.PortName = "COM1"
Modem.BaudRate = 9600
Modem.DataBits = 8
Modem.Parity = Parity.None
Modem.StopBits = StopBits.One
If Modem.IsOpen = False Then Modem.Open()
Modem.Write("AT #CID=1" & vbCrLf) '-------- YOU CAN ADD ADDITIONAL LINES SUCH AS #ATS0=0 TO DISABLE AUTO ANSWER IN INTERNAL MODEMS
End Sub
Next using the “Data Received” event we want to capture the Data which was received, Since there is a thread already running it wont allow us to update the textbox so simple we need to call use using the definition below,
Private Sub DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles Modem.DataReceived
Try
txtDataReceived.Invoke(New myDelegate(AddressOf updateTextBox), New Object() {})
Catch EX As Exception
Debug.Print("ERROR")
End Try
End Sub
Second function to update the textbox and check for the number, and check for one of the text information above, Ive stripped my code for simplicity but you can search for specific strings here, match it with fields in a database, even FTP the data somewhere else, but that i’ll show you on another post.
Here we will check for the number ‘123456789′
Public Sub updateTextBox() Dim temp As String With txtDataReceived .Font = New Font("Garamond", 12.0!, FontStyle.Bold) .SelectionColor = Color.Red temp = Modem.ReadExisting.ToString Buffer = Buffer + temp .AppendText(temp) .ScrollToCaret() End With If Buffer.Contains("NMBR") = True Then Dim FILENAME As String = "c:\cALLINFO.TXT" ' - Set a filename File.WriteAllText(FILENAME, Buffer) '---- Write all the buffer for testing if we want to see it If Buffer.contains("123456789") then '----- check for specific # 'DO INSTEON COMMANDS HERE Buffer="" End If End if End sub
Software:Get X10 data to your PC using a Insteon PLC
June 21, 2008 at 4:49 pm | In Hardware setup, Software Setup | Leave a CommentTags: capture x10 with plc, Home Automation, Insteon, PC capture, X10, x10 commands
I guess at the time of this writing Insteon there really isn’t a economical Insteon motion sensor out there, But after reading that the PLC and send and receive X10. I started to investigate further. And using inexpensive X10 devices I capture them and send out Insteon commands.
Just like with the insteon data you just have to phrase the information coming in.
As for hardware, if you are using Motion sensors you NEED a X10 transceiver, this device is what will convert the signals sent from you motion sensor to X10 power lines signals that your PLC will pick up. Just go to Ebay and search for X10 Transceivers you will find them very cheap, I bought the one below for $10 with s & H!
Each transceivers will capture only 1 house code and up to 16 devices.
Here is a picture of my transceiver piggy back on top of my PLC. Since the motion sensors take 2 unit addresses, the more devices you will find you will need to add
in more but under another house code.

For the motion sensors, the same thing, go look for X10 motion sensor (The Eagle) are very inexpensive and great!!)
The go for about $5-6 each, and their weather proof!

Here is one I have outside the entrance (Painted with same color)

You can even have 2 eagle sensor with the same code to cover a big area like in my case my hall way which is in a “L” shape
so it will turn on the lights when ever it detects people in either direction.
—————————————————————–
Before we start, I recommend reading the previous threads here so you know how to setup and ‘capture’ the PLC text using VB 2005. If you new to X10 and just started reading from here, please check out my first blog related to the X10 house code / unit code, found here
Like all my code, IM SURE there is many other ways but I just found it the easiest way for me.
Unlike Insteon, for some reason (I could be wrong) I cant seam to get all the information from one line, so I have to capture first the device that is talking, store the device in a variable then look further and see what its doing (on,off, etc)
For starters I use the same event for the ‘OnText’ event, Below is a sample text of a device that has been turned on which is read line by line from the OnText event
6/21/2008 4:16:46 PM eventraw=08 - Means a X10 code was received
6/21/2008 4:16:46 PM receiveX10raw=00 EE - The HEX value of the device (We wont use this)
6/21/2008 4:16:46 PM receiveX10=B2 – The device that is sending the code this can be A-G (House code) and 1-16 (Unit code)
6/21/2008 4:16:47 PM eventraw=08 - Means another X10 code was received
6/21/2008 4:16:47 PM receiveX10raw=01 E2 – The HEX value for ON/OFf depending on device I use this to see if its on many time it can be 22/23 or E2/E3.
6/21/2008 4:16:47 PM receiveX10=B On - If the device was turned on, or off
Here is my code below (I’ve removed all Insteon and only left the x10 statements), This is the main X10 routine I use to capture ALL devices and convert them to Insteon, for example remotes, key chains, motion detectors etc.etc.etc.
‘– I define a public variable called LastX10 this will hold the last HouseCode, Unit # in a variable that isnt lost when we leave the function.
‘- Somewhere in the start of your code,
Public Lastx10 As String
‘—– In the SM (SDM previously defined) OnText event.
Public Sub sm_OnText(ByVal strInsteonStatus As String) Handles Sm.OnText
Dim var As System.Array
var = Split(strInsteonStatus, "=")
Select Case LCase(var(0))
' -------------- GET DEVICE WHICH IS TRANSMITTING
Case "receivex10"
Dim variant1, variant2
variant1 = Split(strInsteonStatus, "=")
If (variant1(0) = "receiveX10") Then
Lastx10 = variant1(1) '--------- Here I will store the X10 HouseCode and UnitNumber like (B2)
End If
'---------------------------------- SEARCH X10 CODES
Case "receivex10raw"
Dim variant1, variant2, strhousecode, strnumber
variant1 = Split(strInsteonStatus, "=")
If (variant1(0) = "receiveX10raw") Then
variant2 = Split(variant1(1), " ")
strhousecode = variant2(0)
strnumber = variant2(1)
If strhousecode <> 0 Then Checkx10codes(strhousecode, strnumber) '-------- Here I send the next commands to check all three LastX10,Strhousecode,strnumber)
End If
Here is a example of the Checkx10codes which is called; Notice the strnumber variable changes when its on/off. Only way to find them for me is to test the device and capture
it, sometimes comes back as other numbers but the combination of the three variables is what makes it unique.
Public Function Checkx10codes(ByVal housecode As String, ByVal strnumber As String) As Boolean
'------------- TURN ON/OFF HOUSE LIGHTS --------------- C2
If housecode = "01" And strnumber = "22" And Lastx10 = "C2" Then
SendtoLog("*-- Keychain pressed to turn on house")
StartofDay() ' - Some other function to turn on the lights
Lastx10 = ""
End If
If housecode = "01" And strnumber = "23" And Lastx10 = "C2" Then
SendtoLog("*-- Keychain pressed to turn off house with not activate")
TurnOffHouse() ' - Another function to turn off all the house
Lastx10 = ""
Exit Function
End If
End Function
Here are some more pictures of other X10 devices im using,
This 5 in 1 remote cost me $9 off Ebay. I have all my devices programmed in it, also
has EXCELLENT range to the x10 transceiver on the other side of the house! There is no DVD button but I programmed the
SAT button, and works great with my Brighthouse Digital box including the interactive guide!
See the device in action here controlling my living room fan / TV / light.
A couple of key chains, the one of the LEFT, keep away from it, the range is horrible, its a cool device for its
size and the fact is has 4 sets of buttons but, horrible range. I dont use it all.
The one on the right is EXCELLENT, highly recommended, you can get a set of 3 for like $12!!
Back side of one of my smaller remote, this one controls the light of the entrance which can be dimmed if I wanted to. So at the tip of my finger tips I can dim both the garage and entrance lights of the whole outside house. Neat...
Backside of larger remote, Clear see though labels seem to stick better than regular labels. And by capturing each one of the button presses and the code above you can then send out Insteon commands to the devices you want.
![]()
For example on the main remote I have a button to call my children. Basically the program does the following,
For this to work each PC needs to have the Messenger service running which by default is off
Then from your code shell out to DOS, example below,
System.Diagnostics.Process.Start("c:\wintools\CALLGIRLS_LIVINGROOM.bat")
Here is what the batch file contains,
NET SEND * "Hi Girls, Your presence is requested in the living room. THANK YOU"
I also blink the Living room lights with the following command (Basically four Insteon commands with a second delay between each)
For the example; InD(16).MacSP="11 22 BB" which is the device address.
Sm.SendINSTEONRaw("00 00 00 " + InD(16).MacSP + " 05 12 FF", 3) - ON
System.Threading.Thread.Sleep(1000)
Sm.SendINSTEONRaw("00 00 00 " + InD(16).MacSP + " 05 13 00", 3) - OFF
System.Threading.Thread.Sleep(1000)
Sm.SendINSTEONRaw("00 00 00 " + InD(16).MacSP + " 05 12 FF", 3) - ON
System.Threading.Thread.Sleep(1000)
Sm.SendINSTEONRaw("00 00 00 " + InD(16).MacSP + " 05 13 00", 3) - OFF
Enjoy!
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:Controlling Insteon devices using an email account
June 17, 2008 at 2:27 pm | In Software Setup | 1 CommentTags: Checking Email, Home Automation, Insteon, vb 2005, X10
Lets say you want to check a email account every couple of minutes and this was react such as run a couple of commands and email you back?
For example I have already setup
- Status checks of all lights
- Turn on or off the whole house or individual lights
- Randomize the house lights which will turn on my media player and play music remotely as well.
- Open / close the garage,
- Email me when movement is detected after I’ve turned the house off
- The sky’s the limit.
What im currently using is outlook checking a pop3 account every 5 min, since Mapi interfaces really good with VB I use this. This way outlook itself checks every 5 minutes and you code just checks the email every 3. Again my code is Vb2005 / Windows
First setup outlook as your normally would, make sure it checks your email every 2-3 minutes. Then in your code, you will need to make sure you first reference the “Microsoft Office object 12 or 11 “ library into your code. Depends your version it may have object version 11 I’ve used this with Outlook 2000,2003,2007. I suspect by a macro you wont need to have outlook running but in my case its no biggie.

In your imports section include the following
Friend Class MainMenu In your class definion add the following, i've commented each line
‘——– SET UP EMAIL goodies
Friend Class MainMenu
Public inboxitem As Microsoft.Office.Interop.Outlook.MailItem '--- we will use this object to send emails out
Public objOutlook As Microsoft.Office.Interop.Outlook._Application ' --- Reference the outlook object, and load it if not already
Public objNS As Microsoft.Office.Interop.Outlook._NameSpace '--------- The Outlook namespace, used throught the code.
Public objInBox As Microsoft.Office.Interop.Outlook.MAPIFolder'------ The folder object that we will assign the inbox to.
Public objItems As Microsoft.Office.Interop.Outlook.Items'-------- Each of the items in the inbox, we will loop thru this to read the individual emails.
Then once the program starts we need to set the session that will hold the connection to outlook, this is done in the Load event
Public Sub MainMenu_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load objOutlook = New Microsoft.Office.Interop.Outlook.Application() '--- Assign the variable objOutlook to the application objNS = objOutlook.Session '--------- Tie to the active session, if its not running it will load automatically .. .. Then you can set a timer to check your email every certain amount of time executing the function CheckMail()
In the function that will do the actual reading, we will start with the assigning of variables and then check the emails and search for special text inside the body of the emails.
Public function Checkemail() as Boolean objInBox = objNS.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox) ' --- Assign ObjInBox to map to the default inbox. objItems = objInBox.Items.Restrict("[UnRead]=True") '----- assign individual items BUT filter only the UNREAD ones! Dim outmail As Microsoft.Office.Interop.Outlook.MailItem '---- This will hold the outgoing mail object Dim iCount As Integer = objItems.Count '------ Will hold the amount of NEW email, will return 0 if all email has already been read. For i = 1 To iCount inboxitem = objItems.Item(i) '----------- ASSIGN A EMAIL ITEM TO THE INBOXITEM, from there we can query stuff like date,subject sender etc. If InStr(LCase(inboxitem.Body), "ouse on") > 0 Then ' --- check for certain words in the Body, in this case 'house on' this also works for VB6 Occupy() ' ---- Run another special function or code somewhere else '------ Here we create our reply email. ------------------ outmail = objOutlook.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem) outmail.To = inboxitem.SenderEmailAddress '-------- Get the sender email for the inboxitem object. outmail.Subject = "* Reply" outmail.Body = "NICE TO HEAR FROM YOU, HOUSE ON. WAITING YOUR ARRIVAL." outmail.Send() End If inboxitem.UnRead = False '- Mark email as read so its not checked twice next time next i Checkemail=True '----- Just to return something End Function
And thats it!. If you like you can add attachments, HTML text and others, I would checkout Microsofts site for more details on what you can do with the outlook client!.
Enjoy
Installation:Setting up a virtual 3 way switch
June 15, 2008 at 10:56 pm | In Hardware setup | Leave a CommentTags: 3-way, Home Automation, Insteon, X10
In my hallway I have a good ‘ol three way switch this is how I changed it. Just like in my previous entry, you can have switches controlling other switches by creating scenes. So a 3 way switch is basically that. Two switches controlling each other.
In 3 way switches you have a primary and secondary, the primary is the one which actually carries the load to the light fixture. The secondary just follows. But you may find the case (like me) where the secondary switch box doesnt have any power, since in traditional switches the power is fed from the primary.
Since there are a two wires connecting the primary to secondary (known as the traveler) we will jump the black wire to the line and use it to power the secondary switch. In my case it was easy to find the traveler wires since 1st it will be in a strand with 2nd traveler and it wont be with the line or neutral.
Once setup, and power ‘on’ you link both of them to each other and create a ’scenes’ and each dimmer switch holds plenty of them, So you can with one switch control all the others (without needing a computer) , but not only turn on how about turn on to a certain level, and even control the ramp rate (Which is how fast the light turns on) – A very neat effect!. And presto you have created your virtual 3 way switch, the response is very fast. And technically you can add more if you like. I cant imagine a 10 way switch.
but technically you can do it, all this without a dedicated computer.
Here is the wiring diagram off the Smarthome page for it.
As for reading them in the program I just look for one of them, since eventually both will respond.
See ya
Luis
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.


See the device in action
Back side of one of my smaller remote, this one controls the light of the entrance which can be dimmed if I wanted to. So at the tip of my finger tips
I can dim both the garage and entrance lights of the whole outside house. Neat...
Backside of larger remote, Clear see though labels seem to stick
better than regular labels. And by capturing each one of the button presses and the code above you can
then send out Insteon commands to the devices you want. 

