Rewrote help and description.
This commit is contained in:
parent
3081b16a22
commit
1f825347ab
2 changed files with 15 additions and 11 deletions
17
README.md
17
README.md
|
@ -1,21 +1,24 @@
|
||||||
# wled.sh
|
# wled.sh
|
||||||
|
|
||||||
Simple shell script to turn predefined wled instances on/off, change brightness
|
Turn WLED installations in the C4 hackspace on/off, change brightness or switch
|
||||||
and switch presets.
|
between presets.
|
||||||
|
|
||||||
Requires *curl* version 7.82.0 or newer.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Switch on/off:
|
Switch on/off:
|
||||||
|
|
||||||
`wled f(nordcenter)|w(ohnzimmer) on|off`
|
`$ wled -f(nordcenter)|-w(wohnzimmer) on|off`
|
||||||
|
|
||||||
Switch between presets 1 to 17 or list available presets:
|
Switch between presets 1 to 17 or list available presets:
|
||||||
|
|
||||||
`wled f(nordcenter)|w(ohnzimmer) 1-17|l(ist)`
|
`$ wled -f|-w 1-17|l`
|
||||||
|
|
||||||
Change brightness:
|
Change brightness:
|
||||||
|
|
||||||
`wled f(nordcenter)|w(ohnzimmer) b(rightness) 1-255`
|
`$ wled -f|-w -b 1-255`
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
*curl* version 7.82.0 or newer.
|
||||||
|
You have to be connected to the local network.
|
||||||
|
|
||||||
|
|
9
wled
9
wled
|
@ -1,17 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Simpel command line tool to turn predefined wled instances on/off or switch
|
# Turn WLED installations in the C4 hackspace on/off, change brightness or
|
||||||
# presets.
|
# switch between presets.
|
||||||
#
|
#
|
||||||
# Author: Shy
|
# Author: Shy
|
||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
|
NAME="wled.sh"
|
||||||
COMMAND="wled"
|
COMMAND="wled"
|
||||||
VERSION="0.0.1"
|
VERSION="0.0.1"
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
echo "\
|
echo "\
|
||||||
Usage: $COMMAND -f|-w [on|off]
|
Usage: $COMMAND -f(norcenter)|-w(wohnzimmer) [on|off]
|
||||||
$COMMAND -f|-w [1-17|list]
|
$COMMAND -f|-w [1-17|list]
|
||||||
$COMMAND -f|-w -b [1-255]"
|
$COMMAND -f|-w -b [1-255]"
|
||||||
}
|
}
|
||||||
|
@ -41,7 +42,7 @@ case "$1" in
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-v|--version)
|
-v|--version)
|
||||||
echo "wled.sh version $VERSION"
|
echo "$NAME version $VERSION"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-f|--fnordcenter)
|
-f|--fnordcenter)
|
||||||
|
|
Loading…
Reference in a new issue