Repository navigation
feat: CO2-only regulation via Wattnet by default - #15
Merged
Merged
Conversation
…kens - Ship a CO2-only [PIPELINE] (read power,cpufreq; score co2; act cpu_freq) as the default; no price fetch. Default CO2 backend is now Wattnet. - Wattnet auth: WATTNET_EMAIL/WATTNET_PASSWORD replace WATTNET_API_KEY (Wattnet has no API keys). The 24 h token is fetched from /token-request/get_token, cached in /var/lib/hpc_eff/wattnet_token.json (mode 600), and renewed 10 min before expiry. - A rejected token is answered with a 302 to the Wattnet login page, not a 401. Redirects are no longer followed: 302/401 triggers one re-login, then a clear error. - Wattnet parsing: merge all response series (final, pending, preview) so the current value is ~now instead of ~4 h old, and average per clock hour. Previously only the first series was read, so live calls always failed with "only 21/24 hourly values". - CO2 fetch failure: reuse the last real grade if at most MAX_AGE_MIN (120) minutes old, else rating 1 (no slowdown without evidence). Fallback grades are never chained. The reason is logged as a WARNING and written to the state.json summary. - deb postinst no longer enables cron on install (matches the rpm); it prints the setup steps instead. Upgrades keep an existing cron job. - Docs: Wattnet login requirement and registration (https://api.wattnet.eu/token-request/), token handling, CO2 fallback, troubleshooting.
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.
No description provided.