Skip to main content

Read data from Sunways inverter via local network

Project description

Sunways

PyPi Python Versions License

Library for connecting to Sunways inverter over local network and retrieving runtime sensor values and configuration parameters.

It has been reported to work with Sunways inverters. It should work with other inverters as well, as long as they listen on UDP port 8899 and respond to one of supported communication protocols. In general, if you can connect to your inverter with the official mobile app (SolarGo/PvMaster) over Wi-Fi (not bluetooth), this library should work.

(If you can't communicate with the inverter despite your model is listed above, it is possible you have old ARM firmware version. You should ask manufacturer support to upgrade your ARM firmware (not just inverter firmware) to be able to communicate with the inverter via UDP.)

White-label (sunways manufactured) inverters may work as well, e.g. General Electric GEP (PSB, PSC) and GEH models are know to work properly.

Since v0.4.x the library also supports standard Modbus/TCP over port 502. This protocol is supported by the V2.0 version of LAN+WiFi communication dongle (model WLA0000-01-00P).

Usage

  1. Install this package pip install sunways
  2. Write down your Sunways inverter's IP address (or invoke sunways.search_inverters())
  3. Connect to inverter and read all runtime data, example below
import asyncio
import sunways


async def get_runtime_data():
    ip_address = '192.168.1.14'

    inverter = await sunways.connect(ip_address)
    runtime_data = await inverter.read_runtime_data()

    for sensor in inverter.sensors():
        if sensor.id_ in runtime_data:
            print(f"{sensor.id_}: \t\t {sensor.name} = {runtime_data[sensor.id_]} {sensor.unit}")


asyncio.run(get_runtime_data())

References and useful links

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

sunways-0.0.5.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

sunways-0.0.5-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file sunways-0.0.5.tar.gz.

File metadata

  • Download URL: sunways-0.0.5.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sunways-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2193e335a552e8253cb94322d2485ddea1348bc1f0b18e1a8942db2c4fbeca78
MD5 34671961c28f4d59a410d9ce84c8c198
BLAKE2b-256 2c04dc1aa97dec1748ce64b89f7a00dea4ddfad1ec943a10302f2e89a8203601

See more details on using hashes here.

File details

Details for the file sunways-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: sunways-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sunways-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6e3523bab3cdf4d0a9a07d228fdd9a5eff3b082120da3c6cdeef4ce4f2ffd283
MD5 27977b63dbf1e5119451335db5c57b3b
BLAKE2b-256 16a4f3b017215daa6519a59b41dc89330dd1ad75287c8ba2ddf2c51eb3b9b354

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