Add SPH device support via the regional mobile API#145
Open
morland96 wants to merge 1 commit intoindykoning:masterfrom
Open
Add SPH device support via the regional mobile API#145morland96 wants to merge 1 commit intoindykoning:masterfrom
morland96 wants to merge 1 commit intoindykoning:masterfrom
Conversation
3a70b9d to
4bed1df
Compare
Newer SPH inverters aren't reachable via the V1 OpenAPI. Add methods
that target the regional mobile host (server-{region}-api.growatt.com)
which is what the ShinePhone app uses.
Methods on GrowattApi:
- sph_system_status() — real-time values (SOC, PV, battery, grid, load)
- sph_energy_overview() — daily and lifetime totals
- sph_energy_prod_and_cons() — chart series (day/month/year/total)
- sph_settings() — full settings bean
- update_sph_inverter_setting() — write a setting
4bed1df to
df3d417
Compare
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
Newer SPH/SPM hybrid inverters (e.g. SPM-10000TL-HU) aren't reachable via the existing legacy mix_/tlx_/storage_* endpoints — those return null/zero values. They're also not reachable via the V1 sph_* methods because V1's device_list omits these devices entirely.
I proxied my phone and looks like ShinePhone mobile app to reverse engineer the same set of methods for SPH/SPM inverters:
An exampled is included:
examples/sph_legacy_example.pyChecklist