Skip to content

Instantly share code, notes, and snippets.

View emily-pesce's full-sized avatar

Emily emily-pesce

  • USA
  • 04:16 (UTC -07:00)
View GitHub Profile
Use Ruby. Load into irb.
(reqires tesla_api gem: https://github.com/timdorr/tesla-api)
1) require 'tesla_api'
2) tesla_api = TeslaApi::Client.new("YOUR_TESLA_ACCOUNT_EMAIL_ADDRESS", "81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384", "c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3")
3) tesla_api.login!("YOUR_TESLA_ACCOUNT_PASSWORD")
This will return a long string that is your token.
@emily-pesce
emily-pesce / tesla-data-logger
Last active January 24, 2021 12:39
Google Sheet Data Logger for Teslas
function getData() {
var id = 'REPLACE_WITH_GOOGLE_SHEET_ID';
var sheet = SpreadsheetApp.openById(id);
var today = Utilities.formatDate(new Date(), 'America/New_York', "MM/dd/yy hh:mm:ss a");
var base_url = 'https://owner-api.teslamotors.com/api/1/vehicles/'
var auth_token = "Bearer REPLACE_WITH_AUTHORIZATION_STRING"
Verifying my Blockstack ID is secured with the address 1CL3Vpesx8zgUhS6jhoJ1SksTdSzhVZ1JR https://explorer.blockstack.org/address/1CL3Vpesx8zgUhS6jhoJ1SksTdSzhVZ1JR

Keybase proof

I hereby claim:

  • I am michael-pesce on github.
  • I am michaelpesce (https://keybase.io/michaelpesce) on keybase.
  • I have a public key whose fingerprint is B600 E84D 5928 1823 E028 1904 7779 BECF 537C F5E3

To claim this, I am signing this object:

@emily-pesce
emily-pesce / NestScript.gs
Last active June 26, 2023 07:12
Nest Thermostat Data Collection in Google Sheets for Upstairs/Downstairs Setups
// CREDIT TO BEEZLY for a lot of this, I just adapted it a bit and added more documentation :)
// --> BEEZLY's work: https://gist.github.com/beezly/9b2de3749d687fdbff3f
// To make this work:
// 1) create a new Google Sheet (name it whatever you'd like, e.g., "Nest Data")
// 2) on the menu bar click Tools -> Script Editor... to open Script Editor (new window)
// 3) in Script Editor delete all the default scripts/files, and create a new one (I called it "NestScript.gs")
// 4) cut and paste this entire file into NestScript.gs, then SAVE THE SCRIPT
// 5) on the menu bar click Publish -> Deploy as Web App
// select "Execute the App as Me"