upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
UPM API for Aeotec Smart Dimmer Gen 2. More...
This module allows for controlling and monitoring certain elements of an Aeotec Smart Dimmer Gen 2.
Public Types | |
enum | INDEX_VALUES_T : int { INDEX_Level = 0, INDEX_Energy_kWh = 3, INDEX_Power_Watts = 6, INDEX_Volts = 9, INDEX_Current = 12 } |
Public Member Functions | |
AeotecSDG2 (int nodeID) | |
~AeotecSDG2 () | |
void | setLevel (int level) |
int | getLevel () |
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
AeotecSDG2 | ( | int | nodeID | ) |
AeotecSDG2 constructor
nodeID | The ZWave node number of the device we are interested in. Use the ozwdump example to see what nodes you have available. |
~AeotecSDG2 | ( | ) |
AeotecSDG2 Destructor
void setLevel | ( | int | level | ) |
Set the output level of the dimmer switch. This is a value between 0 (fully off) and 99 (fully on).
level | The desired output level of the dimmer switch. Valid values are between 0-99. |
int getLevel | ( | ) |
Return the current output level of the dimmer switch. This will be a number between 0 (fully off) and 99 (fully on).
|
inline |
Turn the switch fully on by setting the highest level (99). This is equivalent to calling setLevel(99).
|
inline |
Turn the switch off by setting the lowest level (0). This is equivalent to calling setLevel(0).
bool isOn | ( | ) |
Check to see if the switch is on or off. Any dimmer level greater that 0 is considered 'on'.
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 dimmer Level 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.