tesladdicts / testatus

Python suite to access the Tesla JSON API, pollers and log via the API, parse the log, rpc, etc
MIT License
12 stars 2 forks source link

unable to login #9

Open pmendes opened 3 years ago

pmendes commented 3 years ago

I've restarted the logger which had been running for a long time and now I cannot login, I get an error 11 exceptions: HTTP Error 400: Bad Request Traceback (most recent call last): File "/home/mendes/src/testatus/tesla_poller", line 579, in <module> master_connection = refresh_vehicles(args, debug=True if args.verbose > 2 else False) This happened before upgrading to the latest changes (ie, running python 2.7), but after upgrade and changing to python 3, the same error still happens.

I have always used email and password rather than token. Is this related to changes in authentication at Tesla? What do I need to get it to work with a token? (been looking for info but haven't found anything that works yet)

pmendes commented 3 years ago

The problem is related with the change in authentication at Tesla. The fix is to upgrade teslajson.py to its version 2.0.0. Unfortuantely there is currently an ongoing problem with (obviously undocumented) changes at Tesla that cause the API to fail to login. When this is fixed upstream I will upgrade this code to use the new version of teslajson.py .

SethRobertson commented 3 years ago

For the record I am not having any authentication problems, though I do use tokens. Tokens have limited lifetimes and automatically renew, though they renew via the refresh_token and not a password. My last renewal was two days again.

I guess it sounds like if I was ever down during the renew interval I would be SOL. But so far so good.