HS4 Scripting Docs
HomeSeer provides access to the hs object for scripts. hs methods and properties are used to interact with the HomeSeer environment.
The hs object is instantiated from the HomeSeer hsapplication class.
In HS3, the hsapplication class provides the same functionality as the HomeSeerAPI.IHSApplication class. Documentation for these HS3 scripting capabilities are found here.
In HS4, additional functionality was introduced that is provided by the HomeSeer.PluginSdk.IHsController class. Documentation of this class can be found here.
In HS4, the hs object (expanded hsapplication class) is a combination of the methods and properties of both HomeSeerAPI.IHSApplication and HomeSeer.PluginSdk.IHsController classes. While in most cases you can use the hs object to reference both sets of functionality, there are a few cases where the same method is defined in both IHSApplication and IHsController creating a conflict. HS4 also makes available the hs4 object that is an instance of the IHsController class.
It is best practice to use the hs object for the original HS3 functionality and the hs4 object for the additional HS4 functions. {if you use tenScripting, you MUST follow this convention}.