llamafilm / tesla-http-proxy-addon

Tesla HTTP Proxy Add-on for Home Assistant
Apache License 2.0
44 stars 19 forks source link

404 error when starting Tesla HTTP Proxy #124

Closed jnicolaes closed 3 months ago

jnicolaes commented 3 months ago

The problem

I've configured the subdomain,made sure the A record is setup (DuckDNS). Configured let's encrypt to sign the certificate for the subdomain. The Fleet API application is setup and I'm trying to start the Tesla HTTP Proxy. It's throwing this error:

curl: (22) The requested URL returned error: 404 Warning: Problem (retrying all errors). Will retry in 1 seconds. 14 retries Warning: left. HTTP/1.1 404 Not Found Content-Type: text/plain; charset=utf-8 Referrer-Policy: no-referrer X-Content-Type-Options: nosniff Server: X-Frame-Options: SAMEORIGIN Content-Length: 14 Date: Tue, 02 Jul 2024 07:35:24 GMT

I've enabled verbose logging but not sure which URL it's reaching out to to confirm why it's not working.

I'm using 2.2.8

What version of the addon are you using?

2.2.8

What version of Home Assistant Core are you using?

2024.4.4

What type of installation are you running?

Home Assistant OS

What version of Tesla integration are you using?

v3.24.0

What region of Tesla API are you using?

Europe, Middle East

What model and year is your vehicle?

Model Y 2024

What is your domain name (FQDN)?

Paste the log output from the addon here

s6-rc: info: service webui: starting
s6-rc: info: service webui successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[09:42:51] webui:INFO: Starting Flask server for Web UI...
[09:42:51] werkzeug:INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8099
 * Running on http://172.30.33.6:8099
[09:42:51] werkzeug:INFO: Press CTRL+C to quit
[09:42:52] INFO: Found existing keypair
[09:42:52] INFO: Testing public key...
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
Server: 
X-Frame-Options: SAMEORIGIN
Content-Length: 14
Date: Tue, 02 Jul 2024 07:42:52 GMT

curl: (22) The requested URL returned error: 404
Warning: Problem (retrying all errors). Will retry in 1 seconds. 14 retries 
Warning: left.
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
Server: 
X-Frame-Options: SAMEORIGIN
Content-Length: 14
Date: Tue, 02 Jul 2024 07:42:53 GMT

curl: (22) The requested URL returned error: 404
Warning: Problem (retrying all errors). Will retry in 2 seconds. 13 retries 
Warning: left.

Any additional context or screenshots that help explain the issue

No response

llamafilm commented 3 months ago

It doesn’t look like debug logging is enabled. You have to restart the add on after changing that setting.

The URL it’s trying is https://tesla.observantenweg78.duckdns.org/.well-known/appspecific/com.tesla.3p.public-key.pem That link is actually working fine for me, but maybe the behavior is different from within your local network. Are you using the recommended config with Nginx addon?

llamafilm commented 3 months ago

What do you see when the url works on your mobile? If it’s an iOS device, you should see some message about downloading a config profile and no SSL errors. I noticed dnschecker.com shows several servers haven’t yet pickup up your domain so you might just need to wait a day or 2 for that to propagate.

llamafilm commented 3 months ago

Okay, it looks like DNS and SSL are fine and the problem is somewhere in the addon or nginx. Enable the nginx debug log and restart it; it should show something about a 404.

jnicolaes commented 3 months ago

Thanks for your help so far. It seems NGINX doesn't really have a verbose logging. The logs as shared earlier, is basically all I'm getting.