@Throttle(MIN_TIME_BETWEEN_SCANS)
    def _update_info(self):
        """Ensure the information from the TP-Link router is up to date.

        Return boolean if scanning successful.
        """
        with self.lock:
            if (self.stok == '') or (self.sysauth == ''):
                self._get_auth_tokens()

            _LOGGER.info("Loading wireless clients...")

            url = ('http://{}/cgi-bin/luci/;stok={}/admin/wireless?'
                   'form=statistics').format(self.host, self.stok)
            referer = 'http://{}/webpages/index.html'.format(self.host)

            response = requests.post(url,
                                     params={'operation': 'load'},
                                     headers={'referer': referer},
                                     cookies={'sysauth': self.sysauth})

            try:
                json_response = response.json()

                if json_response.get('success'):
                    result = response.json().get('data')
                else:
                    if json_response.get('errorcode') == 'timeout':
                        _LOGGER.info("Token timed out. "
                                     "Relogging on next scan.")
                        self.stok = ''
                        self.sysauth = ''
                        return False
                    else:
                        _LOGGER.error("An unknown error happened "
                                      "while fetching data.")
                        return False
            except __HOLE__:
                _LOGGER.error("Router didn't respond with JSON. "
                              "Check if credentials are correct.")
                return False

            if result:
                self.last_results = {
                    device['mac'].replace('-', ':'): device['mac']
                    for device in result
                    }
                return True

            return False
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/device_tracker/tplink.py/Tplink3DeviceScanner._update_info