Announcement

Collapse
No announcement yet.

What is HS4 equivalent of hs.CAPIControlHandler(CAPIcontrol)

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

    What is HS4 equivalent of hs.CAPIControlHandler(CAPIcontrol)

    Look in the object model and in the API HS3->HS4 reference and did not have any hits?

    How does one command another plugin's feature?

    #2
    IHsController.SendControlForFeatureByValue


    https://homeseer.github.io/Plugin-SD...System_Double_

    Comment


      #3
      Originally posted by spud View Post
      IHsController.SendControlForFeatureByValue


      https://homeseer.github.io/Plugin-SD...System_Double_
      Just wondering, since you are creating a new library, why not do it proper OOP way? I.e. instead of IHsController.SendControlForFeatureByValue(device) - do device.SendControlForFeatureByValue()

      Comment


        #4
        This implies to me that features can only be controlled with numbers. In hubitat plugin, for example, devices can be controlled by text (e.g. Speak something). How is it done with HS4? What I have done is a kludge by first setting the string and then commanding a number and the plugin's handler then looks at the string to see what should be spoken.

        Should this method be included in https://docs.homeseer.com/pages/view...pageId=7443557

        Comment


          #5
          Originally posted by alexbk66 View Post

          Just wondering, since you are creating a new library, why not do it proper OOP way? I.e. instead of IHsController.SendControlForFeatureByValue(device) - do device.SendControlForFeatureByValue()
          I'm not the one who wrote the SDK, so I'm not sure about the rationale behind all the design choices.
          The SDK is open source so if you think something should be implemented differently, pull requests are welcomed.

          Comment


            #6
            Originally posted by Michael McSharry View Post
            This implies to me that features can only be controlled with numbers. In hubitat plugin, for example, devices can be controlled by text (e.g. Speak something). How is it done with HS4? What I have done is a kludge by first setting the string and then commanding a number and the plugin's handler then looks at the string to see what should be spoken.

            Should this method be included in https://docs.homeseer.com/pages/view...pageId=7443557
            so basically, you need a SendControlForFeatureByString(int devOrFeatRef, string value) method to be added?

            Comment


              #7
              Originally posted by spud View Post

              I'm not the one who wrote the SDK, so I'm not sure about the rationale behind all the design choices.
              The SDK is open source so if you think something should be implemented differently, pull requests are welcomed.
              I know, I know

              Comment


                #8
                spud
                that would be a reasonable addition to match the ControlString that exists in ControlEvent

                it seems users should also have the capability in Event Actions to command a String. in both HS3 and HS4 the control device appears to only control Value.

                Comment


                  #9
                  Originally posted by spud View Post
                  IHsController.SendControlForFeatureByValue


                  https://homeseer.github.io/Plugin-SD...System_Double_
                  So, will these IHsController methods be available to scripting running from an event?
                  tenholde

                  Comment


                    #10
                    Originally posted by Michael McSharry View Post
                    spud
                    that would be a reasonable addition to match the ControlString that exists in ControlEvent

                    it seems users should also have the capability in Event Actions to command a String. in both HS3 and HS4 the control device appears to only control Value.
                    I added a feature request for SendControlForFeatureByString

                    Comment


                      #11
                      Thanks spud

                      Comment


                        #12
                        SendControlForFeaturebyString is now available in PluginSdk 1.3.0.0 and HS 4.1.17.0
                        https://homeseer.github.io/Plugin-SD...atureByString_

                        Comment

                        Working...
                        X