2024-02-17 14:17:25 +08:00
# Internet detector for OpenWrt.
2024-02-20 00:22:53 +08:00
Internet-detector is an application for checking the availability of the Internet. Performs periodic connections to a known public host and determines the actual Internet availability.
2024-02-17 14:17:25 +08:00
**Features:**
- It can run continuously as a system service or only in an open web interface.
- Checking the availability of a host using ping or by connecting via TCP to a specified port.
- LED indication of Internet availability.
![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/internet-led.jpg)
2024-02-20 00:22:53 +08:00
- Performing actions when connecting and disconnecting the Internet: rebooting device, restarting network or modem (internet-detector-mod-modem-restart), executing custom shell scripts.
- Sending email notification when Internet access is restored (internet-detector-mod-email).
2024-02-17 14:17:25 +08:00
- The daemon is written entirely in Lua using the luaposix library.
2024-02-20 00:22:53 +08:00
**Dependences:** lua, luaposix, libuci-lua.
2024-02-17 14:17:25 +08:00
2024-02-20 00:22:53 +08:00
## Installation notes (OpenWrt >= 21.02)
2024-02-17 14:17:25 +08:00
opkg update
2024-11-16 04:23:49 +08:00
wget --no-check-certificate -O /tmp/internet-detector_1.3.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.3.1-r1_all.ipk
opkg install /tmp/internet-detector_1.3.1-r1_all.ipk
rm /tmp/internet-detector_1.3.1-r1_all.ipk
2024-02-17 14:17:25 +08:00
/etc/init.d/internet-detector start
/etc/init.d/internet-detector enable
2024-12-17 04:23:32 +08:00
wget --no-check-certificate -O /tmp/luci-app-internet-detector_1.3.1-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_1.3.1-1_all.ipk
opkg install /tmp/luci-app-internet-detector_1.3.1-1_all.ipk
rm /tmp/luci-app-internet-detector_1.3.1-1_all.ipk
2024-02-17 14:17:25 +08:00
/etc/init.d/rpcd restart
i18n-ru:
2024-12-17 04:23:32 +08:00
wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk
opkg install /tmp/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk
rm /tmp/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk
2024-02-17 14:17:25 +08:00
## Screenshots:
![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/01.jpg)
![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/02.jpg)
![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/03.jpg)
2024-02-20 00:22:53 +08:00
## Modem restart module (internet-detector-mod-modem-restart):
**Dependences:** modemmanager.
2024-11-16 04:23:49 +08:00
wget --no-check-certificate -O /tmp/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk
opkg install /tmp/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk
rm /tmp/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk
2024-02-20 00:22:53 +08:00
/etc/init.d/internet-detector restart
![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/04.jpg)
## Email notification module (internet-detector-mod-email):
**Dependences:** mailsend.
2024-11-16 04:23:49 +08:00
wget --no-check-certificate -O /tmp/internet-detector-mod-email_1.3.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-email_1.3.1-r1_all.ipk
opkg install /tmp/internet-detector-mod-email_1.3.1-r1_all.ipk
rm /tmp/internet-detector-mod-email_1.3.1-r1_all.ipk
2024-02-20 00:22:53 +08:00
/etc/init.d/internet-detector restart
![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/05.jpg)
## [OpenWrt 19.07](https://github.com/gSpotx2f/luci-app-internet-detector/tree/19.07)