Troubleshooting

Why HedgieMate cannot reach your TeslaMate, and how to fix it.

Work through four checks in order

HedgieMate talks directly from your iPhone, iPad, Mac or Apple Watch to your TeslaMate API. There is no HedgieMate server in between, so every connection problem comes down to one of three things: the URL is wrong, the device cannot reach that URL, or the credentials do not match.

Stop at the first check that explains what you see.

  1. The URL points at TeslaMate API, not TeslaMate

    This is the most common mistake. The TeslaMate web interface usually runs on port 4000, and HedgieMate cannot use it. TeslaMate API is a separate container that listens on port 8080 by default. If your URL ends in :4000, change it to the TeslaMate API address.

  2. TeslaMate API is running

    Run the command below on the server. If nothing is listed, the teslamateapi service is missing from your docker-compose.yml and needs to be added next to TeslaMate. If it keeps restarting, read its logs: most failures are database settings that do not match your running TeslaMate.

    Terminal
    docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}" | grep teslamateapi
    docker logs teslamateapi --tail 50
  3. Your device can reach the URL

    Open your API URL in Safari on the same iPhone and add /api/v1/cars to the end. If Safari shows JSON, HedgieMate will connect too. If Safari fails as well, the problem is the network, not the app. The Safari section below explains what each result means.

    Safari
    http://192.168.1.20:8080/api/v1/cars
  4. The sign-in method matches the server

    In HedgieMate, Authentication Type offers No Authentication, Basic Auth, Cloudflare Access and Token Auth. A 401 error means the type you chose, or the credentials you entered, do not match what the server expects.

Common errors and how to fix them

Why does HedgieMate not connect to my TeslaMate on port 4000?

Port 4000 is the TeslaMate web interface. HedgieMate reads data from TeslaMate API, a separate container that listens on port 8080 by default. Use the TeslaMate API address, for example http://192.168.1.20:8080.

What does 401 Unauthorized mean in HedgieMate?

The server requires credentials that the app did not send, or that do not match. Basic Auth needs the Username and Password set on your proxy. Cloudflare Access needs the Cloudflare Client ID and Cloudflare Client Secret of a service token. Token Auth needs the API token configured in TeslaMate API. MyTeslaMate always requires authentication.

Why does Cloudflare return 403 Forbidden?

Your Cloudflare Access policy expects a person to log in through a browser, which an app cannot do. Create a service token in Cloudflare Zero Trust, add a policy with the Service Auth action that includes that token, then set Authentication Type to Cloudflare Access in HedgieMate and enter the token's Client ID and Client Secret.

HedgieMate says the API version is too old. What should I do?

HedgieMate needs TeslaMate API 1.23.0 or newer and fully supports 1.24. Pull the latest teslamateapi image and restart the container.

HedgieMate connects but shows no vehicles found. Why?

The app reached TeslaMate API, but TeslaMate is not recording any car. Open the TeslaMate web interface and check that your car shows recent activity. HedgieMate only reads what TeslaMate has stored.

HedgieMate works on Wi-Fi but not on mobile data. How do I fix it?

Your URL is a local address such as 192.168.x.x, which only exists on your home network. For access away from home you need a VPN such as Tailscale, a reverse proxy with HTTPS and Basic Auth, or a Cloudflare Zero Trust tunnel.

Why do I get a certificate error?

An expired certificate, or one issued for a different hostname, is rejected. For a self-signed certificate on a server you control, turn on Allow self-signed certificate for that server in HedgieMate. A free trusted certificate from Let's Encrypt, through Caddy, Nginx or Cloudflare, avoids the problem entirely.

What does 502 or 504 mean?

Your reverse proxy is running but cannot reach the teslamateapi container behind it. Check that the proxy points at the right container name and port, and that TeslaMate API is running.

HedgieMate works on my iPhone but not on Apple Watch. Why?

A local network address is not passed through from the iPhone to the Watch. Use an endpoint the Watch can reach on its own, such as a reverse proxy or a Cloudflare Zero Trust tunnel.

Why is my data missing or not updating?

HedgieMate shows what TeslaMate has recorded. If TeslaMate stopped receiving data from Tesla, the app has nothing new to show. Check the TeslaMate web interface first.

Test your URL in Safari

Open your API URL with /api/v1/cars added to the end, in Safari on the same device that runs HedgieMate.

Safari shows Likely cause
Cannot connect, or it loads forever Wrong IP address or port, a firewall, or the VPN is not connected
401 Unauthorized The server requires sign-in. Check the authentication method
403 Forbidden from Cloudflare The Access policy expects a browser login instead of a service token
502 or 504 The reverse proxy cannot reach the teslamateapi container
Certificate error Self-signed, expired, or issued for a different hostname
JSON with your cars The network works. Check the URL and credentials in HedgieMate

Still stuck? Contact support

If all four checks pass and HedgieMate still does not connect, email support@hedgiemate.com with:

  1. Your HedgieMate version, from Settings, About
  2. Your TeslaMate API version, from the first line of its logs
  3. The exact error HedgieMate shows
  4. The last 100 lines of the teslamateapi logs
support@hedgiemate.com

Never post your credentials or your full API URL in a public channel.

What not to do

  • Do not expose TeslaMate API over plain HTTP on the internet. Always use HTTPS and authentication.
  • Do not turn on Allow self-signed certificate for a server you do not control. HedgieMate then accepts that server's certificate without validation.
  • Do not edit the TeslaMate database to fix the app. HedgieMate only reads data through TeslaMate API.

Need Help?

Having trouble with setup? We're here to help you get started.