alandtse / tesla

Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
Apache License 2.0
552 stars 99 forks source link

Fleet API Proxy: reset/change misconfigured Proxy URL? #970

Closed FFV21 closed 1 month ago

FFV21 commented 1 month ago

Is there an existing issue for this?

I have read about the Fleet API and understand I may need to use it

Version of the Tesla component

v3.21.0

Version of the Tesla car software

2024.14.6

Model

Model 3

Current Behavior

Because the owner API stopped working for me recently I set up a docker container running Fleet API Proxy this morning and have that working.

When I configuring this custom integration I did a stupid thing and made a mistake on the Proxy URL address. I put in the external address https://tesla.xxxxxxxx.com (FQDN) instead of the internal proxy host address https://TeslaHTTPProxy:443.

Now when the integration launches it is looking for the misconfigured https://tesla.xxxxxxxx.com and as nothing is there it is obviously failing to set up.

Is there any way I can change the Proxy URL without deleting my account/car from the integration and starting over?

I have so many automations based on this integration it would take forever to fix my stupid mistake.

Thank you!

Expected Behavior

Would like to change the Proxy URL without deleting/reinstalling if possible.

Debug logs

2024-05-25 15:47:58.000 DEBUG (MainThread) [teslajsonpy.connection] Successfully refreshed oauth
2024-05-25 15:47:58.000 DEBUG (MainThread) [teslajsonpy.connection] get: https://tesla.xxxxxxxx.com/api/1/products {}
2024-05-25 15:47:58.180 DEBUG (MainThread) [teslajsonpy.connection] 502: <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>tesla.xxxxxxxx.com | 502: Bad gateway</title>

Anything else?

Docker Fleet API Proxy: https://github.com/iainbullock/tesla-http-proxy-docker v1.0.5 Docker HA Core version 2024.5.5

FFV21 commented 1 month ago

Found it in /config/config/core.config_entries and changed the URL there.

llamafilm commented 1 month ago

FWIW, deleting and re-adding the car won’t break any automations, because the entity_id remains the same.