diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 9357a1ea5..1dbb347cb 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -856,6 +856,8 @@ // Auto-binding constants, see `Z_autoAttributeReporting` + #define USE_ZIGBEE_AUTOBIND_MAX_ENDPOINTS 8 // max number of endpoint receiving auto-bind requests + #define USE_ZIGBEE_AUTOBIND_MAX_CLUSTER 0x10 // max endpoint number (excluded receiving auto-bind requests) // Below are the threshold for attribute reporting #define USE_ZIGBEE_AUTOBIND_BATTVOLTAGE 0.2 // V #define USE_ZIGBEE_AUTOBIND_BATTPERCENT 5 // % diff --git a/tasmota/xdrv_23_zigbee_8_parsers.ino b/tasmota/xdrv_23_zigbee_8_parsers.ino index 72b994a57..2f3b9688f 100644 --- a/tasmota/xdrv_23_zigbee_8_parsers.ino +++ b/tasmota/xdrv_23_zigbee_8_parsers.ino @@ -638,7 +638,7 @@ int32_t Z_ReceiveActiveEp(int32_t res, const SBuffer &buf) { for (uint32_t i = 0; i < activeEpCount; i++) { uint8_t ep = activeEpList[i]; zigbee_devices.getShortAddr(nwkAddr).addEndpoint(ep); - if ((i < 4) && (ep < 0x10)) { + if ((i < USE_ZIGBEE_AUTOBIND_MAX_ENDPOINTS) && (ep < USE_ZIGBEE_AUTOBIND_MAX_CLUSTER)) { zigbee_devices.queueTimer(nwkAddr, 0 /* groupaddr */, 1500, ep /* fake cluster as ep */, ep, Z_CAT_EP_DESC, 0 /* value */, &Z_SendSimpleDescReq); } }