Skip to main content

Sungrow HTTP Config

This is a package to configure parameters on Sungrow inverters that are not typically available over standard interfaces. It supports both the Sungrow Local Access HTTP API and direct Modbus TCP communication.

It currently supports setting or unsetting an export limit, which is useful if on a variable-rate tariff that can go negative (i.e., charging you for exports at times there's oversupply in the grid), such as Amber Electric in Australia.

Usage

from sungrow_http_config import SungrowHttpConfig

# Using HTTP mode (default)
config = SungrowHttpConfig(host="192.168.1.100")

# Using direct Modbus TCP mode
config_modbus = SungrowHttpConfig(host="192.168.1.100", mode="modbus")

# Connect to the inverter
config.connect()

# Set export limit to 1kW (100 dekawatts)
config.setExportLimit(100)

# Get current export limit
limit = config.getCurrentExportLimit()
print(f"Current export limit: {limit/100}kW")

# Remove export limit
config.unsetExportLimit()

Notes

  • Please note that a 0kW export limit is equivalent to unlimited. To set as close to zero as possible, use 0.01kW (1 dekawatt).
  • The reaction time of the inverter to changes in loads can be a little slow, which could result in more use of grid power than anticipated if a new load is switched on. Depending on your differential in price between imports and exports, you may want to configure a bigger export "buffer" to mitigate this.
  • When using Modbus mode, the default port is 502 and the default unit ID is 1. These can be configured when initialising the class.

Communication Modes

HTTP Mode

Uses the Sungrow Local Access HTTP API via a WiNet-S dongle connected to the inverter. This is the default mode and requires the inverter to be connected to a WiNet-S dongle.

Modbus Mode

Communicates directly with the inverter using Modbus TCP on port 502. This mode doesn't require a WiNet-S dongle but requires the inverter to be accessible via TCP/IP.

WARNING This package has only been tested on a limited number of inverters, and the protocol is not well understood. Using it with anything else could damage your equipment, void your warranty, cause physical damage, or violate your agreement with your network operator.

Do not use this package if you have an export limit normally configured.

Metadata

Release files for sungrow-http-config 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sungrow-http-config 0.2.1
File Size Uploaded Provenance Actions
sungrow_http_config-0.2.1.tar.gz 16.1 kB With provenance Details for sungrow_http_config-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sungrow-http-config 0.2.1
File Interpreter ABI Platform Actions
sungrow_http_config-0.2.1-py3-none-any.whl Python 3 none any Details for sungrow_http_config-0.2.1-py3-none-any.whl

Total release size: 25.2 kB

Release files / sungrow_http_config-0.2.1.tar.gz

Download URL sungrow_http_config-0.2.1.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
06a8c78d1469ded2faeb617fc83322e54f7d5faeb4328e003e8aac17e89b0632
BLAKE2b-256 checksum
How to use checksums
7b1ef7df41acf681485213fe63f4aedb0b2a3b0775fa9996c8257c73cca3277e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2025.

Transparency log

Release files / sungrow_http_config-0.2.1-py3-none-any.whl

Download URL sungrow_http_config-0.2.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a6d3b8ce18da4a9830209b3d0301aedfe77c0e59386ae7758d6925bbb447192
BLAKE2b-256 checksum
How to use checksums
7c60ab44a3fa82386a0a39551d211fe167fe1c6a588bc41d5b49a1b882413540
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2025.

Transparency log

Security for sungrow-http-config 0.2.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sungrow_http_config-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2025.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page