Repository navigation
Update API docs from 2026-09 HAR export; shorten JWT fallback expiry - #5
Merged
Merged
Conversation
CheckWatt's updated web app revealed several API changes:
- JwtTokenExpires removed from login response; JWT lifetime cut to ~15 min
- Refresh token lifetime extended to 14 days
- New SiteMeasurements dataTypes (per-minute power/SoC) replacing
datagrouping delta for the live view
- ActivationSchedule greatly expanded (spot prices, EMS schedule, settings)
- New /Tariff/assignableTariffsForSite endpoint; new fields on
/site/{id}, /site/Statuses, /user/FacilitiesV2 and /user/Login
- /measurements/SolarNow, /ems/gridtariff, /ems/service/Pending no longer
observed in web traffic
Code: JWT-expiry decode fallback reduced from 2 h to 10 min to match the
new ~15-minute token lifetime.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P2N4Hw4yUxPDRE7DcfRQ46
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2N4Hw4yUxPDRE7DcfRQ46
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.
Summary
CheckWatt updated the EnergyInBalance web app, so
docs/api.mdwas re-verified against a fresh HAR export (2026-09-01). All endpoints the integration uses still exist with compatible response shapes — nothing is broken — but several API details changed and are now documented.API changes found
JwtTokenExpireswas removed from the login response and the JWT lifetime was cut from ~2.25 hours to ~15 minutes; the refresh token lifetime was extended from 7 to 14 days. The client already reads expiry from the JWT's ownexpclaim, so it is unaffected./SiteMeasurements/{id}/Datagainedresolution=Minuteand new per-minute power/SoC dataTypes (SolarProductionPower,BatteryChargePower,BatteryDischargePower,BoughtPower,SoldPower,Soc), which the web app now uses for the live view instead of/datagrouping/serieswithdeltagrouping./ems/ActivationScheduleis greatly expanded: spot prices (EUR/MWh), total buy/sell energy prices, the full hourly EMS schedule, user settings (SoC limits etc.) and system settings./Tariff/assignableTariffsForSite; new fields on/site/{id},/site/Statuses,/user/FacilitiesV2and/user/Login;siteIdparam on/ems/spotprice./measurements/SolarNow,/ems/gridtariffand/ems/service/Pendingare no longer observed in web traffic and are marked as likely deprecated.Code change
api.py: the JWT-expiry fallback used when decoding the token fails is reduced from 2 hours to 10 minutes, matching the new ~15-minute token lifetime.All examples in the docs use anonymized placeholder values; no real identifiers from the HAR export are included.
Testing
ruff checkandruff format --checkpasspytest tests— 49 passed🤖 Generated with Claude Code
https://claude.ai/code/session_01P2N4Hw4yUxPDRE7DcfRQ46
Generated by Claude Code