Skip to main content

Solax inverter API client

Project description

Solax

Build Status PyPI - Downloads

Read energy usage data from the real-time API on Solax solar inverters.

  • Real time power, current and voltage
  • Grid power information
  • Battery level
  • Temperature and inverter health
  • Daily/Total energy summaries

Usage

pip install solax

Then from within your project:

import solax
import asyncio

async def work():
    r = await solax.real_time_api('10.0.0.1')
    return await r.get_data()

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
data = loop.run_until_complete(work())
print(data)

This will try all the inverter classes in turn until it finds the first one that works with your installation. You can see the list of inverter implementation classes in the entry points configured in setup.py.

If you want to bypass the inverter discovery code and use a specific inverter class, you can invoke discover specifying directly the class. In this example, the X1 Hybrid Gen4 implementation is used:

from importlib.metadata import entry_points
import solax
import asyncio

INVERTERS_ENTRY_POINTS = {
   ep.name: ep.load() for ep in entry_points(group="solax.inverter")
}

async def work():
    inverter = await solax.discover("10.0.0.1", 80, "xxxxx", inverters=[INVERTERS_ENTRY_POINTS.get("x1_hybrid_gen4")], return_when=asyncio.FIRST_COMPLETED)
    return await inverter.get_data()

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
data = loop.run_until_complete(work())
print(data)

Confirmed Supported Inverters

These inverters have been tested and confirmed to be working. If your inverter is not listed below, this library may still work- please create an issue so we can add your inverter to the list 😊.

  • SK-TL5000E
  • X1 Hybrid Gen4

You can get the list of supported inverters by looking up the solax.inverter entry points:

for ep in entry_points(group="solax.inverter"):
    print(ep)

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

solax-3.2.3.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

solax-3.2.3-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file solax-3.2.3.tar.gz.

File metadata

  • Download URL: solax-3.2.3.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for solax-3.2.3.tar.gz
Algorithm Hash digest
SHA256 86df943ff8acf7e81a94c895cffa64c2daded415df0934f7f52a52cf855cb6fb
MD5 096dbd6c60ef84a5172abab5f0a85a01
BLAKE2b-256 4949fe4002a9b48aaba833606d6dc2d9ecd3a5d52190b50cbc02e2b1c03534f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for solax-3.2.3.tar.gz:

Publisher: publish.yml on squishykid/solax

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

File details

Details for the file solax-3.2.3-py3-none-any.whl.

File metadata

  • Download URL: solax-3.2.3-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for solax-3.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 42a4fe548c0bfedef196f92f8538e911107f7586b7127e9f1cdc5556110ebf15
MD5 e8a76cbdd1df363e0b96775d5409379d
BLAKE2b-256 a50cc11977e37089eba3fb46c47be72c73ef5e70b82c4ab9363abf36d12c1731

See more details on using hashes here.

Provenance

The following attestation bundles were made for solax-3.2.3-py3-none-any.whl:

Publisher: publish.yml on squishykid/solax

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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page