bisho / carnet

This is a library and cli tool to access the VW car-net® api from the comfort of your cli, and easily integrate it with other systems.
GNU General Public License v3.0
43 stars 8 forks source link

carnet: A implementation of the VW car-net® api

The latest VW vehicles include car-net® connectivity to access your car information from the web and a mobile app.

This is a library and cli tool to access the same api from the comfort of your cli, and easily integrate it with other systems. Do you want to track and map your vehicle locations? Do you want to receive alarms when the battery is full or too low? There are endless possibilities! Let me know how you use this library!

See the cli in action:

$ carnet setup
Account ID: 11111111
PIN: 1111
Verifying credentials...
Success!
---- Vehicle information -------------------
  Model: VW eGolf (2016)
  Color: Pacific Blue Metallic
  VIN:   XXXXXXXXXXX
  TCUID: XXXXXXXXXXX

---- Owner information ---------------------
  Phone: 5550000000
  Email: foo@bar.com

$ carnet status
---- Vehicle information -------------------
  Model: VW eGolf (2016)
  Color: Pacific Blue Metallic
  VIN:   XXXXXXXXXXX
  TCUID: XXXXXXXXXXX

---- Owner information ---------------------
  Phone: 5550000000
  Email: foo@bar.com

---- Main Status ---------------------------
  Mileage: 265 Km

  Battery:  80%
  Range:    144 Km
  Charging: connected, charging  (1h 35m untill full)

  Location: (37.8197, -122.4786)
            http://www.latlong.net/c/?lat=37.8197&long=-122.4786

And how to use the API:

from carnet import Api

api = Api(account_id, pin)
status = api.status()
lat = status['VehicleLocation']['Latitude']
lon = status['VehicleLocation']['Longitude']

Feature Support

Right now the implementation is rather limited: Only read-access to vehicle information and status is implemented.

The pairing exchange is also implemented, but I didn't have time to start implementing any actions. Any help and pull requests are greatly appreciated.

Security Considerations

This project started motivated by my curiosity about how secure secure was the api.

I must confess that the findings are not very encouraging:

I have already contacted the company that runs this service and will let them know about my findings and suggestions.

Install

It requires python3. To install run:

</path/to/python3> setup.py install