README.md
Growatt API
A Python wrapper for the Growatt API, allowing you to interact with Growatt's services.
Installation
pip install growatt-api
Usage
Initialization and Login
First, create an instance of the Growatt class and log in using your Growatt credentials.
from growatt import Growatt
api = Growatt()
api.login("your_email@example.com", "your_password")
Fetching Plants
Retrieve the first plant and get the id.
plant_list = api.get_plants()[0]["id"]
print(plant_list)
Fetching Specific Plant
Get detailed information about a specific plant.
plant_id = "plant_id"
plant_topic = api.get_plant(plant_id)
print(plant_topic)
Quick Demo
Here's a quick demo showing how to use the Growatt API wrapper.
from growatt import Growatt
api = Growatt()
api.login("user@example.com", "pass123")
plantId = api.get_plants()[0]["id"]
print(f"Plant ID: {plantId}")
plant = api.get_plant(plantId)
print(plant)
mixSn = api.get_mix_ids(plantId)[0][1]
print(mixSn)
mixTotal = api.get_mix_total(plantId, mixSn)
print(mixTotal)
mixStatus = api.get_mix_status(plantId, mixSn)
pprint(mixStatus)
Fetching periodic data
To fetch periodic data such as daily, monthly, yearly or total, you can use the following functions.
Daily
api.get_energy_stats_yearly("2024-08-06",1234567,"ODCUTJF8IFP")
Monthly
api.get_energy_stats_yearly("2024-08",1234567,"ODCUTJF8IFP")
Yearly
api.get_energy_stats_yearly("2024",1234567,"ODCUTJF8IFP")
Battery weekly data
Battery information is in a weekly format.
api.get_weekly_battery_stats(1234567,"ODCUTJF8IFP")
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Metadata
Release files for growatt-api 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| growatt_api-0.1.4.tar.gz | 4.6 kB | Without provenance | Details for growatt_api-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| growatt_api-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for growatt_api-0.1.4-py3-none-any.whl |
Total release size: 9.3 kB
Release files / growatt_api-0.1.4.tar.gz
| Download URL | growatt_api-0.1.4.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a95b478696ce2a55de34a242fa7acd1e6edf24e39439bcc0a21334bfd114cd27
|
|
BLAKE2b-256 checksum How to use checksums |
01c9dea545ffd061fa46fb0933cd7f4ead8fc3e705528fb1e746be38871dca89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / growatt_api-0.1.4-py3-none-any.whl
| Download URL | growatt_api-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7518dc93b0dc200f08b1f7a8b2bfbc0902a30d0ad155913f7707c05765a9cbfa
|
|
BLAKE2b-256 checksum How to use checksums |
8c19ac1a2d3c77f9605803f8a3e6d5139087130a5f2a628b184589c43d2d609a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for growatt-api 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.