Starting with HomeSeer version 2.1.106.0, procedures and objects are available that comprise a new device control API available to ASPX pages, scripts, and plug-ins. The objects used are COM visible, so they can be used by ASP pages, VBS scripts, and COM plug-ins.
The device control API is a stop-gap solution for interfacing with devices while HST works on a more comprehensive device type class model. The object of the device type class model is to provide a way for devices to be self-describing in how they are to be visually rendered, how they are to be controlled, and for as many common device types as we can create that they subscribe to a standard model that enables other applications to use them.
A full device type class implementation will result in plug-ins and scripts that manage devices to have to be updated to support the new system. The device control API provided here does NOT have that same requirement. The device control API is a means for programmers creating alternative interfaces for HomeSeer to be able to obtain status information and control devices, regardless of whether the device was designed to use buttons, status, or values (or a combination) as the main control mechanism.
The device control API works from the premise that HomeSeer always knows how to render a device's status and provide control options on the device status page. If a device does not have device value/status/graphic pairs associated with it, then it gets On/Off buttons. If it is marked as dimmable, it gets a drop down of dim values. If the device has buttons associated with it, the buttons are displayed. If the device has a string value, the string is displayed under the status column, etc.... Using the code that HomeSeer uses, the control API returns a status object for a device, and a collection of control capabilities can be obtained. Codes in the control capability objects tell the user of the API what kind of a control method is used and the data/value that corresponds to it.
All of the procedures of the device control API use the unique device reference number (dv.ref) - it is best to have a good working knowledge of the HomeSeer scripting interface commands that work with the device reference IDs. In most cases, the device enumerator is your friend.
The pages herein describe the API procedures and objects.