fix(zigbee): Add manuf_code to report attribure commands · espressif/arduino-esp32@4713126 (original) (raw)

File tree

7 files changed

lines changed

7 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -125,8 +125,8 @@ void loop() {
125 125 int startTime = millis();
126 126 while (digitalRead(button) == LOW) {
127 127 delay(50);
128 -if ((millis() - startTime) > 3000) {
129 -// If key pressed for more than 3secs, factory reset Zigbee and reboot
128 +if ((millis() - startTime) > 10000) {
129 +// If key pressed for more than 10secs, factory reset Zigbee and reboot
130 130 Serial.println("Resetting Zigbee to factory and rebooting in 1s.");
131 131 delay(1000);
132 132 Zigbee.factoryReset();
Original file line number Diff line number Diff line change
@@ -93,6 +93,7 @@ void ZigbeeAnalog::reportAnalogInput() {
93 93 report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
94 94 report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_ANALOG_INPUT;
95 95 report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
96 + report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
96 97
97 98 esp_zb_lock_acquire(portMAX_DELAY);
98 99 esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
Original file line number Diff line number Diff line change
@@ -85,6 +85,7 @@ void ZigbeeCarbonDioxideSensor::report() {
85 85 report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
86 86 report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_CARBON_DIOXIDE_MEASUREMENT;
87 87 report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
88 + report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
88 89
89 90 esp_zb_lock_acquire(portMAX_DELAY);
90 91 esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
Original file line number Diff line number Diff line change
@@ -79,6 +79,7 @@ void ZigbeeFlowSensor::report() {
79 79 report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
80 80 report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_FLOW_MEASUREMENT;
81 81 report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
82 + report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
82 83
83 84 esp_zb_lock_acquire(portMAX_DELAY);
84 85 esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ void ZigbeeOccupancySensor::report() {
49 49 report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
50 50 report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_OCCUPANCY_SENSING;
51 51 report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
52 + report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
52 53
53 54 esp_zb_lock_acquire(portMAX_DELAY);
54 55 esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
Original file line number Diff line number Diff line change
@@ -75,6 +75,7 @@ void ZigbeePressureSensor::report() {
75 75 report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
76 76 report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_PRESSURE_MEASUREMENT;
77 77 report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
78 + report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
78 79
79 80 esp_zb_lock_acquire(portMAX_DELAY);
80 81 esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ void ZigbeeTempSensor::reportTemperature() {
74 74 report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
75 75 report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
76 76 report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
77 + report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
77 78
78 79 esp_zb_lock_acquire(portMAX_DELAY);
79 80 esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
@@ -116,6 +117,7 @@ void ZigbeeTempSensor::reportHumidity() {
116 117 report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
117 118 report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT;
118 119 report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
120 + report_attr_cmd.manuf_code = ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC;
119 121
120 122 esp_zb_lock_acquire(portMAX_DELAY);
121 123 esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);