Auto WiFi on/off scheduling for Globe Fiber Huawei ONT/routers
Control your Globe Fiber Huawei ONT's WiFi remotely via API. Turn WiFi off while you sleep or when you're away to reduce EMF exposure, save power, and improve sleep quality.
Works with Huawei ONTs commonly provided by Globe Fiber in the Philippines (HG8145V5, HG8245, HN8245Q, etc.)
# Make it executable
chmod +x wifi-control.sh
# Check current WiFi status
bash wifi-control.sh status
# Turn WiFi off
bash wifi-control.sh off
# Turn WiFi on
bash wifi-control.sh on# Install 10PM off / 7AM on schedule
bash wifi-control.sh installThe script:
- Logs into the router at
192.168.254.254 - Gets an authentication token
- Toggles WiFi via the
setajax.cgiAPI endpoint - The 2.4GHz and 5GHz radios are controlled separately
You need the admin username and password for your Globe Huawei ONT.
Default credentials (check your router sticker):
- Username:
admin(oruser) - Password: Look on the router sticker — it's usually labeled "Web Password", "GUI Password", or "Admin Password"
Globe default patterns:
admin/Globe@[last 4 of serial]admin/adminuser/user
- Check the router sticker — look on the back/bottom for:
- "Web Password" / "GUI Password" / "Admin Password"
- The WiFi password sometimes doubles as the admin password
- Check Google Passwords — https://passwords.google.com → search "192.168.254.254" or "Globe" or "router"
- Check your browser — Edge/Chrome → Settings → Passwords → search "192.168.254.254"
bash wifi-control.sh # Show current status
bash wifi-control.sh on # Turn WiFi on
bash wifi-control.sh off # Turn WiFi off
bash wifi-control.sh status # Show detailed status
bash wifi-control.sh install # Install 10PM off / 7AM on schedule
bash wifi-control.sh remove # Remove cron schedule
This was reverse-engineered from the router's Vue.js web interface:
| Endpoint | Purpose |
|---|---|
GET /asp/GetRandCount.asp |
Get unauthenticated token (for login) |
POST /login.cgi |
Login with UserName, PassWord (base64), x.X_HW_Token |
GET /html/ssmp/common/GetRandToken.asp |
Get authenticated token (for API calls) |
POST /setajax.cgi?x={domain}&RequestFile=/ |
Set parameter with POST data x.Enable=0|1&x.X_HW_Token={token} |
WiFi domains:
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1— 2.4GHz radioInternetGatewayDevice.LANDevice.1.WLANConfiguration.5— 5GHz radio
Tested on:
- Globe Fiber Huawei ONT (HG8145V5 variant)
- Firmware: Unknown (Vue.js SPA web interface)
- Router IP: 192.168.254.254
Likely works on:
- Most Huawei ONTs with
login.cgi+setajax.cgiendpoints - Globe Fiber, PLDT, and other ISPs using Huawei ONTs
- Older ASP-based interfaces and newer Vue.js interfaces
PRs welcome! Especially for:
- Testing on other Huawei ONT models
- Adding more features (WiFi power control, LED control)
- Support for non-Globe ISPs using Huawei ONTs
MIT — use it, share it, sleep better.