This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Alarm Cluster functions

Hello everyone,

I need some help with ZCL Alarms Cluster implementation. Right now I am reading official zcl specification document ( Alarms Cluster, Power Cfg Cluster ), but it is a little bit confusing for me. Basically I have one end device on which battery voltage level is monitored. My intention is to inform coordinator when battery voltage(on end device) drops bellow some threshold value. In official zcl specification stands that ED should generate alarm when this occur.

I have realized battery voltage measurements and it works well, now I want to send alarm to coordinator by

 zclGeneral_SendAlarm( myEndpoint, &coordAddr, 0x01, ZCL_CLUSTER_ID_GEN_POWER_CFG, 0, seqNum++ ) ;

Is that good approach?

Do I need to implement Alarm Table?

What is the function of BatteryAlarmMask attribute?

Basically I need some advices how to implement battery low voltage notification in a good way.

Best Regards

  • You should use zcl_SendReportCmd if you want to send BatteryAlarmMask attribute report. By the way, you should report low battery bit of ATTRID_SS_IAS_ZONE_STATUS in IAS zone cluster if your device support IAS zone cluster.
  • Hi milos,

    To make low battery alarm work, the end device needs to have both Alarms Cluster(server) and Power Configuration Cluster(server). At least the attributes BatteryAlarmMask and BatteryVoltageMinThreshold should be populated in the Alarms Cluster. If alarm table where alarm occurrences are recorded is not necessary, no attribute needs to be populated in Alarms Cluster server implementation.

    In your use case, the coordinator is the client to both the clusters. In order for the coordinator to get an alarm message, it needs to configure BatteryAlarmMask and BatteryVoltageMinThreshold attributes properly on the end device first because the end device is supposed to check values of both the attributes to determine whether or not to send Alarm command to the coordinator. The end device can send an Alarm command only when the bit 0('Battery voltage too low') of BatteryAlarmMask attribute is '1'(BAT_ALARM_MASK_VOLT_2_LOW) and the measured voltage is below the value of BatteryVoltageMinThreshold attribute.

    When you send an Alarm command regarding 'battery low' condition, the parameters would be as following:

    zclGeneral_SendAlarm( myEndpoint, &coordAddr, ALARM_CODE_BAT_VOLT_MIN_THRES_BAT_SRC_1, ZCL_CLUSTER_ID_GEN_POWER_CFG, 0, seqNum++ );

    - Cetri

  • Hi Cetri
    is there only adding the relate Cluster?
    how could the ZED Know the battery low ?
    as i though , ZED will implement ADC checking again and again,is that right?
  • Yes, ZED has to implemented ADC checking for low battery again and again.