Close

Hello Google Spreadsheet

A project log for Monitoring washing machines

One mans quest to spend less time in the basement

Lars KnudsenLars Knudsen 02/06/2016 at 13:520 Comments

For working with the sensor input I would like to test out some different sensors, look at their output during a washing/drying cycle and use that information to figure out how to interpret the output and pick the best sensor for the task. I really like to make informed decisions (I guess my academic background is to blame here) and I think this could also be very useful for future projects. To do this I would like the pi to store the input from the sensor regularly (e.g. every 30 seconds or so) and preferably in a way that lets me graph it easily, e.g. csv or perhaps a spreadsheet.

Last night I got my Pi up and running, set up ssh and ftp on it (and strongly considering VNC) to support developing on it without connecting peripherals. I can highly recommend the guides on the official Raspberry pi site in this regard, https://www.raspberrypi.org/documentation/remote-access/.

The first gen raspi I'm prototyping on until I can get my hands on a zero. So far the ethernet cable is providing network access, but I hope one of the USB wifi dongles I have will work with the Pi and be able to connect to my wifi from the basement

Having the basics up and running I started googling around to figure out how to save the sensor output. In the best of worlds the Pi would save the data on the internet/cloud so I did not have to fetch it directly from the Pi and it turned to be a lot easier than I expected, as I feared I would have to set up an SQL server or such.

Having done a lot of work in excel in the past and some in google sheets I decided to look into if there was an easy way to interface with sheets. Turns out google has made an API for it and better yet, I found an easy to follow guide on how to use it with example code from LadyAda, https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/connecting-to-googles-docs-updated. After 20 minutes of poking around, I had a cloud connected python application making timestamped rows on a google spreadsheet! I was stunned, I though this would be one of the biggest challenges of the project. Having the data directly available in google sheets suits my likings and the scope of a project like this very well.

So far I just hardcoded some text for the application to output. Next stop connecting actual sensors to the Pi

Discussions