tenWare Software

tenScripting HomeSeer Script Development for HS3

 

This program requires HomeSeer 3.0 or later (including HS4). The legacy version for HS2 can be found here

While tenScripting3 will run on either HS3 or HS4, there is an upgraded tenScripting4 that will only run on HS4 and includes additional features tailored for an HS4 environment.

One of the most powerful features of the HomeSeer product is the ability to write scripts to control the home automation environment.  Since version 2.0, HomeSeer has been based upon the Microsoft .NET Framework.  Scripts and plug-ins can now be developed using VB.NET or CSHARP.NET instead of the vBasic scripting language. 

Developing even very simple HomeSeer scripts can be frustrating and time consuming because the only way of testing the scripts as they are developed has been to copy them to the HomeSeer Script folder and then try running them.  Only then is the syntax checked, and errors written to the HomeSeer log.  You must continually update, run, and check the log until the script finally runs with no syntax errors.  This does not mean the script actually worked, however, as you then must find all logic errors in the script.  This usually requires including code within your script to display message boxes or write records to the HomeSeer log to help determine how the script is executing and to see how variable values are changing.  Developing serious scripts is daunting even for experienced programmers.

The tenScripting development environment significantly improves on this process by utilizing Microsoft's Visual Studio development products (including the FREE MS Visual Studio 2019 Community Edition).  Scripts can be created using the Visual Editor that provides:

 Dynamic formatting (indents code blocks; displays keywords, literals, values in different colors)

 Dynamic checking of VB and C# syntax while entering each statement

Intellisense for all .NET classes and all HomeSeer classes.  This makes entering HomeSeer function calls much easier providing auto-completion and drop-down lists of properties and methods.

Built-in Object Browser that displays all HomeSeer classes, methods, and properties

Once the script has been entered (or imported from the HS scripts folder) and all syntax errors corrected, it can then be executed in the development environment that provides:

Ability to set break-points in the script code without modifying the code itself

Ability to monitor/display the values of all script variables when a break-point is reached

Ability to single-step through the script, one statement at a time

The tenScripting development environment does not have to be on the same PC as your HomeSeer server.  Typically, it is NOT.  While your script is running in the tenScripting environment, all HomeSeer scripting functions are available.

Once your script is working correctly, ONLY THEN do you export it into your HomeSeer Script directory for production use.

tenScripting has been tested using the following Microsoft Development environments:

MS Visual Studio 2005
MS Visual Web Developer 2005
MS Visual Studio 2005 Express Edition
MS Visual Web Developer 2005 Express Edition
MS Visual Studio 2008
MS Visual Web Developer 2008
MS Visual Basic 2008 Express Edition
MS Visual Web Developer 2008 Express Edition
MS Visual Studio 2017 Community Edition
MS Visual Studio 2019 Community Edition Preview

 If you do not have one of these products installed, you can download and install the FREE Visual Basic 2019Community Edition from Microsoft (see video).  tenScripting is also distributed free of charge.

 

An example of the tenScripting program window:

tenScripting window

While the tenScripting product greatly simplifies the process of coding and testing HS scripts, it is even more powerful when used in conjunction with two programming utilities, tenHsEvents and tenScriptAid.  Watch the following video to see how to greatly enhance HS script creation: