{"record":{"id":"bbaa49a302b3950b","repo":"home-assistant/core","slug":"error-connecting-to-host-port","errorCode":null,"errorMessage":"Error connecting to {host}:{port}","messagePattern":"Error connecting to (.+?):(.+?)","errorType":"exception","errorClass":"ConfigEntryNotReady","httpStatus":null,"severity":"error","filePath":"homeassistant/components/bluesound/__init__.py","lineNumber":63,"sourceCode":"        entity_domain=MEDIA_PLAYER_DOMAIN,\n        schema=None,\n        func=\"async_bluesound_unjoin\",\n    )\n    return True\n\n\nasync def async_setup_entry(\n    hass: HomeAssistant, config_entry: BluesoundConfigEntry\n) -> bool:\n    \"\"\"Set up the Bluesound entry.\"\"\"\n    host = config_entry.data[CONF_HOST]\n    port = config_entry.data[CONF_PORT]\n    session = async_get_clientsession(hass)\n    player = Player(host, port, session=session, default_timeout=10)\n    try:\n        sync_status = await player.sync_status(timeout=1)\n    except PlayerUnreachableError as ex:\n        raise ConfigEntryNotReady(f\"Error connecting to {host}:{port}\") from ex\n\n    coordinator = BluesoundCoordinator(hass, config_entry, player, sync_status)\n    await coordinator.async_config_entry_first_refresh()\n\n    config_entry.runtime_data = BluesoundRuntimeData(player, sync_status, coordinator)\n\n    await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)\n\n    return True\n\n\nasync def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:\n    \"\"\"Unload a config entry.\"\"\"\n    return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)\n","sourceCodeStart":45,"sourceCodeEnd":78,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bluesound/__init__.py#L45-L78","documentation":"ConfigEntryNotReady raised in bluesound async_setup_entry when the initial player.sync_status(timeout=1) call throws PlayerUnreachableError. HA will mark the entry as setup-error and retry with backoff; it signals the Bluesound device was not reachable on the network at that moment.","triggerScenarios":"Setting up (or HA restarting with) a bluesound config entry while the player is powered off, asleep, its IP changed (DHCP), the port is wrong (non-default, e.g. behind a proxy), or a firewall blocks the local API.","commonSituations":"Device powered off or in standby during HA restart; DHCP reassigned the player IP; entry configured with a stale host/port after router changes; player on a different VLAN/subnet.","solutions":["Power on the player and verify http://<host>:<port>/sync_status returns data from the HA host","Reserve a static DHCP lease for the player or update the config entry host/port to current values","Check the port: Bluesound uses 11000 by default; adjust if the device exposes another","After fixing, reload the integration from Settings > Devices & Services (retries setup)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import asyncio\nfrom aiohttp import ClientSession\n\nasync def player_reachable(host: str, port: int, session: ClientSession) -> bool:\n    try:\n        async with session.get(f\"http://{host}:{port}/sync_status\", timeout=asyncio.timeout(2)) as resp:\n            return resp.status == 200\n    except Exception:\n        return False","typeGuard":null,"tryCatchPattern":"# ConfigEntryNotReady is raised by the integration itself; HA retries with backoff.\n# In wrappers, surface it as 'device offline' and retry later:\nasync def setup_with_retry(hass, entry):\n    try:\n        return await async_setup_entry(hass, entry)\n    except ConfigEntryNotReady:\n        hass.async_create_task(reload_later(entry))\n        return False","preventionTips":["Give the player a static DHCP reservation","Keep bluesound devices powered and network-reachable before restarting HA"],"tags":["bluesound","network","config-entry-not-ready","retry"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}