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.1.0.tar.gz (9.2 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.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sungrow_http_config-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.2

File hashes

Hashes for sungrow_http_config-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bfc1795ea0432755436079fa2a9b7b7f6801249e0c52315137904013b7a06809
MD5 154d07b54e9f361a1c96093e8e093b94
BLAKE2b-256 5d88b4fbc1241c166774171c63f163738b83fbcc3ec7dae3f66156428b399a4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sungrow_http_config-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a181f8d76fc9d7039adbc1b64eec90a96d01df440a1739ad66624809bc73231
MD5 e7a228c9f61c422e6930755822927dbf
BLAKE2b-256 59640ff2f7d6bb8b532be2e5f144933edf57972f81ddaafbbe03def4cb13ae15

See more details on using hashes here.

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