use of com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneStateEnum in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeIasCieApp method appStartup.
@Override
public boolean appStartup(ZclCluster cluster) {
iasZoneCluster = (ZclIasZoneCluster) cluster;
Integer currentState = iasZoneCluster.getZoneState(0);
if (currentState != null) {
ZoneStateEnum currentStateEnum = ZoneStateEnum.getByValue(currentState);
logger.debug("{}: IAS CIE state is currently {}[{}]", iasZoneCluster.getZigBeeAddress(), currentStateEnum, currentState);
}
IeeeAddress currentIeeeAddress = iasZoneCluster.getIascieAddress(0);
logger.debug("{}: IAS CIE address is currently {}", iasZoneCluster.getZigBeeAddress(), currentIeeeAddress);
if (!ieeeAddress.equals(currentIeeeAddress)) {
// Set the CIE address in the remote device. This is where the device will send its reports.
iasZoneCluster.setIascieAddress(ieeeAddress);
currentIeeeAddress = iasZoneCluster.getIascieAddress(0);
logger.debug("{}: IAS CIE address is confirmed {}", iasZoneCluster.getZigBeeAddress(), currentIeeeAddress);
}
Integer currentZone = iasZoneCluster.getZoneId(0);
logger.debug("{}: IAS CIE zone is currently {}", iasZoneCluster.getZigBeeAddress(), currentZone);
return false;
}
Aggregations