def device_exclusion(Button):
zwareGlobals.debugData.insert(INSERT,"Excluding device from the network....\n")
Button['state'] = 'disabled'
result = messagebox.askokcancel("Exclude Device","Initiate your device and select \"OK\" to remove it from the network\n")
if result == 1:
zwareGlobals.debugData.focus_force()
r = zware.zw_add_remove(3)
zware.zw_net_comp(3)
zwareGlobals.debugData.insert(INSERT,"Device has been successfully removed from the network\n")
poll_node_list(True)
enable_disable_binary_switch()
else:
zwareGlobals.debugData.focus_force()
zwareGlobals.debugData.insert(INSERT,"Device Exclusion cancelled\n")
zwareGlobals.debugData.see(END)
Button['state'] = 'normal'
##
#\addtogroup poll_network
#@{
#\section polling Network Polling
#The client polls the network both automatically in the background as well as on user prompt with the "Node Details" button. On polling succesfully the client displays a list of nodes along with all available endpoints connected to them. It also displays a list of all the Command Classes supported by each endpoint. This is achieved using:<br>1. The Client queries for available nodes using the <b>zwnet_get_node_list</b> web api.<br>2. On succesfully retrieving the node list the client queries for available endpoints for each node using the <b>zwnet_get_ep_list</b> web api.<br>3. Subsequently for each endpoint it will query for the supporting command classes using the <b>zwnet_get_if_list</b> web api. Once all data has been retrieved it will either be a:)Be displayed to the user if they had clicked on the "Node Details" button or b:)Be used for further background polling of devices.
#\section tracking Tracking Devices
#The client will constantly be polling the network for tracking devices and their state values. In the present version this support is provided for Binary Switches, Binary Sensors and Multilevel Sensors. For example whenever a binary switch is added or removed from a network the client will display this information to the user. This is achieved using the polling web-apis mentioned above along with identifying the binary switch using it's interface id.
#@}
评论列表
文章目录