'Initialize the scanner.'

def __init__(self, config):

    self.last_results = []
    self.host = config[CONF_HOST]
    self.username = config[CONF_USERNAME]
    self.password = config[CONF_PASSWORD]
    self.success_init = True
    import fritzconnection as fc
    try:
        self.fritz_box = fc.FritzHosts(address=self.host, user=self.username, password=self.password)
    except (ValueError, TypeError):
        self.fritz_box = None
    if ((self.fritz_box is None) or (not self.fritz_box.modelname)):
        self.success_init = False
    if self.success_init:
        _LOGGER.info('Successfully    connected    to    %s', self.fritz_box.modelname)
        self._update_info()
    else:
        _LOGGER.error('Failed    to    establish    connection    to    FRITZ!Box    with    IP:    %s', self.host)
