Data logging directly to Google Docs (Google Drive)

[Emanuele] is using Google Docs to log his temperature sensor data automatically (translated). We can see a few benefits gained by using this system. One is that you don’t have to visit the site of the logging hardware to harvest the data, another is that Google will automatically graph the data for you. Of course this means you need some way to connect your logger to the Internet, but we’ve seen buckets of different techniques for doing so. In this case, [Emanuele] is using PIC hardware that has a NIC on the board. But the technique could be used from a computer just as easily as from a microcontroller.

The meat and potatoes of the hack is sniffing out the HTTP header and syntax for writing to cells on a Google Docs (soon to be Google Drive) spreadsheet. After making a new spreadsheet and copying the URL and key from the address bar, he loads up the page using a header-viewer web service. With all the pertinent info in hand he crafts about a dozen lines of code to assemble the HTTP packet, and rolls the timestamp and temperature reading into it dynamically. See the system in action after the break.

Comments

  1. tw says:

    Why did he have to “sniff out the HTTP header”? When I worked with google spreadsheet (back when it was docs), I just used the published docs and called curl. https://developers.google.com/google-apps/spreadsheets/

  2. misterhay says:

    I know of a teacher doing a similar thing with monitoring a greenhouse using Arduinos and Vernier sensors. https://sites.google.com/a/caldwellschools.com/the-hibriten-greenhouse-project/home/real-time-data-monitoring-test

  3. misterhay says:

    There’s a teacher doing a similar thing for monitoring a greenhouse using Arduinos and Vernier sensors:
    https://sites.google.com/a/caldwellschools.com/the-hibriten-greenhouse-project/home/real-time-data-monitoring-test

  4. Sean says:

    “Of course this means you need some way to connect your logger to the Internet, but we’ve seen buckets of different techniques for doing so.”

    What are some of those ways? I think I’m googling wrong. :)

    I’m looking for a straightforward way to collect thermocouple data to an online space like googledocs.

  5. NewCommentor1283 says:

    first of all technically,
    this is interesting and a great accomplishment.

    but personally, i feel this would be usless if logging anything that might/will coincide with internet being lost… like earthquakes(sisemic detection) poweroutages(voltage spike monitor) ect.

    but PERFECT for a greenhouse or other non critical…

    PS: i never have, and never will use googledocs,
    or anyother cloud service whenever possible.

    PPS: i feel bad for all those people ABOUT to be forced to use googledocs in order to participate in highschool (errors, hacking, loss/internet, ect)

    PPPS: spyware is watching you(everyone),
    and if its in/on a cloud…
    some disgruntled student _might_ get you expelled
    by modifying your project 5 mins b4 presentation…
    jussayn

    • NewCommentor1283 says:

      EDIT: i know hotmail is cloud based, im talking about things that can and always have been done locally.

      EDIT: … or they might just publish/sell your stuff 5 mins b4 presentation and when teacher checks if its copy&pasted from the internet… automatic expulsion and you’ll NEVER EVER get into a university.

      • markS says:

        Fear is our greatest weapon… and Surprise… Fear and Surprise are our two greatest weapons…
        and Ruthless Efficiency… Fear, Surprise and Ruthless Efficiency are our three greatest wepaons !!..

  6. Wassi says:

    another way of interfacing with Google docs would be Google app script ( https://developers.google.com/apps-script/) . you could also react to certain values (e.g. temperature Spikes) by sending out emails.
    but sniffing http requests certainly raises the hack Level;-)

  7. clipless03 says:

    I’m trying to get a similar setup working for my beer fermentor. Right now I’m leaning towards Cosm (formerly Pachube). Does anyone have some experience with this site?

    Currently I have a $25 Pogoplug running arch linux with an arduino attached that’s reading several dallas digital temp sensors.

  8. Brian Hickey says:

    Google has certainly changed the manner in which spreadsheets are update since this article was written. I’ve been trying to sniff this out for a week. I’m not a programmer, and I’m not well versed in any language except AutoLISP (learnt many years ago).

    Has anyone played with this topic since Docs converted to Drive?

  9. indirakumar says:

    how it is using arduino and ethernetsheild..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,441 other followers