[Zigbee] 基于 IAS 的终点不调用响应回调处理程序

作者: SLAZ666创建于 2026年9月1日更新于 2026年9月11日
标签IDE: Arduino IDEArea: Zigbee

// Zigbee contact switch (IAS Zone) configuration #define CONTACT_SWITCH_ENDPOINT_NUMBER 1 uint8_t button = BOOT_PIN; uint8_t sensor_pin = D1;

// Zigbee contact switch ZigbeeContactSwitch zbContactSwitch = ZigbeeContactSwitch(CONTACT_SWITCH_ENDPOINT_NUMBER);

// Preferences for storing ENROLLED flag to persist across reboots Preferences preferences;

// If USE_GLOBAL_ON_RESPONSE_CALLBACK is set to 1, use the global callback specified directly for the endpoint. #if USE_GLOBAL_ON_RESPONSE_CALLBACK void onGlobalResponse(zb_cmd_type_t command, esp_zb_zcl_status_t status, uint8_t endpoint, uint16_t cluster) { Serial.printf("Global response command: %d, status: %s, endpoint: %u, cluster: 0x%04x\r\n", command, esp_zb_zcl_status_to_name(status), endpoint, cluster); }

内容来源: espressif/arduino-esp32