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

v0.12.2 - TEDAPI Cache Expiration Fix #123

Merged
merged 4 commits into from
Dec 31, 2024
Merged

v0.12.2 - TEDAPI Cache Expiration Fix #123

merged 4 commits into from
Dec 31, 2024

Conversation

jasonacox
Copy link
Owner

@jasonacox jasonacox commented Dec 27, 2024

v0.12.2 - Cache Expiration Fix

  • Fix bug in cache expiration timeout code that was not honoring pwcacheexpire setting. Raised by @erikgieseler in Is PW_CACHE_EXPIRE=0 not possible? (Proxy) #122 - PW_CACHE_EXPIRE=0 not possible? (Proxy)
  • Add WARNING log in proxy for settings below 5s.
  • Change TEDAPI config default timeout from 300s to 5s and link to pwcacheexpire setting.

Closes #122

@jasonacox
Copy link
Owner Author

The cache time for config was set to 300s (5m) - I think the basis was to reduce load on TEDAPI for mostly static (config) data, but this impacts the "battery reserve setting" data as well. I can't recall if this was to address any reported issue where the config data timeout helped address stability.

For consistency, I'm updating the 300s to match the status data timeout of 5s. It will also match the explicit cache time setting if provided in the Powerwall object constructor.

I will run this a while in full mode to ensure no negative impact.

@jasonacox jasonacox changed the title v0.12.2 - Cache Expiration Fix v0.12.2 - TEDAPI Cache Expiration Fix Dec 27, 2024
@jasonacox
Copy link
Owner Author

Test docker image: jasonacox/pypowerwall:0.12.2t67-beta

Testing to close #122

@jasonacox jasonacox merged commit 81dc7af into main Dec 31, 2024
25 checks passed
@jasonacox jasonacox deleted the v0.12.2 branch December 31, 2024 05:42
@jasonacox
Copy link
Owner Author

No issues during tests. Merged and released v0.12.2:

View at:
https://pypi.org/project/pypowerwall/0.12.2/

Proxy docker image:
jasonacox/pypowerwall:0.12.2t67

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.

Is PW_CACHE_EXPIRE=0 not possible? (Proxy)
1 participant