Boing Lamp over Bluetooth
Control the Boing Ball lamp from the browser over Bluetooth — the lamp's own control page (effects, brightness, playlist, clock and weather, LED calibration, WiFi set-up) with every request carried over BLE, plus a console for its text commands.
Added
How to use it
The Boing Lamp is an ESP32-C6 inside a printed Boing ball, driving a string of WS2812 LEDs. Over WiFi it serves a control page; this tool is the same page, talking to the lamp over Bluetooth instead. It works where the lamp can’t be reached over WiFi: a network that keeps devices apart, somewhere with no WiFi at all, or a new lamp that hasn’t joined a network yet.
How to use it
-
Power the lamp and press Connect by Bluetooth. Choose boing-lamp in the browser’s list. If your lamp has a name that doesn’t start with “boing”, tick Show every Bluetooth device first.
-
The lamp’s control page opens below, exactly as the lamp serves it: effects in their groups, brightness, speed and tweak, the playlist and Save as startup, the clock, alarm, timer, weather location and status light, LED calibration, and the Network panel.
-
The box under the page sends a console command, as you would type it at the serial port:
fx earth,bri 60,play next,tz PST8PDT,M3.2.0,M11.1.0,wifi list,reboot.
If the link drops (the lamp restarted, or you walked out of range), the next thing you do reconnects. A command takes about 50 ms; the full state about half a second; a WiFi scan about five seconds.
Setting up WiFi over Bluetooth
A lamp with no network comes up as an open access point. You don’t need to join it: connect here,
open the Network panel, pick your network and type its password. The password goes to the lamp over
the Bluetooth link and is stored there; it is never shown again (wifi list gives names only).
How it works
The lamp has one command layer with three ways in — HTTP, Bluetooth LE and the serial console — all
wrappers round the same function. Over BLE, the GATT service 6b1a0001-4253-89b4-a543-135c471e5d9e
has a command characteristic (…0002) and a response characteristic (…0004) that notifies. The page
writes GET /api/state (or POST /api/play and a JSON body) to the command characteristic in packets
that each start with a flag byte — bit 1 the first packet, bit 0 more to follow — and the reply comes
back as notifications framed the same way, the first carrying J for JSON or T for text.
The lamp’s page runs in a sandboxed frame with fetch() for /api/… replaced by that exchange, so it
works unchanged. While you drag a slider, a newer brightness, speed or tweak replaces one still
waiting to be sent, so the lamp keeps up with your hand.
Browser support
Web Bluetooth works in Chrome and Edge on Mac, Windows, ChromeOS and Android. Safari, Firefox and every browser on iPhone and iPad can’t reach the lamp. The lamp is Bluetooth LE only (the C6 has no Bluetooth Classic), and it takes one connection at a time — close the Mac bridge or another tab first.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser — network requests go only to the services named on this page.