diff --git a/README.md b/README.md index 7dc1c1f..32a0581 100644 --- a/README.md +++ b/README.md @@ -97,12 +97,15 @@ in lieu of command-line flags when using the above applications: * `TESLA_VIN` specifies a vehicle identification number. You can find your VIN under Controls > Software in your vehicle's UI. (Despite the name, VINs contain both letters and numbers). + * `TESLA_CACHE_FILE` specifies a file that caches session information. The + cache allows programs to skip sending handshake messages to a vehicle. For example: ```bash export TESLA_KEY_NAME=$(whoami) export TESLA_TOKEN_NAME=$(whoami) +export TESLA_CACHE_FILE=~/.tesla-cache.json ``` At this point, you're ready to go use the [the command-line diff --git a/pkg/connector/inet/inet.go b/pkg/connector/inet/inet.go index 7fc6e6b..a647428 100644 --- a/pkg/connector/inet/inet.go +++ b/pkg/connector/inet/inet.go @@ -77,8 +77,7 @@ func (e *HttpError) Temporary() bool { return e.Code == http.StatusServiceUnavailable || e.Code == http.StatusGatewayTimeout || e.Code == http.StatusRequestTimeout || - e.Code == http.StatusMisdirectedRequest || - e.Code == http.StatusTooManyRequests + e.Code == http.StatusMisdirectedRequest } func SendFleetAPICommand(ctx context.Context, client *http.Client, userAgent, authHeader string, url string, command interface{}) ([]byte, error) {