Announcement

Collapse
No announcement yet.

How To Access The Device's "Voice Command" Text Field (Not The Bit Flag)?

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

    How To Access The Device's "Voice Command" Text Field (Not The Bit Flag)?

    I have a need to be able to access the device property "Voice Command" text field. I know how to access (get and set) the bit value that turns on and off the Device's Voice command but I cannot find how to access (get and set) the text field of the Device's voice command. Can anyone point me in the right direction for this Device Text Field?

    Click image for larger version

Name:	Screenshot_2021-02-20_22-05-54.jpg
Views:	75
Size:	132.4 KB
ID:	1457685

    Thanks So Much,
    Jean-Marie Vaneskahian
    ---------------------------------------------------
    Jean-Marie G. Vaneskahian
    jean@vaneskahian.com
    ---------------------------------------------------

    #2
    public string AbstractHsDevice.VoiceCommand?

    Comment


      #3
      Voicecommand is a property of Scheduler.classes.deviceclass. Use one of the getDevice methods to get the device object. Access is via scripting.

      Comment


        #4
        Originally posted by Michael McSharry View Post
        Voicecommand is a property of Scheduler.classes.deviceclass. Use one of the getDevice methods to get the device object. Access is via scripting.
        VoiceCommand is a property of abstract class AbstractHsDevice - we are in HS4

        Comment


          #5
          Thank you for the help alexbk66 and Michael McSharry! While it may seem obvious, I did not see it documented anywhere (I did just find something here, though it was not very helpful: https://homeseer.github.io/Plugin-SD...e_VoiceCommand). I really need to learn what tools to use to be able to explore a class’s properties and methods as well as what arguments it takes in and what it returns.

          Here is the code I used (In HS3) to get the Voice Command given a device’s Reference:

          C#
          Code:
          int Device_Reference = 1000;
          string Device_Voice_Command = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(Device_Refe rence).VoiceCommand(hs);
          Visual Basic
          Code:
          Dim Device_Reference As Integer = 1000
          Dim Device_Voice_Command As String = CType(hs.GetDeviceByRef(Device_Reference), Scheduler.Classes.DeviceClass).VoiceCommand(hs)
          Can you show me the syntax to set the Voice Command given a device’s Reference?
          ---------------------------------------------------
          Jean-Marie G. Vaneskahian
          jean@vaneskahian.com
          ---------------------------------------------------

          Comment


            #6
            The only "tool" I use - instead of using the prebuilt PluginSdk.dll - I clone the SDK source code and add the project to my solution.

            Unfortunately HS documentation is useless - they generate the docs from source comments, which quite often are missing.

            So just look in AbstractPlugin.cs and IHsController.cs

            Comment

            Working...
            X