Announcement

Collapse
No announcement yet.

DS10A & ACRF Door Announcement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DS10A & ACRF Door Announcement

    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:

    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

    #2
    Hmm do you need a script?

    I use an event, this is tied to BLRandom which means the announcement is different all the time, you just add the phrases you want and it selects one from random and speaks it.. just makes it "different" than just "door is open" type stuff


    TrOjAn

    Comment


      #3
      thanks i will check it out..

      great for those of us that dont want to use extra plugins (of course unless they are free... )
      HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

      HS - HS3 Pro Edition 3.0.0.435

      Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

      Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

      Comment

      Working...
      X