public class ZigbeeBinaryLight extends AbstractDevice implements BinaryLight, ZigbeeDevice, ZigbeeDeviceTracker
logger
BINARY_LIGHT_MAX_POWER_LEVEL, BINARY_LIGHT_POWER_STATUS
DEFAULT_HEIGHT, DEFAULT_WIDTH, DEVICE_SERIAL_NUMBER, FAULT_NO, FAULT_PROPERTY_NAME, FAULT_UNKNOWN, FAULT_YES, LOCATION_PROPERTY_NAME, LOCATION_UNKNOWN, STATE_ACTIVATED, STATE_DEACTIVATED, STATE_PROPERTY_NAME, STATE_UNKNOWN
BATTERY_LEVEL
FILTER_PROP_NAME
Constructor and Description |
---|
ZigbeeBinaryLight() |
Modifier and Type | Method and Description |
---|---|
void |
deviceAdded(DeviceInfo deviceInfo)
Called when a new device has been discovered by the driver.
|
void |
deviceBatteryLevelChanged(String address,
float oldBatteryLevel,
float newBatteryLevel)
Called when a device battery level has changed.
|
void |
deviceDataChanged(String address,
Data oldData,
Data newData)
Called when a device data has changed.
|
void |
deviceRemoved(DeviceInfo deviceInfo)
Called when a device has been discovered by the driver.
|
double |
getMaxPowerLevel()
Return the current power level of this binary light
|
boolean |
getPowerStatus()
Return the current power state of this binary light.
|
String |
getSerialNumber()
Return the serial number of the device.
|
boolean |
setPowerStatus(boolean status)
Change the power status of this binary light.
|
void |
setPropertyValue(String propertyName,
Object value)
If the given propertyName is the power status, it will set it to the device;
the value will not change, if is not changed in the device.
|
void |
start() |
void |
stop() |
void |
turnOff()
Change the power status to false
|
void |
turnOn()
Change the power status to true
|
addListener, constainsProperty, enterInZones, equals, getFault, getProperties, getPropertyValue, getState, hashCode, hasPropertyValue, leavingZones, notifyListeners, removeListener, removeProperty, setFault, setState
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, constainsProperty, enterInZones, getFault, getProperties, getPropertyValue, getState, hasPropertyValue, leavingZones, removeListener, removeProperty, setFault, setState
public String getSerialNumber()
GenericDevice
getSerialNumber
in interface GenericDevice
GenericDevice.DEVICE_SERIAL_NUMBER
public boolean getPowerStatus()
BinaryLight
getPowerStatus
in interface BinaryLight
BinaryLight.setPowerStatus(boolean)
,
BinaryLight.BINARY_LIGHT_POWER_STATUS
public boolean setPowerStatus(boolean status)
BinaryLight
setPowerStatus
in interface BinaryLight
status
- the new power state of this binary light.BinaryLight.getPowerStatus()
,
BinaryLight.BINARY_LIGHT_POWER_STATUS
public double getMaxPowerLevel()
BinaryLight
getMaxPowerLevel
in interface BinaryLight
BinaryLight.BINARY_LIGHT_MAX_POWER_LEVEL
public void turnOn()
BinaryLight
turnOn
in interface BinaryLight
public void turnOff()
BinaryLight
turnOff
in interface BinaryLight
public void start()
public void stop()
public void setPropertyValue(String propertyName, Object value)
setPropertyValue
in interface GenericDevice
setPropertyValue
in class AbstractDevice
propertyName
- value
- public void deviceAdded(DeviceInfo deviceInfo)
deviceAdded
in interface ZigbeeDeviceTracker
deviceInfo
- information about the devicepublic void deviceRemoved(DeviceInfo deviceInfo)
deviceRemoved
in interface ZigbeeDeviceTracker
deviceInfo
- information about the devicepublic void deviceDataChanged(String address, Data oldData, Data newData)
deviceDataChanged
in interface ZigbeeDeviceTracker
address
- a device module addressoldData
- previous device datanewData
- new device datapublic void deviceBatteryLevelChanged(String address, float oldBatteryLevel, float newBatteryLevel)
deviceBatteryLevelChanged
in interface ZigbeeDeviceTracker
address
- a device module addressoldBatteryLevel
- previous device battery levelnewBatteryLevel
- new device battery levelCopyright © 2012-2013 ADELE Research Group. All Rights Reserved.