A.Quarter.To.Seven

Some of Stef's Stuff

Raspberry Pi to Xively (Cosm, Pachube)

by Stefano on 2014.06.05, no comments

raspberry-pi-xively-cosm-pachube
Want create site? Find Free WordPress Themes and plugins.

Share your sensors is a breeze with Xively

We have our Raspberry Pi and some sensors onboard or around the house and we would let those data to be available for online screening. Xively service (formerly Cosm, formerly Pachube) is probably the fastest way to do that.

In general, data can be sent to Xively using one of the supported formats with respect to a specific API version. Various Python libraries/wrappers can be found online:

 

METHOD 1 – Python, Xively API, Cron

This method is based on the official tutorial Xively – Rasberry Pi . It is really complete and covers all the required steps from the hardware setup to the actual sensor’s code execution. Assuming the preliminary configuration of the Raspberry Pi (SD card and OS installation) has already been done just start to Write some code!

NOTE: Other than get FEED_ID and API_KEY from the environment you can declare them inside the script changing the section

[python]
FEED_ID = os.environ["FEED_ID"]
API_KEY = os.environ["API_KEY"]
DEBUG = os.environ["DEBUG"] or false
[/python]

into

[python]
FEED_ID = "your_feed_id"
API_KEY = "your_api_key"
DEBUG = false
[/python]

 

 

 

OTHER METHODS — TODO

see

http://www.raspberrypi.org/phpBB3/viewtopic.php?t=11968&p=129437

and use from it

git clone git://github.com/petervizi/python-eeml.git

 

eventually install lxml

http://stackoverflow.com/questions/4598229/installing-lxml-module-in-python

sudo apt-get install python-lxml

Did you find apk for android? You can find new Free Android Games and apps.

Leave a Reply

Your email address will not be published. Required fields are marked *