Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is the data of zdo and zcl sent and received? #143

Open
lbuque opened this issue Nov 1, 2022 · 5 comments
Open

How is the data of zdo and zcl sent and received? #143

lbuque opened this issue Nov 1, 2022 · 5 comments

Comments

@lbuque
Copy link

lbuque commented Nov 1, 2022

We received this request.

I'm learning how zigpy works?

How is the data of zdo and zcl sent and received?

@puddly
Copy link
Collaborator

puddly commented Nov 1, 2022

Zigpy expects low-level access to the stack. Radio libraries are expected to implement only a few methods:

That being said, it seems that your radio is based on the TLSR8258 chip. Is there any widely-available USB stick using this chip? If not, there is not going to be much of a benefit to writing a new radio library when we already have good support for CC2652, EFR32, and Conbee chips.


@Hedda I appreciate your enthusiasm but please do not recruit developers to write new radio libraries without first consulting with the zigpy team.

The maintenance burden of the existing legacy zigpy radio libraries is significant. Adding yet another radio type will not help with Zigbee adoption when we already have five to choose from, it will just increase the amount of time it takes to make changes to zigpy.

@AskAlice
Copy link

AskAlice commented Dec 7, 2022

stubled across this thread 👀

Doing a little digging I see zigpy is mostly used for coordinators, but could it be used in a device context? Communicating with the esp32 of a ttgo t-zigbee over serial, then relaying that over to another zigpy-controlled device (z2m or zha) ?

If there were a method of abstracting away the zigbee radio's firmware it could greatly improve the developer experience with working with these boards. For me, i'm kind of running into a brick wall at the moment because the sdk provided by telink only gives examples of firmware that works within the limits of the zigbee alliance's specification, which leaves me fairly in the dark about how to implement custom messaging that doesn't conform to ZCL or ZDO.

@puddly
Copy link
Collaborator

puddly commented Dec 7, 2022

Doing a little digging I see zigpy is mostly used for coordinators, but could it be used in a device context?

Totally, but only if the firmware can be configured to join a network. There's no standard zigpy API for this since we have never needed to do it. I believe the EmberZNet and ZNP coordinators can be configured to join a network as a router but I have not tried it in a very long time.

which leaves me fairly in the dark about how to implement custom messaging that doesn't conform to ZCL or ZDO.

Custom messaging can be implemented with ZCL if you define a manufacturer-specific cluster with manufacturer-specific commands. You'd just have the overhead of the ZCL header, which is just a couple of bytes. No reason not to use ZCL.

Multi-device can also be done with multi-PAN commands, but I have only tested that with a ZNP radio and it's not really all that useful, since I don't believe the packets are relayed, nor are they encrypted.

@MattWestb
Copy link

@AskAlice You can (normally) only having one coordinator in one Zigbee network (or more true one trust center pair) that is controlling all devices.
But if you can compiling own firmware you can doing one Zigbee Control Bridge that you having one serial port and CLI and can sending and receiving commands over the comport and controlling all devices in the network. Its the same way IKEA Tradfri is working and you can communicating with all devices in the network but not doing the trust center things.
Search for it and you is finding one easy way doing it.

PS: I have cooking firmware for the old IKEA module with it and its working but i have not testing connecting it ESP32 but shall working OK.

@Hedda
Copy link
Contributor

Hedda commented Dec 7, 2022

Doing a little digging I see zigpy is mostly used for coordinators, but could it be used in a device context? Communicating with the esp32 of a ttgo t-zigbee over serial, then relaying that over to another zigpy-controlled device (z2m or zha) ?

If there were a method of abstracting away the zigbee radio's firmware it could greatly improve the developer experience with working with these boards. For me, i'm kind of running into a brick wall at the moment because the sdk provided by telink only gives examples of firmware that works within the limits of the zigbee alliance's specification, which leaves me fairly in the dark about how to implement custom messaging that doesn't conform to ZCL or ZDO.

Tip on another possible alternative ESP32 target hardware for that described scenario could be the upcoming Espressif ESP32-C6 SoC series (and Espressif ESP32-H2 SoC series) which add an integrated 802.15.4 radio that supports Zigbee 3.0 (and Thread).

See related discussion here -> zigpy/zigpy#783

PS: I believe that those with Espressif contacts can get such DevKit boards for evaluation upon request(?) -> [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants