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

Add options for rounding vs. truncating, smaller granularity than whole amps #515

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RichieB2B
Copy link

I found that using round() works much better for PV tracking. With round() I stay within 0.5A of the target. With 3-phases 240V that is a maximum inaccuracy of 360W instead of 720W when using int(). With single phase 120V it is 60W vs 120W so it doesn't matter as much.

@MikeBishop
Copy link
Collaborator

MikeBishop commented Mar 11, 2024

I guess it depends what the goal is here. int() means you stay strictly under; you might export a little bit, but charging should generally not cause you to import energy. round() will variously cause you to import or export a little bit. Is it more important to track closely or to never import?

Edit: I see I said the same thing a year ago, and that the content of the PR has changed since then. Oops.

@MikeBishop MikeBishop changed the title round(desiredAmpsOffered) instead of removing fractions using int() Add options for rounding vs. truncating, smaller granularity than whole amps Mar 11, 2024
@RichieB2B
Copy link
Author

I actually stopped using this patch. I couldn't get the TWCmamager to offer fractions to the TWC. I might give it another try when there is more sun here.

@ChutneyMary
Copy link

My preference is to have TWCManager use round() based on the available information provided to it. I use the api/addConsumptionOffset method and can easily add buffers to that value to avoid drawing grid power.

But that's largely academic at the moment... still having issues getting the FleetAPI working. But thanks @RichieB2B for the tutorial link you provided in the other thread. The problem is with Tesla approving the app request.

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.

3 participants