Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

EV Car/My Tesla - An Alexa skill for Amazon Echo / Tesla integration

This site may earn commission on affiliate links.
Yes, the Authentication method that Tesla employs for the APIs has been changed. Implementing the new mechanism will take a while. I did find new documentation updated at Tim Dorr's excellent resource: Authentication however that has not worked for me yet.

For now, if you have an existing token generated before or one generated from another tool that support the new mechanism, you can use that token for enabling this skill.
 
Thanks for confirming that it's working for you. Here are my steps:

Evie Car

Alexa skill >> Disable skill >> Enable >> use password manager to plug in email address and password on the AWS page >> Submit

and I get this error:

{errorMessage=Cound not parse authorization code: [



], errorType=ValueError, stackTrace=[" File \"\/var\/task\/lambda_function.py\", line 36, in lambda_handler\n return(process_api_command(event))\n"," File \"\/var\/task\/lambda_function.py\", line 1001, in process_api_command\n return (generate_token(state, redirect_uri, email, password, token))\n"," File \"\/var\/task\/lambda_function.py\", line 1123, in generate_token\n car = falcon.mytesla(email=email, password=password, token=token)\n"," File \"\/var\/task\/falcon.py\", line 17, in __init__\n auth_result = tesla_auth.authorize_user(email, password)\n"," File \"\/var\/task\/tesla_auth.py\", line 128, in authorize_user\n authorization_code = get_authorization_code(code_challenge, cookie, field_list, email, password)\n"," File \"\/var\/task\/tesla_auth.py\", line 73, in get_authorization_code\n raise ValueError('Cound not parse authorization code: [{}]'.format(r.text))\n"]}

To be sure, I have MFA enabled on my Tesla account and I am not prompted anywhere for that MFA code.

Google Assistant Action >> Link >> LINK >> takes me to the same AWS form and submitting my credentials yields the same error (and no prompt for MFA code).

If I've misunderstood that EV car isn't working with MFA, my apologies.
 
It wasn't just MFA. Tesla had changed the way the (undocumented) APIs used by this skill to authenticate users works. So people were not able to login at all using the skill. The change was to support the new authentication workflow.

Currently you can use this skill either if MFA is disabled for the account or if you use Tesla tokens generated elsewhere. Details for MFA handling for the APIs is still murky. When the details are clearer, support will be added to this skill.
 
I am trying to link my tesla account to the skill with generated token, I get the error below. Also if I try with Username/password I get timeout error

{errorMessage=HTTPSConnectionPool(host='owner-api.teslamotors.com', port=443): Max retries exceeded with url: /api/1/vehicles (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known'))), errorType=ProxyError, stackTrace=[" File \"\/var\/task\/lambda_function.py\", line 36, in lambda_handler\n return(process_api_command(event))\n"," File \"\/var\/task\/lambda_function.py\", line 1001, in process_api_command\n return (generate_token(state, redirect_uri, email, password, token))\n"," File \"\/var\/task\/lambda_function.py\", line 1123, in generate_token\n car = falcon.mytesla(email=email, password=password, token=token)\n"," File \"\/var\/task\/falcon.py\", line 26, in __init__\n vid = self.set_vehicle(name)\n"," File \"\/var\/task\/falcon.py\", line 130, in set_vehicle\n r = self._request_url(self.api)\n"," File \"\/var\/task\/falcon.py\", line 93, in _request_url\n r = requests.get(url, params=data, headers=headers, proxies=proxies)\n"," File \"\/var\/task\/requests\/api.py\", line 76, in get\n return request('get', url, params=params, **kwargs)\n"," File \"\/var\/task\/requests\/api.py\", line 61, in request\n return session.request(method=method, url=url, **kwargs)\n"," File \"\/var\/task\/requests\/sessions.py\", line 542, in request\n resp = self.send(prep, **send_kwargs)\n"," File \"\/var\/task\/requests\/sessions.py\", line 655, in send\n r = adapter.send(request, **kwargs)\n"," File \"\/var\/task\/requests\/adapters.py\", line 510, in send\n raise ProxyError(e, request=request)\n"]}
 
I have 2 Teslas a Model Y and a Model X. Initially, they both worked but a few months ago the Model X stopped working. Whenever I switched to the Model X I get "there was an error communicating with car". I've unlinked and relinked a number of times without success.