HAD Customization: Guidelines

From Universal Devices, Inc. Wiki
Jump to: navigation, search

Customizations should be as much as possible be done in index.htm or custom.js.

index.htm

This is HAD's home page.

This is where your custom device table should be located. You can create as many tables as you like. Feel free to customize everything. In normal circumstances, you can easily upgrade HAD as it should not touch much index.htm.

custom.js

This is where you should put your custom javascript options.

There are several options at the top that you can set to your taste.

If possible, disable as many of the following options as possible. This will help reduce the time required to load a page.

var loadVar1Defs = 1; // Set to 1 if some integer variable names are used in a custom table, or if using generic var table. Set to 0 for better performance.
var loadVar2Defs = 1; // Set to 1 if some state variable names are used in a custom table, or if using generic var table. Set to 0 for better performance.
var loadVar1Data = 1; // Set to 1 to load integer variable data and run UDFvarDataLoaded. 
var loadVar2Data = 1; // Set to 1 to load state variable data and run UDFvarDataLoaded. 
var loadPgms = 1; // Set to 1 if some program names are used in a custom table, or if using generic pgm table. Set to 0 for better performance. (Will not run UDFpgmLoaded)

Note on HAD edition

Please note that HAD has 2 editions. The first one is called the firmware edition, and as it's name suggests, it is the one supplied in the ISY firmware. It comes with UDAjax and a redirector which allows the user to switch between these 2 UI's. In that version, index.htm is actually a redirector that points to had.htm, or udajax.htm, based on a cookie. The developer edition, which is available for download, does not come with UDAjax and the home page is index.htm.