Announcement

Collapse
No announcement yet.

is this possible in a script ?

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

  • is this possible in a script ?

    I have a script that calls all the pir's in an array like this example


    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
    Last edited by Malosa; August 16th, 2016, 09:52 AM.
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 3.0.0.531 on windows 7 ultimate X64 on hp quadcore laptop 8 GB.

  • #2
    or is this also possible

    pir_name = dv.Name(hs)


    hs.TriggerEvent(pir_name)



    But i also cant get it to work , i created an event with the exact same name as the pir device , but doesnt trigger the event...
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 3.0.0.531 on windows 7 ultimate X64 on hp quadcore laptop 8 GB.

    Comment


    • #3
      anyone an idea ?
      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




      HS3Pro 3.0.0.531 on windows 7 ultimate X64 on hp quadcore laptop 8 GB.

      Comment

      Working...
      X