1.4 KiB
1.4 KiB
wled-cli
Tiny no-dependency CLI for talking to a WLED box over its JSON API.
Features
- turn lights on/off
- set brightness
- set named or hex colors
- target 1-based inclusive LED ranges
- set effects by name or id
- list effects
- list presets
- use presets by name or id
- inspect raw WLED JSON endpoints
Install
npm install
npm link
Or just run it directly:
node ./bin/wled.js status
Default target
By default the CLI talks to:
http://wled.local
Override with:
wled --url http://another-device.local status
Or set an env var:
export WLED_URL=http://another-device.local
Usage
wled on
wled off
wled status
wled effects
wled effects rainbow
wled presets
wled set --color blue --range 70-80 --brightness 50%
wled set --color green --range 90-100 --effect blink --rest-color white
wled set --hex '#00ff88' --effect solid
wled set --preset 1
wled raw /json/info
Notes
--rangeis 1-based inclusive. So70-80means LEDs 70 through 80.--brightnessaccepts1-255or a percentage like50%.--rest-color/--rest-hexlets you paint the LEDs outside the selected range in one shot.--effectaccepts a numeric id or a fuzzy name match.--presetaccepts a numeric id or a fuzzy preset name match.- For new integrations, prefer WLED's JSON API docs: https://kno.wled.ge/interfaces/json-api/
License
MIT