Announcement

Collapse
No announcement yet.

Create a virtual device with 4 values.

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

    Create a virtual device with 4 values.

    I want to create a virtual device with 4 values.
    In HS3 I did this by adding lines with New Single Value. In HS4 this does not appear to work.

    How do I do this in HS4?

    #2
    Use the HS3 screens till they get the HS4 issues worked out.


    http://192.168.2.184/deviceutility

    Substitute you HS4 IP.


    Sent from my iPhone using Tapatalk

    Comment


      #3
      In HS4 API use AddGraphicForValue. For example:
      Code:
      Dim ff As HomeSeer.PluginSdk.Devices.FeatureFactory = hsNewFeature("Feature Name")
      Dim sGraphicPath As String = "images/HomeSeer/status/"
      ff.AddGraphicForValue(sGraphicPath & "red.png", 0, "Offline")
      ff.AddGraphicForValue(sGraphicPath & "green.png", 1, "Online")
      ff.AddGraphicForValue(sGraphicPath & "yellow.png", 2, "DontKnow")
      ff.AddGraphicForValue(sGraphicPath & "blue.png", 3, "Oops")Dim fd As HomeSeer.PluginSdk.Devices.NewFeatureData = ff.PrepareForHsDevice(iParentDeviceRef)
      iFeatureChildRef = hs.CreateFeatureForDevice(fd)
      If you are creating controls rather than status then use Add the type of control such as button as shown below

      Code:
      ff.AddButton(0, "Suspend", Nothing, HomeSeer.PluginSdk.Devices.Controls.EControlUse.Off)
      ff.AddButton(1, "Resume", Nothing, HomeSeer.PluginSdk.Devices.Controls.EControlUse.On)
      If you already have the feature created then use hs.AddStatusControlToFeature or hs.AddStatusGraphicToFeature

      Comment


        #4
        Thanks for the responses - got it now :-)

        Comment


          #5
          Have they fixed this yet and I just can't figure it out? Is there some way to actually use the device utility page? It doesn't matter which browser I use I can't get to the whole screen at the top?
          Click image for larger version  Name:	Device.JPG Views:	0 Size:	51.8 KB ID:	1434998

          Comment


            #6
            As srodgers mentioned, use the HS3 page at http://[IPAddress]/deviceutility. Considering the color scheme you seems to be on an HS4 page.

            Comment


              #7
              Thanks! I can get to that screen, but can't get to the top of the places I need to edit??? See the image above. It's hiding behind the top and won't scroll. Chrome/Edge/other browsers all the same.

              Comment


                #8
                Through myHS, this is what I see with /deviceutility. I have not seen the "Legacy" or "Utility" drop downs with HS4. This is in Chrome.

                Comment


                  #9
                  Kevb...I'm guessing it's a plugin causing the issue then. That gives me a place to start looking...thanks!

                  Comment


                    #10
                    Originally posted by ts1234 View Post
                    Kevb...I'm guessing it's a plugin causing the issue then. That gives me a place to start looking...thanks!
                    Make sure you are using '.../deviceutility' not '.../_deviceultility.html' to access the legacy view.

                    With the latter you get the HS4 header menus which obscure the HS3 tabs as per the image you posted.

                    Having said that, whilst the legacy pages are easier to use, I think you can do what the OP asked on the HS4 page now. There are still things missing from the Status Graphics page in HS4 but you can create values and ranges now. It is improving slightly with each release.

                    Steve

                    Comment


                      #11
                      SteveMSJ - THANKS! Solved...You nailed it! What a difference a couple letters make.

                      Comment

                      Working...
                      X