Avoid wake up loop during battery health check (soh test)#630
Open
RichieB2B wants to merge 1 commit intongardiner:mainfrom
Open
Avoid wake up loop during battery health check (soh test)#630RichieB2B wants to merge 1 commit intongardiner:mainfrom
RichieB2B wants to merge 1 commit intongardiner:mainfrom
Conversation
1bc28a0 to
6c0adcb
Compare
6c0adcb to
714641d
Compare
Collaborator
|
You could also explicitly recognize the error that it fails with and consider that a successful wake, if the car is otherwise online. (Though I think the code already tries to check the car's status before waking it unnecessarily?) |
Author
|
That is a bit tricky. It is not the wake call that fails but the start charge call. We could ignore this specific error there but the car status will not indicate "charging".. that might lead to other problems. Perhaps a "start charge" loop.. The wake loop is caused by I do believe calling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran a battery health check yesterday. A requirement is to be connected to a changer with a minimum of 5 kW power. The test starts with discharging the battery. This confuses TWCManager: it tries to start the charge but the start command receives this error as a response:
This error causes
vehicle.lastErrorTimeto be set andvehicle.ready()to return False.However, TWCManager still tried to wake the car every 5 seconds:
The wake up call is a charged Tesla Fleet API endpoint, so that turned out to be pretty expensive.
I think this can be avoided to call
self.getCarApiRetryRemainingwith thevehicleparameter. This will take into account thevehicle.lastErrorTimeand backoff the wake up calls.