Skip to content

zippyy/GL.iNet-WiFi-Cellular-Timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⏱ GL.iNet Radio Timer

Simple Wi-Fi and optional cellular timer automation for GL.iNet / OpenWrt


πŸš€ Features

  • πŸ•’ 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 procd service with persistent config
  • πŸš€ One-line install from GitHub

βš™οΈ What It Does

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

πŸ“¦ Installation

sh -c "$(curl -fsSL https://raw.githubusercontent.com/zippyy/GL.iNet-WiFi-Cellular-Timer/main/install.sh)"

🧰 Commands

Interactive setup:

radio-timer interactive

Set only the shutoff time:

radio-timer set 23:15

Set shutoff and automatic turn-back-on:

radio-timer set 23:15 06:30

Check status:

radio-timer status

Clear the timer:

radio-timer clear

Force shutoff immediately:

radio-timer run-now

Force turn-back-on immediately:

radio-timer run-enable-now

Service control:

/etc/init.d/radio-timer status
/etc/init.d/radio-timer restart

🧩 Behavior

  • 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 down and wifi up
  • Cellular interfaces are detected from uci show network

πŸ“ Installed Files

  • /usr/bin/radio-timer
  • /etc/init.d/radio-timer
  • /etc/config/radio-timer

πŸ“ Notes

  • Times use the router's local timezone
  • Existing /etc/config/radio-timer is preserved by the installer
  • The service is enabled automatically during install

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages