Part of concept I'm working up uses a base station to act as the bridge between a suite of sensors and the internet. Cosm is a web service that manages data upload, storage and retrieval and enables sharing of data streams.
Getting data off the Pi and into Cosm is reasonably trivial, but it took me a few tries to get it working, but here's the Cosm datastream. The Pi is hooked up to a BMP085, as described previously. In the end I bought an Adafruit cobbler for the convenience of hooking up to a breadboard and popped the Pi in a crust of laser-cut clear acrylic.
The code used the python BMP085 example from Adafruit. To upload to Cosm, I found a small library by Josh Heling that generates the JSON data structure and uploads to your datastream on Cosm. I did have to get the mechanize library for python, but that was a simple as downloading the latest zipped source and running the installer script... Cosm itself recommends using EEML libraries but I couldn't install them properly, possibly due to the /temp RAM drive being set too small on my Pi...
Another thing to note is that Cosm controls access to your streams using 'API keys'. These keys can be set on a per-datastream basis or one for each data feed. They let you control read, write, create and delete. Make sure you get the settings right as I got stuck with '403 forbidden' HTML errors that I was trying to debug from my code, but in the end the cause was a write-locked API key :-/
Anyhow, here's the code:
from Adafruit_BMP085 import BMP085
from pachube import PachubeFeedUpdate
# Example Code
# Initialise the BMP085 and use STANDARD mode (default value)
# bmp = BMP085(0x77, debug=True)
bmp = BMP085(0x77)
# To specify a different operating mode, uncomment one of the following:
# bmp = BMP085(0x77, 0) # ULTRALOWPOWER Mode
# bmp = BMP085(0x77, 1) # STANDARD Mode
# bmp = BMP085(0x77, 2) # HIRES Mode
# bmp = BMP085(0x77, 3) # ULTRAHIRES Mode
temp = bmp.readTemperature()
pressure = bmp.readPressure()
altitude = bmp.readAltitude()
print "Temperature: %.2f C" % temp
print "Pressure: %.2f hPa" % (pressure / 100.0)
print "Altitude: %.2f" % altitude
API_KEY = 'API key goes in here'
FEED = '73642'
API_URL = '/v2/feeds/1234.xml' .format(feednum = FEED)
pfu = PachubeFeedUpdate(FEED,API_KEY)
# do some stuff; gather data, repeating as necessary for any number of datastreams
# finish up and submit the data