upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Types | Public Member Functions

UPM API for Trane TZEMT400 Z-Wave Thermostat. More...

Detailed Description

This module allows for monitoring certain elements of a Trane TZEMT400 Z-Wave Thermostat. It was tested with a Trane TZEMT400BB32MAA variant.

string defaultDev = "/dev/ttyACM0";
// if an argument was specified, use it as the device instead
if (argc > 1)
defaultDev = string(argv[1]);
// Instantiate a TZEMT400 instance, on device node 13. You will
// almost certainly need to change this to reflect your own network.
// Use the ozwdump example to see what nodes are available.
upm::TZEMT400 sensor(13);
// The first thing to do is create options, then lock them when done.
sensor.optionsCreate();
sensor.optionsLock();
// Next, initialize it.
cout << "Initializing, this may take awhile depending on your ZWave network" << endl;
sensor.init(defaultDev);
cout << "Initialization complete" << endl;
cout << "Querying data..." << endl;
while (shouldRun) {
sensor.update();
// we show both C and F for temperatures
cout << "Temperature: " << sensor.getTemperature() << " C / " << sensor.getTemperature(true)
<< " F" << endl;
cout << "Mode: " << sensor.getMode() << endl;
cout << "Operating State: " << sensor.getOperatingState() << endl;
cout << "Heating Point: " << sensor.getHeatingPointTemperature() << " C / "
<< sensor.getHeatingPointTemperature(true) << " F" << endl;
cout << "Cooling Point: " << sensor.getCoolingPointTemperature() << " C / "
<< sensor.getCoolingPointTemperature(true) << " F" << endl;
cout << "Fan Mode: " << sensor.getFanMode() << endl;
cout << "Fan State: " << sensor.getFanState() << endl;
cout << endl;
upm_delay(5);
}
cout << "Exiting..." << endl;

Public Types

enum  INDEX_VALUES_T : int {
  INDEX_Temperature = 0, INDEX_Mode = 1, INDEX_Operating_State = 2, INDEX_Heating_Point = 3,
  INDEX_Cooling_Point = 4, INDEX_Fan_Mode = 5, INDEX_Fan_State = 6, INDEX_FC_Units = 14
}
 

Public Member Functions

 TZEMT400 (int nodeID)
 
 ~TZEMT400 ()
 
float getTemperature (bool fahrenheit=false)
 
std::string getMode ()
 
std::string getOperatingState ()
 
float getHeatingPointTemperature (bool fahrenheit=false)
 
float getCoolingPointTemperature (bool fahrenheit=false)
 
std::string getFanMode ()
 
std::string getFanState ()
 
void update ()
 
- Public Member Functions inherited from ozwInterface
 ozwInterface (int nodeID)
 
virtual ~ozwInterface ()
 
virtual void setDebug (bool enable)
 
virtual void optionsCreate (std::string configPath="/etc/openzwave", std::string userConfigDir="", std::string cmdLine="")
 
virtual void optionAddInt (std::string name, int val)
 
virtual void optionAddBool (std::string name, bool val)
 
virtual void optionAddString (std::string name, std::string val, bool append)
 
virtual void optionsLock ()
 
virtual void init (std::string devicePath, bool isHID=false)
 
virtual void dumpNodes (bool all=false)
 
virtual std::string getValueUnits (int index)
 
virtual std::string getValueLabel (int index)
 

Additional Inherited Members

- Protected Attributes inherited from ozwInterface
bool m_debugging
 
uint32_t m_nodeID
 
OZWm_instance
 
bool m_initialized
 

Member Enumeration Documentation

enum INDEX_VALUES_T : int

These values correspond to the index values of the given node

Constructor & Destructor Documentation

TZEMT400 ( int  nodeID)

TZEMT400 constructor

Parameters
nodeIDThe ZWave node number of the device we are interested in. Use the ozwdump example to see what nodes you have available.
~TZEMT400 ( )

TZEMT400 Destructor

Member Function Documentation

float getTemperature ( bool  fahrenheit = false)

Return the current measured temperature in Celsius or Fahrenheit.

Parameters
fahrenheittrue to return data in Fahrenheit, false for Celicus. Celsius is the default.
Returns
The temperature in degrees Celsius or Fahrenheit.

Here is the call graph for this function:

string getMode ( )

Return a string representing the current Mode. This is usually something like "Cool", "Heat", "Auto", etc.

Returns
a string representing the current mode.

Here is the call graph for this function:

string getOperatingState ( )

Return a string representing the current Operating State. This is usually something like "Idle", or "Cooling".

Returns
a string representing the current operating state.

Here is the call graph for this function:

float getHeatingPointTemperature ( bool  fahrenheit = false)

Return the current Heating Point temperature in Celsius or Fahrenheit. This is the temperature at which the thermostat will want to engage Heat.

Parameters
fahrenheittrue to return data in Fahrenheit, false for Celicus. Celsius is the default.
Returns
The Heating Point temperature in degrees Celsius or Fahrenheit.

Here is the call graph for this function:

float getCoolingPointTemperature ( bool  fahrenheit = false)

Return the current Cooling Point temperature in Celsius or Fahrenheit. This is the temperature at which the thermostat will want to engage Cooling.

Parameters
fahrenheittrue to return data in Fahrenheit, false for Celicus. Celsius is the default.
Returns
The Cooling Point temperature in degrees Celsius or Fahrenheit.

Here is the call graph for this function:

string getFanMode ( )

Return a string representing the current Fan Mode. This is usually something like "Auto Low".

Returns
a string representing the Fan Mode.

Here is the call graph for this function:

void update ( void  )

Query the device and update internal state. Strictly speaking, this is not really neccessary – a device may send this data on it's own at periodic intervals. This method causes OZW to specifically query the device for it's current information. The device may take some time to respond.

Here is the call graph for this function:

Inheritance diagram for TZEMT400:
Inheritance graph
[legend]
Collaboration diagram for TZEMT400:
Collaboration graph
[legend]

The documentation for this class was generated from the following files: