Announcement

Collapse
No announcement yet.

Custom device for communication back and forth between Homeseer and Hubitat

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

    #16
    You can see controluse in the Hs deviceutility page. I think it is with status graphics tab, but could be advanced tab. mcsHubitat devices all have controluse defined. It is only needed for things like HSTouch and maybe Google services. For general control using CAPITAL controluse does not matter.

    i recognize tenScripting is a great addition, but I do all my work in Visual Studio so never had a need to use it.

    Comment


      #17
      Post #2 of the thread I referenced provided a one-line method to control a button that has button label of On. In event action preceded it with ampersand in the one line script action. In my example it was the value rather than the label that is being used to identify the specific VSP that is being controlled.

      Comment


        #18
        ok, bear with me. I have taken screen shots of what I see in Status and Advanced tab.

        So if I wanted to do an immediate script action in an event in HS3 to set this value for this device what would the syntax be?

        Tried this - &hs.CAPIControlHandler(hs.CAPIGetSingleControl(4378, false, "1", false, false)); - based on the post you pointed me to, but I am shooting in the dark here and this generated a lot of errors that didn't really tell me anything.

        If I can get it working in an event then I can start playing with the scripting. Thanks.

        Click image for larger version

Name:	Screen Shot 2021-05-30 at 11.08.23 AM.png
Views:	33
Size:	106.7 KB
ID:	1477113Click image for larger version

Name:	Screen Shot 2021-05-30 at 11.08.51 AM.png
Views:	15
Size:	113.2 KB
ID:	1477114

        Comment


          #19
          Some observations on the screen shots.
          1. Interface property set to Hubitat so it is a plugin device.
          2. ControlUse is set to not specified. This is typically used in Hubitat plugin for text inputs
          3. ControlType is TextBox. This means that DeviceString and not DeviceValue is being managed. HS is oriented to DeviceValue so not a surprise that this could be problematic. Why are you trying to set the DeviceValue for a device that is expecting a text string?

          Comment


            #20
            I actually started with trying to set the device string.

            temp = hs.SetDeviceString(4378, HS2_source, False)

            Then I tried setting the value, which is when I first posted on this issue.

            temp = hs.SetDeviceValueByRef(4378, HS2_source, True)

            Neither of this independently or together updated the variable in Hubitat.

            All I am trying to do is update with a 1 through 6 in this field to represent the source channel number of the music playing in a particular zone in Homeseer, and have it update in Hubitat.

            Is there a script command that can accomplish this?

            As an aside, I started down this path by trying to simplify things. Instead of creating a device in Hubitat to represent each parameter of the audio settings in a zone - volume, source, now playing, etc. So I created a custom virtual device handler in Hubitat using "off the shelf" components - SayText (Now Playing), SwitchLevel (Volume), Switch (Zone on/off), etc. The idea being that this would be cleaner than creating individual devices in Hubitat for each of these components.

            Thanks.



            Comment


              #21
              Look at post #24 of Add support for Echo Speaks? - HomeSeer Message Board

              This is what I did for workaround due to HS lack of String control event action. In essence the action is two steps. The first is to populate DevcieString with the text. The second is to send any number to the device. This second step will cause Hubitat plugin to be called and it will recognize that it is a text device and use what is in the DeviceString to send to Hubitat.

              Comment

              Working...
              X