Zigbee with Python

With my custom made devices I’m using custom data structures and ZigBee is used only as a data transport protocol. However, having more and more standard ZigBee devices available, I started to look for some standard ZigBee features implementation in Python. Unfortunately wasn’t really able to find anything which would fit the purpose – ZigBee feature implementation decoupled from manufacturer specific elements and covering ZDO/ZCL processing/parsing as per ZigBee standard.

There are usually three groups of references coming up in search results:

  • XBEE python package, which provides a tool which handles XBEE api, however has nothing to do with ZigBee as such. I’m already using this library with slight modifications today to handle XBEE api in my application.
  • bellows python package, which gets really close to what I’m looking for, but is very much linked with specific manufacturer device api.
  • custom implementations of specific ZigBee ZCL/ZDO requests for specific devices as part of some project.

So I decided to look a bit more into bellows package. Quite quickly I was able to simulate parsing of ZCL/ZDO messages, but few of the general concepts were not exactly matching my expectations. So to make it work for me either I had to implement EZSP uart protocol in my coordinator device, or rewrite several parts of library which would anyway require quite good understanding of ZDO/ZCL stuff. Unfortunately neither was looking as a quick and simple option.

The only option left was to dig into ZigBee ZDO/ZCL details and create some kind of prototype library by myself to get better understanding what I can get out of standard features, the complexity of implementation, and then decide to have another look on bellows package or continue with own library creation.

Leave a Reply

Your email address will not be published. Required fields are marked *