
for every key you need to create a event.
and for every action another event..like arm, disarm and Lightson2
in the action event just put the actions that you want.
my Alarm Arm event
Lock the frontdoor
Turn on soft alarm
Turn of the lights
Turn off the AV
Run event powersave
Powersave will turn of other devices in my house
this is the script keyfob.vb (since version 9 of Rfxcom plugin there is no need for resetting the key...last line)
Code: Select all
Sub Main(parms As String)
Dim i As Integer
i = hs.DeviceValue (parms)
Select Case i
Case 2
''ArmAwayMaxDelay
hs.TriggerEvent ("Alarm Arm")
Case 5
''Disarm
hs.TriggerEvent ("Alarm Disarm")
Case 9
''Lightson2
hs.TriggerEvent ("Alarm Lightson2")
End Select
'' Reset Keyfob
hs.SetDeviceValue (parms,0)
End Sub