Announcement

Collapse
No announcement yet.

Question about device channel (retrieve possible control options)

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

    Question about device channel (retrieve possible control options)

    Lets say I have a virtual device like the one below with the possible statuses as below.
    Can I retrieve the possible values it can have?
    In the case below: 0, 10, 20 and 30

    I want to be able to cycle thru the options. From 0 to 30 in this case. But for another vd it could be 0 10 20 30 40 50 60 ...
    So I want to build me a script that is a bit universal for this application (lighting).

    All help is as always greatly appreciated.



    Click image for larger version  Name:	crap.png Views:	0 Size:	22.3 KB ID:	1334163Click image for larger version  Name:	crap.png Views:	0 Size:	138.5 KB ID:	1334164 ghgggg Click image for larger version  Name:	crap.png Views:	0 Size:	22.3 KB ID:	1334162

    #2
    I've used something like this:

    Code:
                    Dim ValueStatusPairListing As HomeSeerAPI.VSVGPairs.VSPair() = hs.DeviceVSP_GetAllStatus(HSDev)
                    Dim ValueStatusPairs As HomeSeerAPI.VSPair
    
                    For Each ValueStatusPairs In ValueStatusPairListing
                        If ValueStatusPairs.PairType = 1 Then hs.writelog("VS Pairs",Cstr(ValueStatusPairs.Value))
                    Next
    Change HSDev in the first line to the reference ID of the device. This retrieves simple Status/Values (ValueStatusPairs.PairType = 1) like in your example. If there are other types that include ranges, then those would be ValueStatusPairs.PairType = 2 and need a bit more work to retrieve the range.
    HS 3.0.0.548: 1990 Devices 1172 Events
    Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

    Comment


      #3
      Originally posted by sparkman View Post
      I've used something like this:

      Code:
       Dim ValueStatusPairListing As HomeSeerAPI.VSVGPairs.VSPair() = hs.DeviceVSP_GetAllStatus(HSDev)
      Dim ValueStatusPairs As HomeSeerAPI.VSPair
      
      For Each ValueStatusPairs In ValueStatusPairListing
      If ValueStatusPairs.PairType = 1 Then hs.writelog("VS Pairs",Cstr(ValueStatusPairs.Value))
      Next
      Change HSDev in the first line to the reference ID of the device. This retrieves simple Status/Values (ValueStatusPairs.PairType = 1) like in your example. If there are other types that include ranges, then those would be ValueStatusPairs.PairType = 2 and need a bit more work to retrieve the range.
      Super thx again man!!! That saves me a lot of digging.

      Comment

      Working...
      X