upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
UPM API for Aeotec Smart Switch 6. More...
This module allows for controlling and monitoring certain elements of an Aeotec Smart Switch 6.
Public Types | |
enum | INDEX_VALUES_T : int { INDEX_SwitchCtrl = 0, INDEX_Energy_kWh = 4, INDEX_Power_Watts = 7, INDEX_Volts = 8, INDEX_Current = 9 } |
Public Member Functions | |
AeotecSS6 (int nodeID) | |
~AeotecSS6 () | |
void | on () |
void | off () |
bool | isOn () |
void | update () |
float | getEnergy () |
float | getWatts () |
float | getVolts () |
float | getCurrent () |
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 |
OZW * | m_instance |
bool | m_initialized |
enum INDEX_VALUES_T : int |
These values correspond to the index values of the given node
AeotecSS6 | ( | int | nodeID | ) |
AeotecSS6 constructor
nodeID | The ZWave node number of the device we are interested in. Use the ozwdump example to see what nodes you have available. |
void on | ( | ) |
Turn the switch on.
void off | ( | ) |
Turn the switch off.
bool isOn | ( | ) |
Check to see if the switch is on or off.
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 Energy, Watts, Volts, Current, and Switch status. The device may take some time to respond.
float getEnergy | ( | ) |
Return the device's accumulated energy usage in kilo-watt-hours (kWh).
float getWatts | ( | ) |
Return the device's current power consumption in Watts.
float getVolts | ( | ) |
Return the device's current voltage measurement in Volts.
float getCurrent | ( | ) |
Return the device's current consumption in Amps.