Skip to content

Dampen some useless commands#601

Merged
MikeBishop merged 8 commits intomainfrom
useless
Mar 6, 2025
Merged

Dampen some useless commands#601
MikeBishop merged 8 commits intomainfrom
useless

Conversation

@MikeBishop
Copy link
Copy Markdown
Collaborator

@MikeBishop MikeBishop commented Jan 14, 2025

This targets the two useless commands I identified in #591; if others are noted, I can add them. It's based on #571, since it needs some of the additional state that was picked up there; I'll retarget to main once that's merged.

  • When charging stops (as reported by the TWC), stopAskingToStartCharging is set on the last-connected vehicle if that vehicle last reported an estimated time-to-completion of less than five minutes.
  • Before sending a start-charge command, the vehicle's last-reported charge status is checked. No start/stop command is sent if the vehicle reported being disconnected or done charging, and no charge command is sent if the vehicle reported that it was already charging.

It now also eliminates an additional useless command I discovered from my tesla-proxy logs:

  • If the charge limit is being set to the same limit the car already reports, no charge limit command is sent.

@ngardiner
Copy link
Copy Markdown
Owner

Hi @MikeBishop, I think this would be a good candidate for merging prior to Feb 1 to reduce potential API costs, but I see that the PR targets the mqtt_data branch, is that intentional & do you think it's a good time to merge?

@MikeBishop
Copy link
Copy Markdown
Collaborator Author

That was deliberate, because it builds on things contained in that branch but I wanted this to be reviewable separately. I think both are ready to merge; we can retarget this to main once #571 is in.

@MikeBishop
Copy link
Copy Markdown
Collaborator Author

I would be fine to merge this and have a follow-up, but I have noticed my car not stopping sometimes when it really ought to. I have a suspicion the bug is in this PR, but I haven't found it yet -- because if I restart it on the debugger, it stops correctly.

@MikeBishop MikeBishop changed the base branch from mqtt_data to main March 6, 2025 21:23
@MikeBishop MikeBishop merged commit af538dd into main Mar 6, 2025
@MikeBishop
Copy link
Copy Markdown
Collaborator Author

Merging for the command savings; if the bug around not stopping persists, we can track that as a separate issue.

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 this pull request may close these issues.

2 participants