I’m having trouble with HAOS connection to the Philips Hue Bridge that I have running in my house.
HAOS is running inside Proxmox as a VM, living on the IoT vlan, and the Hue Bridge is also there on the same vlan. HAOS can see it, even prompt me to configure it, but I end up with the following error:
Retrying setup: Error connecting to the Hue bridge at 192.168.107.40
Detailed logs:
2023-05-16 22:23:06.071 WARNING (MainThread) [homeassistant.components.hue.config_flow] Error while attempting to retrieve discovery information, is there a bridge alive on IP 192.168.107.40 ?
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
return await fut
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 541, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.107.40', 80)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/hue/config_flow.py", line 78, in _get_bridge
bridge = await discover_bridge(
File "/usr/local/lib/python3.10/site-packages/aiohue/discovery.py", line 36, in discover_bridge
bridge_id = await is_hue_bridge(host, websession)
File "/usr/local/lib/python3.10/site-packages/aiohue/discovery.py", line 82, in is_hue_bridge
async with websession.get(url, timeout=30) as res:
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.107.40:80 ssl:default [Connect call failed ('192.168.107.40', 80)]
I tried to curl the local IP and I get the following:
PS C:\Users\Payne> curl http://192.168.107.40/debug/clip.html
StatusCode : 200
StatusDescription : OK
Content : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>API D...
RawContent : HTTP/1.1 200 OK
Connection: close
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Content-Security-Policy: default-src 'self'
Pragma: no-cache
Referr...
Forms : {commandform}
Headers : {[Connection, close], [X-XSS-Protection, 1; mode=block], [X-Frame-Options, SAMEORIGIN],
[X-Content-Type-Options, nosniff]...}
Images : {}
InputFields : {@{innerHTML=; innerText=; outerHTML=<INPUT size=60 value=/ name=commandurl>; outerText=;
tagName=INPUT; size=60; value=/; name=commandurl}, @{innerHTML=; innerText=; outerHTML=<INPUT
class=key size=30 name=h1name>; outerText=; tagName=INPUT; class=key; size=30; name=h1name},
@{innerHTML=; innerText=; outerHTML=<INPUT class=value size=30 name=h1value>; outerText=;
tagName=INPUT; class=value; size=30; name=h1value}, @{innerHTML=; innerText=; outerHTML=<INPUT
class=key size=30 name=h2name>; outerText=; tagName=INPUT; class=key; size=30; name=h2name}...}
Links : {}
ParsedHtml : System.__ComObject
RawContentLength : 1442
I also see the bridge on discovery.meethue.com as follows:
[{"id":"ecb5fafffe9840b2","internalipaddress":"192.168.107.40","port":443}]
What I noticed is that in the logs it tries to use port 80, but the discovery url reports port 443.
Any thoughts on what might be causing this? I can control all my lights through the Philips Hue app and Google Assistant/Homekit.