Skip to content
yaleman edited this page Sep 13, 2010 · 15 revisions

Copied from here on pachube after much googling on how to use this library :)

What you need is

  • one Arduino with some sensor
  • python-eeml

After you have uploaded your application to the Arduino, which sends measurement data via USB (for an example look at this), and installed python-eeml (sudo python setup.py install) you are ready to update your data stream on Pachube, like this:

@import eeml
import serial

  1. parameters
    API_KEY = ‘YOUR PERSONAL API KEY
    API_URL = ‘YOUR PERSONAL API URL, LIKE /api/1275.xml’

serial = serial.Serial(‘/dev/ttyUSB0’, 9600)
readings = serial.readline().strip().split(’ ’) # the readings are separated by spaces
pac = eeml.Pachube(API_URL, API_KEY)
pac.update([eeml.Data(0, readings0, unit=eeml.Celsius()), eeml.Data(1, readings1, unit=eeml.RH])
pac.put()@

This library only supports manual update at the moment, however you can generate full EEML documents with it.

Clone this wiki locally