davidgiga1993 / AudiAPI

Audi MMI Api
84 stars 28 forks source link

VehicleStatusReportService - how to use? #4

Closed VolkerMuehlhaus closed 5 years ago

VolkerMuehlhaus commented 5 years ago

Hello,

I am struggling with the VehicleStatusReportService calls.

This is what I tried:

car_service = CarService(api)
vehicles_response = car_service.get_vehicles()
for vehicle in vehicles_response.vehicles:
    print(str(vehicle))
    mycar = vehicle

info_service = VehicleStatusReportService(api, mycar)
stored_data = info_service.get_stored_vehicle_data()

print(str(stored_data))

… but that just returns <audiapi.model.VehicleDataResponse.VehicleDataResponse object at 0x0000028878A92DD8>

Can anyone show an example how to properly request Status data, e.g. range? I was able to use the RemoteTripStatisticsService but can't get the car status report to work.

Best regards and many thanks Volker

davidgiga1993 commented 5 years ago

get_stored_vehicle_data returns a VehicleDataResponse object. This object holds the response data. Example:

stored_data = info_service.get_stored_vehicle_data()
for field in stored_data.data_fields:
   print(str(field))
VolkerMuehlhaus commented 5 years ago

Perfect - Many thanks David!