User Supported Scripts

The HomeSeer message board has a section for scripts that are donated by users.  There are a large variety of scripts available. Visit the message board at the HomeSeer website.

Script Languages

VBScript contains a large number of built-in commands.  If you are new to scripting, get the VBScript documentation from Microsoft.  A tutorial on VBScript is also available.  

If you would rather use JScript (JavaScript) instead of VBScript (or any other supported script language) you can change the language HomeSeer uses by using a different extension with the script filename.  The following scripting engines are supported:

VB.NET Scripts

Scripts may also be written in VB.NET. Scripts written in this language are compiled then executed. The syntax of a VB.NET script follows the same rules as a standard VB.NET application. Consult the event log for compile errors when running your script.

VB.NET scripts differ from VBScript scripts significantly.  In VB.NET, variables must be defined, and they must be given a variable type such as String, Integer, Short, Object, etc.  Also, in VBScript scripts, subs are called without parenthesis, but functions require parenthesis, but in VB.NET this complication was removed and all parameters are enclosed in parenthesis.  As an example:

hs.Speak "This is a test."

Is coded in VB.NET as:

hs.Speak("This is a test.")

Although learning to write VB.NET scripts is more like writing a program than a script, the speed advantages of compiled code may be worth it to you to learn how to do it.  Microsoft does provide a (currently) free development environment called Visual Studio Express which may be used to author VB.NET scripts.

Because Visual Studio Express expects scripts to be a part of a class, and because your script source does not have the references to the HomeSeer system objects, you should create a class project in Visual Studio (call it whatever you like), then in the classname.vb module, type the following and insert your script code where indicated.  This example uses a class name of Class1:

Encrypted Scripts

HomeSeer scripts can be encrypted in two different ways.  They can be encrypted using Microsoft's Script Encoder, or they can be encrypted using HomeSeer's built-in encryption.  You can download Microsoft's script encoder from the Microsoft Script Technologies Downloads page.  

HomeSeer's encryption is done using the HomeSeer Script Encoder (HSSEncoder) tool which is included with the HomeSeer Developer Package (see the HomeSeer website).

Scripts that are encoded using Microsoft's Script Encoder are recognized by HomeSeer as scripts ending in .vbe for Visual Basic Encoded scripts, and .jse for JScript Encoded scripts.

Scripts that are encoded using HomeSeer's encryption are recognized by HomeSeer as scripts ending in .vbh for Visual Basic Scripts, .vben for VB.NET Scripts, and .jsh for JScript scripts.

HomeSeer encryption can also be applied to Active Server Pages (ASP) and their extension for the encrypted version of the page is .ash.