nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
154 stars 38 forks source link

always api error #101

Closed Archaeus closed 1 year ago

Archaeus commented 1 year ago

i'm a chinese guy,my tesla token is not work this ,i dont konw how to solve,hope nfarina have a look soon

Archaeus commented 1 year ago
截屏2022-12-10 16 52 37
Archaeus commented 1 year ago

[Tesla Model Y] Error while getting an access token: Authentication has previously failed; not retrying. [12/10/2022, 11:40:14 PM] [Tesla Model Y] Error while getting an access token: Authentication has previously failed; not retrying. [12/10/2022, 11:40:14 PM] Error: invalid_request at _callee2$ (/homebridge/node_modules/homebridge-tesla/dist/index.js:2324:21) at tryCatch (/homebridge/node_modules/homebridge-tesla/dist/index.js:44:17) at Generator. (/homebridge/node_modules/homebridge-tesla/dist/index.js:125:22) at Generator.next (/homebridge/node_modules/homebridge-tesla/dist/index.js:69:21) at asyncGeneratorStep (/homebridge/node_modules/homebridge-tesla/dist/index.js:311:24) at _next (/homebridge/node_modules/homebridge-tesla/dist/index.js:330:9) at processTicksAndRejections (node:internal/process/task_queues:96:5)

nfarina commented 1 year ago

Hmm perhaps Tesla has a different auth server (or different API servers entirely) in China? Unfortunately hard for me to fix since I can't reproduce it here :(

Archaeus commented 1 year ago

one guy tell me fix api gatewat in index.js,but i cant find where fix in index.js,there are many codes,its difficult for me

nfarina commented 1 year ago

I've published version 4.0.2 which might fix this for you - in the configuration, try setting the "china" option to true.

Archaeus commented 1 year ago

ahhhhhhhh,its ok,thank you very much,i can control my model y on my iPhone。

nfarina commented 1 year ago

Wow that’s great, thanks for reporting back!