txThings - “Good enough” is good enough


Long time no see! Last update here was posted more than a year ago. There are multiple reasons for that, but the most important one is that I decided to pause embedded development for a while, and learn more about application layer, and user applications. For a start I decided to write a library for CoAP - new protocol for Internet of Things. I also decided to write it in Python, using Twisted framework. The development has been quite slow, but last month I accidentaly found pyvideo.org site with various Python related videos, and found a brilliant talk by Alex Martelli : “Good enough is good enough”

After watching the video, I decided to quickly finish the work on current features, and release the first version of library, with some features completed, and some missing. I hope to get some feedback from users, so that I can improve the library.

txThings - CoAP Python library

I’ve decided to call the library txThings - Twisted has a tradition of calling modules with plural nouns (also Coap LIbrary for Twisted gave really bad acronym ;) ).

txThings has the following features:

Other nice things:

txThings installation HowTo

txThings is posted on Github. The easiest way to get it is to clone the repository to your local machine using the command below:

git clone git://github.com/mwasilak/txThings.git

Library contains CoAP code (inside “iot” directory) and three examples:

Client_GET and client_PUT both use port 61616 - to use them simultaneously change port number in one of the clients. Server will send blockwise responses for default settings. To use txThings you need Python 2.7 with Twisted installed (I suggest using the latest Twisted version, but older releases also work - tested with 11.1).

Current work

Next step is to add Observe and full Core Link Format support to txThings. I am also planning to continue investigating Kivy library.

If you are interested in using txThings and have any questions, don’t hesitate to contact me.