def connect(self):
        # pylint: disable=broad-except
        # get hub settings
        hub = self.get_node('hub')
        ip_addr = '{}.{}.{}.{}'.format(
            hub.get_driver('GV1')[0], hub.get_driver('GV2')[0],
            hub.get_driver('GV3')[0], hub.get_driver('GV4')[0])

        # try to authenticate with the hub
        try:
            self.hub = phue.Bridge(
                ip_addr, config_file_path=os.path.join(os.getcwd(), 'bridges'))
        except phue.PhueRegistrationException:
            self.poly.send_error('IP Address OK. Node Server not registered.')
            return False
        except Exception:
            self.poly.send_error('Cannot find hub at {}'.format(ip_addr))
            return False  # bad ip Addressse:
        else:
            # ensure hub is connectable
            api = self._get_api()

            if api:
                hub.set_driver('GV5', 1)
                hub.report_driver()
                return True
            else:
                self.hub = None
                return False
Connect to Phillips Hue Hub
dataset/ETHPy150Open UniversalDevicesInc/Polyglot/polyglot/node_servers/hue/hue.py/HueNodeServer.connect