Skip to content

Zigbee On/Off Switch bounds only to 1st Endpoint and Ignores Additional Endpoints on the Light Device #11006

Open
@sebastian-ionita

Description

@sebastian-ionita

Board

ESP32c6

Device Description

2 x Esp32c6

Hardware Configuration

Default configuration

Version

v3.1.2

IDE Name

Arduino

Operating System

Windows 11

Flash frequency

40Mhz

PSRAM enabled

yes

Upload speed

115200

Description

When using a Zigbee On/Off Switch, it always prints "Endpoint 10", even if the On/Off Light device is configured with a different endpoint. Additionaly, if the On/Off Light device registers multiple endpoints (e.g., 10 and 11), the switch only sees one endpoint, instead of recognizing both.

Sketch

Light example: 

#define ZIGBEE_LIGHT_ENDPOINT 11
#define ZIGBEE_LIGHT_ENDPOINT2 12

ZigbeeLight zbLight = ZigbeeLight(ZIGBEE_LIGHT_ENDPOINT);
ZigbeeLight zbLight2 = ZigbeeLight(ZIGBEE_LIGHT_ENDPOINT2);


void setup() {
  Serial.begin(115200);

  // Init LED and turn it OFF (if LED_PIN == RGB_BUILTIN, the rgbLedWrite() will be used under the hood)
  pinMode(led, OUTPUT);
  digitalWrite(led, LOW);

  // Init button for factory reset
  pinMode(button, INPUT_PULLUP);

  //Optional: set Zigbee device name and model
  zbLight.setManufacturerAndModel("Espressif", "ZBLightBulb");
  zbLight2.setManufacturerAndModel("Espressif", "ZBLightBulb2");

  // Set callback function for light change
  zbLight.onLightChange(setLED);
  zbLight2.onLightChange(setLED2);

  //Add endpoint to Zigbee Core
  Serial.println("Adding ZigbeeLight endpoint to Zigbee Core");
  Zigbee.addEndpoint(&zbLight);
  Zigbee.addEndpoint(&zbLight2);

  // When all EPs are registered, start Zigbee. By default acts as ZIGBEE_END_DEVICE
  if (!Zigbee.begin()) {
    Serial.println("Zigbee failed to start!");
    Serial.println("Rebooting...");
    ESP.restart();
  }
  Serial.println("Connecting to network");
  while (!Zigbee.connected()) {
    Serial.print(".");
    delay(100);
  }
  Serial.println("Connected");
  zbLight.printBoundDevices(Serial);
  zbLight2.printBoundDevices(Serial);
}

Switch Example is untouched.

Debug Message

Switch example prints:
Device on endpoint 10, short address: 0x0, ieee address: 40:4c:ca:ff:fe:5e:d3:c0

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Labels

Area: ZigbeeIssues and Feature Request about Zigbee

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions