Skip to main content

Add your description here

Project description

Superwatt Python Client

Python client and CLI for SuperWatt / Voltronic-compatible inverters over serial.

Install

uv sync

Set the serial port with --port or SUPERWATT_PORT.

Examples:

$env:SUPERWATT_PORT = "COM3"
uv run superwatt query protocol-id
uv run superwatt --port COM3 query protocol-id
export SUPERWATT_PORT=/dev/ttyUSB0
uv run superwatt query protocol-id
uv run superwatt --port /dev/ttyUSB0 query protocol-id

CLI

Read a typed query:

uv run superwatt query protocol-id
uv run superwatt query general-status
uv run superwatt query device-flags

Send a raw protocol query:

uv run superwatt rawquery QPI
uv run superwatt rawquery QPIGS
uv run superwatt rawquery QFOO --allow-unknown

Build a parameter command without sending it:

uv run superwatt parameter disable buzzer
uv run superwatt parameter disable lcd-backlight

Execute a parameter command:

uv run superwatt parameter disable buzzer --execute
uv run superwatt parameter enable lcd-backlight --execute

Supported parameters:

buzzer
bypass-to-utility-on-overload
fault-code-recording
lcd-backlight
lcd-timeout-escape-to-default-page
over-temperature-restart
overload-restart
power-saving
primary-source-interrupt-alarm

Python

from superwatt import SuperWattClient

client = SuperWattClient(port="/dev/ttyUSB0")

protocol = client.get_protocol_id()
status = client.get_general_status()
flags = client.get_device_flags()

dry_run = client.build_set_parameter_command("buzzer", False)
result = client.set_parameter_value("buzzer", False)

Errors

NegativeAcknowledgementError is raised when the inverter returns NAK.

UnknownQuery is raised when an unknown query sent with allow_unknown=True returns NAK.

Project details


Download files

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

Source Distribution

superwatt-0.1.2.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

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

superwatt-0.1.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file superwatt-0.1.2.tar.gz.

File metadata

  • Download URL: superwatt-0.1.2.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for superwatt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 feeb59336be6ec3cbd85a5be602f943734459f375c89c74009c07a4cacab4848
MD5 c73e9bb84e90a5ed13cbf1057301bb26
BLAKE2b-256 651659e4d86dcdbef2b45c99c662788a33217877f27e9f98cdfe361cea80739a

See more details on using hashes here.

Provenance

The following attestation bundles were made for superwatt-0.1.2.tar.gz:

Publisher: publish.yml on Sygmei/SuperwattPythonClient

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

File details

Details for the file superwatt-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: superwatt-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for superwatt-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b44b3f63b8590f44ef83df9b6150b71d6d538403db3a1d3c9a1f9670d4a4364
MD5 ae5aa686b7f735eb8cc2c42240f3614e
BLAKE2b-256 8007e0e66e5465d79fdee0f560000ab83123726e97dd20c1db358b861aa4f48c

See more details on using hashes here.

Provenance

The following attestation bundles were made for superwatt-0.1.2-py3-none-any.whl:

Publisher: publish.yml on Sygmei/SuperwattPythonClient

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 Pingdom Monitoring Sentry Error logging StatusPage Status page