hagaygo / OpenWrtManager

Mobile app for interacting with your OpenWrt device.
GNU General Public License v3.0
145 stars 10 forks source link

Unrelated to project, Need help detect bandwidth for script. #43

Closed Rexadev closed 5 months ago

Rexadev commented 6 months ago

OpenWrtManager shows Up and Down bandwidth of each connected wifi station. I assume using this dart code (https://github.com/hagaygo/OpenWrtManager/blob/github/lib/Overview/NetworkTraffic.dart).

I want to use this feature in bash script that controls wifi power and I need help with it.

Problems with it after adapting it for bash -

  1. Select highest bandwidth usage device
  2. Ignore Spikes. What to consider a spike <5 sec or <3 sec
  3. detect furtest device and chech the radio power need for that
hagaygo commented 6 months ago

Hi

The 2 problems seems related to bash.

Did you manage to authenticate and generate the correct REST request to your OpenWrt device and got the json reponse with data ?

If so you need to parse and handle the json response to extract the traffic data and then sort it as you like (and ignore invalid data as you see fit).