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.1.tar.gz (10.9 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.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lightball_ble-0.1.1.tar.gz
  • Upload date:
  • Size: 10.9 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.1.tar.gz
Algorithm Hash digest
SHA256 4558a3b93fa308c657cb9660f97d1a443906afda1200ec19b5f600de6527129d
MD5 004c1b46fb80ad026b80d0f5565485db
BLAKE2b-256 adec574fc8308f86367ae9367ef3e6adbb6eaf1863e1224420532dfb30fb0d33

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightball_ble-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: lightball_ble-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e4ab619d6aa2b8beea951362dcd97179b47748578c2e610c5d2ac4d025742438
MD5 ac81076d870724de815f4df05da4cbd3
BLAKE2b-256 03e512ac3cf67fa222279af9053b0d8bb0dfd333c346af23f9ae818e67fcc3cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightball_ble-0.1.1-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