teslajson
teslajson copied to clipboard
recent auth issues?
code and pw have not changed but i have not been able to auth for two days or so. anyone else experiencing this?
87, in fetch_sso_token m = re.search('code=([^&]*)',r.headers['location']) File "/usr/local/lib/python3.6/site-packages/requests/structures.py", line 52, in getitem return self._store[key.lower()][1] KeyError: 'location'
I too have had this problem for the last couple of days. I'm still using Python 2.7 and I the account only uses the basic authentication - email & password. The last data collected via Teslajson was 2021-05-28 19:05:03 GMT. I was recording data every 60 seconds at that point.
Response contains the following keys: Server Content-Type X-DNS-Prefetch-Control X-Frame-Options Strict-Transport-Security X-Download-Options X-Content-Type-Options X-XSS-Protection X-Request-ID X-Correlation-ID Content-Security-Policy X-Content-Security-Policy X-WebKit-CSP ETag X-Response-Time X-EdgeConnect-MidMile-RTT X-EdgeConnect-Origin-MEX-Latency OriginIP X-Akamai-Transformed Vary Content-Encoding Date Content-Length Connection Set-Cookie Origin_hostname
Same here. I was actually about to create an issue myself, but you beat me to it :) My list of headers in the response is identical. The last datapoint I have received through Tesla-JSON was on 2021-05-28, 12:04 PST.
Remember folks, this library uses an undocumented API. Looks like Tesla changed the API again, and it will take some time to reverse engineer it.
It looks like Tesla now requires you to complete a CAPTCHA. This isn't going to have a quick fix. Again, such is life with an undocumented API.
Thanks Greg, I saw that in the data and did wonder. Best of luck and thanks for all the work you've done so far.
On Mon, 31 May 2021, 06:47 Greg Glockner, @.***> wrote:
It looks like Tesla now requires you to complete a CAPTCHA https://github.com/timdorr/tesla-api/discussions/390. This isn't going to have a quick fix. Again, such is life with an undocumented API.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gglockner/teslajson/issues/30#issuecomment-851197084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4CGTB5ZITTWOUJS5JKFJDTQMPFZANCNFSM45ZYU7RA .
Same exact problem here.
For reference/testing i also test with tdorssers / TeslaPy (github)
It still works, the one I have was downloaded in Februari.
Would it be possible to snarf the login and wake_up code from TeslaPy ?
In another project they speculated it was the old/wrong USER_AGENT, when updated their code magically started to work again ...
Started working normally for me again at 2021-06-02 09:15:05 BST. Haven't made any changes. Maybe Tesla has backed out the change (temporarily?).
Ditto, suddenly works as before, no changes required.
Auth issues started appearing again yesterday. Working for anyone else?
Problem started yesterday evening for me again (error references 'location'). It still isn't working now. I then tried TeslaPy and it appears to be working fine so presumably TeslaPy was fixed for the problem even though Tesla appeared to back the change out.
Auth issues here too. Worked until a 2 or 3 days ago.
Same problem 'KeyError: location' started for me on 2021-07-08.
I'm getting the same, anything that can be done? I miss this thing!
root@masterbot:/config# /config/unlock_car.sh Traceback (most recent call last): File "/config/unlock_car.py", line 4, in <module> c = teslajson.Connection('[email protected]', 'andapassword') File "/usr/local/lib/python3.9/site-packages/teslajson/teslajson.py", line 66, in __init__ self.fetch_token(**kwargs) File "/usr/local/lib/python3.9/site-packages/teslajson/teslajson.py", line 150, in fetch_token self.fetch_sso_token(**kwargs) File "/usr/local/lib/python3.9/site-packages/teslajson/teslajson.py", line 123, in fetch_sso_token m = re.search('code=([^&]*)',r.headers['location']) File "/usr/local/lib/python3.9/site-packages/requests/structures.py", line 54, in __getitem__ return self._store[key.lower()][1] KeyError: 'location'
I changed over to TeslaPy...it handles the captcha and can give you the image to solve manually. One time action needed as it keeps using a refresh token after that. Worked for me. Maybe teslajson can implement the equivalent...
Thanks, I’ve just moved over to TeslaPy too, all good.
I too am trying TeslaPy - the 2 suggested code snippets and cli.py and menu.py But in every case I'm geting an error on line 210 of init.py Credentials rejected Captcha is required Catcha does not match Any suggestions most welcome How do you get an image to solve manually? for example
Ask your questions over on that project, not here. There is a snippet of source on the main page for TeslaPy showing how to do an alternate captcha solver where you can get the real file.