23
23
## SOFTWARE.
24
24
25
25
###
26
- __VERSION__ = 0.83
26
+ __VERSION__ = 0.87
27
27
28
28
import sys
29
29
import socket
@@ -353,7 +353,7 @@ class unifi_device(unifi_object):
353
353
"lcm_idle_timeout_override" ,"lcm_brightness_override" ,"uplink_depth" ,"mesh_sta_vap_enabled" ,"mesh_uplink_2" ,
354
354
"lcm_tracker_enabled" ,"model_incompatible" ,"model_in_lts" ,"model_in_eol" ,"country_code" ,"wifi_caps" ,
355
355
"meshv3_peer_mac" ,"element_peer_mac" ,"vwireEnabled" ,"hide_ch_width" ,"x_authkey" ,"x_ssh_hostkey_fingerprint" ,
356
- "x_fingerprint" ,"x_inform_authkey" ,"op_mode"
356
+ "x_fingerprint" ,"x_inform_authkey" ,"op_mode" , "uptime"
357
357
]
358
358
for _k ,_v in self .__dict__ .items ():
359
359
if _k .startswith ("_" ) or _k in _unwanted or type (_v ) not in (str ,int ,float ):
@@ -362,7 +362,10 @@ class unifi_device(unifi_object):
362
362
363
363
_ret .append ("<<<labels:sep(0)>>>" )
364
364
_ret .append (f"{{\" unifi_device\" :\" unifi-{ self .type } \" }}" )
365
-
365
+ _uptime = getattr (self ,"uptime" ,None )
366
+ if _uptime :
367
+ _ret .append ("<<<uptime>>>" )
368
+ _ret .append (str (_uptime ))
366
369
if self ._NETWORK_PORTS :
367
370
_ret += ["" ,"<<<unifi_network_ports:sep(124)>>>" ] + [str (_port ) for _port in self ._NETWORK_PORTS ]
368
371
if self ._NETWORK_RADIO :
@@ -470,7 +473,7 @@ class unifi_controller(unifi_object):
470
473
471
474
_ret = []
472
475
for _ssid ,_obj in _dict .items ():
473
- pprint (_obj )
476
+ # pprint(_obj)
474
477
for _key in ("num_sta" ,"ng_num_sta" ,"na_num_sta" ,"ng_tcp_packet_loss" ,"na_tcp_packet_loss" ,"ng_wifi_retries" ,"na_wifi_retries" ,"ng_wifi_latency" ,"na_wifi_latency" ):
475
478
_ret .append ("|" .join ([_ssid ,_key ,str (sum (map (lambda x : getattr (x ,_key ,0 ),_obj )))]))
476
479
0 commit comments