A script that does silly things to the LEDs of Turris Omnia routers. Primarily made to confuse and annoy my friend.
- Shell 100%
| LICENSE | ||
| omnia-leds.sh | ||
| README.md | ||
Turris Omnia LED control script
This shell script is meant to control the multicolor LEDs on a Turris Omnia router running OpenWrt. It allows you to set the LEDs to different color schemes, including a rainbow pattern, pink, white, and random colors.
Features
- Rainbow Mode: Sets the LEDs to a fixed rainbow pattern.
- Pink Mode: Sets all LEDs to pink (
255, 20, 147). - White Mode: Sets all LEDs to white (
255, 255, 255). - Random Mode: Sets the LEDs to random RGB values.
Requirements
- A Turris Omnia router running OpenWrt;
- LEDs exposed via
/sys/class/leds/; - ash shell.
Installation
- Place
omnia-leds.shin the/root/directory of your Turris Omnia router by usingscp -Oor pasting it withvi. - Ensure the script is executable with
chmod +x omnia-leds.sh.
Usage
- Set LEDs to a rainbow pattern:
./omnia-leds.sh --rainbow - Set LEDs to pink:
./omnia-leds.sh --pink - Set LEDs to white:
./omnia-leds.sh --white - Set LEDs to random colors:
./omnia-leds.sh --random
Running at boot
The easiest way to run the script at boot is by adding it to /etc/rc.local.
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
sh /root/omnia-leds.sh --rainbow
exit 0
Running with cron
The --random option is ideal for cronjobs. You can add the script to your crontab with crontab -e.
Then add the following line:
* * * * * sh /root/omnia-leds.sh --random
This will randomize the LED colors every minute.
License
This project is licensed under the GNU General Public License v3.0 (GPLv3). You are free to use, modify, and redistribute it under the terms of the GPLv3.
For details, see: https://www.gnu.org/licenses/gpl-3.0.en.html