Skip to main content

lighthouse-ble

Async Bluetooth LE control of SteamVR Lighthouse base stations — Valve Index (V2, LHB-…) and HTC Vive (V1, HTC BS …). Built to back a Home Assistant integration, usable on its own.

V2 (Valve Index) V1 (HTC Vive)
Power on / standby / sleep on / sleep
State passive from advertisements, or GATT read not readable (optimistic)
Identify (blink LED) yes —
Channel 1–16 read / write —

V2 stations advertise their power state, channel and fault flag, so state updates need no connection. Waking from sleep takes about 11 s (reported as booting), from standby about 1 s.

Install

uv add lighthouse-ble            # as a library dependency
uvx lighthouse-ble scan          # run the CLI without installing

Command line

lighthouse-ble scan                      # list stations with passive state
lighthouse-ble scan --raw                # every advertisement with raw bytes and intervals
lighthouse-ble info LHB-1A2B3C4D         # device information + GATT state
lighthouse-ble on LHB-1A2B3C4D
lighthouse-ble standby LHB-1A2B3C4D
lighthouse-ble off LHB-1A2B3C4D
lighthouse-ble identify LHB-1A2B3C4D
lighthouse-ble channel LHB-1A2B3C4D 5
lighthouse-ble off "HTC BS 12AB34" --v1-id 1A2B   # V1: first 4 hex digits from the back label

Stations can be addressed by name or BLE address. --scan-time changes how long to look (default 10 s).

Library

import asyncio

from lighthouse_ble import PowerState, create_base_station, discover


async def main() -> None:
    for found in await discover(5):
        station = create_base_station(found.device, found.advertisement)
        print(station.name, station.state)
        await station.set_power(PowerState.ON)


asyncio.run(main())

In Home Assistant, feed advertisements from the bluetooth integration instead of scanning:

adv = parse_advertisement(service_info.name, service_info.manufacturer_data)
station.set_ble_device(service_info.device)
station.update_from_advertisement(adv)
unsubscribe = station.register_callback(lambda state: ...)

Every command opens a short connection and disconnects again, so no ESPHome proxy slot stays taken. Errors are always LighthouseError subclasses.

Development

uv sync
uv run pytest --cov=lighthouse_ble
uv run mypy
uv run ruff check . && uv run ruff format --check .

License

Apache-2.0

Metadata

Release files for lighthouse-ble 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lighthouse-ble 0.2.0
File Size Uploaded Provenance Actions
lighthouse_ble-0.2.0.tar.gz 67.6 kB With provenance Details for lighthouse_ble-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lighthouse-ble 0.2.0
File Interpreter ABI Platform Actions
lighthouse_ble-0.2.0-py3-none-any.whl Python 3 none any Details for lighthouse_ble-0.2.0-py3-none-any.whl

Total release size: 86.0 kB

Release files / lighthouse_ble-0.2.0.tar.gz

Download URL lighthouse_ble-0.2.0.tar.gz
Size 67.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3003d5ab140c8d64cd694c8ac137411a1677ba2b41c99745a51aa3b3d20224b0
BLAKE2b-256 checksum
How to use checksums
f8c0ff9654a0fd03032e2450134158a1988caa21e3cb18a5c5f3edced81d38d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / lighthouse_ble-0.2.0-py3-none-any.whl

Download URL lighthouse_ble-0.2.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4331c7a71d9a97a2d6eba83cba43423af3d3e8ba2d9a79d02e1abfb4162206fa
BLAKE2b-256 checksum
How to use checksums
eba290444a88aaa858d89d8c6ec47094548e4a5cb691bd9b8d4612b66aaeb0ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Security for lighthouse-ble 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lighthouse_ble-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page