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
        End sub
        Last edited by jon00; July 30th, 2019, 10:40 AM.
        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


          • #6
            Device Unknown status;



            hs.DeviceInvalidValue(xxxx) to get it
            hs.DeviceInvalidValue(xxxx)= false to set

            xxxx = ref
            Regards Bart
            ------------------------------------------
            Win7 64Bit on Intel NUCI7 with SSD
            HSPRO 3.
            Devices; 1370 Events; 691

            Jon00 Scripts, JowHue, HSTouch, Plugwise, Z-wave, Ultranetatmo, Ultracam, PHlocation, BLUSBUIRT, MeiHarmony, Buienradar, MEiUnifi Pushover 3P, Random, Nest HSPhone and Blueiris

            Visonic Powermax Alarm System (HS3) Interface: http://www.domoticaforum.eu/viewtopic.php?f=68&t=11129

            Comment


            • #7
              Originally posted by jon00 View Post
              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
              Will have to test this on linux

              Comment


              • #8
                Syntax is lacking a just little bit for those not all that familiar with VB .net syntax:

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

                Comment

                Working...
                X