Skip to main content

CSRmesh BLE protocol and async client for Holiday Show Home LED Balls

Project description

lightball-ble

Async BLE protocol and client for Holiday Show Home "Show Home" LED Balls — the battery-powered RGB orbs sold under the Holiday Showtime / Show Home brands. They speak Qualcomm/CSR's CSRmesh over a GATT bridge; this library reimplements that framing so you can control a ball from Python (and powers the Home Assistant lightball integration).

Install

pip install lightball-ble

Usage

You provide a bleak BLEDevice (the ball rotates its BLE address, so re-resolve it by the stable local name — e.g. LAB00001CEB11 — before each use):

from bleak import BleakScanner
from lightball_ble import LightBall

device = await BleakScanner.find_device_by_name("LAB00001CEB11")
ball = LightBall(device, "LAB00001CEB11")

await ball.set_state(mode=1, color=0, level=2)   # steady, red, mid brightness
await ball.set_show(6)                            # MultiColor animated show
await ball.turn_off()

# Re-resolve the address later, then reuse the client:
ball.set_ble_device(await BleakScanner.find_device_by_name("LAB00001CEB11"))

Command reference

  • set_state(mode, color, level, *, turn_on=True)commonMode: animation mode (0=off, 1=steady, 2=blink, 5=fade, 7=waves …), palette color index (0=red … 28=MultiColor), brightness level 0–4.
  • set_show(show_sel, *, turn_on=True)showView animated preset (0=Christmas … 6=MultiColor).
  • turn_off().

Protocol

lightball_ble.protocol exposes the low-level framing if you need it:

  • Network key: reverse(SHA-256(b"686868\x00MCP"))[:16] (a fixed, product-line shared key — derive_key()).
  • Packet: AES-128 counter-mode payload + an 8-byte byte-reversed HMAC-SHA256 MIC
    • a trailing 0xFF (make_packet).
  • Transport: packets > 20 bytes split across two GATT control points (split_writes).

This was reverse-engineered from the official "Show Home" Android app; see the lightball project for the full writeup.

Develop

pip install -e ".[test]"
pytest --cov=lightball_ble --cov-report=term-missing
ruff check . && ruff format --check .

License

Apache-2.0.

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

lightball_ble-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

lightball_ble-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file lightball_ble-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for lightball_ble-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fbfc1445267a17d07dd39f9f353cb759c930122c8224de0eeec75e12372973dc
MD5 744796cd69633d92dbb221097d6678bb
BLAKE2b-256 3a783fa2452a396c718ede2f149e769f2f2f47e31cad8c6ab48de4a66949619c

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightball_ble-0.1.0.tar.gz:

Publisher: publish.yml on dallanwagz/lightball-ble

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

File details

Details for the file lightball_ble-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for lightball_ble-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bef682295091dc16a23dadd071f7134b43efa33579e515493181ac5a93f108c9
MD5 f396f592d667b5d8e3564375368cd84c
BLAKE2b-256 fd158c5a3898ec90145fa99646a61cf4296fd76e811b78eddec433c63fcf68ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightball_ble-0.1.0-py3-none-any.whl:

Publisher: publish.yml on dallanwagz/lightball-ble

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