Zigbee: Why does my Temperature Sensor not obey my commands?

vritzka
Posts: 24
Joined: Wed Sep 07, 2022 5:33 am

Zigbee: Why does my Temperature Sensor not obey my commands?

Postby vritzka » Fri Dec 01, 2023 7:31 am

Hi,

I am trying to make temperature sensors work on ESP32S3 + ESP32-C6.

The sensor is a TUYA Zigbee
The manufacturer gives some information here.

After binding the sensor to my network, I am telling it to occasionally report with this command:

Code: Select all

        esp_zb_zcl_config_report_cmd_t report_cmd;
        uint8_t report_change = 5;
        report_cmd.zcl_basic_cmd.dst_addr_u.addr_short = ((zdo_info_user_ctx_t *)user_ctx)->short_addr;
        report_cmd.zcl_basic_cmd.dst_endpoint = ((zdo_info_user_ctx_t *)user_ctx)->endpoint;
        report_cmd.zcl_basic_cmd.src_endpoint = HA_THERMOMETER_ENDPOINT;
        report_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT;
        report_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
        esp_zb_zcl_config_report_record_t records[] = {
            {ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID, ESP_ZB_ZCL_ATTR_TYPE_S16, 10, 20, &report_change}};
        report_cmd.record_number = sizeof(records) / sizeof(esp_zb_zcl_config_report_record_t);
        report_cmd.record_field = records;
        esp_zb_zcl_config_report_cmd_req(&report_cmd); 

Report change = 5.
Minimum update interval = 10
Maximum update Interval = 15.

The sensor ignores all of this.

Im getting irregular reports, every 100 to 300 seconds or so.
Screenshot 2023-12-01 at 3.27.48 pm.png
Screenshot 2023-12-01 at 3.27.48 pm.png (251.64 KiB) Viewed 3973 times
Does anyone know if my report command above should work?

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], markkuk and 288 guests