Transport-agnostic client library for the Silla Prism EV wallbox over MQTT
Project description
pysillaprism
Transport-agnostic Python client library for the Silla Prism EV wallbox, speaking its native MQTT protocol (topic manual rel. 4.0).
The library does not own an MQTT connection. It parses the Prism topics into
typed state and builds the command topics; you wire it to whatever MQTT client
you already have — for example Home Assistant's mqtt integration. This keeps
it free of transport dependencies and trivially unit-testable.
Install
pip install pysillaprism
Usage
from pysillaprism import PrismDevice, PortMode
# `publish` may be sync or async (e.g. hass mqtt.async_publish).
async def publish(topic: str, payload: str) -> None:
...
device = PrismDevice("prism", publish=publish)
# Wire callbacks (all optional).
device.on_status_update = lambda upd: print("changed", upd.field)
device.on_event = lambda ev: print("touch/knock", ev.values)
device.on_command_result = lambda res: print(res.command, res.result)
device.on_hello = lambda info: print("serial", info.serial)
# Subscribe your MQTT client to `device.subscription_topic` ("prism/#")
# and feed every message in:
device.handle_message("prism/1/state", "3")
print(device.status.port(1).state) # PortState.CHARGING
print(device.status.energy.power_grid) # signed watts
# Send commands:
await device.set_mode(PortMode.NORMAL)
await device.set_current_limit(9.6) # amps, for load balancing
await device.set_current_user(16) # amps, mirrors the +/- buttons
await device.authorize()
Notes on the protocol
- Prism publishes a topic only when its value changes, so status fields stay
Noneuntil first reported. Status topics are retained on the broker, so a fresh subscriber receives the current snapshot immediately. - The
helloannouncement (which carries the serial and firmware version) is sent only when Prism (re)connects and is not retained. Treat device info as opportunistic: it populates on the next Prism reboot, and the device works without it. Identify a device by its base topic, not its serial. power_solar/power_houseare only meaningful with a Powerwall/meter configured; otherwise Prism publishes0.
License
MIT © Ermanno Baschiera. Not affiliated with Silla S.r.l.
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 pysillaprism-0.1.0.tar.gz.
File metadata
- Download URL: pysillaprism-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db3ada1598848dcaff7c619b444fa4fd6d2d6bd5a642fd7039ed786940ebb7f2
|
|
| MD5 |
e49cd0c259dfd396c584f2a116749046
|
|
| BLAKE2b-256 |
00e77871ed5e09ee9b551445c0d83791a379daf185bcf0cdfbbee3bfa8358608
|
Provenance
The following attestation bundles were made for pysillaprism-0.1.0.tar.gz:
Publisher:
release.yml on ebaschiera/pysillaprism
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysillaprism-0.1.0.tar.gz -
Subject digest:
db3ada1598848dcaff7c619b444fa4fd6d2d6bd5a642fd7039ed786940ebb7f2 - Sigstore transparency entry: 2171971931
- Sigstore integration time:
-
Permalink:
ebaschiera/pysillaprism@98b70e16a70bdcd61477697aebb3bfb0ffd917b9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ebaschiera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98b70e16a70bdcd61477697aebb3bfb0ffd917b9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pysillaprism-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pysillaprism-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b31f04b2671637aa6491db680e2b8bcc36d4ae546aa907a0028c1847f65a5abf
|
|
| MD5 |
880a9aabfa3ed0f831c6df449131f23d
|
|
| BLAKE2b-256 |
2c2ee8fb2f3d1ad2eba67f6e92f3f3085915402ef3517a66c56717305a48fccd
|
Provenance
The following attestation bundles were made for pysillaprism-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ebaschiera/pysillaprism
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysillaprism-0.1.0-py3-none-any.whl -
Subject digest:
b31f04b2671637aa6491db680e2b8bcc36d4ae546aa907a0028c1847f65a5abf - Sigstore transparency entry: 2171971940
- Sigstore integration time:
-
Permalink:
ebaschiera/pysillaprism@98b70e16a70bdcd61477697aebb3bfb0ffd917b9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ebaschiera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98b70e16a70bdcd61477697aebb3bfb0ffd917b9 -
Trigger Event:
release
-
Statement type: