Reading and writing data to Amazon's Simple DB

Hi Forum

I am a newb to xbee and related technologies and am having a great time exploring it’s potential for domestic smart grid applications. I am new to Python also, but having programmed for a number of years, am also finding that great fun… nice language, and keen to learn more. I have been given a Connect Port X4 to play with and a few XBee sensors and asked to develop software for Home Area Network Management. I have figured out how to configure end devices and routers and read sensor data. Support for activities like these seems more than adequate (as one might expect). What I really want to do is send sensor data to a remote database like Amazon’s SimpleDB service. There are a number of Python libraries that support this and I have already used them to send data to SimpleDB using a simple XBee coordinator connected to my PC via a COM port in API mode… lots of potential. However, I would like to do this from the Connect Port Gateway if at all practical.

I hadn’t appreciated (until this evening) how sparse the Python libraries are for the Connect Port, and none of the third party libraries I’ve tried work, even those that only rely on standard Python libraries. Given this limitation and also given that the price of the Connect Port X4 is comparable to a low end Netbook, I’m beginning to wonder if I should be using a Netbook for development as at least then I will be able to utilize a full distribution version of Python, any third-party libraries I might take advantage of, and a full OS. With all the libraries available for Python, XBee software development could be very simple and quick, but with the very limited library support in the X4 I’m beginning to wonder if it is going to be worth the significant extra effort to develop software for it.

Before I hang my head in shame, give up, and buy myself a low end Netbook and move on, does anyone have any experience in getting third party libraries to run on the X4, or other digi gateways, esp. with a focus on accessing web services like SimpleDB?

Many thanks indeed for any assistance you can offer.


Have you looked at Digi’s Dia framework at all? I’m finding it to be something of a pain in the butt (buggy, poorly documented) but it has a lot of potential, and the build tool included with it does a good job of packaging up the modules you need from a standard Python 2.4.3 installation. Basically, you can grab any pure-python module from a Python 2.4.3 install and run it on the ConnectPort. It’ll probably be helpful to byte-compile it ahead of time to save time, space, and flash write-cycles.

Many thanks for the tip - I will certainly check out the Dia framework… I must admit, however, that using something like the SheevaPlug ( which I discovered yesterday, instead of an X4, is beginning to look far more attractive… it runs a full Linux kernel, is little bigger than a laptop powerpack, and there are moves to get it down to $49… amazing! The ability to run Python and any third party libraries (without messing around with packaging them up), and even Mono (essentially .NET for Win, OSX and Linux), is pretty hard to resist. The days of the semi-dumb router are numbered :wink:

Yeah, I’ve really been tempted by the SheevaPlug. My first attempt at rolling my own XBee gateway was with an Asus WL-520gu; it worked, but I was having problems with it freezing up. Then I saw the package deal on the Digi gear for the green design contest and jumped at it. Despite the shortcomings of the ConnectPort, the other bits (OEM modules, USB breakout board, router, sensor) are nice to have and make the investment worthwhile. And it looks like there’s just a plain old ZB Pro module inside the CPX4 (with RPSMA connector), so if I get really frustrated I’ll just yank out the good bits! :slight_smile:

Totally off topic - so sorry. Just ordered a TonidoPlug to hopefully replace my home media center PC, email server, central data storage… all in a plug! 6W instead of 500W! Damn, I love miniaturization!!!