Posts Tagged ‘Insteon relay’

Lets say your like me and you wish to check the status of the contact on your garage.    But notice that regular polls only return the device itself not the status of the contact.

For example maybe at a given time you want to make sure the contact is closed.  Here is how

I’m going to use as reference the original articles of getting “Insteon to talking to your PC found below” Part #1,#2,

https://pixiescorner.wordpress.com/2008/06/15/part-2-get-insteon-talking-to-your-pc/
https://pixiescorner.wordpress.com/2008/06/20/part-3-get-insteon-talking-to-your-pc-part-2/

This is using VB .NET and assuming you already have some experience with the SDM/PLC commands.

For the Sensor Poll We are going to use the command #19 and a second command of ’01 to query the device.  For example

For this example Lets say for example my plc is AA.BB.CC
My I/O Linc is : 11.22.33

 

So in VB polling the device using the SDM would be like this,

sm.SendINSTEONRaw(”AA BB CC 11 22 33 05 19 01″, 3)

In return you will get the following bytes, notice the change in the last digit.
If the garage is closed (Contact closed)
 - 04 11 22 33 AA BB CC 25 03 01 

If the garage is closed (Contact OPEN)
 - 04 11 22 33 AA BB CC 25 03 00

If you get FF,FE or other numbers make sure you are using the last 01 on your command #19 as this will give you the state of the device which isnt the contact status.

Enjoy!

 
 
Advertisements