trocotronic / weconnect

API to interact with Volkswagen's service We Connect (formerly CarNet)
Open Data Commons Open Database License v1.0
83 stars 17 forks source link

Example code #8

Closed videopix closed 3 years ago

videopix commented 3 years ago

Looking at the example, I could log in and I'm getting the vsr json reply from the server with the following lines: vin = car['vehicleIdentificationNumber'] vsr = vwc.get_vsr(vin) pvsr = vwc.parse_vsr(vsr) print ('pvsr: ', pvsr)

To get the car's location, I tried vwc.get_location(vin) which ends up in an error, however. Could you please add examples to get the json for location and emanager data? Also an example how to send commands like stop charging would be helpful.

Thanks for the very good work! Uwe

trocotronic commented 3 years ago

Try with vwc.get_position(vin)

With emanager data you can on/off the battery charge with vwc.battery_charge(vin, 'on'|'off')

I need to make an update the README.

videopix commented 3 years ago

Thanks for the quick reply. After weconnect login was not possible for some days, I just tested and it worked fine. Also get_charger and get_climater. I'm looking forward for your updating the readme.