Simple Wi-Fi and optional cellular timer automation for GL.iNet / OpenWrt
- π Interactive timer setup
- πΆ Scheduled Wi-Fi shutoff
- π‘ Optional cellular shutoff on modem-equipped models
- π Optional automatic turn-back-on time
- π Service status and timer status commands
- π§ Works on Wi-Fi-only and Wi-Fi + cellular GL.iNet models
- βοΈ OpenWrt
procdservice with persistent config - π One-line install from GitHub
The script can:
- Turn off Wi-Fi at a user-selected time
- Turn off detected cellular interfaces at the same time when present
- Optionally turn Wi-Fi and cellular back on at a second time
- Keep the timer running as a service across restarts
- Show current timer state, remaining time, and last action
sh -c "$(curl -fsSL https://raw.githubusercontent.com/zippyy/GL.iNet-WiFi-Cellular-Timer/main/install.sh)"Interactive setup:
radio-timer interactiveSet only the shutoff time:
radio-timer set 23:15Set shutoff and automatic turn-back-on:
radio-timer set 23:15 06:30Check status:
radio-timer statusClear the timer:
radio-timer clearForce shutoff immediately:
radio-timer run-nowForce turn-back-on immediately:
radio-timer run-enable-nowService control:
/etc/init.d/radio-timer status
/etc/init.d/radio-timer restart- If the off time has already passed today, it rolls to tomorrow
- If the on time is earlier than or equal to the off time, it rolls to the next day after shutoff
- On Wi-Fi-only models, the script skips cellular actions automatically
- Wi-Fi is controlled with
wifi downandwifi up - Cellular interfaces are detected from
uci show network
/usr/bin/radio-timer/etc/init.d/radio-timer/etc/config/radio-timer
- Times use the router's local timezone
- Existing
/etc/config/radio-timeris preserved by the installer - The service is enabled automatically during install