zigpy / zigpy-xbee

A library which communicates with XBee radios for zigpy
GNU General Public License v3.0
22 stars 18 forks source link

XBee as end device #87

Open dbruggner opened 4 years ago

dbruggner commented 4 years ago

Is it possible to use a XBee S2C as a ZigBee end device with this library? I.e. the XBee should join the network and it should be possible to send Home Automation profile commands to the ZigBee coordinator.

Adminiuga commented 4 years ago

Not out of the box. The library itself does not process received requests. You would need to add a layer which responds and reacts to incoming requests.

sybohy commented 4 years ago

@Adminiuga can you provide a bit more context on what's missing? I can try to take a crack at it.

Shulyaka commented 11 months ago

@sybohy I guess no one tried it before.

At the very minimum, you will need to update the ControllerApplication.start_network function to join the network as a router or end device, update the AO command value to enable bind requests pass-through, and possibly some more configuration.

To handle requests and send messages to the coordinator you will need to implement a custom zigpy.device.Device class (or may be zigpy.quirks.CustomDevice) for the coordinator device that would implement your application protocol and add it to the devices list (ControllerApplication.devices).

However if your use case is simple, you wouldn't need this library at all, just configure XBee for the transparent mode (AP=0) and configure Cluster ID (CI), endpoints (SE, DE) and destination address (DH, DL).

Hope this answers the question.