Hello Nordic!
I want to control the battery level, and set alarms... I know that there is a cluster callled PowerConfig cluster and I have been reading it, but I acan't figure out how declare it.
I have the following code (it is written in Spanish, sorry):
typedef struct contexto_alimentacion_s { zb_uint8_t battery_voltage; // Atributo 3.3.2.2.3.1 zb_uint8_t battery_size; // Atributo 3.3.2.2.4.2 zb_uint8_t battery_quantity; // Atributo 3.3.2.2.4.4 zb_uint8_t battery_rated_voltage; // Atributo 3.3.2.2.4.5 zb_uint8_t battery_alarm_mask; // Atributo 3.3.2.2.4.6 zb_uint8_t battery_voltage_min_threshold; // Atributo 3.3.2.2.4.7 } contexto_alimentacion_t; static contexto_alimentacion_t contexto_alimentacion; ZB_ZCL_DECLARE_POWER_CONFIG_ATTRIB_LIST(lista_atributos_alimentacion, &contexto_alimentacion.battery_voltage, &contexto_alimentacion.battery_size, &contexto_alimentacion.battery_quantity, &contexto_alimentacion.battery_rated_voltage, &contexto_alimentacion.battery_alarm_mask, &contexto_alimentacion.battery_voltage_min_threshold);
This is part of a bigger code which is using doorlock cluster too. Ithink that I have to use what is asked in this older post, am I right?
Anyway, can someone point me in the right direcction? Where can I find some examples of the Power Config cluster?
Thank you very much!