I have already managed to put my Raspberry Pi to work, uploading data from an EnviR to cosm.com (pachube), via a perl script.
I got some ideas from this blog: http://www.jibble.org/currentcost/
Initially, I had some problems to install Device::SerialPort perl module, and I ended up compiling it manually, but I think you can install it easily via apt-get
, but I discovered that just after managed to install manually. I think the command should be:
sudo apt-get install libdevice-serialport-perl
The Envi USB to serial cable is automatically recognized by the Raspberry, but, I had a problem with the script returning a "Permission Denied" on the serial port (/dev/ttyUSB0), so, I had to execute:
sudo chmod 666 /dev/ttyUSB0
After that, everything ran fine.
I'm sending my final script attached, and you can see my feed at: https://cosm.com/feeds/56652
(I just started uploading with the Raspberry from yesterday, 9PM)
As the Envi sends readings every 6 seconds, I decided to make an average from 10 readings, and send the average value to Cosm, so, I'm sending data every minute or so.
Don't forget to change the script, and put your API-Key, and your Feed ID.
Hope you manage to make it work too.