I don't know where else to put this, hopefully someone can use this script for announcing when their door is opened or closed. It does have a bit of attitude for fun.
I use the ACRF plug-in with the W800 antenna & HS2 Pro.
'USES:
-hs.deviceValue("x10Code") 'look @ code in Status Tab, from ACRF Plugin assigned code in security setup
-DS10A signals: 1=open, 2=closed
-instead of using global variables, used hs.DeviceString("xx") & hs.SetDeviceString "xx", "text", xx= x-10 code for virtual devices (one for instance= one instance of opening and closing door, one for state=one state if door had been opened too long):
HERE'S THE VBS CODE FOR AN ACRF EVENT TRIGGERED BY DS10A TO ANY STATUS:
I use the ACRF plug-in with the W800 antenna & HS2 Pro.
'USES:
-hs.deviceValue("x10Code") 'look @ code in Status Tab, from ACRF Plugin assigned code in security setup
-DS10A signals: 1=open, 2=closed
-instead of using global variables, used hs.DeviceString("xx") & hs.SetDeviceString "xx", "text", xx= x-10 code for virtual devices (one for instance= one instance of opening and closing door, one for state=one state if door had been opened too long):
HERE'S THE VBS CODE FOR AN ACRF EVENT TRIGGERED BY DS10A TO ANY STATUS:
Code:
sub main() If hs.deviceValue("\9") = 1 then hs.SetDeviceString "A99", "BEGIN" hs.SetDeviceString "A98", "F" 'flag for door open long time -> A98 virtual device hs.speak("front door open") hs.WaitSecs(5) if hs.deviceValue("\9") = 1 then hs.speak("please close front door") end if hs.WaitSecs(5) if hs.deviceValue("\9") = 1 then hs.speak("close the stinking front door, do you think I'm made out of money?!") 'gives attitude hs.SetDeviceString "A98", "T" 'sets flag end if End If If hs.deviceValue("\9") = 2 Then if hs.DeviceString("A99")= "BEGIN" then if hs.DeviceString("A98") ="T" then 'flag=long time, give attitude hs.speak("thank you for finally closing the front door!") hs.SetDeviceString "A98", "F" hs.SetDeviceString "A99", "END" else hs.speak("front door closed") hs.SetDeviceString "A99", "END" end if end if End If end sub
Comment