Skip to content

[BUG] WebSocket not authenticatedΒ #186

Description

@barisahmet

πŸ› Bug Description

Claude.ai (cloud) can't modify anything in my instance, it can read entities, automations etc.

πŸ”„ Steps to Reproduce

Steps to reproduce the behavior:

  1. Tell claude to modify anything

βœ… Expected Behavior

It should modify my automations, entities etc.

❌ Actual Behavior

Claude says that websocket authentication failed. And here is add-on logs:

INFO:     172.30.33.14:50914 - "POST /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:50914 - "POST /private_xxx HTTP/1.1" 202 Accepted
INFO:     172.30.33.14:50914 - "GET /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:50926 - "POST /private_xxxHTTP/1.1" 200 OK
WebSocket connection failed: server rejected WebSocket connection: HTTP 401
WebSocket message failed: WebSocket not authenticated
INFO:     172.30.33.14:50926 - "POST /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:55420 - "POST /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:55420 - "GET /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:55436 - "POST /private_xxx HTTP/1.1" 202 Accepted
INFO:     172.30.33.14:55436 - "POST /private_xxx HTTP/1.1" 200 OK
WebSocket connection failed: server rejected WebSocket connection: HTTP 401
WebSocket message failed: WebSocket not authenticated
INFO:     172.30.33.14:55436 - "POST /private_xxx HTTP/1.1" 200 OK

200 OK ones are read commands, list entities etc.
But when claude tries to write or modify anything, 401 happens.

πŸ“Š Environment

  • Home Assistant version: (e.g., 2025.12.0b2)
  • MCP Server version: (4.7.1)

πŸ“ Error Logs

If applicable, add error logs to help explain your problem:

INFO:     172.30.33.14:50914 - "POST /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:50914 - "POST /private_xxx HTTP/1.1" 202 Accepted
INFO:     172.30.33.14:50914 - "GET /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:50926 - "POST /private_xxxHTTP/1.1" 200 OK
WebSocket connection failed: server rejected WebSocket connection: HTTP 401
WebSocket message failed: WebSocket not authenticated
INFO:     172.30.33.14:50926 - "POST /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:55420 - "POST /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:55420 - "GET /private_xxx HTTP/1.1" 200 OK
INFO:     172.30.33.14:55436 - "POST /private_xxx HTTP/1.1" 202 Accepted
INFO:     172.30.33.14:55436 - "POST /private_xxx HTTP/1.1" 200 OK
WebSocket connection failed: server rejected WebSocket connection: HTTP 401
WebSocket message failed: WebSocket not authenticated
INFO:     172.30.33.14:55436 - "POST /private_xxx HTTP/1.1" 200 OK

πŸ§ͺ Test Results

If E2E tests are affected:

  • Integration tests pass
  • E2E tests fail
  • Performance impact observed

πŸ“Έ Screenshots

If applicable, add screenshots to help explain your problem.

πŸ” Additional Context

Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions