Git Product home page Git Product logo

teslapsmodule's Introduction

TeslaPSModule

Control your Tesla vehicle from PowerShell.

Tesla PowerShell Module

This module will enable you to call Tesla commands (like those from http://mytesla.com and your phone app) in a PowerShell script, and automate them in Scheduled Tasks etc. just like Windows services.

  • Start your climate control automatically
  • Log your physical location over time
  • Use your imagination!

Documentation

See the TeslaPSModule wiki for more info on the project.

Installation

  1. Create folder C:\Users\<username>\Documents\WindowsPowerShell\Modules\Tesla
  2. Copy Tesla.ps1 and Tesla.psm1 into that directory.
  3. You will only have to call Connect-Tesla once (use your email and password as with http://mytesla.com), these will be encrypted and cached in your user profile.
  4. After that you can call Get-Tesla and Set-Tesla as much as you like.

This is a first release and not all functions are currently supported, although more can easily be added.

Currently supported commands are:

  • Get-Tesla commands:
    • climate_state
    • charge_state
    • gui_settings
    • drive_state
    • vehicle_state
    • vehicles
  • Set-Tesla commands:
    • mobile_enabled
    • auto_conditioning_start
    • auto_conditioning_stop
    • door_lock
    • door_unlock
    • sun_roof_control?state=close
    • sun_roof_control?state=comfort
    • sun_roof_control?state=vent
    • charge_stop
    • charge_start

Example Usage

PS> Connect-Tesla

Enter MyTesla.com web site credentials when prompted

PS> Get-Tesla -Command drive_state

shift_state :

speed :

latitude : 47.636793

longitude : -122.134307

heading : 265

gps_as_of : 1432940624

PS> Set-Tesla -Command auto_conditioning_start

Next Steps

The syntax for specific commands could be improved a bit, and this should eventually have proper installer / package manager package.

Fixes, suggestions, improvements etc. are all welcome via the GitHub repository. https://github.com/JonnMsft/TeslaPSModule

teslapsmodule's People

Contributors

jonnmsft avatar jthelin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.