Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customisation of the wait parameter time #47

Closed
avhm opened this issue Nov 26, 2024 · 0 comments · Fixed by #53
Closed

Allow customisation of the wait parameter time #47

avhm opened this issue Nov 26, 2024 · 0 comments · Fixed by #53

Comments

@avhm
Copy link

avhm commented Nov 26, 2024

As discussed in #39 - I've been having an intermittent issue that would result in the error:
500 From Tesla:: {"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""} when the car is asleep, and a command is sent.

I've been trying to track this down over a few weeks, and now have confirmation that it's due to variable time delays caused by the car being on cellular where it is parked.

The wait parameter is not currently patient enough to give the car time to wake over cellular all the time.

I can fix the issue by adjusting:

DELAY_CMD_WAKE = timedelta(seconds=10)

Setting it from 10 to 30. I've not had a single failed command over the last 2 weeks since making this change.

It would be great if we could customize the parameter in the teslaFI configuration.

jhansche added a commit that referenced this issue Jan 5, 2025
The TeslaFi API supports adding a `wake=N` argument that instructs
TeslaFi to wait for up to `N` seconds for the car to wake up before
sending the requested command. In my testing, wake=10 was sufficient
to allow the car to wake up, but that testing was performed at home
on wifi.

Issues #39 and #47 report that 10 seconds may not be enough time to
car fully, but 30 seconds appears to be more reliable.

If the car is already awake when a command is being sent, then the
argument will have no effect. So this should be a safe change.
jhansche added a commit that referenced this issue Jan 5, 2025
The TeslaFi API supports adding a `wake=N` argument that instructs
TeslaFi to wait for up to `N` seconds for the car to wake up before
sending the requested command. In my testing, wake=10 was sufficient
to allow the car to wake up, but that testing was performed at home
on wifi.

Issues #39 and #47 report that 10 seconds may not be enough time to
wake the car fully, but 30 seconds appears to be more reliable.

If the car is already awake when a command is being sent, then the
argument will have no effect. So this should be a safe change.
@jhansche jhansche linked a pull request Jan 5, 2025 that will close this issue
jhansche added a commit that referenced this issue Jan 5, 2025
The TeslaFi API supports adding a `wake=N` argument that instructs
TeslaFi to wait for up to `N` seconds for the car to wake up before
sending the requested command. In my testing, wake=10 was sufficient
to allow the car to wake up, but that testing was performed at home
on wifi.

Issues #39 and #47 report that 10 seconds may not be enough time to
wake the car fully, but 30 seconds appears to be more reliable.

If the car is already awake when a command is being sent, then the
argument will have no effect. So this should be a safe change.
jhansche added a commit that referenced this issue Jan 5, 2025
The TeslaFi API supports adding a `wake=N` argument that instructs
TeslaFi to wait for up to `N` seconds for the car to wake up before
sending the requested command. In my testing, wake=10 was sufficient
to allow the car to wake up, but that testing was performed at home
on wifi.

Issues #39 and #47 report that 10 seconds may not be enough time to
wake the car fully, but 30 seconds appears to be more reliable.

If the car is already awake when a command is being sent, then the
argument will have no effect. So this should be a safe change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant