TP-Link Archer C6 v3.20, OpenWRT 24.10.
How to configure the behavior of two LEDs in a custom way?
No cable present in the WAN port = nothing lights up.
The cable is present, but there is no internet connection (e. g. no IP address) = amber:wan lights up continuously.
The cable is present and the connection is fine = green:wan lights up or flashes.
This is the default logic of these LEDs on stock firmware. Is this possible on OpenWRT?
You will need to create specific scripts for what you want it to do.
https://forum.openwrt.org/search?q=wan%20led%20script
I made a service to check 8.8.8.8 every 10 seconds and turn on the 'Internet' led on my device if it's successful. The service runs at boot but I was wondering if I can get it to run only when a wan interface gets an IP. I do have multiple wans. The interfaces are designated as wans in the firewall. Also, hotplug.d/net/ doesn't really have much of an explanation in the hotplug guide.
No, there is no such trigger. Simply "link up" detects the WAN cable, but does not detect the internet connection itself. Scripts mentioned here do the opposite: they cannot detect if the cable is disconnected.
A script isn't needed for cable connectivity.
To be clear, you did see the script for WAN Internet link?
I wasn't sure if you made your comment because the example used blue instead of amber.