onokje / node-red-contrib-tesla

Node red nodes to control Tesla vehicles and devices
MIT License
20 stars 11 forks source link

Tesla Authentication has changed #10

Closed Walz83 closed 3 years ago

Walz83 commented 3 years ago

Sadly node-red-contrib-tesla is not working anymore because authentication has changed

https://tesla-api.timdorr.com/api-basics/authentication

Can you pls fix it? Thank you

ChutneyMary commented 3 years ago

Upvote...please, please, please.

steveh80 commented 3 years ago

upvote!

onokje commented 3 years ago

Yep, will fix. I may be a few days, feel free to submit a pr if you want it faster ;)

lassenygard commented 3 years ago

The same issue with fixes is found here: https://github.com/timdorr/tesla-api/discussions/263

onokje commented 3 years ago

I have to wait until the teslajs package has been updated, since this library is based on that one. They are working on it (for reference: https://github.com/mseminatore/TeslaJS/pull/209)

onokje commented 3 years ago

Fixed, at least partially. It works again if you don't use MFA. If you do use MFA, you need to wait a bit more, because it requires some additional work. Update to 1.0.3 (it may take a while for the new version to show up in node red)

ChutneyMary commented 3 years ago

I tried v1.0.3. Unfortunately without success (Tesla Model S). I don't have MFA enabled.

Perhaps coincidently, the Tesla phone app was then locked out. I get a 'Sign-In Failed - UNKNOWN_OWNERAPI_ERROR. txid: 99xxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxxxxx. Please try again later.'

The timing of how it happened seemed to suggest that something had ruffled the Tesla servers and locked my account...

edit 1: Phone app access has resumed ok. Node-Red shows error - "Error: Tesla API: Get access token failed"

edit 2: Successful login now. Perhaps server-end resetting something after a set duration?

Thanks for your quick implementation of the new authentication!

Walz83 commented 3 years ago

Thank you very much. Works like a charm.

I didn't have the errors described by ChutneyMary.