Skip to main content

Satori

SunSpec Alliance      DER Security

py20305

The IEEE 2030.5 / CSIP client of Project Satori — an open-source project led by the SunSpec Alliance, DER Security, and industry consortium members.

CI Tests Coverage PyPI Python License Project Satori

An open IEEE 2030.5 client for distributed energy resources, with CSIP-AUS support. It speaks the utility's protocol so your device doesn't have to.

Point it at an IEEE 2030.5 server and it registers, discovers what the server exposes, runs the DERControl schedule it is given, applies the resulting setpoints to a device, and posts telemetry back.

Install

pip install py20305

The base install is the protocol client. Extras add what you may not need: sunspec for Modbus devices, api for the HTTP management API, or all.

Running it as a service

pip install "py20305[cli,sunspec]"
py20305 --config client.yaml --check   # validate, print your LFDI
py20305 --config client.yaml           # run

One YAML or JSON file describes the server, the certificate and the devices. It retries the connection while the server is down, registers itself only if the server does not already know it, and stops cleanly on SIGTERM. See Running a client and examples/client.example.yaml.

Running it in a container

docker build -t py20305 .
docker run -d -v "$PWD/config:/etc/py20305:ro" py20305

The image carries the client and nothing else -- configuration and certificates are mounted, never baked in. It runs unprivileged and stops in order on SIGTERM. See Running in a container and examples/docker-compose.yml.

Embedding it: talking to a server in five minutes

IEEE 2030.5 is mutual TLS throughout, and the server identifies your client by its certificate. Your LFDI — the identifier the utility registers — is derived from it:

from pathlib import Path
from py20305.security import compute_lfdi

print(compute_lfdi(Path("certs/client.pem").read_text()))

Give that to whoever runs the server, then:

python examples/quickstart.py \
  --url https://server.example.com:8443 \
  --cert certs/client.pem --key certs/client.key --ca certs/ca.pem

That drives the print connector, which needs no hardware — it logs the controls it would have applied. So you can exercise the whole discovery, event and telemetry path against a real server before an inverter is wired up.

Swap in SunSpecDeviceConfig when you have one. Full walkthrough in the quickstart.

What's in it

Protocol client Resource discovery, registration, mTLS transport, retry with backoff, redirect probing, server timebase
Finding a server DNS-SD query over mDNS or xmDNS when no server URL is configured, as IEEE 2030.5 §6.9.2 asks of a client; optional announcement of this client so an operator can find it on their own network
Event engine DERControl five-state machine, supersession across programs, randomized start and duration, Response acknowledgments
Pricing IEEE 2030.5 Pricing function set, off by default: discovers the tariff tree and relays each active interval's price to connectors as it changes; relay-only, so the client does not act on price, the connector decides
Telemetry DERStatus, DERCapability, DERSettings, DERAvailability, metered readings as MirrorUsagePoints, started and rediscovered for you by the runner; site and DER meters mirrored with their own roleFlags
Connectors SunSpec Modbus over TCP, RTU and TLS, for inverters and meters; a no-hardware print connector; your own by subclass or factory
Subscriptions Subscribe/notify as an alternative to polling, with a notification listener
Runner A CLI, config file, connection retry and signal-handled shutdown
Management API Optional HTTP API for observing and nudging a running client
Observers Optional hooks that hand an embedding application a record of every HTTP exchange, connection event, protocol anomaly, device read and write, and audit record

Standards

IEEE 2030.5-2018 and 2030.5-2023. Both XSDs ship with the package and validation runs against them, layered so a body that carries CSIP-AUS extensions is checked against both the IEEE 2030.5 and the CSIP-AUS schemas. The generated bindings track 2023; a server schema profile (server.schema) sends a 2018 server only what 2018 defines, plus any function it borrows from 2023, such as import and export limits.

CSIP-AUS, including DOE (dynamic operating envelope) limits. The client writes its CSIP-AUS extensions in the namespace the server declares, so it works with servers on CSIP-AUS 1.3 (https://csipaus.org/ns/v1.3) and on earlier versions (https://csipaus.org/ns).

The client maps one certificate identity to one end device. It registers and drives that device, and does not fan a server-side EndDevice out across several local ones.

Certification

py20305 is not SunSpec CSIP certified, and using it does not make a product certified. Certification is a property of the product -- the assembled client device or system, tested as a whole -- not of a library inside it.

If you are building a client product that needs SunSpec CSIP certification, follow the SunSpec Alliance's certification process: IEEE 2030.5 / CSIP certification.

Project Satori

Any certified DER. Any utility program. Satori — “awakening” — is an open-source initiative to make any certified DER a compliant participant in utility DER programs: point it at the Modbus port of a UL 1741 SB device — inverter, battery, or EV — and it joins a program without a firmware rewrite. The bundle builds on SunSpec-certified implementations contributed by DER Security, and this repository is its IEEE 2030.5 half:

Project Role
PySunSpec2 SunSpec Modbus reference library, used in more than 80% of inverter-based products shipped globally
py20305 (this repository) IEEE 2030.5 client stack with CSIP and CSIP-AUS support, and a SunSpec Modbus bridge
Satori Scout Phone app that finds DER on a network: a SunSpec Modbus sweep of the local subnet, and IEEE 2030.5 discovery over mDNS. A reference implementation rather than an open-source component

Project website: https://open-satori.org

Documentation

https://dersecurity.github.io/py20305/

Development

pip install -e ".[dev]"
pytest tests -q                 # unit tests, no network
ruff check src tests examples scripts
mypy
mkdocs serve                    # docs at http://127.0.0.1:8000

There is also an end-to-end suite that runs this client against envoy, the open-source CSIP-AUS utility server from the Australian National University — the implementation ANU's certification program runs on. It needs Docker:

python scripts/e2e_server.py up
pytest tests/e2e -v
python scripts/e2e_server.py down

The unit suite proves this client does what we believe the standard requires. That one proves the belief survives contact with an implementation nobody here wrote. See Testing.

See CONTRIBUTING.md.

License

Apache-2.0. See LICENSE and NOTICE.

Metadata

Release files for py20305 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py20305 1.0.0
File Size Uploaded Provenance Actions
py20305-1.0.0.tar.gz 965.3 kB With provenance Details for py20305-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py20305 1.0.0
File Interpreter ABI Platform Actions
py20305-1.0.0-py3-none-any.whl Python 3 none any Details for py20305-1.0.0-py3-none-any.whl

Total release size: 1.6 MB

Release files / py20305-1.0.0.tar.gz

Download URL py20305-1.0.0.tar.gz
Size 965.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ffefb510a24cf3916c5d007b8a485c451ea9aaac83e1b31fbdd72dfb9d1f6be0
BLAKE2b-256 checksum
How to use checksums
fa60c33aea236e32931e900ab126d40c68815719e9e639f476e632d2de20d36c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / py20305-1.0.0-py3-none-any.whl

Download URL py20305-1.0.0-py3-none-any.whl
Size 667.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
096e99a80137a9f50a77fdcbc8c86680c9fe515562cafbf4748cbcb1c9724aeb
BLAKE2b-256 checksum
How to use checksums
1ce0c81a9fad618fdec6ed0195c8e54174f8e24de9daf731e2cc1079e2b847a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for py20305 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for py20305-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page