Zigbee NRF52840 cluster question with custom payload data

Hello,

I have a question about the best way of implementation.

The data will consists out of a struct with multiple pressure and temperature measurements coming from another device via UART(non Zigbee).

Is it the best solution to have a custom cluster with custom payload data, and if so, is there an example of this?

Or is it the best solution to bitshift out the data from this struct and assign each value to an existing cluster (temperature, pressure, ...)

Thanks in advance,

Sebastiaan

Parents
  • Hi Sebastiaan,

    Can you elaborate more on what your goal is? What sort of Zigbee device is it, and what is the device to do with the data after receiving it from another device over UART? Will it do something with the data locally, or is the goal to make the device send the data to another Zigbee device? If it is to send the data, can you tell me more about the Zigbee device that is to receive it?

    Best regards,

    Marte

  • The flow is like this:

    ESP32 measuring sensor data and puts it into binary UART packet <- HARDWIRED -> NRF52840DK Router receives the packet  <- ZIGBEE -> NRF52840DK coordinator with W5500 to act as a gateway

    My question is how to properly send the UART received sensor data from the ESP32 to the coordinator (as seperate clusters, or as a binary packet)

Reply Children
  • Hi,

    In this scenario I would suggest implementing the nRF52840 router as a temperature and pressure measurement device, and using the measured value attribute in the temperature measurement and pressure measurement clusters. Upon receiving data from the ESP32 measuring sensor, you can update the attributes with the data using zb_zcl_set_attr_val(), as is done inside the function zb_app_timer_handler() in the multi sensor example. The coordinator can then get the value by either sending a read attributes command, or by configuring attribute reporting.

    Best regards,

    Marte

Related