home-assistant/core · error · ConfigEntryNotReady

Error connecting to {host}:{port}

Error message

Error connecting to {host}:{port}

What it means

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.

Source

Thrown at homeassistant/components/bluesound/__init__.py:63

        entity_domain=MEDIA_PLAYER_DOMAIN,
        schema=None,
        func="async_bluesound_unjoin",
    )
    return True


async def async_setup_entry(
    hass: HomeAssistant, config_entry: BluesoundConfigEntry
) -> bool:
    """Set up the Bluesound entry."""
    host = config_entry.data[CONF_HOST]
    port = config_entry.data[CONF_PORT]
    session = async_get_clientsession(hass)
    player = Player(host, port, session=session, default_timeout=10)
    try:
        sync_status = await player.sync_status(timeout=1)
    except PlayerUnreachableError as ex:
        raise ConfigEntryNotReady(f"Error connecting to {host}:{port}") from ex

    coordinator = BluesoundCoordinator(hass, config_entry, player, sync_status)
    await coordinator.async_config_entry_first_refresh()

    config_entry.runtime_data = BluesoundRuntimeData(player, sync_status, coordinator)

    await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

    return True


async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
    """Unload a config entry."""
    return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Power on the player and verify http://<host>:<port>/sync_status returns data from the HA host
  2. Reserve a static DHCP lease for the player or update the config entry host/port to current values
  3. Check the port: Bluesound uses 11000 by default; adjust if the device exposes another
  4. After fixing, reload the integration from Settings > Devices & Services (retries setup)
Defensive patterns

Strategy: retry

Validate before calling

import asyncio
from aiohttp import ClientSession

async def player_reachable(host: str, port: int, session: ClientSession) -> bool:
    try:
        async with session.get(f"http://{host}:{port}/sync_status", timeout=asyncio.timeout(2)) as resp:
            return resp.status == 200
    except Exception:
        return False

Try / catch

# ConfigEntryNotReady is raised by the integration itself; HA retries with backoff.
# In wrappers, surface it as 'device offline' and retry later:
async def setup_with_retry(hass, entry):
    try:
        return await async_setup_entry(hass, entry)
    except ConfigEntryNotReady:
        hass.async_create_task(reload_later(entry))
        return False

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/bbaa49a302b3950b. Report an issue: GitHub.