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.
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 | |
|---|---|---|---|
| growatt_api-0.1.4.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| growatt_api-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
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
|