Giter Club home page Giter Club logo

mymazda-relay's Introduction

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

mymazda-relay's People

Contributors

alanzchen avatar siyu6974 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.