def __init__(self):
     ZBController.__init__(self)
     self.load_configs()
     if not self.controller_ip:
         self.controller_ip = raw_input("Please enter the controller IP: ")
     self.open(self.controller_ip)
     if not self.dut_node_id:
         self.wait_for_joined()
     if not self.dut_ieee_address:
         self.dut_ieee_address = raw_input("Please enter ieee address of device under test: ")
     self.save_configs()
Beispiel #2
0
 def __init__(self):
     ZBController.__init__(self)
     self.load_configs()
     if not self.controller_ip:
         self.controller_ip = raw_input("Please enter the controller IP: ")
     self.open(self.controller_ip)
     if not self.dut_node_id:
         self.wait_for_joined()
     if not self.dut_ieee_address:
         self.dut_ieee_address = raw_input(
             "Please enter ieee address of device under test: ")
     self.save_configs()
 def wait_for_joined(self):
     try:
         self.enable_permit_join()
         print "Please initiate the inclusion process on the device"
         self.dut_node_id = ZBController.wait_for_join(self)
         self.disable_permit_join()
     except NetworkOperationError:
         print "Error joining device. Trying to form a new network"
         self.form_network()
         self.enable_permit_join()
         print "Please initiate the inclusion process on the device"
         self.dut_node_id = ZBController.wait_for_join(self)
         self.disable_permit_join()
Beispiel #4
0
 def wait_for_joined(self):
     try:
         self.enable_permit_join()
         print "Please initiate the inclusion process on the device"
         self.dut_node_id = ZBController.wait_for_join(self)
         self.disable_permit_join()
     except NetworkOperationError:
         print "Error joining device. Trying to form a new network"
         self.form_network()
         self.enable_permit_join()
         print "Please initiate the inclusion process on the device"
         self.dut_node_id = ZBController.wait_for_join(self)
         self.disable_permit_join()
 def configure_reporting(self, *args):
     ZBController.configure_reporting(self, self.dut_node_id, *args)
 def bind_node(self, cluster_id):
     ZBController.bind_node(self, self.dut_node_id, self.dut_ieee_address, cluster_id)
 def write_attribute(self, attribute, value):
     ZBController.write_attribute(self, self.dut_node_id, attribute, value)
     time.sleep(4)
 def read_attribute(self, attribute):
     value = ZBController.read_attribute(self, self.dut_node_id, attribute)
     return value
 def send_zcl_command(self, zcl_command, *args, **kwargs):
     ZBController.send_zcl_command(self, self.dut_node_id, zcl_command, *args, **kwargs)
     time.sleep(3)
Beispiel #10
0
 def configure_reporting(self, *args):
     ZBController.configure_reporting(self, self.dut_node_id, *args)
Beispiel #11
0
 def bind_node(self, cluster_id):
     ZBController.bind_node(self, self.dut_node_id, self.dut_ieee_address,
                            cluster_id)
Beispiel #12
0
 def write_attribute(self, attribute, value):
     ZBController.write_attribute(self, self.dut_node_id, attribute, value)
     time.sleep(4)
Beispiel #13
0
 def read_attribute(self, attribute):
     value = ZBController.read_attribute(self, self.dut_node_id, attribute)
     return value
Beispiel #14
0
 def send_zcl_command(self, zcl_command, *args, **kwargs):
     ZBController.send_zcl_command(self, self.dut_node_id, zcl_command,
                                   *args, **kwargs)
     time.sleep(3)