Skip to main content
Skip table of contents


This will retrieve all value/status pair objects (VSPair) from a device which are defined as STATUS or BOTH.

Public Function DeviceVSP_GetAllStatus(ByVal dvRef As IntegerAs VSPair()

MyPair = hs.DeviceVSP_Get(ref)
If MyPair Is Nothing OrElse MyPair.Length < 1 Then
    hs.WriteLog("Error","No pairs are assigned to device " & hs.DeviceName(ref))
    Exit Sub
End If
For Each P As VSPair In MyPair


ref= device reference #

You can check the return value (VSPair object array) to determine if it was successful or not.  If the returned object = Nothing or has a count of zero then there are no status pairs (or both status and control pairs) on the device.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.