Skip to main content

A package to manipulate settings on Sungrow Inverters

Project description

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.

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

sungrow_http_config-0.2.1.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sungrow_http_config-0.2.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file sungrow_http_config-0.2.1.tar.gz.

File metadata

  • Download URL: sungrow_http_config-0.2.1.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sungrow_http_config-0.2.1.tar.gz
Algorithm Hash digest
SHA256 06a8c78d1469ded2faeb617fc83322e54f7d5faeb4328e003e8aac17e89b0632
MD5 bbaf124fccfea84f68e301996db4d649
BLAKE2b-256 7b1ef7df41acf681485213fe63f4aedb0b2a3b0775fa9996c8257c73cca3277e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sungrow_http_config-0.2.1.tar.gz:

Publisher: publish-pypi.yml on ross-w/sungrow_http_config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sungrow_http_config-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sungrow_http_config-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a6d3b8ce18da4a9830209b3d0301aedfe77c0e59386ae7758d6925bbb447192
MD5 78845557698729a4652ef1444b4b7749
BLAKE2b-256 7c60ab44a3fa82386a0a39551d211fe167fe1c6a588bc41d5b49a1b882413540

See more details on using hashes here.

Provenance

The following attestation bundles were made for sungrow_http_config-0.2.1-py3-none-any.whl:

Publisher: publish-pypi.yml on ross-w/sungrow_http_config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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