All Projects → timdorr → Tesla Api

timdorr / Tesla Api

Licence: mit
🚘 A Ruby gem and unofficial documentation of Tesla's JSON API for the Model S, 3, X, and Y.

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Tesla Api

Rest980
REST interface to control your iRobot Roomba 980 via local server on your lan.
Stars: ✭ 186 (-85.88%)
Mutual labels:  api, iot
Unit Api
Units of Measurement API
Stars: ✭ 140 (-89.37%)
Mutual labels:  api, iot
Kotlin Obd Api
🚙 A Kotlin OBD-II API for reading engine data
Stars: ✭ 91 (-93.09%)
Mutual labels:  car, iot
Pytradfri
IKEA Trådfri/Tradfri API. Control and observe your lights from Python. Examples available. On pypi. Sans-io.
Stars: ✭ 778 (-40.93%)
Mutual labels:  api, iot
Apisix
The Cloud-Native API Gateway
Stars: ✭ 7,920 (+501.37%)
Mutual labels:  api, iot
Drago
A flexible configuration manager for Wireguard networks
Stars: ✭ 204 (-84.51%)
Mutual labels:  api, iot
Water Monitoring System
Water Monitoring System is an IOT based Liquid Level Monitoring system that has mechanisms to keep the user alerted in case of liquid overflow or when tank depletes.
Stars: ✭ 122 (-90.74%)
Mutual labels:  api, iot
V8 Archive
Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API
Stars: ✭ 486 (-63.1%)
Mutual labels:  api, iot
Dorita980
Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
Stars: ✭ 523 (-60.29%)
Mutual labels:  api, iot
Fritzbox.js
☎️ The leading AVM Fritz!Box API for NodeJS and JavaScript.
Stars: ✭ 36 (-97.27%)
Mutual labels:  api, iot
Deluge Webapi
Plugin for Deluge WebUI providing sane JSON API
Stars: ✭ 90 (-93.17%)
Mutual labels:  api
Neardb
Simple document db made for infinitely scalable globally distributed reads.
Stars: ✭ 92 (-93.01%)
Mutual labels:  iot
Cutehmi
CuteHMI is an open-source HMI (Human Machine Interface) software written in C++ and QML, using Qt libraries as a framework. GitHub repository is a mirror!
Stars: ✭ 90 (-93.17%)
Mutual labels:  iot
Tpp
Repositório central para organização total (Issues, README's, LICENSE's, etc)
Stars: ✭ 92 (-93.01%)
Mutual labels:  api
Habanero
client for Crossref search API
Stars: ✭ 90 (-93.17%)
Mutual labels:  api
Behat Api Extension
API extension for Behat, used to ease testing of JSON-based APIs
Stars: ✭ 92 (-93.01%)
Mutual labels:  api
Packagist Api
The easiest way to work with the packagist API
Stars: ✭ 90 (-93.17%)
Mutual labels:  api
Python Nomad
Client library Hashicorp Nomad
Stars: ✭ 90 (-93.17%)
Mutual labels:  api
Magicblue
💡 Unofficial Python API to control Magic Blue bulbs over Bluetooth
Stars: ✭ 92 (-93.01%)
Mutual labels:  iot
Home Assistant Config
🏠 Home Assistant configuration
Stars: ✭ 92 (-93.01%)
Mutual labels:  iot

Referrals are back! Need a Tesla to test with? Get one with 1,000 miles of free supercharging

Do you work at Tesla? Get in contact! I'd love to help with making this API official.

Tesla JSON API

View Documentation

This is unofficial documentation of the Tesla JSON API used by the iOS and Android apps. The API provides functionality to monitor and control the Model S (and future Tesla vehicles) remotely. The project provides both a documentation of the API and a Ruby library for accessing it.

If any folks at Tesla are reading this, I'd love to help coordinate a developer program for your APIs. If there's any way I can be helpful, please feel free to get in contact. Also, I'd love to be in the beta firmware program 😉

Ruby Gem Gem Version Build Status

This gem provides a basic wrapper around the API to easily query and command the car remotely. It also provides access to the streaming API and a means to process data coming from it.

Installation

Add this line to your application's Gemfile:

gem 'tesla_api'

Or install it yourself:

gem install tesla_api

Usage

Here's a quick example:

require 'tesla_api'

tesla_api = TeslaApi::Client.new(email: email, client_id: client_id, client_secret: client_secret)
tesla_api.login!(password)
# Or if you have an access token:
tesla_api = TeslaApi::Client.new(access_token: access_token) 

model_s = tesla_api.vehicles.first # => <TeslaApi::Vehicle>

model_s.wake_up
model_s.auto_conditioning_start unless model_s.climate_state["is_auto_conditioning_on"]

model_s.set_charge_limit(90)
model_s.charge_start

charge_state = model_s.charge_state
puts "Your Model S is #{charge_state["charging_state"]} " +
     "with a SOC of #{charge_state["battery_level"]}% " + 
     "and an estimate range of #{charge_state["est_battery_range"]} miles"

Copyright

Ruby portions are Copyright (c) 2014-Present Tim Dorr. Released under the terms of the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].