HAD Customization: Advanced customization table

From Universal Devices, Inc. Wiki

Custom device table options

  • location: Name for a group of devices. (It does not have any relationship with ISY folders)
  • List:
    • name: Name of the device. Has to match an ISY device name. (Required, unless refreshOpt=="Pgm" or "Var")
    • displayname: Use to override the device name displayed. (Default: name)
    • control: Use to override the device to control. Can be a scene or another device. (Default: name).
    • refreshOpt: Use to control the refresh after a change.
      • "Yes": Update only current item. (Default for devices)
      • "All": Refresh all devices. (Default for scenes)
      • "Pgm": If typeControl=="Pgm", you can use refreshOpt to display the Status of the pgm instead of a device. (Default for programs)
      • "Var": If typeControl=="Pgm", you can have a variable be displayed instead
      • "No": Do not refresh.
    • typeControl: Can be "Dev", "Pgm" or "Var".
    • if typeControl=="Dev", this means this is a device or Scene.
    • if typeControl=="Pgm"
      • program: program name
      • OR programId: ID of the program (If ID is specified, page can load faster)
      • NOTE: The On button will trigger "Then", Off will trigger "Else".
    • if typeControl=="Pgm" and refreshOpt=="Var"
      • variable: Name of variable to display
      • OR
      • varType: 1 for integer, 2 for state
      • varId: Id of the variable (If Type and ID are specified, page can load faster)
    • if typeControl=="Var"
      • variable: Name of variable to control (and display if refreshOpt does not specify otherwise)
      • OR
      • varType: 1 for integer, 2 for state
      • varId: Id of the variable (If Type and ID are specified, page can load faster)
      • varMax: Maximum value allowed for the variable. Default=100
      • varInc: Increment used for the buttons. Default=1
      • varControl: Variable additional control. 0=Disable, 1=Slider, 2=Edit (Future)
      • varSliderSnap: Value set for slider will be a multiple of varSliderSnap, Default=1.
    • hideControls: "Yes", Useful if you want to hide buttons and dimmers.
    • labelOn: Use to override the "On" label with something else
    • labelOff: Use to override the "Off" label with something else


Custom device table examples

var deviceList =  
[			
  {  location: "Standard devices & scenes", 	
     list : [ 
	{ name : "Device1" }, 
	{ name : "Device2" }, 
	{ name : "Device3" },
	{ name : "Thermostat1" },
	{ name : "Thermostat2" },
	{ name : "Scene1" },
	{ name : "Scene2" }
     ]},
  {  location: "Devices & scenes examples", 	
     list : [ 
	{ name : "DeviceControlledByScene1", control:"Scene1" }, // Controls via scene, display a specific device (All the table will be refreshed)
	{ name : "DeviceControlledByScene2", control:"Scene1", refreshOpt:"Yes" }, // Same, but just this device will be refreshed
	{ name : "Device", displayname:"DeviceRenamed" }, // Standard device control and display, but change the displayed name
	{ name : "DeviceStatusOnly", hideControls:"Yes" } // Displays the device status only, but hide buttons and sliders
     ]},
  {  location: "Programs and Vars examples", 	
	list : [ 
	{ name : "Pgm with status", typeControl:"Pgm", program:"testPgm", refreshOpt:"Pgm" }, // Controls "program". Status is the program's status
	{ name : "Pgm custom labels", labelOn:"-1", labelOff:"+1", typeControl:"Pgm", program:"testPgm"  }, // Same, but button labels are changed
	{ name : "Pgm Controls Var", typeControl:"Pgm", program:"testVarPgm", refreshOpt:"Var", variable:"testVar"  }, // Controls "program", but testVar will be displayed
		// Direct variable control example, with slider
	{ name : "DirectVar", labelOn:"-10", labelOff:"+10", typeControl:"Var", refreshOpt:"Var", varType:"1", varId:"2", varInc:"10", varMax:"500", varSliderSnap:"10" }							
      ]}
];