Skip to content

Android Mobile and Wear OS Smartwatch App using the Unofficial Tesla API

Notifications You must be signed in to change notification settings

ecalfonso/pewpewTeslaWear

Repository files navigation

pewpewTeslaWear Icon

A personal project for controlling your Tesla vehicle(s) through your Android phone and/or Wear OS smartwatch using the unofficial Tesla API.

This is by no means perfect or optimized, most code was taken from various StackOverflow threads to get to a working state.

Disclaimer

The Mobile and Wear OS apps/code are provided "as is" without warranty of any kind, either express or implied. Use at your own risk.

Features

Login and Car selection

Login with your Tesla credentials or with an Access token. Optionally include your Refresh token to stay logged in past the Access token expiration.

Phone login:

Phone login

Wear OS login:

Wear OS login

Tesla username/password is not saved. Only the Access and Refresh tokens are stored.

View vehicle status in app

View Vehicle name, Battery charge/range remaining, Indoor/Outdoor temperature, Charging status and time of last data update. The app also dynamically displays car alerts in the app when the data refreshes.

App car alerts

Icons show when these conditions are met:

Vehicle is unlocked
Door(s) is/are open
Frunk is open
Trunk is open
Windows(s) is/are open
Software Update is available
Sentry Mode is on
Climate controls are active

Notifications are not supported at this time

Vehicle controls

Control options:

Lock/Unlock 
Turn on/off climate
Open frunk/trunk*
Vent/Close windows
Turn on/off sentry mode
Start/Stop charging
Open/Close charge port
Set charge limit (50-100%)
Activate Homelink*

*note: App will display a confirmation message before executing these commands.

Mobile demo

Mobile cmd and alerts demo Mobile cmd confirmation

Wear OS demo

Wear OS controls give you a 2.5 second confirmation delay before executing the command. Wear OS cmd confirmation timeout

Wear OS cmd confirmation dialog

Wear OS cmd set charge

TODO Features

Mobile:

Add Widgets
Add Shortcuts
Implement permanent notification

Wear:

Implement Complications
Implement Tile
Implement sync access/refresh token from phone
Add direct commands from app list, like Google fit
Implement Settings:
	Custom confirmation time delay 

Common

Move from static views to List/Adapters
Set climate for driver/passenger
Show current climate setting 
Include STANDARD/MAX in set charge limit dialog
Reset car data when selecting a new car

Gate commands by vehicle config:
	Trunk Open/Close, if vehicle_config.plg==true
	Start/Stop charge, if charge_state.charging_state!=Disconnected
	Open/Close charge port, if vehicle_config.motorized_charge_port==true
	Open/Close sunroof, if vehicle_config.sun_roof_installed!=null

Known bugs

TBD

Changelist

1.0.3:

Optimize APKs, drawables and code
Wear: CarSelect take RotaryInput
Wear: Remove dark gray backgrounds
Wear: Enhancements for round/square displays
Mobile: Update UI
Mobile: Change TokenActivity to InfoActivity
Common: Fix parking/charging logic
Common: Update to cleaner Sentry Mode icon

1.0.2:

Improve CarSelect activities for mobile and wear
Move CarAlerts from static images/views to a list/adapter
Wear: Reorganize home screen
Mobile: Change Tokenscreen to Car Info screen
Create common code directory for mobile and wear	

1.0.1:

common: new app icon
common: Move start of data update to onResume()
common: Clear previous vehicle data when new vehicle is selected
mobile: Fix AutoFill
wear: Fix RotaryInput
wear: Reset back to top of home screen on re-open
wear: Properly close LoginSelectorActivity when login is good

1.0.0:

Initial implementation

About

Android Mobile and Wear OS Smartwatch App using the Unofficial Tesla API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages