Closed jstewart99 closed 3 years ago
Yeah, I was just trying that out. It's days/hours/minutes/seconds.
There's a number of users state for APs that I could use. I don't see anything obvious that splits them by band. Not sure what I would use for the switches or the USG. Suggestions?
Looks like
radio_table_stats_0_channel and radio_table_stats_1_channel
show the 2G/5G channels (on mine).
num_sta shows total clients, or
radio_table_stats_0_num_sta (not sure how that differs from radio_table_stats_0_user-num_sta, both show the same values) displays the number of users for 2G ( and radio_table_stats_1_num_sta for 5G).
I don't have switches or USG in my setup so I can't help on those (just an Edgerouter which doesn't show up in the controller)
I might put in an option for what to show for the status. Right now I'm concentrating on squashing bugs.
I'll probably implement this. Can you provide some sample status strings you'd like to see? Less than 20 characters, I think.
I don't know if you're going to make this user-selectable as to what displays, but I'd suggest:
5G Clients: [5g client count] / 2G Clients: [2g client count] or Clients: [total client count] or 5G Ch: [5g channel] / 2G Ch: [2g channel]
See my earlier post for which states appear to store these values. Uptime is obviously also a good one to continue to offer as a display option. The present method isn't very intuitive but once the user understands the format (days/hours/etc) it's easy enough.
Yeah, I can give an option of several choices, so one would be client counts and another would be channel. Plus uptime. OK, I'll put something together soon.
Well, this is interesting. Which radio is 5G vs 2G isn't always the same. Can't assume radio 0 is 2GHz and radio 1 is 5GH
Try the pre-release: https://github.com/FlyingDiver/Indigo-miniUniFi/releases/tag/0.1.1
Created one new device without issue but the second one I tried (named "UnifiAP - Garage LR" says "off" in the state (I chose Wifi Info) and threw the following error in the log:
miniUniFi Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 122, in runConcurrentThread
File "plugin.py", line 484, in updateUniFiDevice
IndexError: list index out of range
miniUniFi Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
miniUniFi Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 122, in runConcurrentThread
File "plugin.py", line 484, in updateUniFiDevice
IndexError: list index out of range
miniUniFi Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Do it again with debug logging on.
(it's an older AP, shows Model BZ2LR rather than the newer U7LR, if that helps...)
Does that one only have one radio? 2.4GHz only?
I assumed they would all be dual band units. Probably bad assumption.
Yeah I think it's only 2.4Ghz. Log says
miniUniFi Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last): File "plugin.py", line 122, in runConcurrentThread KeyError: 'key id 115115268 not found in database'
For that unit, what do you see in the radio_table_stats_0_channel and radio_table_stats_1_channel states?
num_sta displays the number of clients. ...0_channel displays the 2.4Ghz channel. ...1_channel doesn't exist
Grab the commit I just pushed and see if that fixes it.
Yep that one seems to work and displays correct data. Thanks!
Fixed in 0.1.2.
Added my APs, displayed state shows: "Up 16:14:28:42" (or similar). What are the 4 numbers? It would be kind of handy if you could show "Up/Down" and then maybe either Channels or number of 5G/2G Clients? "Uptime" isn't really the most useful metric (IMO), so if you're showing something other than just Up/Down (like you show SSID with the clients), I'd vote for Channels or number of clients, since that changes regularly and can be a handy indicator of problems at a glance.