#NEWLINE# @ Throttle ( MIN_TIME_BETWEEN_SCANS ) #NEWLINE# def _update_info( self ) : #NEWLINE# #INDENT# 'Ensure the information from the Luci router is up to date.\n\n        Returns boolean if scanning successful.\n        ' #NEWLINE# if ( not self . success_init ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# with self . lock : #NEWLINE# #INDENT# _LOGGER . info ( 'Checking ARP' ) #NEWLINE# url = 'http://{}/cgi-bin/luci/rpc/sys' . format ( url . host ) #NEWLINE# result = _req_json_rpc ( url , 'net.arptable' , params = { #NEWLINE# #INDENT# 'auth' : self . token , #NEWLINE# #UNINDENT# } ) #NEWLINE# if result : #NEWLINE# #INDENT# self . last_results = [ ] #NEWLINE# for device_entry in result : #NEWLINE# #INDENT# if ( int ( device_entry [ 'Flags' ] , 16 ) & 2 ) : #NEWLINE# #INDENT# self . last_results . append ( device_entry [ 'HW address' ] ) #NEWLINE# #UNINDENT# #UNINDENT# return True #NEWLINE# #UNINDENT# return False