Logging variables to Google sheets


1) Give a description of the problem
I would like to log some variables to Google sheets for auditing purposes.

3) What is happening/not happening?
I can’t seem to find an easy way. There are smart apps, but those log device activity, not variables. I really don’t want to create dozens of fake devices to try to get them to log.

Capturing Global Variables in Google Sheet

Thanks to another thread, they recommended https://github.com/loverso-smartthings/Google Docs Logging which works well

Which Piston Ran

Also try this form method. It works a teat and doesn’t require opening access to the Sheet to public.


Thanks for this idea - it was helpful for creating my own event log to Google Sheets. I just implemented the same approach, but instead of the CURL command (like in that document), I’m making web posts directly from WebCore. I have a piston set up just for logging and it detects various changes (doors, windows, location mode, etc) and logs to the Google Sheet. Here’s an excerpt:


I do something similar using the Google Sheets smart app

Once you have this sheets script set up you can log directly from webCoRE (I’m using http GET) to sheets bypassing the smart app

https://script.google.com/macros/s/KEY/exec?{$currentEventDevice} {$currentEventAttribute}={$currentEventValue}”

The associated google script takes the data before = makes that column heading, then appends new row with time stamp and data in appropriate column.

Google sheet webcore?

@AvronW and @ddtex awesome!! I love WebCore’s Fuel Streams, but it just goes offline way too often. Now I can easily create my own. Works like a charm!!


In case anyone stumbles across this, I have created a couple of more generalized scripts for accessing google sheets. One to write the data and another to read it. See links below.