def map_node_list(): list = zigbee.get_node_list(); u = False for node in list: if node.label: if map(node.label, node.addr_extended): u = True if u: write_cache()
def query_params(sock): print "starting query params\n" while not exitRequest: try: nodes = zigbee.get_node_list(True) for n in nodes: print "sending query to "+n.addr_extended sock.sendto("AQ\n", 0, (n.addr_extended, 0xe8, 0xc105, 0x11)) except: exctype, value = sys.exc_info()[:2] print "failed to query node: "+str(exctype)+", "+str(value) time.sleep(10) print "goodbye from query_params\n"