IoT Macroprogramming Framework
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


PyoT is a Web-Based Macroprogramming Interface for the IoT

  • Allows remote management of IoT-based networks
  • CoAP resources and 6LoWPAN nodes are abstracted as high-level Python objects
  • Provides a web interface to interact with CoAP resources
  • Provides interactive Macroprogramming, using the Shell
  • Resource discovery and indexing based on CoRE Resource Directory
  • Flexible event handling (automatic reaction when IoT resources send alarm notifications)
  • Asynchronous tasks performing communication with IoT nodes on PyoT Workers

PyoT Architecture

PyoT comes with some Contiki Cooja simulations for local testing. The examples included in the package require the gcc-msp430 version 4.7.2 compiler. Here you can find instructions on how to build the compiler. For simplicity a packer-based virtual machine is provided in the packer_pyot_vm folder. To build the VM just execute The resulting VM can be loaded on VirtualBox and contains a ready-to-run version of PyoT, with all the required dependencies.

Requirements and manual installation (tested on Ubuntu 12.04)

Install general requirements:

sudo apt-get install python-mysqldb libmysqlclient-dev rabbitmq-server python-pip python-dev libcurl4-gnutls-dev graphviz libgraphviz-dev  libfreetype6-dev libpng12-dev

The next step will install python requirements, in a local virtual env folder, and build libcoap:


This command creates a local sqlite database and loads some preliminary data on it:


An admin user account is automatically created. Username: noes. Password: noes.

How to run the application

Start the web application:


Start the worker node in another terminal:


Open a new terminal to start IPython Notebook interface:


Compile and start on the provided Cooja simulations. For the following steps I assume you have ant, jdk, msp430gcc and everything required to run a Cooja simulation already installed:


The first simulation includes a set of simple CoAP servers with simulated sensors and actuators. It can be tested opening and executing the 'demo' notebook.


The second simulation includes a T-Res example. To test it just open and execute the 'T-Res' notebook.

Start tunslip, open another terminal and type:


Open the Cooja simulator window and start the simulation. In a few seconds you should see the Host and Resource page populating with the nodes. The system will automatically perform resource discovery on the hosts.


  • Program group of nodes or entire networks as a whole
  • Easily control sensors and actuators
  • Support Synchronous and Asynchronous Semantic

The easiest way to test macroprogramming is through the IPython Notebook interface. You can find some example scripts preloaded on PyoT's Notebook.

Build status

builder build outcome
Travis unit tests Build Status
Code Health