Click or drag to resize

ChvTstatex Class

Class used for CHV-TSTATEX thermostats. The CHV-TSTATEX is a wireless thermostat featuring infiNET EX® technology.
Inheritance Hierarchy

Namespace: Crestron.SimplSharpPro.Thermostats
Assembly: Crestron.SimplSharpPro.Thermostats (in Crestron.SimplSharpPro.Thermostats.dll) Version: 2.21.121
Syntax
C#
public sealed class ChvTstatex : RFThermostat

The ChvTstatex type exposes the following members.

Constructors
 NameDescription
Public methodChvTstatex Constructor to generate a new CHV-TSTATEX that is attached to the specified RF gateway.
Top
Properties
 NameDescription
Public propertyAuto1ptSetpoint Sets the auto1pt setpoint, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius). The displayed value is rounded to whole or half degrees based on the setting.
(Inherited from Thermostat)
Public propertyAuto1ptSetpointFeedback Reports the active auto1pt setpoint value. This output should be connected to the corresponding setpoint input; otherwise the output will not report the setpoint value.

The BaseEvent event will trigger with Auto1ptSetpointFeedbackEventId.


(Inherited from Thermostat)
Public propertyAutoAsSingleSetpointFeedback Indicates that single-setpoint auto mode is enabled (the "s" option for auto mode has been selected in the Setup menu). The output remains true for as long as single-setpoint auto mode is active.
(Inherited from RFThermostat)
Public propertyAutoDeadbandFeedback Reports the auto deadband value selected via the "db" option in the Setup menu, where 1d = 0.1 degrees. In dual-setpoint auto mode, this value is the minimum separation between heat and cool setpoints, which prevents the system from toggling back and forth due to overshoot. In single-setpoint auto mode, this value sets the hysteresis used when changing from heat to cool. For example, if the setpoint is 70°F with auto deadband of 2 degrees, the temperature would have to rise to 72°F before running cool, and 68°F before running heat. HZ-THSTAT reports auto mode deadband parameter in 10ths of current unit: Fahrenheit : 20, 30, 40, 50, 60 (F). Celsius : 10, 20, 30 (C).

The BaseEvent event will trigger with AutoDeadbandFeedbackEventId.


(Inherited from Thermostat)
Public propertyAutoModeEnabledFeedback Indicates that the auto mode has been enabled. The output remains true for as long as the mode is enabled. Note that this output only indicates that the unit has been configured to support the corresponding mode; it does not indicate whether or not the unit is actively in that mode.
(Inherited from RFThermostat)
Public propertyAuxHeatAvailableFeedback Indicates that the system is capable of running an auxiliary heat system (heat pump systems only). The output remains true for as long as the system supports auxiliary heat.
(Inherited from RFThermostat)
Public propertyAuxHeatCallFeedbacks Collection of AuxHeatCall feedbacks. Each feedback indicates if the system is calling for auxiliary heat. Remains true for as long as the emergency heat system is running.
Public propertyBatteryState Returns the current battery state.
(Inherited from RFThermostat)
Public propertyConnectedIpList A property containing the list of the ConnectedIpInformation objects which contain information about the devices that are connected to this IP ID. This property is only valid for an ethernet device. If this is not an ethernet device, then this property will return null. If this is an ethernet device, the list will be non-null. It will be empty if no devices are connected. The order of items in this list is not guaranteed.
(Inherited from GenericDevice)
Public propertyCoolCallFeedbacks Returns a collection of components that indicate when the system is calling for cooling.

The ClimateControlComponentCallChange event will trigger with ClimateControlComponent object.


(Inherited from Thermostat)
Public propertyCoolModeEnabledFeedback Indicates that the cool mode has been enabled. The output remains true for as long as the mode is enabled. Note that this output only indicates that the unit has been configured to support the corresponding mode; it does not indicate whether or not the unit is actively in that mode.
(Inherited from RFThermostat)
Public propertyCoolSetpoint Sets the cool setpoint, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius). The displayed value is rounded to whole or half degrees based on the setting.
(Inherited from Thermostat)
Public propertyCoolSetpointFeedback Reports the active cool setpoint value. This output should be connected to the corresponding setpoint input; otherwise the output will not report the setpoint value.

The BaseEvent event will trigger with CoolSetpointFeedbackEventId.


(Inherited from Thermostat)
Public propertyCode exampleDescription Get/Set the description of this device.
(Inherited from GenericBase)
Public propertyDisableBacklight Disables the backlight from turning on under any condition, for as long as the input is true. This can be used to extend battery life.
(Inherited from RFThermostat)
Public propertyDisplayUnit Reports the current temperature format.
(Inherited from RFThermostat)
Public propertyDisplayUnitFeedback Reports the current temperature format.
(Inherited from RFThermostat)
Public propertyDisposed Property to indicate if the device has been disposed.
(Inherited from GenericDevice)
Public propertyEnableSensorOutputs Enables temperature reporting on Slot 01 for the Local Remote 1 and Remote 2 sensors.
(Inherited from RFThermostat)
Public propertyFanCall Indicates that the fan is running (for any reason). Remains true for as long as the fan is running.
Public propertyFanMode Sets the fan mode.
(Inherited from RFThermostat)
Public propertyFanModeFeedback Reports the current fan mode.
(Inherited from RFThermostat)
Public propertyHeatCallFeedbacks Returns a collection of components that indicate when the system is calling for heat.

The ClimateControlComponentCallChange event will trigger with ClimateControlComponent object.


(Inherited from Thermostat)
Public propertyHeatModeEnabledFeedback Indicates that the heat mode has been enabled. The output remains true for as long as the mode is enabled. Note that this output only indicates that the unit has been configured to support the corresponding mode; it does not indicate whether or not the unit is actively in that mode.
(Inherited from RFThermostat)
Public propertyHeatSetpoint Sets the heat setpoint, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius). The displayed value is rounded to whole or half degrees based on the setting.
(Inherited from Thermostat)
Public propertyHeatSetpointFeedback Reports the active heat setpoint value. This output should be connected to the corresponding setpoint input; otherwise the output will not report the setpoint value.

The BaseEvent event will trigger with HeatSetpointFeedbackEventId.


(Inherited from Thermostat)
Public propertyHoldMode Sets the hold mode as follows: 1d = Hold mode ON 2d = Hold mode OFF (Run mode ON) When hold mode is active, the setpoint can be manually adjusted, either locally or via the Simpl#Pro program. All scheduled setpoints are ignored until the unit is taken out of hold mode. When the hold state changes from Hold (1d) to Run (2d), the unit will recall the last scheduled setpoint.
(Inherited from RFThermostat)
Public propertyHoldModeFeedback Reports the current hold mode.
(Inherited from RFThermostat)
Public propertyID Property to get the ID of the device.
(Inherited from GenericDevice)
Public propertyIsOnline Property to get the current online state of the device.
(Inherited from GenericDevice)
Public propertyLocalTemperatureFeedback Reports the local temperature reported by the Local sensor. Only enabled when EnableSensorOutputs is enabled. This property is supported by "HZThstat" not supported by "DinThstat".

The TemperatureChange event will trigger with temperatureType and newTemperature.


(Inherited from Thermostat)
Public propertyMaxAuto1ptSetpointFeedback Reports the maximum allowable single-point auto setpoint that the system supports, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius), as reported by DisplayUnitFeedback.
(Inherited from RFThermostat)
Public propertyMaxCoolSetpointFeedback Reports the maximum allowable cool that the system supports, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius), as reported by DisplayUnitFeedback.
(Inherited from RFThermostat)
Public propertyMaxHeatSetpointFeedback Reports the maximum allowable heat that the system supports, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius), as reported by DisplayUnitFeedback.
(Inherited from RFThermostat)
Public propertyMinAuto1ptSetpointFeedback Reports the minimum allowable single-point auto setpoint that the system supports, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius), as reported by DisplayUnitFeedback.
(Inherited from RFThermostat)
Public propertyMinCoolSetpointFeedback Reports the minimum allowable cool that the system supports, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius), as reported by DisplayUnitFeedback.
(Inherited from RFThermostat)
Public propertyMinHeatSetpointFeedback Reports the minimum allowable heat that the system supports, where 1d = 0.1 degrees. The value is based on the current temperature scale (Fahrenheit or Celsius), as reported by DisplayUnitFeedback.
(Inherited from RFThermostat)
Public propertyName Get the name of this device.
(Inherited from GenericBase)
Public propertyOutdoorTemperatureFeedback Sends the current outdoor temperature to the thermostat. This input should only be used for heatpump/dual fuel balance point systems, not heat/cool system types. The value should be sent in tenths of a degree (1d = 0.1 degrees) based on the current temperature scale (Fahrenheit or Celsius). For example, if the outdoor temperature is 45.3°F, the value should be 453.

The TemperatureChange event will trigger with temperatureType and newTemperature.


(Inherited from Thermostat)
Public propertyOutdoorTemperatureInput Sends the current outdoor temperature to the thermostat. This input should only be used for heatpump/dual fuel balance point systems, not heat/cool system types. The value should be sent in tenths of a degree (1d = 0.1 degrees) based on the current temperature scale (Fahrenheit or Celsius). For example, if the outdoor temperature is 45.3°F, the value should be 453d.
(Inherited from Thermostat)
Public propertyParent The parent that a given object was added to.
(Inherited from GenericBase)
Public propertyRegisterable Property to indicate that this device can be registered.
(Inherited from GenericDevice)
Public propertyRegistered Property to get the current registration state of the device.
(Inherited from GenericDevice)
Public propertyRegistrationFailureReason Property to get the Registration Failure Reason, this will match the return value from the call to register.
(Inherited from GenericDevice)
Public propertyRegulationTemperatureFeedback Reports displayed temperature, which can be the Local temperature or the Remote 1 temperature, or the average of Local and Remote 1, based on the option selected in the Setup menu (Local = i; Remote 1 = r; Average = ir).

The TemperatureChange event will trigger with temperatureType and newTemperature.


(Inherited from Thermostat)
Public propertyRemote1TemperatureFeedback Reports the temperature reported by the Remote 1 sensor. Only enabled when EnableSensorOutputs is enabled.

The TemperatureChange event will trigger with temperatureType and newTemperature.


(Inherited from Thermostat)
Public propertyRemote2TemperatureFeedback Reports the local temperature reported by the Remote 2 sensor. Only enabled when EnableSensorOutputs is enabled.

The TemperatureChange event will trigger with temperatureType and newTemperature.


(Inherited from Thermostat)
Public propertySensorConfigurationFeedback 16-bit analog value that reports sensor configuration information, as follows: bits 15 and 14: 2-bit version code, currently 00 bits 13 and 12: Reserved bit 11: RS2 temperature data valid (1) or invalid (0) bit 10: RS1 temperature data valid (1) or invalid (0) bit 9: Local temperature valid (1) or invalid (0) bit 8: RS2 sensor type digital (0) or analog/NTC (1) bit 7: RS1 sensor type digital (0) or analog/NTC (1) bit 6: Local sensor type digital (0) or analog/NTC (1) bits 5 and 4: RS2 usage code (see below) bits 3 and 2: RS1 usage code bits 1 and 0: Local usage code Usage code 00: Not used/averaged 01: For regulation temperature 10: For outdoor temperature 11: For specific sensing (i.e., FCU changeover)
(Inherited from RFThermostat)
Public propertySetpointsSchedule Returns a ScheduledSetpoints object that has all of the thermostats scheduled setpoints cues.
(Inherited from RFThermostat)
Protected propertySIMPLDeviceImplementation Internal protected member used for actual device control.
(Inherited from GenericDevice)
Public propertySystemConfigurationFeedback For internal Crestron use only.
(Inherited from RFThermostat)
Public propertySystemMode Sets the system mode, as follows: When the system mode changes the unit will recall the last scheduled setpoint for that new mode. This output should be connected to the HoldMode input; otherwise the output it will not track the value of HoldMode.
(Inherited from RFThermostat)
Public propertySystemModeFeedback Reports the current system mode.
(Inherited from RFThermostat)
Public propertyType Property to determine to type of device this is.
(Inherited from GenericDevice)
Public propertyUnRegistrationFailureReason Property to get the Unregistration Failure Reason, this will match the return value from the call to unregister.
(Inherited from GenericDevice)
Public propertyUserSpecifiedObject Can be assigned anything that user wants.
(Inherited from GenericBase)
Protected propertyXioEndpointStubSIMPLDevice The SIMPL "stub" Device that the XiO Director creates for an endpoint to send the 1C/0E to the correct place in hierarchy.
(Inherited from GenericDevice)
Top
Methods
 NameDescription
Protected method_CurrentSystemStateSlot_CueChange Method that handles CurrentSystemState slot events.
(Overrides Thermostat_CurrentSystemStateSlot_CueChange(CrestronDeviceWithEvents, SigEventArgs))
Protected method_HeatCoolControlSlot_CueChange Subscription to the Heat Cool Control slot.
(Inherited from RFThermostat)
Protected method_SystemConfigurationSlot_CueChange Method that handles the SystemConfiguration slot events.
(Overrides Thermostat_SystemConfigurationSlot_CueChange(CrestronDeviceWithEvents, SigEventArgs))
Public methodDispose Clean up of resources.
(Inherited from GenericBase)
Protected methodDispose(Boolean) Method to perform the actual disposing of the device.
(Inherited from GenericDevice)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Destructor of the device.
(Inherited from GenericDevice)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodInitializeDevice Method used to initialize RF thermostats.
(Inherited from RFThermostat)
Protected methodInitializeScheduleSetpoints Method used to initialize schedule setpoints objects.
(Inherited from RFThermostat)
Protected methodOnBaseEvent(Int32) Protected member used to fire the BaseEvent with the default extended information.
(Inherited from GenericBase)
Protected methodOnBaseEvent(Int32, UInt16) Protected member used to fine the BaseEvent with extended event information.
(Inherited from GenericBase)
Protected methodOnBatteryEvent Method to fire the battery change event.
(Inherited from RFThermostat)
Protected methodOnClimateControlComponentEvent Method to fire the climate control component change event.
(Inherited from Thermostat)
Protected methodOnFanCallEvent Method to fire the fan event.
(Inherited from Thermostat)
Protected methodOnTemperatureChange Method to fire the temperature change event.
(Inherited from Thermostat)
Public methodRegister Register this device with the system.
(Inherited from GenericDevice)
Public methodToString Return the name of the device.
(Inherited from GenericDevice)
Public methodUnRegister Unregister this device with the system. This function can not be called from the device's own SigChange event handler.

On successful unregistration, if this device supports the OnlineStatusChange event, it will trigger indicating the device when offline.


(Inherited from GenericDevice)
Top
Events
 NameDescription
Public eventBaseEvent Generic base event, triggered when the there are no other handlers available for a specific EventID.
(Inherited from GenericBase)
Public eventBatteryEvent Event fired when a battery state change was received from the device.
(Inherited from RFThermostat)
Public eventClimateControlComponentCallChange Event fired when a climate component change was received from the device.
(Inherited from Thermostat)
Public eventFanCallChange Event fired when a fan change was received from the device.
(Inherited from Thermostat)
Public eventIpInformationChange Event that tells what IP Address is connected/disconnected from an IP ID for a non-UDP device. This is only valid for an Ethernet device. An exception will be thrown if it is not.
(Inherited from GenericDevice)
Public eventOnlineStatusChange Event triggered when the Online status of the device changes.
(Inherited from GenericDevice)
Public eventTemperatureChange Event fired when a temperature change was received from the device.
(Inherited from Thermostat)
Top
Fields
 NameDescription
Protected field_CoolCallFeedbacks Returns a collection of components that indicate when the system is calling for cooling.
(Inherited from Thermostat)
Protected field_CurrentSystemStateSlot Current system state slot device.
(Inherited from Thermostat)
Protected field_HeatCallFeedbacks A collection of components that indicate when the system is calling for heat.
(Inherited from Thermostat)
Protected field_HeatCoolControlSlot Heat/cool control slot device.
(Inherited from Thermostat)
Protected field_SystemConfigurationSlot System configuration slot device.
(Inherited from Thermostat)
Top
Example
C#
public static class ChvTstat_Example


private static CenRfgwEx _rfGateway; //CHANGE TO WHATEVER GATEWAY YOU ARE USING.
private static ChvTstatex _therm;


// Helper function to initialize the RF thermostat object and set up all initial values
// for the RFThermostat.
// IMPORTANT: Register your rfGateway after you initialize all your object and object attributes. 
// Can lead to issues with device registration if not done correctly.
// You can call this function in your InitializeDevice function within your program 
// and pass your global objects into this function to initialize your RFThermostat. 
public static bool InitializeDevice(ControlSystem controller)
{
    bool returnValue = false;

    try
    {
        // If the control system does not support Ethernet, then we cannot connect to the gateway. So we return.
        if (!controller.SupportsEthernet)
            return returnValue; 

        // If the controller is null then also return right away.
        if (controller == null)
            return returnValue;


        // Create a new object for the rfGateway connected to the Control System. ->(this)
        // Device is connected the control system by an IP_ID. 
        // In this example we bind it to IP_ID 4.
        // However, yours can be on another so feel free to change this value. 
        // The second parameter, "this" is referring to the ControlSystem class that extends the CrestronControlSystem.
        // If you are not within the scope of such a class, make sure you have access to it. 
        _rfGateway = new CenRfgwEx(0x04, controller);

        // Initialize your thermostat object with it's rf_id and RF-Gateway device.
        _therm = new ChvTstatex(0x03, rfGateway);


        // Assign the dimmer, and rfGateway a description.
        // These descriptions will be used within the IP table constructed by the program on the control system.
        _rfGateway.Description = "GWEXER Main";

        // Set a description for your device.
        _therm.Description = "Kitchen thermostat";

        // Allow the device to output sensor data about itself.
        _therm.EnableSensorOutputs.BoolValue = true;

        // Set up event listeners for the thermostat.
        EventHandlerInitialization();

        // Register the gateway device to the RMC3 controller.
        if (_rfGateway.Register() != eDeviceRegistrationUnRegistrationResponse.Success)
        {
            ErrorLog.Error("rf-Gateway cannot be registered: {0}", rfGateway.RegistrationFailureReason.ToString());
        }
        else
        {
            // If rfGateway registration goes successfully then we can return successfully.
                returnValue = true;
        }

    }
    catch (Exception e)
    {
        // If anything has an issue, this exception will trigger and be logged within the device's error log.
        ErrorLog.Error("Error Registering RF Devices: {0}", e.Message.ToString());

        // Mark our return value for failure.
        returnValue = false;
       }
    // Finally return an indication of the success of the function execution.
    return returnValue;
}


// Helper to initialize all thermostat event handlers.
private static void EventHandlerInitialization()
{
    // Check if the gateway is null first.
    if(_rfGateway == null){
        ErrorLog.Error("Could not set up Gateway event handlers, object is null");
        throw new NullReferenceException();
        return;
    }

    // Listen for a change in the rfGateway's online status.
    _rfGateway.OnlineStatusChange += new OnlineStatusChangeEventHandler(OnlineStatusChange);

    // Online status change event handler.
    _therm.OnlineStatusChange += new OnlineStatusChangeEventHandler(Device_OnlineStatusChange);

    // Listen for any temp changes from the thermostat.
    _therm.TemperatureChange += new TemperatureChangeHandler(therm_TemperatureChange);

    // Climate control event handler.
    _therm.ClimateControlComponentCallChange += new ClimateControlComponentCallChangeHandler(therm_ClimateControlComponentCallChange);
}

// Sets the thermostat's mode to cooling. 
public static void SetThermostatCool()
{
    _therm.SystemMode = eSystemMode.Cool;
}

// Sets the thermostat's mode to heating.
public static void SetThermostatHeat()
{
    _therm.SystemMode = eSystemMode.Heat;
}

// Sets the thermostat's mode to off.
public static void SetThermostatOff()
{
    _therm.SystemMode = eSystemMode.Off;
}

// Raises the temperature point for whatever mode the thermostat is in currently.
public static void RaiseSetPoint(short temp)
{
    if (_therm.SystemModeFeedback == eSystemMode.Cool)
    {
        // Check to ensure we are below the max heat temp.
        if (_therm.MaxCoolSetpointFeedback.ShortValue > _therm.CoolSetpointFeedback.ShortValue)
        {
            _therm.CoolSetpoint.ShortValue += temp;
           }
        else
        {
            ErrorLog.Notice("Could not raise temp.");
        }
    }
    else if (therm.SystemModeFeedback == eSystemMode.Heat)
    {
        // Check to ensure we are below the max cool temp.
        if (_therm.MaxHeatSetpointFeedback.ShortValue > _therm.HeatSetpointFeedback.ShortValue)
        {
            therm.HeatSetpoint.ShortValue += temp;
        }
        else
        {
            ErrorLog.Notice("Could not raise temp.");
        }
    }
}

// Lowers the temperature point for whatever mode the thermostat is in currently.
public static void LowerSetPoint(short temp)
{
    if (_therm.SystemModeFeedback == eSystemMode.Cool)
    {
        //Check to ensure we are below the max heat temp.
        if (_therm.CoolSetpointFeedback.UShortValue > therm.MinCoolSetpointFeedback.UShortValue)
        {
            therm.CoolSetpoint.ShortValue -= temp;
        }
        else
        {
            ErrorLog.Notice("Could not lower temp.");
        }
        }
    else if (_therm.SystemModeFeedback == eSystemMode.Heat)
    {
        // Check to ensure we are below the max cool temp.
        if (_therm.HeatSetpointFeedback.UShortValue > _therm.MinHeatSetpointFeedback.UShortValue)
        {
            therm.HeatSetpoint.ShortValue -= temp;
        }
        else
        {
            ErrorLog.Notice("Could not lower temp.");
        }
    }
}

// Sets the temperature point for AutoP1.
public static void AutoP1SetPoint(ushort temp)
{
    _therm.Auto1ptSetpoint.UShortValue = temp;
}

// Event handler for all online status changes.
//When a device goes online or offline this event handler will listen for it.
private static void Device_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
{
    if (args.DeviceOnLine)
        ErrorLog.Notice("{0} is online", currentDevice.Description);
    else
        ErrorLog.Notice("{0} is offline", currentDevice.Description);
}

// Handles all temp change events coming from the device. 
private static void therm_TemperatureChange(Thermostat paramThermostat, TemperatureEventArgs paramTemperatureEventArgs)
{
    ErrorLog.Notice("New temperature: {0}", paramTemperatureEventArgs.newTemperature);
}

//Handles all climate control component event changes coming from the device.
private static void therm_ClimateControlComponentCallChange(Thermostat paramThermostat, ClimateControlCallEventArgs paramClimateControlCallEventArgs)
{
    ErrorLog.Notice("Current therm state: {0}", paramClimateControlCallEventArgs.ClimateControlComponent.ComponentState.ToString());
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also