Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heikkipora/tesla-slack
Integrates your Tesla Model S/X fleet to Slack
https://github.com/heikkipora/tesla-slack
async-await es7 slack tesla
Last synced: about 2 months ago
JSON representation
Integrates your Tesla Model S/X fleet to Slack
- Host: GitHub
- URL: https://github.com/heikkipora/tesla-slack
- Owner: heikkipora
- License: mit
- Created: 2014-05-14T05:47:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:30:11.000Z (over 1 year ago)
- Last Synced: 2024-08-03T17:14:38.258Z (5 months ago)
- Topics: async-await, es7, slack, tesla
- Language: JavaScript
- Homepage:
- Size: 1.35 MB
- Stars: 29
- Watchers: 4
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tesla-slack
Integrates your Tesla Model S/X fleet to https://slack.com
This piece of code serves as an example of how to a) integrate to Slack b) integrate to Tesla APIs. If you happen to have a fleet of shared Tesla vehicles, it will also provide information to the users of the vehicles' whereabouts.
!["Slack integration screenshot"](screenshot.png)
Uses https://github.com/gutenye/tesla-api for Tesla portal integration.
I [blogged](blogpost.md) about the integration at Reaktor's site: https://www.reaktor.com/blog/talking-tesla in 2014 (and an older version of this piece of software)
## Requirements
Node.js v12 from https://nodejs.org
The following ENV variables:
* TESLA_USERNAME - username to the Tesla portal
* TESLA_PASSWORD - password to the Tesla portal
* SLACK_RECEIVE_TOKEN - for "outgoing Slack webhooks"
* GOOGLE_API_KEY - your Google Static Maps API Key## Testing locally
Start it
npm start
Fetch vehicle list:
curl --data "token=&text=!tesla" http://localhost:5000/slack
Fetch vehicle battery, speed and location information:
curl --data "token=&text=!tesla " http://localhost:5000/slack
~~Works nicely when deployed to Heroku~~ Does not necessarily work (connections timeout) in Heroku since September 2020 - maybe Tesla blocked their outgoing gateway IPs ?
Point the outoing Slack webhook configuration to /slack on your Node.js instance.