tdorssers / TeslaPy

A Python module to use the Tesla Motors Owner API
MIT License
374 stars 83 forks source link

sync_wake_up Works Fine With One Car But Sometimes Times Out On Another #117

Closed Haselmaier closed 1 year ago

Haselmaier commented 1 year ago

One car (mine - 2022 Model Y) tends to handle the sync_wake_up() call just fine. Another Tesla owner who is running my code (another Model Y - pre-2022) and it times out relatively frequently on the sync_wake_up() call.

I believe the timeout can be changed - although I haven't looked into it closely or how to use it.

I'm really more interested in understanding why the difference in behavior. Are there car differences that can cause this? Maybe usage differences (my friend's car doesn't get a ton of use so....for example.....is the longer it's asleep does it take longer to wake it up?).

I'm mostly just curious as to why....although any guidance from someone who has messed with changing timeout would also be of interest.

Thanks.

This is what happened after I added a 'timeout=300' to sync_wake_up. Prior to doing that it would exit with a timeout error.

sc

tdorssers commented 1 year ago

The exception you are getting is passed from the owner API to TeslaPy, so there is nothing that TeslaPy can do about this: the car has no connection to Hermes, which is a Tesla server or service. This can be caused by bad Wifi/cellular reception. Maybe you can simply retry your connection after 10 minutes or so and see what happens?

gbizeau commented 1 year ago

Try / Except blocks are your friends, you can't always get data from the car, you have to program for that. :)

On Tue, Jan 3, 2023 at 1:30 PM Tim Dorssers @.***> wrote:

The exception you are getting is passed from the owner API to TeslaPy, so there is nothing that TeslaPy can do about this: the car has no connection to Hermes, which is a Tesla server or service. This can be caused by bad Wifi/cellular reception. Maybe you can simply retry your connection after 10 minutes or so and see what happens?

— Reply to this email directly, view it on GitHub https://github.com/tdorssers/TeslaPy/issues/117#issuecomment-1370040381, or unsubscribe https://github.com/notifications/unsubscribe-auth/A22GEVCJRQHE35QCNU35LCDWQROZ7ANCNFSM6AAAAAATOH5W2Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Haselmaier commented 1 year ago

Thanks!