python3 testAudi.py
Get vehicle information
{"vin": "nö", "registered": "2018-02-09T18:39:18.556+01:00", "csid": "nö"}
Get battery informations
Traceback (most recent call last):
File "testAudi.py", line 50, in <module>
main()
File "testAudi.py", line 28, in main
stored_data = battery_service.get_status()
File "/home/pi/AudiAPI/audiapi/Services.py", line 330, in get_status
data = self._api.get(self.url('/vehicles/{vin}/charger'))
File "/home/pi/AudiAPI/audiapi/API.py", line 50, in get
return self.__handle_error(r.json())
File "/home/pi/AudiAPI/audiapi/API.py", line 68, in __handle_error
raise Exception('API error: ' + str(error) + '\n' + error_msg)
Exception: API error: {'description': 'The service: rbatterycharge_v1 for VIN: nöööööööööööööö could not be found.', 'errorCode': 'batterycharge.auth.forbidden'}
Wenn ich den Teil mit der Batterie rausnehme klappt es besser :-)
Get vehicle information
{"registered": "2018-02-09T18:39:18.556+01:00", "vin": "xxx", "csid": "xxx"}
Get vehicle location
{"findCarResponse": {"Position": {"timestampCarSentUTC": "2019-12-11T06:08:40Z", "carCoordinate": {"longitude": 7xxx, "latitude": 51xxx}, "timestampTssReceived": "2019-12-11T06:08:48Z", "timestampCarCaptured": "0002-11-28T00:00:00", "timestampCarSent": "0002-11-28T00:00:00"}, "parkingTimeUTC": "2019-12-11T06:08:40Z"}}
Decode Position
Longitude: 7xxx
Latitude: 51xxx
-> 51.xxx , 7.xxx
Was man jetzt testen muss, ob er auch die Standortdaten ausgibt, wenn das Auto sich bewegt :-)