Skip to content

Discovering Entities - WebSocket connection closed #279

Description

@manuel-rw

I am unable to link the entities to the Zone Configurator:

Image

The following error is logged within the Addon logs:

{"level":30,"time":1774015089987,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","url":"ws://supervisor/core/api/websocket","msg":"WsReadTransport: Connecting to HA WebSocket"}
{"level":30,"time":1774015090000,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","msg":"WsReadTransport: WebSocket opened, awaiting auth_required"}
{"level":30,"time":1774015090007,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","msg":"WsReadTransport: Authenticated successfully"}
{"level":40,"time":1774015091624,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","code":1009,"reason":"","msg":"WsReadTransport: WebSocket closed"}
{"level":50,"time":1774015091625,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","err":{"type":"Error","message":"WebSocket connection closed","stack":"Error: WebSocket connection closed\n    at /app/backend/dist/ha/wsReadTransport.js:119:54\n    at Map.forEach (<anonymous>)\n    at WebSocket.<anonymous> (/app/backend/dist/ha/wsReadTransport.js:119:30)\n    at WebSocket.emit (node:events:508:28)\n    at WebSocket.emitClose (/app/node_modules/ws/lib/websocket.js:272:10)\n    at Socket.socketOnClose (/app/node_modules/ws/lib/websocket.js:1341:15)\n    at Socket.emit (node:events:508:28)\n    at TCP.<anonymous> (node:net:346:12)"},"msg":"WsReadTransport: Failed to subscribe to state_changed"}
{"level":50,"time":1774015091626,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","error":{},"deviceId":"1e3ab650cc2a9eb453474433303b890e","msg":"Failed to get device entities"}
{"level":30,"time":1774015091633,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","req":{"id":45,"method":"GET","url":"/api/devices/1e3ab650cc2a9eb453474433303b890e/entities","query":{},"params":{},"remotePort":42470},"res":{"statusCode":500,"headers":XXXXX},"err":{"type":"Error","message":"failed with status code 500","stack":"Error: failed with status code 500\n    at onResFinished (/app/backend/node_modules/pino-http/logger.js:114:39)\n    at ServerResponse.onResponseComplete (/app/backend/node_modules/pino-http/logger.js:177:14)\n    at ServerResponse.emit (node:events:520:35)\n    at onFinish (node:_http_outgoing:1026:10)\n    at callback (node:internal/streams/writable:764:21)\n    at afterWrite (node:internal/streams/writable:708:5)\n    at afterWriteTick (node:internal/streams/writable:694:10)\n    at process.processTicksAndRejections (node:internal/process/task_queues:88:21)"},"responseTime":6569,"msg":"request errored"}
{"level":30,"time":1774015096625,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","msg":"WsReadTransport: Attempting reconnect"}
{"level":30,"time":1774015096625,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","url":"ws://supervisor/core/api/websocket","msg":"WsReadTransport: Connecting to HA WebSocket"}
{"level":30,"time":1774015096640,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","msg":"WsReadTransport: WebSocket opened, awaiting auth_required"}
{"level":30,"time":1774015096648,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","msg":"WsReadTransport: Authenticated successfully"}
{"level":30,"time":1774015096789,"pid":1329,"hostname":"234db91b-everything-presence-zone-configurator","name":"zone-configurator-backend","msg":"WsReadTransport: Subscribed to state_changed events"}

I removed sensitive data with XXX in the logs. No proxy used, stable internet connection, no issues with other add-ons.
The entities are there and the sensor is working:

Image

Installation method Home Assistant OS
Core 2026.3.3
Supervisor 2026.03.2
Operating System 17.1
Frontend 20260312.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions