Help to get started with Zigbee

Hi, I want to implement a full Zigbee mesh with a coordinator and multiple router nodes for a university project and don't really know how to get started.

I have looked in the Zigbee documentation on the Connect SDK page, but can't find a way to implement simple messages. I have tried using the coordinator and template examples to send messages between them, but have had no success.


Any help is appreciated.
Philipp

Parents
  • Hello,

    In addition to recommend reading the getting started pages that BilalAliAhmad linked I want to clear up some terminology.

    but can't find a way to implement simple messages.

    Zigbee uses clusters, and the communication between devices depend on the clusters. Which clusters to use depend on what you want to do.

    I have tried using the coordinator and template examples to send messages between them, but have had no success.

    What type of data do you want to send? I can help you to get started if I have some more information on what you want the Zigbee devices to do.

    Best regards,

    Maria

  • Hello,

    thank you very much for your answer.

    I would like to have a network that consists of several routers and a coordinator. The routers will only respond when addressed by the coordinator. All devices will be constantly moving (some perhaps temporarily out of range), so messages may need to be forwarded multiple times to reach their destination.

    The router nodes have a job to do and thus receive the relevant data. Therefore, the process should be as follows:

    1. The coordinator sends a request to a specific node to perform its task to acquire Data.
    2. The node responds with a list of data as result.

    Greetings,
    Philipp

  • Schmid said:
    1. The coordinator sends a request to a specific node to perform its task to acquire Data.

    What exactly is the request? Please specify. The type of data (i.e. temperature) will directly impact which cluster to have on a node (i.e. temperature cluster).

    So we need to know what category of data you want to collect to know which type of clusters to include.

    Schmid said:
    2. The node responds with a list of data as result.

    It is not enough to address a certain node, you need to address a specific attribute in a specific cluster. The exact cluster depends on what the data is (i.e. Temperature Measurement cluster for temperature) and which attribute to read via the Coordinator's read attribute request (i.e. the MeasuredValue attribute for a temperature cluster).

    Also, here is a link for some more useful reading and documentation on the Zigbee Cluster Library (ZCL): https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/zigbee/adding_clusters.html#add_temperature_sensor_device. (edit 2024/7/18: updated to TechDocs url)

    Just letting you know: I'll be out of office for a couple of days, and I'll be back on Tuesday.

    Best Regards,

    Maria

  • I tried the Tutorial at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/zigbee/adding_clusters.html#ug-zigee-adding-clusters. I got problems because there was no reference to Macros like "ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST". I ended up searching for the zb_ha_on_off_switch.h and include the File in my Template. Is this the intended way or did I miss something?

    I don't think there is a Cluster for that, maybe I need to implement a custom one.
    The Data will be a List of tuples consisting of an ID and a Range Value in Meters (16 Bit per tuple, up to around 100 list entries).

    Greetings,
    Philipp

Reply Children
  • Due to two national holidays in Norway this week DevZone has lower staffing. Some delays are to be expected. 


    Hi Philipp,

    Schmid said:
    I tried the Tutorial at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/zigbee/adding_clusters.html#ug-zigee-adding-clusters. I got problems because there was no reference to Macros like "ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST".

    I see, the tutorial is in need of some updates. It does not reflect the related changes from v2.0.0. I will report this internally to get it updated.

    The releveant change is that ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST and other legacy HA definitions was removed in nRF Connect SDK v2.0.0. The new structure is to have an "include" directory in your project folder where device definitions are located. In NCS v2.0.0+, the new structure is used in all the ZigBee samples.

    Schmid said:
    I ended up searching for the zb_ha_on_off_switch.h and include the File in my Template. Is this the intended way or did I miss something?

    That file is not a part of NCS v2.0.0+, so compatibility can be an issue. The recommended way is to follow the same structure as the ZigBee samples, that is: you can look at the header files with the device definitions (zb_dimmable_light.h or zb_dimmer_switch.h) and place your version in a directory named "include" within your project.

    Schmid said:
    I don't think there is a Cluster for that, maybe I need to implement a custom one.
    The Data will be a List of tuples consisting of an ID and a Range Value in Meters (16 Bit per tuple, up to around 100 list entries).

    You are correct. You need to create your own cluster. In nrfxlib/zboss/production/include/zcl and nrfxlib/zboss/production/src/zcl you can look at the implementation of the existing clusters.

    Best regards,

    Maria

Related