1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-04-02 08:12:47 +01:00
Files
supervisor/tests
Stefan Agner 1c43af968a Use Unix socket for Supervisor to Core communication
Switch internal Supervisor→Core HTTP/WebSocket communication to use a
Unix socket instead of TCP when the installed Core version supports it.

The existing /run/supervisor directory on the host (mounted at /run/os
inside Supervisor) is bind-mounted into the Core container as
/run/supervisor. Core receives the SUPERVISOR_CORE_API_SOCKET environment
variable telling it where to create the socket. Supervisor connects to
it via aiohttp.UnixConnector at /run/os/core.sock.

All session and URL management lives in HomeAssistantAPI as private
properties (_session, _api_url, _ws_url) with a version-gated fallback
to the existing TCP path for older Core versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:06:59 +01:00
..