A workflow for Alfred to interact with a Tesla vehicle using the unofficial Tesla JSON API
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_remote Initial commit with workflow files Feb 7, 2019
icons Initial commit with workflow files Feb 7, 2019
lib Update teslajson to 1.3.2 Feb 21, 2019
workflow Initial commit with workflow files Feb 7, 2019
.gitignore Initial commit with workflow files Feb 7, 2019
Credentials.py Initial commit with workflow files Feb 7, 2019
LICENSE Initial commit with license Feb 7, 2019
README.md Add link to latest release in README Feb 22, 2019
api-script.py Send vehicle commands to the active vin, not the first vehicle found Feb 7, 2019
icon.png Initial commit with workflow files Feb 7, 2019
icons.py Initial commit with workflow files Feb 7, 2019
info.plist
notify.py Initial commit with workflow files Feb 7, 2019
refresh-vehicles.py Initial commit with workflow files Feb 7, 2019
requirements.txt Add README, requirements for development, and make info.plist details… Feb 7, 2019
set-credentials-script.py Initial commit with workflow files Feb 7, 2019
set-vin-app.py Initial commit with workflow files Feb 7, 2019
set-vin.py Initial commit with workflow files Feb 7, 2019
tesla-alfred-app.py parse wf args Feb 21, 2019
teslapy.py Initial commit with workflow files Feb 7, 2019
updatesettings.py Add auto-update settings Feb 7, 2019
version.py Bump version number Feb 21, 2019
workflow-build.py Add version parsing to workflow-build.py Feb 21, 2019
workflow.gif Add screenshot Feb 21, 2019

README.md

Tesla Alfred Workflow

A workflow for interacting with a Tesla vehicle via the unofficial Tesla JSON API

Screenshot

Workflow in Action

Requirements

Installation

Software Updates

  • This workflow auto-updates to the latest release by checking the repository once daily and prompting the user to install the update.
  • You can also force update with magic argument: tesla workflow:update

Usage

  • The keywords for Tesla Alfred Workflow are: tesla and tesla-activate
    • tesla-activate to set one of your Tesla vehicles as the active one to use with this workflow
    • tesla to interact with the active vehicle

Development

After changing the source files and/or snippet files, you'll need to export the project as a .alfred3workflow file.

I've included in this repository a modified gist from here to build and export the workflow (workflow-build.py). It includes dependencies that you'll need to install. Here's a recommended workflow:

  • virtualenv ~/.envs/workflow-build creates a virtual environment so you can install the dependencies in their own sandbox
  • source ~/.envs/workflow-build/bin/activate activates the virtual environment
  • cd tesla-alfred-workflow moves you to the repo directory
  • pip install -r requirements.txt installs the dependencies in this sandbox (leaving your global/system python alone)
  • python workflow-build.py -o output_dir . exports the current repo directory as a .alfred3workflow file, excluding the following patterns:
EXCLUDE PATTERNS
*.pyc
*.log
.DS_Store
*.acorn
*.swp
*.sublime-project
*.sublime-workflow
*.git
*.dist-info
*.egg-info
*.gif
README.md
workflow-build.py
requirements.txt
*.idea

You can add more patterns in the workflow-build.py file to exclude new file types that you don't want packaged in the zip file.

Release Notes

v0.0.7

  • Update teslajson library to support polling API commands, resolves issue where sending API command raises ContinuePollingException

v0.0.1

  • Initial release