Hi. Unless you know of some existing code for processing the serial messages, I'm going to be writing a script to take the serial output and pump the data into Patchube. I'll also probably modularize it to write out to CSV or MySQL or somesuch.
I'm going to be deploying this GC kit as a permanent environment monitor, and want to log the data...
Any thoughts / desires?
Thanks.
-Pete
Serial processing code? Patchube?
Re: Serial processing code? Patchube?
Yes, please do!
What data format does Pachube want? This has been on my list of "stuff to figure out" but I since releasing the kit I haven't had time. If there is anything I can do in the firmware to make it easier to interface the kit with Pachube then I'm all for including it in the next rev.
What data format does Pachube want? This has been on my list of "stuff to figure out" but I since releasing the kit I haven't had time. If there is anything I can do in the firmware to make it easier to interface the kit with Pachube then I'm all for including it in the next rev.
Jeff Keyzer
http://mightyohm.com
http://mightyohm.com
-
- Posts: 12
- Joined: Thu Dec 23, 2010 12:56 pm
Re: Serial processing code? Patchube?
It's a pretty simple XML format. Here's the API quickstart:
http://api.pachube.com/quickstart/
I'm hoping to take a stab at this next week, but I may wind up buried like this week...
As far as changing the firmware, I don't know of anything specific to change. The various modes (slow, fast, etc) will complicate things, but it's not insurmountable. You already have the values delimited in the output so it shouldn't be a problem to reliably parse them from the serial stream.
-Pete
http://api.pachube.com/quickstart/
I'm hoping to take a stab at this next week, but I may wind up buried like this week...
As far as changing the firmware, I don't know of anything specific to change. The various modes (slow, fast, etc) will complicate things, but it's not insurmountable. You already have the values delimited in the output so it shouldn't be a problem to reliably parse them from the serial stream.
-Pete
Re: Serial processing code? Patchube?
I tried to make the serial data easy to parse, but I didn't know who or what would be parsing it, so I had to take a guess. Let me know if there is anything i could have done better.
Jeff Keyzer
http://mightyohm.com
http://mightyohm.com
-
- Posts: 12
- Joined: Thu Dec 23, 2010 12:56 pm
Re: Serial processing code? Patchube?
Nothing for now. 
I've got a simple class written that pulls the data from the serial port and logs it to a CSV file. The next bit that is still being worked on is to take that second by second data and roll it up for pushing to Pachube on a longer interval...every 5 minutes or whatever. I just haven't had time to finish it off.
I'll post the code up to github once it is working and has enough documentation for others to make use of it.

I've got a simple class written that pulls the data from the serial port and logs it to a CSV file. The next bit that is still being worked on is to take that second by second data and roll it up for pushing to Pachube on a longer interval...every 5 minutes or whatever. I just haven't had time to finish it off.
I'll post the code up to github once it is working and has enough documentation for others to make use of it.
Re: Serial processing code? Patchube?
Yes, the interval is important. I think the NetRAD shield by Freaklabs posts data about once a minute.
Are you writing python or ?? What operating system?
Very excited to see your code.
Are you writing python or ?? What operating system?
Very excited to see your code.

Jeff Keyzer
http://mightyohm.com
http://mightyohm.com
-
- Posts: 12
- Joined: Thu Dec 23, 2010 12:56 pm
Re: Serial processing code? Patchube?
Yes, it's Python. I'm writing it on OS X, but will test it on Ubuntu and Windows 7 as well. Should be no problem to use it across operating systems.
-
- Posts: 12
- Joined: Thu Dec 23, 2010 12:56 pm
Re: Serial processing code? Patchube?
Ok, I had a bit of time last night and got a basic lashup working. You can see the data on Pachube here: https://pachube.com/feeds/29101
The code still needs some work to be suitable for public viewing.
The code still needs some work to be suitable for public viewing.
