CLI to control Wiz smart lights over your local network. Built with Bun.
Each mode plays a unique ASCII shader animation in your terminal while setting the light.
# symlink into your PATH
ln -s "$(pwd)/wiz.ts" ~/bin/wiz
# discover your bulb and save config
wiz discoverRequires Bun (brew install oven-sh/bun/bun).
wiz discover # scan network, pick your bulb, save to .env
wiz on # turn light on
wiz off # turn light off
wiz status # show current bulb stateEach preset plays a unique ASCII shader animation while setting the light.
| Mode | Brightness | Temp | Use case |
|---|---|---|---|
-movie |
1% | 2200K | Pico projector darkness |
-chill |
40% | 2700K | Warm evening ambiance |
-day |
100% | 5000K | Bright daylight |
wiz ff6b35 # set color by hex
wiz ff6b35 50 # hex color at 50% brightness
wiz -b 75 # brightness only (1-100)
wiz -chill -b 60 # preset with brightness override- Discovers bulb on the local network by MAC address (UDP broadcast, falls back to subnet scan)
- Sends
setPilotcommand via Wiz JSON-RPC protocol (UDP port 38899) - Verifies state with
getPilot, retries on failure (3x with 500ms delay)
Wiz bulbs speak a JSON-RPC protocol over UDP on port 38899. Key commands:
registration— discover bulbs via broadcastgetPilot— read current light statesetPilot— set color, temperature, brightness, powergetSystemConfig— read MAC, firmware, module info
Quirks:
- RGB mode: must send
w: 0, c: 0or white LEDs contaminate the color - RGB mode minimum dimming is 10; color temp mode accepts dimming as low as 1
- Never send
tempandr/g/bin the same command dimming: 0does not turn off the light — usestate: false