-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Area: ZigbeeIssues and Feature Request about ZigbeeIssues and Feature Request about ZigbeeType: Feature requestFeature request for Arduino ESP32Feature request for Arduino ESP32
Milestone
Description
Related area
Zigebee
Hardware specification
ESP32C6
Is your feature request related to a problem?
Current Zigbee library examples focus on one-to-one communication. In real use cases, like mine, we often connect multiple end devices (e.g. 5) to a single coordinator. No endpoint/device information is displayed when receiving data (e.g. temperature).
It is difficult to identify which device sent the data.
The existing temperature (I tried to modify 2 devices connected; the second one took a long time) example does not show how to scale to multiple devices.
Describe the solution you'd like
Suggested improvements:
Show the sender's endpoint or device address when receiving data.
Add an example of multiple devices sending data to one coordinator.
Describe alternatives you've considered
No response
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
- I confirm I have checked existing list of Feature requests and Contribution Guide.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
Area: ZigbeeIssues and Feature Request about ZigbeeIssues and Feature Request about ZigbeeType: Feature requestFeature request for Arduino ESP32Feature request for Arduino ESP32
Type
Projects
Status
Done
Activity
P-R-O-C-H-Y commentedon Jun 3, 2025
Hi @kiansiong85, please if you are able to test the changes in the linked PR. It adds the functionality to receive endpoint+address of the device that sends the temperature or you can directly ask for the temperature or configuration to specific device.
kiansionglau commentedon Jun 12, 2025
Thanks a lot for the update. I’ve tested the new functionality and can confirm that it now successfully receives the endpoint and address of the device sending the temperature — much appreciated!
However, I’m still encountering the same issue as before: it seems I’m unable to connect to more than one device at the same time. Just wondering — does the current implementation support multiple devices simultaneously, or is that still in progress, or you have any advice for guide able give to me?
Thanks again for your support!
kiansionglau commentedon Jun 12, 2025
Below some serial port test result, Even after all i re-uploading the entire program, it still seems to only connect to one device.
Serial Port Print:
Current status: Waiting for 101 seconds, 1 device connected
Network status:
Network open time remaining: 79 seconds
Devices currently connected: 1
Expected number of devices: 2
...Temperature sensor value: 28.76°C from endpoint 11, address 0xac82
...Temperature sensor value: 28.76°C from endpoint 11, address 0xac82
Current status: Waiting for 112 seconds, 1 device connected
Network status:
Network open time remaining: 68 seconds
Devices currently connected: 1
Expected number of devices: 2
...Temperature sensor value: 28.73°C from endpoint 11, address 0xac82
...
P-R-O-C-H-Y commentedon Jun 12, 2025
Hi @kiansiong85 Thank you for the feedback. Can you share your code please?
kiansionglau commentedon Jun 12, 2025
Sure, need your help. sure can .
Code.zip
Appreciate your strong support and guide. I don't know how send to you, but i zip the file and add attachment. if you no received, welcome inform me anytime.
P-R-O-C-H-Y commentedon Jun 12, 2025
I see the problem :) You need to add to the
setup()
where you are setting up the zbThermostat devicezbThermostat.allowMultipleBinding(true);
to allow multiple devices to bind to the Thermostat endpoint. Its just simple as this :) The multi-device binding have been improved in some last updates so it should work without any issues :)kiansionglau commentedon Jun 12, 2025
Hi P-R-O-C-H-Y, Thank you so much — it's working now! I really appreciate your help
kiansionglau commentedon Jun 16, 2025
Dear P-R-O-C-H-Y,I would like to ask a question regarding the device binding functionality of the Thermostat.
I have already successfully bound two devices, but when I attempted to add more devices later, it did not work.
Have you encountered this issue before? Does the Thermostat only support binding all devices at once initially, or is it supposed to allow adding new bindings individually later on?
P-R-O-C-H-Y commentedon Jun 16, 2025
Hi @kiansionglau, I see no issue why binding multiple devices should not work. The binding is done the same way as for on/off switch which I tested to be bounded with 7 on/off lights. Can you post any logs here?
kiansionglau commentedon Jun 16, 2025
During my testing, I found that binding multiple devices simultaneously (e.g., devices 1, 2, and 3) works as expected.
However, when I bind devices 1 and 2 first and attempt to add device 3 afterward, the new binding does not seem to take effect.
I would like to clarify:
Does the Thermostat only support binding all target devices at once, without allowing individual additions later?
For reference, I’ve attached my code below. I’d really appreciate it if you could take a look and let me know if there’s anything I should adjust or keep in mind when you have time.
Also, I’ll review your switch on/off button code again. Thanks so much—I truly appreciate your support!
tempesensor_freertos_imu_zigbee3.zip
NewZigbee_Thermostat_ver2.zip
P-R-O-C-H-Y commentedon Jun 17, 2025
There shouldn't be any issue adding binding new devices any time. Does it print anything when the device joins the network to the log? Please set for Thermostat before flashing in IDE Tools menu ->
Zigbee mode: Zigbee ZCZR (coordinator/router) - Debug
and also setCore Debug Level: Verbose
and post logs when the 3rd device joins.kiansionglau commentedon Jun 18, 2025
Dear P-R-O-C-H-Y, thanks a lot your advise, i use 2 device to test first. this is the logs from serial port. I think I can see the problem when using debug mode, but I'm not sure how to solve it yet.
All the temperature devices are using the same code, just with different endpoints.
I've already connected the device with endpoint 12. Now, I want to add another device with endpoint 13, and the thermostat allows connections for 180 seconds.
From the message below, it looks like the Zigbee device was added successfully, with short address: 0xEA90.
Serial port:
Temperature Device, TEMP_SENSOR_ENDPOINT_NUMBER 13
Serial port:
thermostat show New device commissioned or rejoined (short: 0xea90)
endpoint 12 is existing one. but no display the endpoint 13 temperature.
ziptocheck.zip
kiansionglau commentedon Jun 18, 2025
For Reference.
Sometimes I reprogram everything — endpoint 12, endpoint 13, and the thermostat — at the same time, then can works.
P-R-O-C-H-Y commentedon Jun 18, 2025
I see no issue there why it should happen. The only thing if you are reprogramming some board, idk if you use erase_flash. So what may happen that if you don't remove the device from thermostat, but you are reflashing it so its connecting as new (from the temp sensor point of view), the Thermostat already knows this device so the binding is not processed as shown here in the log:
Device already bound to endpoint 1
P-R-O-C-H-Y commentedon Jun 18, 2025
Also you don't have to use different endpoint numbers. Use the same for all sensors, it will differ by the short and ieee address :)
P-R-O-C-H-Y commentedon Jun 18, 2025
Problem I see is that you are using the ShortAddress as the device identifier only. For example if you reboot the Thermostat, you will lost the shortAdresses and from getBoundDevices you will receive only ieee addresses.