No announcement yet.

Assistance creating device

  • Filter
  • Time
  • Show
Clear All
new posts

  • Assistance creating device

    In a script, I'm creating a device successfully.
    However I'm having some trouble defining Value/Status pairs for the device, even manually in the Advanced tab for the device.
    Preferably, I'd like to make the definitions during the device creation phase, in the script, where values 0 to 299 will have a status "Off", and values 300 and above will have a status "On". The device will be "Status Only"
    No matter what however, the Status indicates UNKNOWN, never Off nor On.

    Here's what I have done: (Description, Device and DeviceCode are all defined elsewhere)

    Device = hs.NewDeviceRef(Description)
    Dim dv As Object = hs.GetDeviceByRef(Device)
    dv.Address(hs) = DeviceCode
    dv.Location(hs) = "System"
    dv.Location2(hs) = "Data"
    dv.Status_Support(hs) = True
    DeviceRefArray(DeviceAryPtr) = Device
    DeviceAryPtr = DeviceAryPtr + 1

    Any ideas?
    Real courage is not securing your Wi-Fi network.

  • #2
    It looks like you have set status support but did not set the status of the device


    • #3
      I've been doing that manually up until now, with a manually created device. Even so, it doesn't seem to provide the result I'm looking for.
      Status support was my latest "try" but according to the Help file that only makes the device pollable. Not something I'll need in this case.
      Also, the Help only ever mentions 0 = Off and 100 = On. This may be a relic from the HS2 help but if not, it'd be incompatible with my needs here.
      I have yet to define status pairs within the script, but where these are two ranges it makes things complicated. Single values are easy enough but where the second (On) range is 300 to essentially infinity, that's a lot of pairs.
      Real courage is not securing your Wi-Fi network.


      • #4
        This may provide some help with pairs.