-
Notifications
You must be signed in to change notification settings - Fork 41
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
a synopsis or template on how to use the zigpy-znp library #108
Comments
Central documentation is unfortunately lacking at the moment so here are some links:
Sending messages is usually done through zigpy itself, since it takes care of constructing the ZCL/ZDO header and eventually calling await device.endpoints[1].on_off.toggle() |
This looks very interesting and especially that one #709 thanks. what is not clear for me is related to zipy- versus zigby stack. In other terms, can I develop a python application relying only on the zigpy- ? What do you mean by "Received messages should be passed to handle_message." in #709 ? Do you mean we have to use add_listener() ? In that case the all zigpy stack mecanism came, correct ? |
Yes. Zigpy on its own just handles ZCL and ZDO, it doesn't talk to any radios and expects a zigpy-znp is dependent on zigpy and internally uses its structures, like
That linked document is explaining how to write a radio library to talk to a new USB coordinator, like zigpy-znp. It describes the internals. Zigpy implements
What portion of zigpy are you trying to avoid? If you configure it to use its SQLite database, it will store device NWK and IEEE addresses and when performing initialization, persist the node descriptor, endpoint descriptors, and model/manufacturer attribute values. That's about it. Binding, setting up attribute reporting, and actual device control is up to your application. If you can describe what you're trying to do, I can maybe come up with a better example application that shows how to use zigpy. As an example of a small, standalone command line tool that uses |
@pitchoun38 Is questions related to Domoticz-Zigate implementation of zigpy-znp and zigate-znp radio libraries discussed here: At least it sounds as pipiche38 what to achieve the same thing in his Zigate plugin for Domoticz because that already have its own ZDO and ZCL layers which are working so believe he for now only want to partly use zigpy radio libraries for hardware abstraction. You might also be interested in the somewhat related discussions here: As well as be aware of zigpy-cli here: https://github.com/zigpy/zigpy-cli |
Thanks for the help |
The zigpy-znp library looks very nice and I wonder if this could be use as a standalone library imported in a python3 code, without the all zigpy stack.
I got some hints from the interesting zigpy-cli project , and so far I'm able to open the communication with the Zigbee usb key. However, I'm struggling on how to send zigbee raw command and how to receive them.
For receiving messages, I guess that I need to create a listener, but not sure on which API it should rely on.
For sending messages, that should I use the request(), broadcast() or mrequest() depending of unicast, briadcast or multi-cast ?
is those API standard for each zigpy- ?
The text was updated successfully, but these errors were encountered: