Python & XStick


I’ve got a bunch of digi devices, including a ConnectPortX4. I’d like to be able to use python on my PC’s to monitor devices on the network via the XStick. Is this possible?

It looks like the zigbee module for python is embedded in the ConnectPortX4, as I haven’t found a way to download a copy.

Is this even possible? If so, can someone point me in the right direction?


It is better to run python code on Connect Port X4 which talks to idigi through RCI request and response. And you can also run the PC application in the python which talks to iDigi. Here is a link, which is a sample application describing the communication from XBIB Board(XBee/XBee-Pro ZB modules)–> CPX4 –> iDigi –> PC Application. You can have refererence of that Sample application to develop your own application.

There is a way to implement PC as a gateway just like ConnectPort X4. I think the most possible reason that digi doesn’t provide the python module of zigbee part for PC platform is to prevent PC devices playing the roles in many places and if that happens the ConnectPort X series will lose market and decrease the profit of the company.

Okay let’s talk about the topic we care. If you have searched in this forum you will get some threads say that digi ftp site actually has a file to unofficially provide partially support to make python programs work together with zigbee module and the hardware is something like USB virtual COM port inteface including XBee stick you have. You may need to download that file and place into your working src directory. In order to use it as a python module, I added some fake under the folder to make python interpreter can regonized the zigbee module. It is also necessary to config the COM settings before running the program.
Finally, I make it works like a gateway. It can init the zigbee socket and get a nodelist. But unfortunately just as the author mentions in the source code, it is not offically provided and has many functions unimplemeted and some features are not tested. Take example, sometimes you can only get a nodelist of the coordinator itself and you can not see anyother nodes joined in. After some plugin-out, happenlly I can get a complete list of nodes (I mean complete but only 2 more Xbee modules tested).

The module downloaded may have some minor constant difference from existed ConnectPort Gateway built-in zigbee module. You have to rename them manually.

Anyway, you are encouraged to search the related threads in this forum to get more discussion results. Here attach the module for your convenience.