HOW-TO: Import Hub/Device Data Into Google Spreadsheet

Before I embark on writing up this process, I'd like to know if any audience members are excited (or even interested) by the prospect of pulling information from your Hubitat C7 directly into Google Sheets, using a simple, automated process.

I'm hoping to craft this tutorial in the same vein as my well-received HOW-TO Store data in Google Sheets directly from RM5 โ€“ let's call that the "push" method โ€“ only this time using function calls from within the Spreadsheet itself (the "pull" method).

6 Likes

I would be highly interessted. Please tell me more. :smile:

1 Like

I'm fairly excited by this. Sounds ace!

1 Like

THIS POST WILL EVOLVE IN "CHAPTERS" SINCE IT IS A LEARN-AND-SHARE PROJECT

THEORY

  • Hubitat can publish information about its Devices through the Maker API.
  • The information is shared via private (hub-specific) URLs in JSON format.
  • Google Sheets has the ability to import and parse data from a given URL.
  • It is possible to refresh the imported data on a prescribed time schedule.
  • A custom Apps Script can be employed to format JSON data into a table.
  • Users can make appropriate selection(s) from that table to build reports.
  • Advanced users can easily log, chart, graph, export or send notifications.

Just to mention, there are two apps that exist to do this. Both were developed on SmartThings and ported over to HE.

Chuck Schwer's Google Docs Logger

@krlaframboise's Simple Event Logger
Original ST thread: [RELEASE] Simple Event Logger - Community Created SmartApps - SmartThings Community
Hubitat version with installation instructions: krlaframboise-Hubitat/apps/krlaframboise/simple-event-logger.src at simple-event ยท loverso-hubitat/krlaframboise-Hubitat ยท GitHub

2 Likes

Well, that's refreshing (and I dare say not at all surprising) to hear! I'd like to assume -- without actually installing and testing that user app myself -- that it exposes all of a given (or multiple) device's attributes, so they can be hand picked cell-by-cell for use in formulae, reports, etc. If so, that's essentially the same road I was heading down (albeit with nothing needed to be installed on the HE side, since I was aiming for a "pull" solution vs the "push" method this app surely employs).

Download the Hubitat app