There is NO official developer support for SmartStart systems and I cannot personally guarantee that using this application will not cause problems with your SmartStart servicer. Use with caution, as I take no responsibility for voided service or any issues caused with your vehicle.
PySmartStart is a simple Python3 application that allows you to interface directly with the SmartStart API using your SmartStart login credentials. Use the CLI code provided to quickly play around with what PySmartStart has to offer, and if you'd like to integrate this in some other application, feel free to play around and build something!
- Connect to the SmartStart API
- Retrieve a list of your connected vehicles
- Provide a list of commands you can send to your vehicle
- Geolocation MAY work if you have that option in your SmartStart account
- Send commands to your vehicle (remote start, arm, disarm, panic, trunk, etc)
Import PySmartStart into your Python3 project using:
import pysmartstart
Or you can play around with the CLI application using:
python cli.py -u [YOUR_USERNAME] -p [YOUR_PASSWORD]
Now, let's get started: The PySmartStart API constructor takes these arguments:
### PySmartStart API Constructor ###
def __init__(self, username, password, verbose = False):
...
'''
Username:
- The username or email address you use to login to your SmartStart account
Password:
- The password you use to login to your SmartStart account
Verbose:
- If you'd like to see some extra information about what's going on in the background
'''
We'll run through the CLI app, which should provide a good picture of how the application works:
python cli.py -u [YOUR_USERNAME] -p [YOUR_PASSWORD]
This will print the response:
PySmartStart CLI
Verbose mode? [y/n]
y
We'll select verbose mode to get some more detailed information
Session ID: [SESSION_ID generated by SmartStart API]
PySmartStart then issues a GET request to the SmartStart API using the credentials provided earlier and returns a JSON response. All we need from this response (you can configure this to glean any kind of data you'd like, but I've kept it simple) is the SessionId value.
Added new vehicle: 2016 Subaru Outback
Added new command to 2016 Subaru Outback: Remote Start
Added new command to 2016 Subaru Outback: Arm
Added new command to 2016 Subaru Outback: Disarm
Added new command to 2016 Subaru Outback: Trunk
Added new command to 2016 Subaru Outback: Panic
After retrieving the session id, PySmartStart issues another GET request to the SmartStart API, this time returning a JSON response with all co 5B74 nnected vehicles, and all commands associated with those vehicles. PySmartStart then saves these vehicles and their commands.
Connection: OK
Press enter to continue, or 'q' to exit
Here we enter a loop in which you can continually select a vehicle and command to send to it.
Select desired vehicle number from the list:
[0] - 2016 Subaru Outback
0
Select desired command number from the list:
[0] - Remote Start
[1] - Arm
[2] - Disarm
[3] - Trunk
[4] - Panic
1
Once we've selected our vehicle and command, we'll be asked to confirm the send command
Press any key to send the command
SENDING...
OK: 0
Command Summary
Command Type: device.sendcommand
Status Code: 0
Error Message:
Command Results
TotalDistanceDriven: N/A
CommandSequenceNumber: 1155
FastestSpeed: 0.00 mph
Action: arm
Heading: -1
Speed: -1 mph
OdometerEstimate: N/A
Press enter to select another command, or 'q' to go back
q
Connection: OK
Press enter to continue, or 'q' to exit
q
$
Here we receive some details about the response from sending the command. If the status code is 0 and there is no error message, the command was sent successfully. Either press enter to send another command or 'q' to go back to the vehicle selection menu.
If, after a while, you do not send any new commands to the SmartStart API, your session will time out. In the case of a timeout just run getSessionID()
on the PySmartStart.API()
object.
Thanks for checking out PySmartStart! If you need to get in touch, or have any questions/comments/concerns, feel free to email me. roberto.despoiu@gmail.com