Skip to content
Back to top
View this page

# Welcome to bleak-smlight documentation!

Installation & Usage

- Installation
- Usage
  - Device configuration
  - Advanced: wiring `connect_scanner` directly
- Architecture
  - What this library is, and what it is not
  - Where the proxy is implemented
  - Connection lifecycle and retries
  - Who can use it
  - See also
- API reference
  - High-level entry point
  - Low-level escape hatch

Project Info

- CHANGELOG
  - v1.1.1 (2026-06-27)
  - v1.1.0 (2026-06-27)
  - v1.0.0 (2026-06-25)
- Contributing
  - Types of Contributions
  - Get Started!
  - Pull Request Guidelines
  - Tips
  - Making a new release

# bleak-smlight

Documentation: https://bleak-smlight.readthedocs.io

Source Code: https://github.com/bluetooth-devices/bleak-smlight

A Bleak backend that receives Bluetooth Low Energy advertisements from a SMLIGHT SLZB BLE proxy. The proxy is scan only, so this library registers a non connectable scanner with habluetooth; it does not support GATT connections. The UDP proxy protocol lives in pysmlight, this library is the host side glue that feeds advertisements into Bleak. See the architecture docs for how the pieces fit together.

## Usage

    import asyncio

    import habluetooth

    from bleak_smlight import SMLIGHTConnectionManager, SMLIGHTDeviceConfig

    DEVICES: list[SMLIGHTDeviceConfig] = [
        {"source": "AA:BB:CC:DD:EE:FF", "name": "slzb-proxy", "host": "10.0.0.5"},
    ]

    async def main() -> None:
        await habluetooth.BluetoothManager().async_setup()
        managers = [SMLIGHTConnectionManager(d) for d in DEVICES]
        await asyncio.gather(*(m.start() for m in managers))
        try:
            await asyncio.Event().wait()  # advertisements now flow into Bleak
        finally:
            await asyncio.gather(*(m.stop() for m in managers))

    asyncio.run(main())

## Installation

Install this via pip (or your favourite package manager):

`pip install bleak-smlight`

## Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

## Credits

This package was created with Copier and the browniebroke/pypackage-template project template.