Onhub TP-LINK TGR1900 future support?

What would be nice would be a method to get the LEDs to do what they did when OnHub was supported. I liked the teal ring when everything was up properly and the red ring if you lost the Internet connection. I already forget what the white ring was for (ready to setup?). Then with the ambient light sensor working all would be working normally. I know there's some LED controls on OpenWrt but exactly what to set them for to create this might be beyond OpenWrt.

The good news is you can tick on the options and see what the lights end up doing.

You are writing about the OnHub you compiled from scratch?

It looks like the LUCI 'LED Configuration' allows you to configure the LEDs to blink for activity, but not on status of lost WAN edit: upstream internet connectivity.
(unless there is some manual config I'm missing with it.)

As a workaround I did test this method which worked though.
It will ping a public IP and change the LED from green to red if actual internet connectivity is lost.

In /etc/config/system I added this:

config led 'wan_led'
        option name 'WAN LED'
        option sysfs 'green:status'
        option default '1'
        option trigger 'none'

In /user/bin/ I created (and made executable) a script called check_wan.sh with contents:

# You can replace 8.8.8.8 with whatever public server desired
if ping -c 1 8.8.8.8 >/dev/null 2>&1; then
        echo "default-on" > /sys/class/leds/green:status/trigger
        echo "none" > /sys/class/leds/red:status/trigger
else
        echo "default-on" > /sys/class/leds/red:status/trigger
        echo "none" > /sys/class/leds/green:status/trigger

fi

Then you can use a cron job in scheduled tasks to run the script at desired interval. Example, to check every minute:

***** /usr/bin/check_wan.sh

Note: I have the ASUS model Onhub. The LED format might be different on the TP-link version - not sure.

1 Like

I think the 'Link On' option gives that information (but may be device specific/tweaked), just not as you asked.
Instead of telling you lost, it denotes an on state.

1 Like

I realize now I could have worded that better. :grinning:
I should have made the distinction between the WAN port being in an 'ON' state (because it's connected to your on-premise ISP modem, etc. ) and secondarily having actual upstream internet connectivity.

1 Like

I'm presently screwing with the lights on the TP-Link OnHub since I have "perfected" and optimized an NSS build and have nothing else to tinker on or upgrade or bug fix. What am I supposed to do when everything is working reliably and fast and never generates any errors or issues and doesn't need regular updates? Of course I have to try and figure out colour palettes of SIX led lights that can each be any of three different colours. The original Google programmers got lots of colours and smooth transitions. Theoretically you can make any colour from red/green/blue like a television does. I think though this is beyond the LED controls in OpenWrt. Early on in this thread, someone posted a script which I have used from the beginning, but I'm thinking I can adapt your script to do something different. At least I have something new to tinker with.

1 Like