MCPcopy Index your code
hub / github.com/ShayBox/Lighthouse

github.com/ShayBox/Lighthouse @1.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.4.0 ↗ · + Follow
12 symbols 20 edges 2 files 4 documented · 33%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Discord Downloads

Lighthouse

Virtual reality basestation power management in Rust

Usage

Usage: lighthouse [OPTIONS] --state <STATE>

Options:
  -s, --state <STATE>      V1: [OFF|ON] | V2: [OFF|ON|STANDBY]
  -b, --bsid <BSID>...     V1: Basestation BSID (Required) | V2: Bluetooth Device Identifier (Optional)
  -v, --verbose...         Increase logging verbosity
  -q, --quiet...           Decrease logging verbosity
  -t, --timeout <TIMEOUT>  Request timeout in seconds [default: 10]
  -h, --help               Print help

V1 Basestations require an 8 character BSID found on the device to work.

V2 Basestations do not require BSID. But you can specify their MAC address as BSID to manage a specific device.

Examples

Turning a V1 lighthouse on:

Find the BSID at the back of the device.

$ lighthouse --state on --bsid aabbccdd
$ lighthouse --state on --bsid aabbccdd --bsid eeff0011
$ lighthouse --state on --bsid aabbccdd,eeff0011

Turning on any V2 lighthouses within range:

$ lighthouse --state on

Turning on a specific V2 lighthouse:

Run once with verbose parameters to find the MAC address for each lighthouse:

$ lighthouse -vv --state off

This will show the device path or MAC address within square brackets, looking something like this:

2025-02-28T22:14:58.528048Z  INFO lighthouse: Found 'LHB-6DC32F38' [hci0/dev_E2_5A_B0_E4_97_AD]
2025-02-28T22:15:33.543205Z  INFO lighthouse: LHB-6DC32F38 [hci0/dev_E2_5A_B0_E4_97_AD]: OFF

Use the ID shown in the square brackets in the previous command as the bsid to manage a specific lighthouse:

$ lighthouse --state on --bsid "hci0/dev_E2_5A_B0_E4_97_AD"
# or
$ lighthouse --state on --bsid "E2:5A:B0:E4:97:AD"
$ lighthouse --state on --bsid "E2:5A:B0:E4:97:AD" --bsid "hci0/dev_A1_B2_C3_D4_E5_F6"
$ lighthouse --state on --bsid "E2:5A:B0:E4:97:AD","hci0/dev_A1_B2_C3_D4_E5_F6"

macOS

Enable the Bluetooth permission for your terminal. You can do the latter by going to System Preferences → Security & Privacy → Privacy → Bluetooth, clicking the '+' button, and selecting 'Terminal' (or iTerm or whichever terminal application you use).

Core symbols most depended-on inside this repo

write
called by 2
src/lib.rs
matches_v2_bsid
called by 1
src/main.rs
matches_v1_bsid
called by 1
src/main.rs
v2_cmd
called by 1
src/main.rs
v1_cmd
called by 1
src/main.rs
adapters
called by 1
src/lib.rs
adapter_info
called by 1
src/lib.rs
scan_peripherals
called by 1
src/lib.rs

Shape

Function 9
Class 2
Enum 1

Languages

Rust100%

Modules by API surface

src/main.rs6 symbols
src/lib.rs6 symbols

For agents

$ claude mcp add Lighthouse \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact