Skip to main content

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 None until first reported. Status topics are retained on the broker, so a fresh subscriber receives the current snapshot immediately.
  • The hello announcement (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_house are only meaningful with a Powerwall/meter configured; otherwise Prism publishes 0.

License

MIT © Ermanno Baschiera. Not affiliated with Silla S.r.l.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysillaprism-0.2.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

pysillaprism-0.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file pysillaprism-0.2.0.tar.gz.

File metadata

  • Download URL: pysillaprism-0.2.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pysillaprism-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d5bf7194ffcd9b1ca2a45b70a5b0e83c09e266f14e75bde545d6975a61fac0b6
MD5 1ab10cd25cff13cec52c8b5111dff22b
BLAKE2b-256 87f03a16fdca4cf3596a37b425b49cfee6bd780161f6f5f30cfc60d9a14effce

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysillaprism-0.2.0.tar.gz:

Publisher: release.yml on ebaschiera/pysillaprism

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

File details

Details for the file pysillaprism-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pysillaprism-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pysillaprism-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6acec231002d397f00555f4b90c6d41a96e6857d10d6891eb7c2a3b1acacedcf
MD5 e1bb8d977b67b28d6962fe86fce8dc3a
BLAKE2b-256 71836e067c9262f366a9df1a172a863be9bc392b4dea1d9aa15bff441851d248

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysillaprism-0.2.0-py3-none-any.whl:

Publisher: release.yml on ebaschiera/pysillaprism

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

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