Public Types | |
enum | DevType { UnknownDeviceType = 0, BinarySwitch, MultilevelSwitch, BinarySensor, MultilevelSwitchOnOff, DoorLock, Alarm, Thermostat, Gateway, SceneController, StandardCIE, MotionSensor, ContactSwitch, FireSensor, WaterSensor, GasSensor, PersonalEmergencyDevice, VibrationOrMovementSensor, RemoteControl, KeyFob, Keypad, StandardWarningDevice, SmartACSwitch, SmartDCSwitch, OccupancySensor, LightSensor, WindowCovering, TemperatureSensor, SimpleMetering, ColorControl, PressureSensor, FlowSensor, ColorDimmableLight, HAPump, Shade } |
A detailed list of all the supported device types available via the libAlmondHA library in the Almond SDK. More... | |
enum | DevTech { UnknownTechnology = 0, ZigBeeTechnology = 1, ZWaveTechnology = 2 } |
Defines the underlying Technology used by the physical device represented by an object of the Device Class. More... | |
Public Member Functions | |
Device () | |
Device (int DevID) | |
~Device () | |
int | getID (void) |
char * | getValue (int index) |
char * | getValue (char *name) |
char * | getValueName (int index) |
void | setValue (char *, char *) |
void | setValue (int, char *) |
DevType | getDeviceType (void) |
DevTech | getDeviceTechnology (void) |
int | getOZWNode (void) |
int | getShortID (void) |
char * | getZigBeeEUI64 (void) |
char * | getDeviceName (void) |
char * | getDeviceLocation (void) |
char * | getFriendlyDeviceType (void) |
bool | getAllowNotificiation (void) |
int | getValueCount (void) |
void | setAllowNotification (bool) |
void | fromDeviceID (int DevID) |
void | setSwitchLevel (int level) |
void | setSwitchOn (bool val) |
void | setSwitchAll (bool val) |
void | setSwitchToggle (void) |
void | setThermostatHeatingTemp (int temp) |
void | setThermostatCoolingTemp (int temp) |
void | setThermostatFanMode (char *mode) |
void | setThermostatMode (char *mode) |
void | setDoorLock (int val) |
void | setDoorLockConf (int val) |
void | setBasic (int val) |
void | getBasic (void) |
void | wakeUpDevice (void) |
void | startAlarm (bool val) |
void | startWindowCovering (bool val) |
void | stopWindowCovering (bool val) |
void | setSceneControllerConf (int val) |
void | startDimming (bool val) |
void | startBrightning (bool val) |
int | getBatterLevel (void) |
int | getLastNotificationIndex (void) |
char * | getLastNotificationIndexName (void) |
char * | getLastNotificationIndexValue (void) |
void | RefreshDevice (void) |
void | setLocation (char *data) |
void | setName (char *data) |
void | clearTamper (void) |
char * | getTamper (void) |
char * | getRemovedeviceid (void) |
void | testserver (void) |
Device Class A Class whose object represents a physical HA capable device connected to the Almond's HA Network.
enum Device::DevTech |
enum Device::DevType |
A detailed list of all the supported device types available via the libAlmondHA library in the Almond SDK.
Enumerator | |
---|---|
UnknownDeviceType |
The default device type, in the case of Z-Wave this kind of device will provide only the "Basic Get", "Basic Set" and "Basic Report" command classes |
BinarySwitch |
A simple on/off switch. This kind of device provides only binary on/off operation. For Z-Wave it will use the COMMAND_CLASS_SWITCH_BINARY, for Zigbee it uses the ZigBeeHA 1.2 ON/OFF-CLUSTER. |
MultilevelSwitch |
A Multilevel switch which has binary on/off operation as well as level control fuctionality. For Z-Wave it will use the COMMAND_CLASS_SWITCH_MULTILEVEL and for ZigBee it will use ON/OFF-CLUSTER and LEVEL-CONTROL-CLUSTER |
BinarySensor |
A basic sensor which returns a true or false state. For Z-Wave it uses the COMMAND_CLASS_SENSOR_BINARY and for ZigBee it uses the IAS Zone Cluster |
MultilevelSwitchOnOff |
Same as MultilevelSwitch |
DoorLock |
A Connected Door Lock, uses the Z-Wave COMMAND_CLASS_SECURITY and COMMAND_CLASS_DOOR_LOCK, ZigBee Door Lock Cluster |
Alarm |
A connected Siren or Security Alarm, uses the Z-Wave COMMAND_CLASS_SECURITY and COMMAND_CLASS_ALARM, ZigBee Alarm Cluster |
Thermostat |
A connected thermostat, uses the Z-Wave COMMAND_CLASS_THERMOSTAT_MODE, COMMAND_CLASS_THERMOSTAT_FAN_MODE, COMMAND_CLASS_THERMOSTAT_FAN_STATE, COMMAND_CLASS_THERMOSTAT_OPERATING_STATE, COMMAND_CLASS_THERMOSTAT_SETBACK, COMMAND_CLASS_THERMOSTAT_SETPOINT and COMMAND_CLASS_SENSOR_MULTILEVEL and for ZigBee it will use Thermostat Cluster |
Gateway |
A Z-Wave device defined as a Primary or Secondary Controller. Uses the Z-Wave COMMAND_CLASS_VERSION, COMMAND_CLASS_BASIC and COMMAND_CLASS_MANUFACTURER_SPECIFIC |
SceneController |
A Z-Wave Scene Controller device. Uses Z-Wave COMMAND_CLASS_SCENE_ACTIVATION and COMMAND_CLASS_CONTROLLER_CONF |
StandardCIE |
A ZigBee device CIE (Control and Indicating Equipment). Uses ZigBee IAS Zone Cluster |
MotionSensor |
A connected Motion Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee IAS Zone Cluster |
ContactSwitch |
A connected Contact Switch (Door/Window Sensor). Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee IAS Zone Cluster |
FireSensor |
A connected Fire Sensor (or Smoke Alarm). Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee IAS Zone Cluster |
WaterSensor |
A connected Water Sensor (Flood Sensor). Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee IAS Zone Cluster |
GasSensor |
A connected Gas Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee IAS Zone Cluster |
PersonalEmergencyDevice | |
VibrationOrMovementSensor |
A connected Vibration or Movement Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee IAS Zone Cluster |
RemoteControl |
Same as Gateway |
KeyFob |
A connected Keyfob or Presence Sensor. Uses Z-Wave COMMAND_CLASS_CONFIGURATION and ZigBee IAS Zone Cluster |
Keypad | |
StandardWarningDevice |
See Alarm |
SmartACSwitch |
A ZigBee switch with intigerated AC Electrical Measurment. Uses ZigBee On/Off Cluster and Electrical Measurement Cluster |
SmartDCSwitch |
A ZigBee switch with intigerated AC Electrical Measurment. Uses ZigBee On/Off Cluster and Electrical Measurement Cluster |
OccupancySensor |
A connected Occupancy Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee Occupancy Sensing Cluster |
LightSensor |
A connected Light Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_BINARY and ZigBee Illuminance Measurement Cluster and Illuminance Level Sensing Cluster |
WindowCovering |
A connected Window Cover Actuator. Uses Z-Wave COMMAND_CLASS_MULTILEVEL and COMMAND_CLASS_BASIC_WINDOW_COVERING and ZigBee Window Covering Cluster |
TemperatureSensor |
A connected Temperature Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_MULTILEVEL and ZigBee Temperature Measurement Cluster |
SimpleMetering |
A connected Meter. Uses Z-Wave COMMAND_CLASS_METER and ZigBee Simple Metering Cluster |
ColorControl |
A ZigBee connected Color Controllable Light. Uses ZigBee Color Control Cluster |
PressureSensor |
A connected Pressure Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_MULTILEVEL and ZigBee Pressure Measurement Cluster |
FlowSensor |
A connected Flow Sensor. Uses Z-Wave COMMAND_CLASS_SENSOR_MULTILEVEL and ZigBee IAS Zone Cluster |
ColorDimmableLight |
See Color Control |
HAPump |
A ZigBee Device for HVAC Pump Configuration and Control. Uses ZigBee Pump Configuration and Control Cluster |
Shade |
A connected Shade Control. Uses Z-Wave COMMAND_CLASS_MULTILEVEL and ZigBee Shade Configuration Cluster |
Device::Device | ( | ) |
Default Contructor The Default Constructor for the Device Class. The default constructor should only be used in the event that a new Device is being created. For all other purposes use Device(int DevID)
Device::Device | ( | int | DevID | ) |
Device::~Device | ( | ) |
Auto Destructor The Destructor for the Device Class. This does not need to be manually called.
void Device::clearTamper | ( | void | ) |
void Device::fromDeviceID | ( | int | DevID | ) |
fromDeviceID(int DevID) Create this device with the device id provided as parameter
Example:
Integer | value representing the DeviceID of this device |
bool Device::getAllowNotificiation | ( | void | ) |
getAllowNotificiation(void) Get whether or not the device is allowed to show notifications.
Example:
void Device::getBasic | ( | void | ) |
getBasic(void); Sends a Basic Get command to the Z-Wave device and initiates a Basic Report
Example:
int Device::getBatterLevel | ( | void | ) |
char* Device::getDeviceLocation | ( | void | ) |
getDeviceLocation(void) Get the user provided location for the HA device.
Example:
char* Device::getDeviceName | ( | void | ) |
getDeviceName(void) Get the user provided name for the HA device.
Example:
DevTech Device::getDeviceTechnology | ( | void | ) |
getDeviceTechnology(void) Get The DevTech that represents the device pointed to by this object.
Example:
DevType Device::getDeviceType | ( | void | ) |
getDeviceType(void) Get The DevType that represents the device pointed to by this object.
Example:
char* Device::getFriendlyDeviceType | ( | void | ) |
getFriendlyDeviceType(void) Get the DevType for the HA device in a friendly string.
Example:
int Device::getID | ( | void | ) |
int Device::getLastNotificationIndex | ( | void | ) |
char* Device::getLastNotificationIndexName | ( | void | ) |
char* Device::getLastNotificationIndexValue | ( | void | ) |
int Device::getOZWNode | ( | void | ) |
getOZWNode(void) Get The Z-Wave Node ID that represents the device pointed to by this object.
Example:
char* Device::getRemovedeviceid | ( | void | ) |
int Device::getShortID | ( | void | ) |
getShortID(void) Get The ZigBee Short ID that represents the device pointed to by this object.
Example:
char* Device::getTamper | ( | void | ) |
char* Device::getValue | ( | int | index | ) |
getValue(int index) Returns the value of the DeviceValuePair at the index index from the physical HA device that this object currently points to.
Example:
index | The index of the DeviceValuePair of which the value should be returned. |
char* Device::getValue | ( | char * | name | ) |
getValue(char* name) Returns the value of the DeviceValuePair having the name name from the physical HA device that this object currently points to.
Example:
name | The name of the DeviceValuePair of which the value should be returned. |
int Device::getValueCount | ( | void | ) |
getValueCount(void) Get the total nuber of DeviceValuePair for this device.
Example:
char* Device::getValueName | ( | int | index | ) |
getValueName(int index) Returns the name representing the value in the DeviceValuePair.
Example:
index | The index of the value in DeviceValuePair of which the name should be returned. |
char* Device::getZigBeeEUI64 | ( | void | ) |
getZigBeeEUI64(void) Get The ZigBee EUI64 (MAC Address) that represents the device pointed to by this object.
Example:
void Device::RefreshDevice | ( | void | ) |
void Device::setAllowNotification | ( | bool | ) |
setAllowNotification(bool) Set whether or not the device is allowed to show notifications.
Example:
bool | value true or false, which determines whether or not the device should send notifications |
void Device::setBasic | ( | int | val | ) |
setBasic(int val); Used for Z-Wave Basic Set Command Class.
Example:
val | An Integer value to Basic Set for the Z-Wave Device |
void Device::setDoorLock | ( | int | val | ) |
setDoorLock(int val); Sets lock/unlock state for a door lock.
Example:
val | An Integer value representing the state of the door lock |
void Device::setDoorLockConf | ( | int | val | ) |
void Device::setLocation | ( | char * | data | ) |
void Device::setName | ( | char * | data | ) |
void Device::setSceneControllerConf | ( | int | val | ) |
void Device::setSwitchAll | ( | bool | val | ) |
setSwitchAll(bool val) Sets the binary switch (On/Off Switch) state for all the associated binary switches.
Example:
val | A boolean value (true or false) representing on and off states for the binary switchs |
void Device::setSwitchLevel | ( | int | level | ) |
setSwitchLevel(int level) Sets the Percentage level for a multilevel switch (Dimmer switch).
Example:
Integer | value representing the percentage level for a multilevel switch (Dimmer switch). |
void Device::setSwitchOn | ( | bool | val | ) |
setSwitchOn(bool val) Sets the binary switch (On/Off Switch) state.
Example:
val | A boolean value (true or false) representing on and off states for the binary switch |
void Device::setSwitchToggle | ( | void | ) |
setSwitchToggle(void) Toggles the state of a binary switch (On/Off Switch).
Example:
void Device::setThermostatCoolingTemp | ( | int | temp | ) |
setThermostatCoolingTemp(int temp) Sets the Cooling target temperature for the thermostat.
Example:
temp | An Integer value representing the target temperature in farenhiet. |
void Device::setThermostatFanMode | ( | char * | mode | ) |
setThermostatFanMode(char* mode) Sets the Fan Mode for the thermostat.
Example:
mode | A char* string representing the Fan Mode of the Thermostat |
void Device::setThermostatHeatingTemp | ( | int | temp | ) |
setThermostatHeatingTemp(int temp) Sets the Heating target temperature for the thermostat.
Example:
temp | An Integer value representing the target temperature in farenhiet. |
void Device::setThermostatMode | ( | char * | mode | ) |
setThermostatMode(char* mode) Sets the Fan Mode for the thermostat.
Example:
mode | A char* string representing the Mode of the Thermostat |
void Device::setValue | ( | char * | , |
char * | |||
) |
setValue(char* indexName, char* value) Sets the value of an index within a device using the name of the index.
Example:
indexName | The name of the index in DeviceValuePair. |
value | The value to be set. |
void Device::setValue | ( | int | , |
char * | |||
) |
setValue(int index, char* value) Sets the value of an index within a device using the index.
Example:
index | The index of the value to be set in DeviceValuePair. |
value | The value to be set. |
void Device::startAlarm | ( | bool | val | ) |
void Device::startBrightning | ( | bool | val | ) |
void Device::startDimming | ( | bool | val | ) |
void Device::startWindowCovering | ( | bool | val | ) |
void Device::stopWindowCovering | ( | bool | val | ) |
void Device::testserver | ( | void | ) |
void Device::wakeUpDevice | ( | void | ) |