Battery monitoring of end device (door lock) from coordinator (central device) over Zigbee

Hello,

I am developing a door lock system. Where in final product door lock will be controlled and monitored by BLE+Zigbee. So far I have complete success of controlling door locks over BLE with battery monitoring + OTA DFU. Now I want to have same functionalities with ZigBee. I am using nRF52840 DK and "nRF SDK for Thread and ZigBee v4.2.0" SDK.

For now I want to monitor battery level of my end device/devices (which will be nrf52840 DK or our custom board based on nrf52840 chip) from a central device ( which will be a coordinator, also nrf52840 DK). As I am complete beginner in ZigBee I am finding it very difficult to achieve this task.

I have gone through the documentation of SDK and implemented light control example but still unable to achieve above task. When I was developing using BLE there were some tutorials like this one, which helped a lot. I am looking for same kind of tutorial or any other resource which can help me monitor battery status or any GPIO status of end device from coordinator over ZigBee. 

Any help in this regard would be highly appreciated.

  • Hi,

    Unfortunally we don't have any guides similar to the Bluetooth guide you're referring to for the ZigBee topic for nRF5 SDK for Thread and ZigBee , except for the documentation available at infocenter.nordicsemi.com.

    For nRF5 SDK for Thread and ZigBee we have the ZigBee stack API Overview available, which contains information about the API, but it does not explain to great details how to use it. I believe ZCL Power Configuration Cluster may be what you need for this, but you will have to declare the cluster and set it up properly to use it. The power configuration cluster contains attributes that will give you information about the battery level and percentage remaining.

    What you could do is to use this nRF Connect SDK guide about Adding ZCL cluster to application for NCS and compare it to how it is done in nRF5 SDK to get a pointer on how it is set up. There will be some differences, but it should be possible to find where the differences are through comparison. In case you want to investigate ZigBee closer in nRF Connect SDK, we also have this ZigBee quick start guide for NCS. As well as the ZigBee samples for network coordinator, light bulb and light switch which shows you how a signal is sent and read to trigger a light bulb through GPIO pins. 

    I would recommend that you also obtain the "ZigBee Cluster Library Specification", which is a book resource you will have to source either from the "CSA" - the former ZigBee Alliance or elsewhere. It is a really handy book for ZigBee developers. Chapter 3.3 here states more details about the power configuration cluster.

    I know this is not necessarily what you were looking for, as you are developing for nRF5 SDK for Thread and ZigBee, but I hope that this will give you a good push in the right direction.

    Please let me know if you have any further questions regarding this topic!

    Kind regards,
    Andreas

  • Hi, 

    Thank you so much for detailed response. I will look into the documents/links you provided. It looks like I will be able to have a good start from these resources. In case I get stuck any some point I will come back here with specific question.

    Thanks again

  • HI Andreas,

    I tried looking into links you provided and also from internet I tried to understand overall ZigBee functionality but unfortunately I still cannot add a power config cluster to my application. I successfully tested multi sensor, light control and CLI samples which comes with SDK but due to complexity of this API structure I am unable to understand how to actually code or modify these samples to my needs.

    Can you please point me to some guide which shows step by step process of how to code this functionality or add existing cluster or modify existing cluster. If there is no such guide available, is there any other way you suggest or is it possible to have a direct call with you or any other Nordic engineer for few minutes which can help us in this task?

    Regards,

    Aqib

  • Hi Aqib,

    After asking in our ZigBee channel a colleague of me suggested that this similar ZigBee case might be of help with adding the power config cluster. Other than that (and maybe other related cases), there are unfortunately few other guide-related resource than the ZigBee stack API Overview for nRF5 SDK for Thread and ZigBee. 

    AqibK said:
    If there is no such guide available, is there any other way you suggest

    Since nRF5 SDK is in maintenance mode, one option is to consider the possibilities of moving from nRF5 SDK to nRF Connect SDK instead. There will be some more learning to do as the SDKs are a bit different from each other, but there exists far better tutorials for nRF Connect SDK, such as this getting started with NCS platform and the Visual Studio Code extension which should help to boost the initial development phase, as well as the three NCS ZigBee tutorials I linked in the previous reply.

    Let me know if this is of any help,

    Kind regards,
    Andreas

  • HI Andreas, 

    Thanks for pointing me to this case. Actually by following that case I already tried to add power config cluster and unfortunately I am stuck at exactly same point where the guy Krystof Vydra is stuck.

    I added power config cluster to multi sensor application. I can see cluster added and can also get reporting from temperature and power sensor but not from power config cluster.

    As you can see in below screenshot power cluster 0x0001 is present in in-cluster list but I cant read value from it.

Related