Skip to main content

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)

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.2.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

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

solax-3.2.2-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: solax-3.2.2.tar.gz
  • Upload date:
  • Size: 31.5 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.2.tar.gz
Algorithm Hash digest
SHA256 b9365f05de7af5b7cc28f7c2765bb2ad6a464806b57daac4afec21d3850af03d
MD5 c76ca126ef92c282c9785b6c07f28bc6
BLAKE2b-256 e96d8666e52a7d1da6b4ac45b7637d6332f163642c0f94398a4919e64c92cb78

See more details on using hashes here.

Provenance

The following attestation bundles were made for solax-3.2.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: solax-3.2.2-py3-none-any.whl
  • Upload date:
  • Size: 30.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 40f3797fa07af42719b882cd1b31104459b6eb9b8d500335947b26b4c4aabd1e
MD5 dba978702625d92089b1c514496ce261
BLAKE2b-256 85c415c07db0951fd33e28fbfe72e5682f459d98cb299a3c4e5ae40d3d98b56b

See more details on using hashes here.

Provenance

The following attestation bundles were made for solax-3.2.2-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 Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page