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

Refactoring the proxy. #143

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

Nexarian
Copy link
Contributor

  • Enable ability to handle multiple gateways.

Fixing aggregates and problems with grid status

Improvements in accuracy and functionality

Changing alerts to be consistent with the -3 suffix

@@ -16,7 +16,7 @@ <h2 style="color:gray;font-family:verdana;">iFrame Example</h2>
<script>
// Get Firmware Version
function showversion() {
var pwver = window.location.protocol + "//" + window.location.hostname + ":8675/version";
var pwver = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/version";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This needed to be some time ago. Thank you!

Copy link
Contributor Author

@Nexarian Nexarian Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still occasionally have issues with it not loading and/or reporting correct data, but I feel like that can be solved incrementally and later.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change causes the issue or is this something else? Any odd errors in the javascript console?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Sometimes this code path gets executed when client.session (Or really, the session variable) is None. I blocked that with a simple if check, but I'm not sure what session is supposed to be in the context of TEDAPI or what this code path is for. Maybe blocking it is indeed the best path.

  • Also I've noticed that the first time after server startup, the widget sometimes doesn't load. I have to refresh a few times, I haven't solved that either.

  • Finally, and I think this is more a Tesla bug we have to work around: In the case where my panels generate significantly more power than the house is using (and thus sending a large amount back to the grid) the house shows as a negative load with a warning icon next to it. This is wrong, the house is still using power, my inverters setup is bugged. My installer (and therefore by proxy, Tesla) say that it's a bug with Tesla's monitoring, but they haven't provided any information on when a potential fix may be coming.

I don't believe any are directly related to my refactor; however. Likely just exposed through testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

But my house is actually using 1.7 kWh!

WORKDIR /app
COPY requirements.txt /app/requirements.txt
COPY ./proxy/requirements.txt /app/requirements.txt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume most would build the container from the directory that contains the Dockerfile (proxy), which is where my automation goes to build and push the proxy container. This would break that. Did you have another idea?

Copy link
Contributor Author

@Nexarian Nexarian Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this because I needed to test changes to the proxy AND pypowerwall itself and I didn't know of another good way to build them together, did I miss the memo on how to do that?

Anyway, I think what I should do is move this configuration to a different Dockerfile and leave this one alone.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. My dev and beta build script copies the library before running the build (cp -r ../pypowerwall .)

- Enable ability to handle multiple gateways.

Fixing aggregates and problems with grid status

Improvements in accuracy and functionality

Changing alerts to be consistent with the -3 suffix
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