Announcement

Collapse
No announcement yet.

Undocumented Scripting/Plugin functions

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

  • Undocumented Scripting/Plugin functions

    I've started this thread to collate a list of scripting/plugin calls which are currently undocumented and may get lost if not recorded somewhere:

    Device Name from reference:

    hs.devicename(deviceRef As integer) as String

    Event Voice Command from reference (Introduced in version 3.0.0.407)

    hs.GetEventVoiceCommand(eventRef as integer) as String

    If you know any more, feel free to post here.
    Jon


  • #2
    I can't add to this list, but really appreciate you starting it.
    Don

    Comment


    • #3
      +1
      HS3Pro Running on a Raspberry Pi3
      64 Z-Wave Nodes, 168 Events, 280 Devices
      UPB modules via OMNI plugin/panel
      Plugins: Z-Wave, BLRF, OMNI, HSTouch, weatherXML, EasyTrigger
      HSTouch Clients: 3 Android, 1 Joggler

      Comment


      • #4
        Check to see if an Application is running:

        hs.IsApplicationRunning(Application Name As String) As Boolean

        Example:

        Code:
        Sub Main(ByVal Parm As Object)
            If Not hs.IsApplicationRunning("Notepad") Then
            hs.Speak("NotePad is not running")
        End if
        Jon

        Comment


        • #5
          Added to the Device Class - Get/Set the Linked Device

          (Introduced in version 3.0.0.451)


          Public Property LinkedDevice(ByVal hs As IHSApplication) As Integer

          This returns or sets the Linked Device Reference for the device: It returns 0 if no devices are linked, else the reference number.

          Example:

          Code:
          Sub Main(ByVal Parm As Object)
              Dim RefNo As Integer = 123
              Dim dv As Scheduler.Classes.DeviceClass
              dv = hs.GetDeviceByRef(RefNo)
              hs.writelog("LinkedDeviceRef", dv.LinkedDevice(nothing))
          End Sub
          Jon

          Comment

          Working...
          X