Skip to content

Repository files navigation

glinet-router

Unified GL.iNet support for Home Assistant.

GitHub Release HACS Custom License Discord Code style: ruff

This integration brings GL.iNet routers into Home Assistant in a practical way. It gives you router status, device tracking, controls for common features, and optional support for VPNs, SMS, repeater mode, firewall tools, and more.


Quick Links


Features

This integration gives you a lot of useful router data and controls out of the box. The tables below are meant to make the available options easier to scan.

Core features

Capability Details Docs
Config flow & discovery Easy setup with DHCP discovery support and router URL/password configuration Feature Matrix
Router metadata Model, firmware version, and MAC address information Feature Matrix
System monitoring CPU temperature, load averages, memory usage, flash usage, and uptime sensors Feature Matrix
WAN monitoring Per-interface WAN status sensors for Ethernet, Repeater, Cellular, and Tethering, reported as Up, Down, or Unknown Feature Matrix
Wi-Fi controls Switches to enable or disable each configured Wi-Fi interface Feature Matrix
Hardware controls System LED toggle and immediate reboot button Feature Matrix
Device tracking Tracks connected clients with MAC address, name/alias, IP, interface type, and last-seen timestamp, including stale-device cleanup Entity Reference
Client diagnostics Per-client upload rate, download rate, and IP address sensors Entity Reference
Unknown device management Discover unknown devices, auto-cleanup rules, allow/blocklist controls, and manual MAC address entries Unknown Device Management
Firmware & diagnostics Native Home Assistant firmware update entity, release notes support, and sanitized diagnostics export Feature Matrix

Optional modules

Module What it adds Docs
Cellular Cellular signal and network sensors, plus modem diagnostics Cellular
Repeater Scan nearby Wi-Fi networks, connect or disconnect, and manage saved networks Repeater
SMS Send, receive, and delete text messages from the router's SIM card SMS
VPNs WireGuard client/server, OpenVPN client/server, Tailscale, and ZeroTier toggles WireGuard Client, WireGuard Server, OpenVPN Client, OpenVPN Server, Tailscale, ZeroTier
AdGuard Home Enable or disable AdGuard Home and DNS redirection AdGuard Home
Firewall & WAN policy DMZ, port forwarding, custom firewall rules, WAN access controls, and KMWAN/MWAN3 actions Firewall, Router API
Smart fan controls Monitor fan status and speed, and set temperature thresholds Smart Fan Controls
MCU Battery Monitor battery status and configure high/low temperature warnings MCU Battery
MCU OLED Configure what is displayed on the router's OLED screen MCU OLED
Parental & access control Internet access blocks and filtering rules per client Parental & Access Control
API playground Send custom JSON-RPC or ubus commands and inspect the response API Playground

You can turn optional features on or off during setup, or later from the Configure menu. Unsupported features on your router model will simply be skipped.


Installation

Using HACS (Recommended)

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

  1. Open HACS in Home Assistant.
  2. Search for GL.iNet Router.
  3. Click Download, then restart Home Assistant once the install finishes.

Manual Installation

  1. Download the latest source code or release ZIP.
  2. Extract the custom_components/glinet_router directory.
  3. Copy the glinet_router folder into Home Assistant's config/custom_components/ directory.
  4. Restart Home Assistant.

Setup

  1. In Home Assistant, go to Settings > Devices & services.
  2. Click Add Integration in the bottom-right corner.
  3. Search for GL.iNet and select it.
  4. Enter your router URL (default: http://192.168.8.1) and admin password.
  5. Choose your setup options, including whether you want device tracking, update frequency, and any optional features enabled.

Wiki & Documentation

The main documentation lives in the project Wiki.

For End Users

  • Feature Matrix — What features are supported on each model.
  • Entity Reference — A list of all sensors, switches, and trackers created by the integration.
  • Services & Actions — How to call services to control the router (e.g. sending SMS or connecting to repeater WiFi).
  • Automation Templates — Ready-made automations you can import (SMS notifications, etc.).

For Developers

Developer Quick Start (Click to expand)

Project Layout

  • custom_components/glinet_router/api: Bundled GL.iNet API client code.
  • custom_components/glinet_router/entities: Home Assistant entity implementations.
  • custom_components/glinet_router: Integration bootstrap, config flow, hub, services, and shared models.
  • docs: Raw markdown files for the documentation wiki.
  • ha-automations: Home Assistant automation templates ready to import.
  • tests: Unit tests with mocked API/session behavior.
  • custom_components/glinet_router/api: Bundled GL.iNet API client code.
  • custom_components/glinet_router/entities: Home Assistant entity implementations.
  • custom_components/glinet_router: Integration bootstrap, config flow, hub, services, and shared models.
  • docs: Raw markdown files for the documentation wiki.
  • tests: Unit tests with mocked API/session behavior.

Development Checks

Run the following commands locally to verify code style and tests:

py -m pytest -q
ruff check custom_components tests
py -m compileall -q custom_components tests

Support & Contribution

If you find this useful, a star on GitHub is always appreciated.

For support, questions, or general discussion, join the Discord:

Discord Banner

Want to contribute a fix, feature, or docs improvement? See CONTRIBUTING.md for the full guide. All pull requests target the development branch — PRs opened against main are flagged and will not be merged, except for release PRs cut by the maintainer team.

Why I built this

I use this integration at home and wanted something that fit the way I actually use GL.iNet hardware. Over time it grew into a broader setup for router control, monitoring, and automation.

Special Thanks

  • HarvsG for the original glinet-router4-integration project which inspired this version.
  • GL.iNet for their hardware and detailed API documentation.

About

HomeAssistant integration for cellular GL-INet Routers based on V4 firmware

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Contributors

Languages