LED color based on bandwidth usage

I guess you need the following:

/etc/init.d/omnia-led-colors stop
/etc/init.d/omnia-led-colors disable
rm /etc/init.d/omnia-led-colors
rm /root/omnia-led-colors

I like the new changes that were being made, thanks dpdrown.

The Omnia is a multi purpose device, so would it be possible to use the LEDs “A” and “B” for CPU and RAM utilization indication? Like for the download bandwith, we could use Green for 10-49% utilization, Yellow for 50-89% utilization and red for 90% and more.

BTW, where can I change the colors? It’s hard to distiguish green and yellow. Red looks more like orange.

I also like this idea:

Thanks for your efforts!

Hey, you can install this program also other than via PuTTY? Maybe from a folder or a zip archive? Thanks for the reply.

Thanks @dpdrown for the mod. I have some questions for you:

  1. I’m using VLAN (eth1.832) to access Internet. Is it correct to use that in the respective functions (option interface) in omnia-led-colors?

  2. When I do a speed test, no led turn red when downloading full speed and only the WAN led turn blue (I’m using the dual bandwidth function) when uploading full speed. Do I need to specify the maximum theoretical speed (in my case 50 Mbps) somewhere?

  3. The PCI3 led (2.4 GHz) is blinking when someone is using it, whereas PCI2 (5 GHz) isn’t. Is there a reason for that?

  4. Where do you change the colours in omnia-led-colors (I suppose it’s in one of the files)?

  5. Would it be possible to apply a smooth transition between colours (I guess controlling the intensity and the colour at the same time) instead of a blinking transition? Something similar to what you get when pressing the reset button for a long time.

Best

For some changes to the LEDs I have noticed you need to reboot the TO for them to kick in.

Just do a “/etc/init.d/setup_led restart” and here you go.
As I am lazy I did a custom command in Luci.

2 Likes

Thank you for reminding me about the custom commands feature!

yes

Yes, the config file has an example:

option limit_in 300000000
option limit_out 20000000

This sets the download “red” speed to 300Mbit and the upload “red” speed to 20Mbit. You’ll need to change those values to match your connection.

That sounds like they might be configured incorrectly. Check your System > LED Configuration. Trigger should be set to netdev and one LED device should be set to wlan0 and the other wlan1.

In the file /usr/sbin/omnia-led-colors

function dualbandwidth_led(ledname, arguments)
...
  local red, green, blue
  if pct_out > 0.5 then
    blue = math.min(math.floor(pct_out*255),255)
    green = 0
    red = 0
  else
    green = math.floor(math.max(1-pct_in,0)*255)
    red = math.min(math.floor(pct_in*255),255)
    blue = 0
  end

That code sets the red/green/blue colors for the colorfunction “dualbandwidth”. pct_in and pct_out are values from 0 to 1 (0.5 is 50%).

The blinking comes from the LED configuration. There should be a way to turn that off in System > LED Configuration, possibly the “none” trigger would do what you want. I haven’t tested that.

Right now, it can only be installed and configured via SSH.

Hi today I noticed that PCI2 LED light is white. Again, I installed omnia-led-colors mode but this did not solve the problem. WIFI 5GHz operating normally LED blinks during data transmission but does not change color. Other LED lights as well. Yesterday was to update the OS to version 3.3 may be the reason? Do you have someone like finding a solution exists? Thanks for the info.

Yes same here. It seems that the statistics path for the ath10k has changed.

Yeah, the new firmware/driver either removed access to these stats or moved them somewhere else. I’m not seeing them anywhere for the ath10k with the new kernel.

Restart to factory settings does not help - personally tested. I believe that the author of the code, find a way to tweak it.:v:

Bumping this in hope of fix.

you can try to parse /proc/net/dev.

That’s what the “bandwidth” and “dualbandwidth” settings do. That doesn’t tell you how much airtime is being used on your channel, though.

The 3.5 update switches back to the ath10k driver with stats. I haven’t verified that they’re giving the right numbers, but it’s looking good.

2 Likes

and i got a

root@turris:~# git clone git://github.com/ddrown/omnia-led-colors.git
Cloning into ‘omnia-led-colors’…
fatal: Unable to look up github.com (port 9418) (Try again)
root@turris:~#

Sounds like your DNS isn’t working. Does “ping -c2 github.com” work?

yes it work and after a while and a couple of new try it did work - merci

Hi, I want to ask users whether they are still little program work? I found out this weekend that the LED colors are still green even when transferring data. Today I re-install the whole little program and I’m still working. Does anyone have the same knowledge? Thanks for the information.