Пример #1
0
    def __init__(self, config):
        """Initialise the scanner."""

        _LOGGER.info("Initialising BT Home Hub 5")
        self.host = config[CONF_HOST]
        self.last_results = {}

        # Test the router is accessible
        data = bthomehub5_devicelist.get_devicelist(self.host)
        self.success_init = data is not None
    def __init__(self, config):
        """Initialise the scanner."""
        import bthomehub5_devicelist

        _LOGGER.info("Initialising BT Home Hub 5")
        self.host = config[CONF_HOST]
        self.last_results = {}

        # Test the router is accessible
        data = bthomehub5_devicelist.get_devicelist(self.host)
        self.success_init = data is not None
Пример #3
0
    def update_info(self):
        """Ensure the information from the BT Home Hub 5 is up to date."""

        _LOGGER.info("Scanning")

        data = bthomehub5_devicelist.get_devicelist(self.host)

        if not data:
            _LOGGER.warning("Error scanning devices")
            return

        self.last_results = data
    def update_info(self):
        """Ensure the information from the BT Home Hub 5 is up to date."""
        import bthomehub5_devicelist

        _LOGGER.info("Scanning")

        data = bthomehub5_devicelist.get_devicelist(self.host)

        if not data:
            _LOGGER.warning("Error scanning devices")
            return

        self.last_results = data
Пример #5
0
def main():

    # If an IP Address is not specified, it will default as 192.169.1.254
    devicelist = bthomehub5_devicelist.get_devicelist('192.168.1.254')

    pprint(devicelist)