Announcement

Collapse
No announcement yet.

Best Approach to Using HS Touch Keypad for Elk (2017)

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

  • Best Approach to Using HS Touch Keypad for Elk (2017)

    I'm getting ready to build a keypad screen for Elk, I have sensors/zones all sorted on an overall house plan, and that's great for a visual indication of what's going on, but I really want to replace the wall-mounted Elk keypad with HS Touch so users can disarm/reset alarms too.

    So can anyone give me the current way to do this - I see threads with references to scripts to get Elk overall status - but I see that those are now devices (?). I have the devices, so that's hopefully correct.

    But what about a keypad, and users entering their codes to disarm alarms? Can I do that? Is that the two virtual device approach I saw too? Just creating buttons and using scripts to shove values into virtual devices?

    What are the Elk keypad devices I can create within the plug-in for? They don't seem to have anything useful I can do with them (or the one I created didn't anyway).

    Pointers and tips would be most welcome to a) help me and b) as a go-to guide for anyone else wanting to try this.

    Thanks in advance for any pointers.

  • #2
    Well I made some progress by working my way through the thread in this group, updating scripts as needed to check/set devices to use HS3 calls for code entry, but am stuck on one thing.

    I'm trying to use the example UltraM1G zones violated.vb script to list violated zones but am falling foul of the strZones = hs.plugin("UltraM1G").GetZonesNotReady() call - is this api no longer available in HS3? Is there another built-in way to get all the violated zones into a device?

    My script looks like this

    Sub Main(ByVal parm As Object)
    Dim strZones As String = ""
    Dim strMessage As String = ""

    if(hs.devicevalue (187))=1 then
    hs.setdevicestring (4636,"READY TO ARM",True)

    else
    ' Get zones in a not ready status
    strZones = hs.plugin("UltraM1G").GetZonesNotReady()
    If strZones.Length > 1 Then
    strMessage = "The following zones are not ready: " & strZones
    hs.speak(strMessage)
    hs.setdevicestring (4636,("NOT READY:" & " " & strZones),True)

    else
    If strZones.Length < 1 Then
    hs.setdevicestring (4636,"READY TO ARM",True)
    End If
    End If
    End If
    End Sub

    Comment


    • #3
      I also tried strZones = hs.plugin("UltraM1G3").GetZonesNotReady()

      When I try this line it results in

      Running script UltraM1G zones violated.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()

      Comment


      • #4
        watching this thread; this is on my upgrade path....

        Comment


        • #5
          Thanks to a friend of mine I found out the way the plugin needs to be called has changed with HS3. So it's really an HS3 thing it seems.

          The working script is now below
          187 is Elk's Arm Up State, 4636 is my scrolling text box.

          Sub Main (ByVal Parms as String)
          Dim strZones As String =""
          Dim strMessage As String = ""

          if(hs.devicevalue (187))=1 then
          hs.setdevicestring (4636,"READY TO ARM",True)

          else
          ' Get zones in a not ready status
          strZones = hs.PluginFunction("UltraM1G3", "", "GetZonesNotReady", nothing)
          If strZones.Length > 1 Then
          strMessage = "The following zones are not ready: " & strZones
          hs.speak(strMessage)
          hs.setdevicestring (4636,"NOT READY:" & " " & strZones,True)

          else
          If strZones.Length < 1 Then
          hs.setdevicestring (4636,"READY TO ARM",True)
          End If
          End If
          End If
          End Sub

          Comment

          Working...
          X