Where can I find some insteon scripting commands. I am looking for basic stuff. Turn on a light switch, turn on to 50%. I searched all over and could find anything. Any help would be great. Thanks
Announcement
Collapse
No announcement yet.
Insteon scripting
Collapse
This topic is closed.
X
X
-
here is the protocol for transmitting an insteon cmd via script. this should cover just any thing you want to do.
Public Sub TransmitInsteonCommand(ByVal HC As String, ByVal DC As String, ByVal InsteonCmd1 As Byte, ByVal InsteonCmd2 As Byte)
you can find the insteon cmd set here:
http://www.insteon.net/pdf/INSTEON_C..._20070925a.pdf
www.madreporite.com/insteon/commands.htm
there are new script functions for setting and getting device op flags and settings. see the latest plugin release notes.
hope this helpsMark
HS3 Pro 4.2.19.5
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD
-
if you just want to use standard hs functions/methods, you could do the following
hs.setdevicevalue A1, 50
where a1 is the devicecode for the insteon hs device, and 50 is the On level
all the hs script commands are documented in the hs help so i won't go into them here.
the script cmds avail via the plugin are the following:
hs.plugin("Insteon").TransmitInsteonCommand
hs.plugin("Insteon").setdevicesetting
hs.plugin("Insteon").getdevicesetting
hs.plugin("Insteon").setdeviceopflag
hs.plugin("Insteon").getdeviceopflag
these are for transmitting special insteon cmds to the device or more direct control of the device settings (typically changed via the plugin UI)
holpe this helpsMark
HS3 Pro 4.2.19.5
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD
Comment
-
I need some help getting this script to execute from other stations on my LAN. I keep getting the "cannot create object" error if i try to run it from any computer other than the HS2 host.
Code:dim hs set hsi = createobject ("HomeSeer2.application") hsi.SetHost "192.168.5.3" rval = hsi.Connect("default","default") if rval <> "" then msgbox rval end if Set hs = hsi.GetHSRef if hs.ison("\2") then hs.execx10 "\2","off",0 else hs.execx10 "\2","on",0
Comment
-
HI Bill,
the object references you are making in your script are frin the homeseer executable running on your server. They will typically only run on the computer running Homeseer and plugins.
You can look at something like this to see if that will work for youPaul
Comment
-
Thanks for the tip. Still no go. If I run the script from from a batch file referencing the script on the local machine, I get the "Microsoft VBScript runtime error: ActiveX
component can't create object: 'HomeSeer2.application'" error.
If I run the script from from a batch file referencing the script on the remote (HS2) machine, I get "CScript Error: Execution of the Windows Script Host failed. (Not enough storage
is available to complete this operation. )"
The script runs fine on the HS2 (XP) machine, either from a batch file or directly.
This has to be doable... it seems so simple.
Comment
-
Insteon Scripting
Could someone give me an example using the transmitinsteoncommand below? I somewhat understand the insteon hex commands from the insteon developers guide, but I would like to see what exactly goes in the HC and DC.
TransmitInsteonCommand(ByVal HC As String, ByVal DC As String, ByVal InsteonCmd1 As Byte, ByVal InsteonCmd2 As Byte)
What I am trying to accomplish is sending a lock command to a keypadlinc. I successfully locked all of my dimmers using the built-in insteon action - send device command, but the keypads will not. It appears that the lock function (20 00) only works using a direct command which is what is sent to the dimmers, but for keypadlincs the send device command uses a group message (02 62 00 00 07 CF 20 00).
Although, it is possible that the keypads won't lock even with a direct command.
PS. using insteon plugin 1.7.3.1
Steve
Comment
-
the hc/dc is the housecode/unitcode found on the hs status page. usually a character like / _ and then the unit code is a number
there is also an insteon action that might make this easierMark
HS3 Pro 4.2.19.5
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD
Comment
-
Ok, the HC is the hex code from the status page and the DC is the device category? or the message flags and/or to - from addresses? I assume that since the HC is given then you don't need the addresses.
Sorry if I am missing something here, but I did try the Insteon action of "send device comand" as mentioned earlier. It will not send a direct command to a keypadlinc, instead it will send a group message. If I use a built in command to change the backlight it will send a direct command. I believe I also need to send a direct command to change the lock opcode.
Steve
Comment
-
steve can you post a screen shot of the hs status page showing the main on/off device of the kplMark
HS3 Pro 4.2.19.5
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD
Comment
-
I would if I could, but apparently I do not have the
privileges to attach anything to my posts.
I don't have a "Manage Attachment" under additional options.
I only have: Miscellaneous Options, Thread Subscriptions and Rate Thread.
I created this account back in 2002 and this is the first time I have actually used it. My account profile list me a "Viewer".
Who do I contact to fix this?
Steve
Comment
-
Rupp should be able to assist with the posting attachment issueMark
HS3 Pro 4.2.19.5
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD
Comment
-
Originally posted by norman100 View PostI would if I could, but apparently I do not have the
privileges to attach anything to my posts.
I don't have a "Manage Attachment" under additional options.
I only have: Miscellaneous Options, Thread Subscriptions and Rate Thread.
I created this account back in 2002 and this is the first time I have actually used it. My account profile list me a "Viewer".
Who do I contact to fix this?
Steve
Comment
Comment