Skip to main content

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)

Uploaded Source

Built Distribution

growatt_api-0.1.3-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page