Announcement

Collapse
No announcement yet.

Scripting directly to EnvisaLink

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

    Scripting directly to EnvisaLink

    I am trying to use HSTouch to collect and pass to the DSC alarm panel the Dis Arm codes. I want the user to enter their disarm ode in the security codebox and pass it to the panel using the SendKeystrokeString call. I do not want to create an action for each user in HS since the owner of the DSC system may add other users to the system and would require hard coding user access codes in a HS event.

    Here is my code:

    Sub Main(ByVal parm As Object)

    Dim AlarmCmd as String = ""
    Dim UserPassword as String = ""
    Dim Zone as String = ""
    Dim CmdError as Object= ""

    AlarmCmd = parm(0).ToString

    Select Case AlarmCmd
    Case "ArmStay"
    UserPassword = parm(1).ToString
    hs.WriteLog("Alarm Script", "Arm Stay - User Password = " & UserPassword)
    Case "ArmAway"
    UserPassword = parm(1).ToString
    CmdError = hs.PluginFunction("EnvisaLink", "","ArmAway",UserPassword )
    hs.WriteLog("Alarm Script", "Arm Away - User Password = " & UserPassword & " error = " & CmdError )
    Case "DisArm"
    UserPassword = parm(1).ToString
    CmdError = hs.PluginFunction("EnvisaLink", "","SendKeystrokeString",UserPassword )
    hs.WriteLog("Alarm Script", "Disarm - User Password = " & UserPassword)
    Case "Bypass"
    Zone = parm(1).ToString
    hs.WriteLog("Alarm Script", "Bypass Zone = " & Zone)
    Case "GetStatus"
    Case Else
    End Select

    End Sub

    Here is the response:

    Running script AlarmEvent.vb :Exception has been thrown by the target of an invocation.->Does entry point Main exist in script? at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Obj ect obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at A.c17b105f989efe61e5979e67bec1ef734.cffd66cb0782c50126727e3f a75582d7a()

    Do you have to use HS Events to signal back to EnvisaLink?
    The SendKeystrokeString action requires a hard coded string. Can this be a Global?

    #2
    The current version of the EnvisaLink plug-in does not have any scripting functions, but this is something I can add easily.

    I can also add the possibility to use a Global variable as the parameter of the "Send Keystroke String" action

    Comment


      #3
      HS Touch Disarm

      How can I get a user to enter their user account to disarm the panel from HSTouch without having to create users in HS? I do not want to modify a HS script every time the owner of a DSC panel adds or deletes users.

      Comment


        #4
        That would be a terrific feature!!

        Comment


          #5
          Using DSC System user codes to disarm

          Solved the problem. I created a plugin for DSC alarm panels that only uses the alarm system's user codes to disarm and arm with code. This way, the alarm panel user codes are not required to be entered into HS. If the DSC panel settings are changed, HS users do not have to be modified. This is more secure. The past plugins assume that if you have access tothe panel via HSTouch, then you are authorized to disarm the panel. It also supports IT-100 serial that has more features than the EVL3/4 including the ability to download the panel keypad zone labels.

          Comment


            #6
            Originally posted by spud View Post
            The current version of the EnvisaLink plug-in does not have any scripting functions, but this is something I can add easily.

            I can also add the possibility to use a Global variable as the parameter of the "Send Keystroke String" action
            Will this be added? if so

            Comment


              #7
              Originally posted by deanrparry View Post
              Will this be added? if so
              yes this will be in the next version

              Comment


                #8
                Originally posted by spud View Post
                yes this will be in the next version
                Thank you

                Comment


                  #9
                  in version 3.0.0.34 available here I have added:
                  • SendKeystrokeString as a scripting function
                  • Possibility to use a replacement variable as the parameter of "Send Keystroke String" action and scripting function


                  see user guide for more info

                  Comment


                    #10
                    Originally posted by spud View Post
                    in version 3.0.0.34 available here I have added:
                    • SendKeystrokeString as a scripting function
                    • Possibility to use a replacement variable as the parameter of "Send Keystroke String" action and scripting function


                    see user guide for more info
                    A quick message to show my gratitude for your time Spud! Much appreciated yet again.

                    Comment

                    Working...
                    X