Closed Paxy closed 3 years ago
get_parking() function still works, but the response is different json structure:
{"event":{"lat":"*****","lon":"******","address":null,"timestamp":"*********"},"tripStatus":"0","protectionState":{"overallStatus":"OK","timestamp":"***********","doors":{"warning":false,"driverSeatDoor":{"warning":false,"closed":true,"locked":true},"passengerSeatDoor":{"warning":false,"closed":true,"locked":true},"rearRightSeatDoor":{"warning":false,"closed":true,"locked":true},"rearLeftSeatDoor":{"warning":false,"closed":true,"locked":true}},"hood":{"closed":true,"warning":false},"lamps":{"warning":false,"headLamp":{"warning":false,"off":true},"tailLamp":{"warning":false,"off":true},"hazardLamp":{"warning":false,"off":true}},"windows":{"warning":false,"driverSeatWindow":{"warning":false,"state":"close"},"passengerSeatWindow":{"warning":false,"state":"close"},"rearRightSeatWindow":{"warning":false,"state":"close"},"rearLeftSeatWindow":{"warning":false,"state":"close"}},"key":{"warning":false,"inCar":false}}}
Yes, that seems to be the case and error message doesn't clearly say what's wrong now. Commenting trip handling out gets everything else still working.
Needs more debugging and probably new round of reverse engineering for the current mobile app.
Looks like https://cpb2cs.toyota-europe.com/api/user/{}/cms/trips/v2/{}/events/vin/{}
does not exist anymore. I couldn't find it in disassembled API library anymore. It is probably replaced by something else.
For me the same: parking, odometer, fuel and statistics works, trips no more.
Today i recieved update for MyT App on Android. And now all works again.
Yes, it seems that functionality is back without any changes in the library. Closing the issue.
`2021-07-11 13:28:05,121:main:INFO: Fetching trips... 2021-07-11 13:28:05,708:main:INFO: Failed to use cached token, doing fresh login... 2021-07-11 13:28:05,708:main:INFO: Logging in... 2021-07-11 13:28:06,568:main:INFO: Fetching trips... Traceback (most recent call last): File "tojota.py", line 372, in main trips, fresh = myt.get_trips() File "tojota.py", line 157, in get_trips raise ValueError('Failed to get data, {} {}'.format(r.status_code, r.headers)) ValueError: Failed to get data, 500 {'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '20', 'X-Powered-By': 'Express', 'x-requestId': '****', 'Access-Control-Allow-Origin': '*', 'P3P': 'CP="NOI ADM DEV PSAi OUR OTRo STP IND COM NAV DEM"', 'Surrogate-Control': 'no-store', 'Cache-Control': 'no-store, no-cache, must-revalidate, proxy-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'ETag': 'W/"14-h4g0PmUzmXUwA2pJjOHY4a9E6dU"', 'X-Amz-Cf-Pop': 'FRA2-C1', 'X-Amz-Cf-Id': '**', 'Date': 'Sun, 11 Jul 2021 11:28:05 GMT', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=86400'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "tojota.py", line 467, in
sys.exit(main())
File "tojota.py", line 376, in main
trips, fresh = myt.get_trips()
File "tojota.py", line 157, in get_trips
raise ValueError('Failed to get data, {} {}'.format(r.status_code, r.headers))
ValueError: Failed to get data, 500 {'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '20', 'X-Powered-By': 'Express', 'x-requestId': '****', 'Access-Control-Allow-Origin': '*', 'P3P': 'CP="NOI ADM DEV PSAi OUR OTRo STP IND COM NAV DEM"', 'Surrogate-Control': 'no-store', 'Cache-Control': 'no-store, no-cache, must-revalidate, proxy-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'ETag': 'W/"14-h4g0PmUzmXUwA2pJjOHY4a9E6dU"', 'X-Amz-Cf-Pop': 'FRA2-C1', 'X-Amz-Cf-Id': '*****', 'Date': 'Sun, 11 Jul 2021 11:28:07 GMT', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=86400'}
`