A Python wrapper for Growatt API
Project description
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)
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
growatt_api-0.1.3.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for growatt_api-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed2a4ab727d25c909d6e298d5e016671876b34a6f8f617f6273192f8fd54dc47 |
|
MD5 | e225bbc3ac0bbe0be4f5e0e0e2001ae6 |
|
BLAKE2b-256 | 783a86c586836d323ed0f17367eadf2a8b0e1d6cb9b346211cfe49233073cb06 |