Script For Checking Caddx Armed Status in Homeseer

BraveSirRobbin

Moderator
Here is a very simple procedure on how to create three "virtual" devices in Homeseer and have each one have a value of ON or OFF based on the armed status of a Caddx System currently viewed by Nitrox's (David Crawford) Homeseer plugin.

Create three virtual devices in Homeseer, one each for "Armed Away" status, "Armed Stay" status, and "Disarmed" status. For this example we use the following:

y1 = Disarmed Status
y2 = Armed Stay Status
y3 = Armed Away Status

The idea is that when the system is Disarmed, y1 will be ON (and the other devices OFF). If the system is armed in Stay Mode, y2 will be on (and the other devices OFF), and if the system is armed in Away Mode, y3 will be on (and the other devices OFF).

This way you can use these device values for conditional triggers in events relating to your security sytem.

Now that the devices are created go to the events section and create a Homeseer event that will be triggered on "Change to Any Status" of the "Caddx Panel Armed Status" device that was created when you set up the Caddx Homeseer plugin. This is the device that registers a value of "Disarmed", "Armed[Stay]", or "Armed[Away]". For my system this device is "O3". Refer to the screen shot below.

Now create the script below and have it run for this event:
Code:
sub main()
hs.WaitSecs 3
dim s
s=hs.DeviceString("O3")
	
	If s = "Disarmed" then
  hs.ExecX10 "y1", "on", 0, 0
	else 
  hs.ExecX10 "y1", "off", 0, 0
	end if

	If s = "Armed [Stay]" then
  hs.ExecX10 "y2", "on", 0, 0
	else 
  hs.ExecX10 "y2", "off", 0, 0
	end if

	If s = "Armed [Away]" then
  hs.ExecX10 "y3", "on", 0, 0
	else 
  hs.ExecX10 "y3", "off", 0, 0
	end if

end sub

Just though this might help someone out with their Caddx system's configuration with Homeseer.
 

Attachments

  • security_event.jpg
    security_event.jpg
    53.1 KB · Views: 71
Back
Top