Skip to content

Using HassIO, connection to the supervisor requires Authorization header #13

Closed
@ssenart

Description

@ssenart

Without Authorization header, we have the error:

An error occured while running Gazpar2HAWS: Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/gazpar2haws/__main__.py", line 76, in main
    await bridge.run()
  File "/usr/local/lib/python3.12/site-packages/gazpar2haws/bridge.py", line 57, in run
    await self._homeassistant.connect()
  File "/usr/local/lib/python3.12/site-packages/gazpar2haws/haws.py", line 26, in connect
    self._websocket = await websockets.connect(ws_url)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/websockets/asyncio/client.py", line 444, in __await_impl__
    await self.connection.handshake(*self.handshake_args)
  File "/usr/local/lib/python3.12/site-packages/websockets/asyncio/client.py", line 104, in handshake
    raise self.protocol.handshake_exc
  File "/usr/local/lib/python3.12/site-packages/websockets/client.py", line 336, in parse
    self.process_response(response)
  File "/usr/local/lib/python3.12/site-packages/websockets/client.py", line 150, in process_response
    raise InvalidStatus(response)
websockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 401

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