Upon finding a valid plug-in file, HomeSeer will query the plug-in for a series of property values (functions). Regardless of whether the plug-in is configured to be used or licensed, these calls will be made each time HomeSeer enumerates the list of available plug-ins. These procedures should be present, written with error trapping, and should return their result (property value) quickly.
HSCOMPort() as Boolean
Your plug-in should return True if you wish to use HomeSeer's interfaces page of the configuration for the user to enter a serial port number for your plug-in to use. If enabled, HomeSeer will return this COM port number to your plug-in in the InitIR/InitX10/InitIO call. If you wish to have your own configuration UI for the serial port, or if your plug-in does not require a serial port, return False.
Name() as String
Probably one of the most important properties, the Name function in your plug-in is what the plug-in is identified with at all times. The filename of the plug-in is irrelevant other than when HomeSeer is searching for plug-in files, but the Name property is key to many things, including how plug-in created triggers and actions are stored by HomeSeer. If this property is changed from one version of the plug-in to the next, all triggers, actions, and devices created by the plug-in will have to be re-created by the user. Please try to keep the Name property value short, e.g. 14 to 16 characters or less. Web pages, trigger and action forms created by your plug-in can use a longer, more elaborate name if you so desire. In the sample plug-ins, the constant IFACE_NAME is commonly used in the program to return the name of the plug-in.
Capabilities() as Integer
The capabilities are what tell HomeSeer the plug-in type. Constants for these types are as follows:
CA_X10 = 1 (An X-10 Plug-In)
CA_IR = 2 (An Infrared Plug-In)
CA_IO = 4 (An 'Other' Plug-In)
CA_THERM = 16 (A Thermostat Plug-In, which is also an 'Other' type plug-in.)
Two or more of these may be logically OR'd together for plug-ins that provide multiple functionality - for instance, a plug-in that is both an IR and I/O interface would return (CA_IR or CA_IO) which is the value 6.
AccessLevel() as Integer
This determines whether the plug-in is free, or is a licensed plug-in using HomeSeer's licensing service. Return a value of 1 for a free plug-in, a value of 2 indicates that the plug-in is licensed using HomeSeer's licensing.