prefixkit Ask an engineerAsk Support RU

Error reference · Home Assistant

Home Assistant: Login attempt or request with invalid authentication from 192.168.1.50 (192.168.1.50).…

Login attempt or request with invalid authentication from 192.168.1.50 (192.168.1.50). Requested URL: '/api/websocket'

What it means

Something tried to log in or call the API with a wrong password or an expired token. After several attempts with ip_ban_enabled the address is banned.

Why it happens

  • An old session in the companion app or a browser tab after a password change.
  • An integration or script with an outdated long-lived token.
  • A scanner or bot from the internet if Home Assistant is exposed directly.
  • Behind a proxy without trusted_proxies every request seems to come from the proxy address, so one mistake bans everyone.

How to fix it

  1. Find the device by the address in the message and log in again (the app: Settings → Companion app → server → log out and in).
  2. Recreate long-lived tokens in your profile → Security.
  3. If you were banned: delete the address from ip_bans.yaml in the config folder and restart.
  4. If the address is from the internet, close direct access and use a tunnel, proxy or WireGuard.

Useful tools

/home-assistant-remote-access/ · What is my IP

Other Home Assistant errors

Idea?