Skip to content

Mazda Connected Service API wrapper based on pymazda and Flask.

License

Notifications You must be signed in to change notification settings

alanzchen/mymazda-relay

Repository files navigation

Mazda Connected Service Relay

Mazda Connected Service API wrapper based on pymazda and Flask.

Deployment

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.

Usage

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 the vid for your vehicle, you can first make a POST call to https://mymazda.herokuapp.com/vehicles with just the username and password as the JSON payload. After getting a list of vehicles, find id associated with it. It will be the vid of your future API requests.
  • region: If you are living in the US, you can omit this field or fill in MNAO. Otherwise, it should be MME for EU, and MJO for Japan.

Below are some examples of API usage. To see a full list of API endpoints, see app.py.

Example: Start / Stop Engine

POST the above JSON to https://mymazda.herokuapp.com/startEngine or https://mymazda.herokuapp.com/stopEngine to start / stop the engine.

Example: Send navigation destination to infortainment

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
}

iOS Shortcuts Example

About

Mazda Connected Service API wrapper based on pymazda and Flask.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published