Close

(Almost) No code data logging to Google Sheets

A project log for Squeak: GPS pet tracker

Squeak is a LoRaWAN GPS pet tracker with a very long battery life. It allows you to ask your pets to share their location

mihai.cuciucmihai.cuciuc 11/29/2022 at 05:130 Comments

Helium has this cool integration to Google Sheets through Google Forms. Once you register the tracker on the Helium console you can follow this guide on how to dump the data into Google Sheets.

The only code you need to massage the data is in the custom decoder. For example if you just want to fill counter, battery and temperature values in your spreadsheet this can be as simple as filling which bytes go where in the template built by the Helium console from your Google Form.

function Decoder(bytes, port) {
  // TODO: Transform bytes to decoded payload below
  var decodedPayload = {
    "battery": bytes[3],
    "counter": (bytes[1] << 8) + bytes[2],
    "temperature": bytes[4]
  };
  // END TODO
  return Serialize(decodedPayload)
}

You can add fancier fields, like latitude and longitude by decoding them similarly to how you do it for Datacake.

Then you can plot your data in Google Sheets or download the Excel file and do it locally.

Discussions