Replies: 5 comments 5 replies
-
This is happening to me too. I'm not sure yet what it is. If I find something, I'll post it here. |
Beta Was this translation helpful? Give feedback.
-
Would you be able to share your code that is using the new API? |
Beta Was this translation helpful? Give feedback.
-
I am only calling it once per minute. Other than that time the other day, I think it is only happening when the car is in the process of going to sleep, but hasn’t changed the status to asleep yet.
Ie the call before it was awake, and the one after it is asleep, and this one is just when it transitions.
Also getting these two errors
2021-10-26 07:01:02 ERROR Error calling get_vehicle_data - HTTPSConnectionPool(host='owner-api.teslamotors.com', port=443): Read timed out. (read timeout=10)
2021-10-26 07:02:15 ERROR Error calling get_vehicle_data - 408 Client Error: {"error": "timeout"} for url: https://owner-api.teslamotors.com/api/1/vehicles/1492932393270858/vehicle_data
How do I increase the timeout? I don’t see that in the teslapy documentation anywhere.
From: Tim Dorssers ***@***.***>
Sent: Tuesday, 26 October 2021 7:11 AM
To: timdorr/tesla-api ***@***.***>
Cc: ***@***.***; Author ***@***.***>
Subject: Re: [timdorr/tesla-api] get_vehicle_data getting result of error=>"vehicle unavailable even when car is online (Discussion #457)
You are using TeslaPy<https://github.com/tdorssers/TeslaPy> right? The 'vehicle unavailable' exception is raised when the API returns 408 and the error reason is 'vehicle unavailable'. It could be some kind of rate limiting.
You could set a Retry object for the 408 error and then TeslaPy will retry automatically, but you should use that with caution, if you retry too many times in a row, your account will be locked for a while.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#457 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AASYAAZVDDQ3NZDBCDQZXELUIW2VZANCNFSM5GPPAE6Q>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
Thanks Tim.
My code is doing a get_vehicle_summary, and only calling get_vehicle_data if it was online in the get_vehicle_summary, and should be only milliseconds later. I suspect there might be a short window where it reports online in get_vehicle_summary but get_vehicle_data still fails, but then works fine a minute later.
In this case, I don’t care, I am just checking every minute, and if it has gone to sleep, it isn’t charging anyway.
What is the process on both raspberry pi and windows to use a commit?
From: Tim Dorssers ***@***.***>
Sent: Wednesday, 27 October 2021 6:14 AM
To: timdorr/tesla-api ***@***.***>
Cc: ***@***.***; Author ***@***.***>
Subject: Re: [timdorr/tesla-api] get_vehicle_data getting result of error=>"vehicle unavailable even when car is online (Discussion #457)
The timeout was hardcoded, I made it configurable through this commit ***@***.***<tdorssers/TeslaPy@7c60304>. Please let me know if this works for you.
If the car is going to sleep and you get a 408 on get_vehicle_data(), you can perform a get_vehicle_summay() to verify that the car is indeed sleeping and wake it again.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#457 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AASYAA2COUDZUYD3ESP45MLUI4DXZANCNFSM5GPPAE6Q>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
I just came across this same issue and found that if I brought up the app on my phone, the API would work. Found that I needed to call the POST |
Beta Was this translation helpful? Give feedback.
-
I have been working on a program to manage the charging rate using the new api, and have that working well, but I am now seeing numerous instances where the car state is online, but get_vehicle_data is raising an exception of "vehicle unavailable" . I hadnt seen this previously. Is that an expected occurrance?
Beta Was this translation helpful? Give feedback.
All reactions