Python library for controlling SAL Pixie BLE mesh wall switches
Project description
Pygsydust
A Python library for controlling SAL Pixie / Telink BLE mesh wall switches - fully offline, no cloud, no hub, no app dependency.
Features
- Full protocol implementation - login, session key derivation, AES-CCM encryption/decryption
- Device control - on/off, LED indicator control (blue/orange/purple), find-me blink
- Status monitoring - broadcast queries, real-time push notifications (0xDB/0xDC)
- Cross-platform - macOS (CoreBluetooth) and Linux (BlueZ via raw HCI)
- Home Assistant integration - see ha-pigsydust
Install
pip install pigsydust
On Linux, the process needs CAP_NET_RAW (or run as root / --privileged in Docker) for the raw HCI socket used to receive BLE notifications.
Quick Start
import asyncio
from pigsydust import PixieClient
async def main():
client = PixieClient("AA:BB:CC:DD:EE:FF")
await client.connect()
await client.login("Smart Light", "12345678")
await client.turn_on(1)
status = await client.query_status()
for addr, ds in status.items():
print(f"Device {addr}: {'ON' if ds.is_on else 'OFF'}")
await client.disconnect()
asyncio.run(main())
API
| Method | Description |
|---|---|
connect() |
Establish BLE connection (scans on macOS, direct on Linux) |
login(name, password) |
Authenticate with the mesh |
turn_on(addr) / turn_off(addr) |
Control a device, group, or broadcast (0xFFFF) |
query_status() |
Poll all devices and return dict[int, DeviceStatus] |
set_led_blue(addr, on) |
Toggle blue indicator LED |
set_led_orange(addr, level) |
Set orange indicator LED brightness (0-15) |
set_led_purple(addr, level) |
Set purple (both) indicator LED |
reset_led(addr) |
Clear indicator LEDs |
find_me(addr) |
Flash device LED for 15 seconds |
on_status_update(callback) |
Register for real-time push notifications |
disconnect() |
Disconnect and clean up |
Mesh credentials
All nodes in a Pixie mesh share two values:
- Mesh name - typically
"Smart Light"(the firmware default) - Mesh password - the numeric string shown in the Pixie app's "Share Home" screen
Protocol reference
See docs/PROTOCOL-REFERENCE.md for the complete reverse-engineered protocol specification.
License
MIT
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 pigsydust-0.6.1.tar.gz.
File metadata
- Download URL: pigsydust-0.6.1.tar.gz
- Upload date:
- Size: 48.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac9acb8cc835037f85dd9c1c9707be6ed8d6abb267d4cdabd0e64c1595c1db48
|
|
| MD5 |
a85ace4fc40c58c24c5409488f379dba
|
|
| BLAKE2b-256 |
0bda9ae2d12efa740d59774b974371cfe6062c9e8da4af82c2ecfa8ea3504ce6
|
Provenance
The following attestation bundles were made for pigsydust-0.6.1.tar.gz:
Publisher:
release.yml on tcslater/pigsydust-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pigsydust-0.6.1.tar.gz -
Subject digest:
ac9acb8cc835037f85dd9c1c9707be6ed8d6abb267d4cdabd0e64c1595c1db48 - Sigstore transparency entry: 1349052990
- Sigstore integration time:
-
Permalink:
tcslater/pigsydust-py@388a1970d29c3937d92f30742e1fba737540e3a7 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/tcslater
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@388a1970d29c3937d92f30742e1fba737540e3a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pigsydust-0.6.1-py3-none-any.whl.
File metadata
- Download URL: pigsydust-0.6.1-py3-none-any.whl
- Upload date:
- Size: 19.6 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 |
fe065671af29ce92ba7591fc3d880c2b5abdf571ad48610c4ba5eae2fceb0445
|
|
| MD5 |
9afa59e5d6fa28e30fb5d85329df962a
|
|
| BLAKE2b-256 |
d161ee7e98e0ea977f97e63aa6ed80715df2c5fc6f4441b9f95569549fd8489e
|
Provenance
The following attestation bundles were made for pigsydust-0.6.1-py3-none-any.whl:
Publisher:
release.yml on tcslater/pigsydust-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pigsydust-0.6.1-py3-none-any.whl -
Subject digest:
fe065671af29ce92ba7591fc3d880c2b5abdf571ad48610c4ba5eae2fceb0445 - Sigstore transparency entry: 1349053064
- Sigstore integration time:
-
Permalink:
tcslater/pigsydust-py@388a1970d29c3937d92f30742e1fba737540e3a7 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/tcslater
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@388a1970d29c3937d92f30742e1fba737540e3a7 -
Trigger Event:
push
-
Statement type: