Solax inverter API client
Project description
Solax
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solax-3.2.4.tar.gz.
File metadata
- Download URL: solax-3.2.4.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb41480e177ad336967303e7abb3fb5b1b9741cd4c8af58d4dcb63dd3b991779
|
|
| MD5 |
0d70b9c428599e46e17ded61509704b6
|
|
| BLAKE2b-256 |
89d2768ce989ef0a0e347cab3c68c65f9c039263c2154eeddcb0e42bf77929ff
|
Provenance
The following attestation bundles were made for solax-3.2.4.tar.gz:
Publisher:
publish.yml on squishykid/solax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
solax-3.2.4.tar.gz -
Subject digest:
eb41480e177ad336967303e7abb3fb5b1b9741cd4c8af58d4dcb63dd3b991779 - Sigstore transparency entry: 738177131
- Sigstore integration time:
-
Permalink:
squishykid/solax@6c9e490b979279486ffec9fc0841b649704489d6 -
Branch / Tag:
refs/tags/v3.2.4 - Owner: https://github.com/squishykid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c9e490b979279486ffec9fc0841b649704489d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file solax-3.2.4-py3-none-any.whl.
File metadata
- Download URL: solax-3.2.4-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07d146dcbabb698e78487f63c53acf734a036f117a7d0ab968cd6dd76ae0c3f4
|
|
| MD5 |
10fd7c7361762c7c8e331cb5fb458a48
|
|
| BLAKE2b-256 |
bb355903683793f2d3a3d2876276787720275962622c2e36442460f7d3a79350
|
Provenance
The following attestation bundles were made for solax-3.2.4-py3-none-any.whl:
Publisher:
publish.yml on squishykid/solax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
solax-3.2.4-py3-none-any.whl -
Subject digest:
07d146dcbabb698e78487f63c53acf734a036f117a7d0ab968cd6dd76ae0c3f4 - Sigstore transparency entry: 738177134
- Sigstore integration time:
-
Permalink:
squishykid/solax@6c9e490b979279486ffec9fc0841b649704489d6 -
Branch / Tag:
refs/tags/v3.2.4 - Owner: https://github.com/squishykid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c9e490b979279486ffec9fc0841b649704489d6 -
Trigger Event:
push
-
Statement type: