I have a script that calls all the pir's in an array like this example
It checks all the devices with the case.. like this :
Here is the thing , how can i let it run a specific event on the device that it matches.
like case 4 is for a person is detected if its lower than 30 seconds ago, i want to run an event that matches that device ... the event is a timer ...
if there are more triggers on that case it must be trigger also the event it matches the device.. so i can trigger seperate timer events trough script
or can i do something with hs.RegisterStatusChangeCB (i really dont know how this works)
regards
Code:
dim array_pir() as string = {"2512","2513","2517","2518"}
It checks all the devices with the case.. like this :
Code:
Select Case hs.DeviceValue(devp) Case 0 Case 4 If S < 30 Then hs.speak("Person detected at the " & location) End If Case 11 Case 15 Case 75 Case Else 'Optional
Here is the thing , how can i let it run a specific event on the device that it matches.
like case 4 is for a person is detected if its lower than 30 seconds ago, i want to run an event that matches that device ... the event is a timer ...
if there are more triggers on that case it must be trigger also the event it matches the device.. so i can trigger seperate timer events trough script
or can i do something with hs.RegisterStatusChangeCB (i really dont know how this works)
regards
Comment