Nikola: An Alexa Skill (and Python intent handler) for Monitoring and Managing a Connected Tesla Automobile

mekolowich, updated 🕥 2022-12-26 20:06:00

Nikola

Nikola is a python application for monitoring and managing a Tesla connected automobile from an Amazon Alexa natural language device

Authors: Michael Kolowich, Andrew Payne; Additional contributions: Wayne Kozun October/November, 2016

Requires: * teslajson.py by Greg Glockner (on GitHub); * flask_ask by John Wheeler (on GitHub); * geocoder by Denis Carriere (on GitHub)

Notes

The Python program application.py contains the intent handlers required to accept an Alexa Intent, query and post to the Tesla API for a specific car, and return a text response to be spoken on Alexa devices such as the Echo and Dot.

The Alexa skill we designed has not been published because we have not (yet) deployed a public server and a way to handle credentials for multiple cars. We have, however, included two files -- intents.txt and utterances.txt -- that would allow an Alexa intent to be deployed easily by anyone who sets up an Amazon developer account.

The following need to be entered as Environment Variables because they contain private information: * TESLA_USER: Tesla.com username for the Tesla automobile to be monitored and managed; * TESLA_PASSWORD: Tesla.com password; * APP_ID: App ID for the Alexa app that you create; * USE_TOKEN: Set to YES if you want to use a provided OAUTH token instead of Tesla.com username and password; * TESLA_TOKEN: Active OAUTH token for the Tesla automobile to be monitored and managd.

The function DataDump() creates a file named tesladata.txt, which contains a complete dump of the data provided by the Tesla API. An example of this file is provided in this repository. (Note: location and vehicle name data is deleted for privacy reasons.)

Deploying the Nikola Skill using Cloud9

I have written up a procedure on how to deploy the Nikola skill on a personal instance of the Amazon developer console and a free server instance on Cloud9. Included are instructions on how to provision a free Cloud9 account and the steps to take in order to get the application/skill up and running. You will find this in the file: how-to-cloud9.txt. Please note that free instances of Cloud9 terminate after two hours; paid accounts will run indefinitely.

Key Files in this repository

Here are the most important files and what they do: * application.py is the main Python program to handle the incoming Alexa intents, query the Tesla API, issue commands through the API, formulate and return responses to be spoken by an Alexa device; * teslajson.py is the third-party application, written by Greg Glockner, that actually handles the communications to and from the Tesla through the API; * intents.txt is the most current schema of intents, in JSON format, that defines the inquiries and commands that Alexa can pass to Nikola. This can be copied and pasted into the "Intent Schema" section of the "Interaction Model" tab for a Nikola Skill that can be defined and managed in the Amazon Developer Console. * utterances is a list of "Sample Utterances" that Alexa uses to decide which intent to send to the application. Like the Intent Schema, this can be copied and pasted into the "Sample Utterances" section of the Interaction Model for an Alexa Skill; * tesladata.txt is, for reference purposes, a dump of API data from a Tesla Model X running v8.0 of the Tesla firmware as of November, 2016. This list may be generated for any Tesla automobile at any time by invoking the "DataDump" intent by saying: "Alexa, ask Nikola to dump my car's data to a file."

Credits

Much credit goes to Tim Dorr for documenting the Tesla JSON API. Also to Greg Glockner for his teslajson.py approach to unlocking that API's power.

Disclaimer

This software is provided as-is. This software is not supported by or endorsed by Tesla Motors. Tesla Motors does not publicly support the underlying JSON API, so this software may stop working at any time. The author makes no guarantee to release an updated version to fix any incompatibilities.

Issues

Bump wheel from 0.24.0 to 0.38.1

opened on 2022-12-26 20:06:00 by dependabot[bot]

Bumps wheel from 0.24.0 to 0.38.1.

Changelog

Sourced from wheel's changelog.

Release Notes

UNRELEASED

  • Updated vendored packaging to 22.0

0.38.4 (2022-11-09)

  • Fixed PKG-INFO conversion in bdist_wheel mangling UTF-8 header values in METADATA (PR by Anderson Bravalheri)

0.38.3 (2022-11-08)

  • Fixed install failure when used with --no-binary, reported on Ubuntu 20.04, by removing setup_requires from setup.cfg

0.38.2 (2022-11-05)

  • Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with multiple platform tags

0.38.1 (2022-11-04)

  • Removed install dependency on setuptools
  • The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was faulty. Fixed so that future changes in the SOABI will not change the tag.

0.38.0 (2022-10-21)

  • Dropped support for Python < 3.7
  • Updated vendored packaging to 21.3
  • Replaced all uses of distutils with setuptools
  • The handling of license_files (including glob patterns and default values) is now delegated to setuptools>=57.0.0 (#466). The package dependencies were updated to reflect this change.
  • Fixed potential DoS attack via the WHEEL_INFO_RE regular expression
  • Fixed ValueError: ZIP does not support timestamps before 1980 when using SOURCE_DATE_EPOCH=0 or when on-disk timestamps are earlier than 1980-01-01. Such timestamps are now changed to the minimum value before packaging.

0.37.1 (2021-12-22)

  • Fixed wheel pack duplicating the WHEEL contents when the build number has changed (#415)
  • Fixed parsing of file names containing commas in RECORD (PR by Hood Chatham)

0.37.0 (2021-08-09)

  • Added official Python 3.10 support
  • Updated vendored packaging library to v20.9

... (truncated)

Commits
  • 6f1608d Created a new release
  • cf8f5ef Moved news item from PR #484 to its proper place
  • 9ec2016 Removed install dependency on setuptools (#483)
  • 747e1f6 Fixed PyPy SOABI parsing (#484)
  • 7627548 [pre-commit.ci] pre-commit autoupdate (#480)
  • 7b9e8e1 Test on Python 3.11 final
  • a04dfef Updated the pypi-publish action
  • 94bb62c Fixed docs not building due to code style changes
  • d635664 Updated the codecov action to the latest version
  • fcb94cd Updated version to match the release
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mekolowich/nikola-tesla-alexa/network/alerts).

Bump pillow from 2.3.0 to 9.3.0

opened on 2022-11-22 00:25:53 by dependabot[bot]

Bumps pillow from 2.3.0 to 9.3.0.

Release notes

Sourced from pillow's releases.

9.3.0

https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

Changes

... (truncated)

Changelog

Sourced from pillow's changelog.

9.3.0 (2022-10-29)

  • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]

  • Initialize libtiff buffer when saving #6699 [radarhere]

  • Inline fname2char to fix memory leak #6329 [nulano]

  • Fix memory leaks related to text features #6330 [nulano]

  • Use double quotes for version check on old CPython on Windows #6695 [hugovk]

  • Remove backup implementation of Round for Windows platforms #6693 [cgohlke]

  • Fixed set_variation_by_name offset #6445 [radarhere]

  • Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]

  • Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]

  • Added ExifTags enums #6630 [radarhere]

  • Do not modify previous frame when calculating delta in PNG #6683 [radarhere]

  • Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]

  • Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]

  • Added GPS TIFF tag info #6661 [radarhere]

  • Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]

  • Do not attempt normalization if mode is already normal #6644 [radarhere]

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mekolowich/nikola-tesla-alexa/network/alerts).

Bump html5lib from 0.999 to 0.999999999

opened on 2022-07-06 20:05:14 by dependabot[bot]

Bumps html5lib from 0.999 to 0.999999999.

Changelog

Sourced from html5lib's changelog.

Commits
  • 6a73efa Yes, another release, already. :(
  • e0dc25f Fix attribute order to the treebuilder to be document order
  • a3b8252 Back to -dev
  • ebf6225 0.99999999 release! Let's party!
  • a8ba43e Merge pull request #270 from gsnedders/rename_stuff
  • 8cb144b Update the docs after all the renaming and add CHANGES
  • 00977d6 Rename a bunch of serializer module variables to be underscore prefixed
  • 18a7102 Have only one set of allowed elements/attributes for the sanitizer
  • c4dd677 Move a whole bunch of private modules to be underscore prefixed
  • 8db5828 Rename treewalkers.lxmletree to .etree_lxml for consistency
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mekolowich/nikola-tesla-alexa/network/alerts).

Bump numpy from 1.8.2 to 1.22.0

opened on 2022-06-21 21:13:47 by dependabot[bot]

Bumps numpy from 1.8.2 to 1.22.0.

Release notes

Sourced from numpy's releases.

v1.22.0

NumPy 1.22.0 Release Notes

NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

  • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
  • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
  • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
  • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
  • A new configurable allocator for use by downstream projects.

These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

Expired deprecations

Deprecated numeric style dtype strings have been removed

Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

(gh-19539)

Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

(gh-19615)

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mekolowich/nikola-tesla-alexa/network/alerts).

Bump paramiko from 1.10.1 to 2.10.1

opened on 2022-03-29 21:54:56 by dependabot[bot]

Bumps paramiko from 1.10.1 to 2.10.1.

Commits
  • 286bd9f Cut 2.10.1
  • 4c491e2 Fix CVE re: PKey.write_private_key chmod race
  • aa3cc6f Cut 2.10.0
  • e50e19f Fix up changelog entry with real links
  • 02ad67e Helps to actually leverage your mocked system calls
  • 29d7bf4 Clearly our agent stuff is not fully tested yet...
  • 5fcb8da OpenSSH docs state %C should also work in IdentityFile and Match exec
  • 1bf3dce Changelog enhancement
  • f6342fc Prettify, add %C as acceptable controlpath token, mock gethostname
  • 3f3451f Add to changelog
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mekolowich/nikola-tesla-alexa/network/alerts).

Bump ipython from 1.2.1 to 7.16.3

opened on 2022-01-21 19:23:53 by dependabot[bot]

Bumps ipython from 1.2.1 to 7.16.3.

Release notes

Sourced from ipython's releases.

7.9.0

No release notes provided.

7.8.0

No release notes provided.

7.7.0

No release notes provided.

7.6.1

No release notes provided.

7.6.0

No release notes provided.

7.5.0

No release notes provided.

7.4.0

No release notes provided.

7.3.0

No release notes provided.

7.2.0

No release notes provided.

7.1.1

No release notes provided.

7.1.0

No release notes provided.

7.0.1

No release notes provided.

7.0.0

No release notes provided.

7.0.0-doc

No release notes provided.

7.0.0rc1

No release notes provided.

7.0.0b1

No release notes provided.

6.2.1

No release notes provided.

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mekolowich/nikola-tesla-alexa/network/alerts).

Releases

Nikola for Alexa v0.6 2016-12-11 15:14:01

Nikola is an Amazon Alexa skill, and a companion Python-based intent handler for monitoring and managing a Tesla connected electric automobile through an Alexa natural language device such as an Echo or Dot.

It handles requests such as: "How charged is my car?", "How far can I drive?", "Unlock my car for 10 minutes", "Charge my car to 90 percent", "Is my car plugged in?", and many other questions that a Tesla owner might ask.

This 0.6 release requires that a user set up an Alexa skill in an Alexa Developer account, and run the Python application code on a server that can be accessed on the internet.

Nikola for Alexa v0.5 2016-11-28 01:00:53

Nikola is an Amazon Alexa skill, and a companion Python-based intent handler for monitoring and managing a Tesla connected electric automobile through an Alexa natural language device such as an Echo or Dot.

It handles requests such as: "How charged is my car?", "How far can I drive?", "Unlock my car for 10 minutes", "Charge my car to 90 percent", "Is my car plugged in?", and many other questions that a Tesla owner might ask.

This 0.5 release requires that a user set up an Alexa skill in an Alexa Developer account, and run the Python application code on a server that can be accessed on the internet.