This function gives direct access to thermostats. Thermostats are supported with special .THM scripts. The command parameter is the entry function that is called. The functions available are:
GetTemp
= Returns the current temperature
GetSetPoint = Returns the current heat set point
GetFan = Returns the Fan mode (0=off, 1=on)
GetMode = Returns the operating mode (0=off, 1=heat, 2=cool, 3=auto)
SetSetPoint = Sets the current heat set point
SetFan = Sets the current fan mode
SetMode = Sets the current operation mode
SetCoolSetPoint = Sets the current cool set point (if supported
by the thermostat)
Parameter: device
Type: string
Description: This is the device code
of the thermostat, such as "J1". The
device code is set when the device
is created.
Return value: command
Type: string
Description: This is the thermostat
command, such as GetTemp.
Return value: value
Type: value
Description: This is the value to set if setting the temperature, mode,
or fan.
' get the current temperature
dim temp
temp = hs.ControlThermostat("J1","GetTemp",0)
' set the set point to 72 degrees
hs.ControlThermostat
"J1","SetSetPoint",72