2323## SOFTWARE.
2424
2525###
26- __VERSION__ = 0.83
26+ __VERSION__ = 0.87
2727
2828import sys
2929import socket
@@ -353,7 +353,7 @@ class unifi_device(unifi_object):
353353 "lcm_idle_timeout_override" ,"lcm_brightness_override" ,"uplink_depth" ,"mesh_sta_vap_enabled" ,"mesh_uplink_2" ,
354354 "lcm_tracker_enabled" ,"model_incompatible" ,"model_in_lts" ,"model_in_eol" ,"country_code" ,"wifi_caps" ,
355355 "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"
357357 ]
358358 for _k ,_v in self .__dict__ .items ():
359359 if _k .startswith ("_" ) or _k in _unwanted or type (_v ) not in (str ,int ,float ):
@@ -362,7 +362,10 @@ class unifi_device(unifi_object):
362362
363363 _ret .append ("<<<labels:sep(0)>>>" )
364364 _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 ))
366369 if self ._NETWORK_PORTS :
367370 _ret += ["" ,"<<<unifi_network_ports:sep(124)>>>" ] + [str (_port ) for _port in self ._NETWORK_PORTS ]
368371 if self ._NETWORK_RADIO :
@@ -470,7 +473,7 @@ class unifi_controller(unifi_object):
470473
471474 _ret = []
472475 for _ssid ,_obj in _dict .items ():
473- pprint (_obj )
476+ # pprint(_obj)
474477 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" ):
475478 _ret .append ("|" .join ([_ssid ,_key ,str (sum (map (lambda x : getattr (x ,_key ,0 ),_obj )))]))
476479
0 commit comments