Announcement

Collapse
No announcement yet.

Device List Pruning

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

  • tenholde
    replied
    You can determine all of the actions defined for a device by using the hs.CAPIGetControl method. Look in the HS help file for details.

    Let me know if you need sample code.

    tenholde

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Device List Pruning

    Device List Pruning

    Hey Everybody looking for some advise on my script

    I am currently using hs.GetDeviceEnumerator to loop through all homeseer devices. I want to display on a webpage just a subset of the complete list of devices.

    In specific I want to only display devices that can be turned On, Off or Dimmed.

    I.E I only want to populate it with things that have an on off switch or are dimmers. I want to hide anything not in this sub category such as itunes current track name and things of that nature.

    I think I can use the 'can_dim' property in the device class to detect dimmers.
    But I do not know how to differentiate On/Off only devices from everything else.
    I tried the

    misc
    "&h10000 = If set, this device will only allow ON and OFF actions in the event properties"

    and I also tried looking at the "buttons" and "values" but none seem to consistently work.

    Does anyone know how to go about doing this?
Working...
X