Package: Thermostat Class Example

Author: HCA Central
Version: 2
Added to Library: 10-Nov-23
HCAVersion needed: 17
Keywords: Example

Package Description:
Example class for a thermostat. You can use this class as the framework for building your own thermostat class that communicates with real hardware.

Program: Change Setpoint

Program Description:
Uses the thermostat programmer Thermostat element to change the setpoint on the test thermostat.

Program: Class Implementation

Program Description:
Example of thermostat class. Doesn't communicate with any actual hardware but shows the handling of the various codes.

To make this a useful example, any change to the thermostat state is saved in tags on the thermostat object. This allows you to do things like right-click on the device and pick "thermostat" from the popup menu to set and change state. By having the log enabled you can see how HCA uses the class to carry out operations on a thermostat.

Example:
This program is not used directly but invoked by HCA to handle operations on a thermostat device of this class.

Parameters:

Name Type Description Default
DeviceName Value HCA Name of the thermostat device  
DeviceId Value What is on the User Class Object tab of the device. This is class specific and is used by the implementation to identify the thermostat.  
Code Value Operation code  
Data Value Operation data  

Program: Get Thermostat data

Program Description:
Uses the _GetThermostat function in a program to get the setpoints and temperature from the test thermostat