Mazda Connected Service API wrapper based on pymazda and Flask.
Docker can be used to deploy the project locally, simply do docker-compose up -d
.
This installs the requirements and launchs the flask server behind a gunicorn
reverse proxy running on port 5001 in a docker container.
Make POST
calls to https://mymazda.herokuapp.com/{endpoint}
, where endpoint
could be something like startEngine
. To make a valid request, you will need to attach a JSON payload with the following fields:
{
"username": your_mazda_email,
"password": your_mazda_password,
"vid": internal_vehicle_id,
"region": your_region
}
vid
: To obtain thevid
for your vehicle, you can first make aPOST
call tohttps://mymazda.herokuapp.com/vehicles
with just theusername
andpassword
as the JSON payload. After getting a list of vehicles, findid
associated with it. It will be thevid
of your future API requests.region
: If you are living in the US, you can omit this field or fill inMNAO
. Otherwise, it should beMME
for EU, andMJO
for Japan.
Below are some examples of API usage. To see a full list of API endpoints, see app.py
.
POST
the above JSON to https://mymazda.herokuapp.com/startEngine
or https://mymazda.herokuapp.com/stopEngine
to start / stop the engine.
Send the following JSON to https://mymazda.herokuapp.com/sendPOI
. Note that you need the navigation SD card for it to work.
{
"username": your_mazda_email,
"password": your_mazda_password,
"vid": internal_vehicle_id,
"longitude": longitude_float,
"latitude": latitude_float,
"name": name
}