Announcement

Collapse
No announcement yet.

HSTouch friendly plugins

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

  • HSTouch friendly plugins

    Are there any directions or guidance to making a plugin HSTouch friendly. I cant seem to make a button toggle my device. I have values of 0 for off and 1 for on with a bunch of other values that represent other things, however I cant get toggle device or display status to work in HSTouch.
    If it ain't broke, don't fix it!

  • #2
    The toggle option in HSTouch will come up when you have a set of VSPairs one with the .ControlUse property set to On and another set to Off. HSTouch does the toggle magic behind the scenes. I've never seen a guide I am afraid...
    My Plugins:

    Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
    Yeelight 3P | Nanoleaf 3P

    Comment


    • #3
      For whatever reason this doesn't seem to work.

      Code:
       ' add an Off button and value
                              Dim Pair As VSPair
                              Pair = New VSPair(HomeSeerAPI.ePairStatusControl.Both)
                              Pair.PairType = VSVGPairType.SingleValue
                              Pair.Value = 0
                              Pair.Status = "Power Off"
                              Pair.Render = Enums.CAPIControlType.Button
                              Pair.Render_Location.Row = 2
                              Pair.Render_Location.Column = 1
                              Pair.ControlUse = ePairControlUse._Off            ' set this for UI apps like HSTouch so they know this is for OFF
                              hs.DeviceVSP_AddPair(ref, Pair)
                              GPair = New VGPair
                              GPair.PairType = VSVGPairType.SingleValue
                              GPair.Set_Value = 0
                              GPair.Graphic = "/images/HomeSeer/status/off.gif"
                              hs.DeviceVGP_AddPair(ref, GPair)
      
                              ' add an On button and value
                              Pair = New VSPair(HomeSeerAPI.ePairStatusControl.Both)
                              Pair.PairType = VSVGPairType.SingleValue
                              Pair.Value = 1
                              Pair.Status = "Power On"
                              Pair.ControlUse = ePairControlUse._On            ' set this for UI apps like HSTouch so they know this is for lighting control ON
                              Pair.Render = Enums.CAPIControlType.Button
                              Pair.Render_Location.Row = 2
                              Pair.Render_Location.Column = 2
                              hs.DeviceVSP_AddPair(ref, Pair)
                              GPair = New VGPair
                              GPair.PairType = VSVGPairType.SingleValue
                              GPair.Set_Value = 1
                              GPair.Graphic = "/images/HomeSeer/status/on.gif"
                              hs.DeviceVGP_AddPair(ref, GPair)
      If it ain't broke, don't fix it!

      Comment


      • #4
        Will have to pass on that one then unfortunately as it should work, http://board.homeseer.com/showpost.p...6&postcount=30 explains it. As that post also eludes to, you could create your own Toggle button in the device also.
        My Plugins:

        Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
        Yeelight 3P | Nanoleaf 3P

        Comment


        • #5
          I had the same issue for my plugin too before. The toggle option in HSTouch only came when the status description hold "On" or "Off". "Power Off" would not work for me.

          Wim
          -- Wim

          Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
          650 devices ---- 336 events ----- 40 scripts

          Comment


          • #6
            Good Information guys!

            I added the following to my device creation and it calls setIOMulti with my value, So I will probably have to write my own little toggle function but that sounds pretty easy. Both 9000 toggle On/Off and 9001 Toggle Power On/Off show up in the hstouch designer, so I could probably add as many toggle commands as I want named whatever I choose.

            Code:
            'add a toggle vs pair
                                    Pair = New VSPair(ePairStatusControl.Both)
                                    Pair.PairType = VSVGPairType.SingleValue
                                    Pair.Value = 9001
                                    Pair.Status = "Toggle Power On/Off"
                                    Pair.ControlUse = ePairControlUse.Not_Specified
                                    hs.DeviceVSP_AddPair(ref, Pair)
            If it ain't broke, don't fix it!

            Comment

            Working...
            X