A device already exists with the name

Happening on both the iOS and MacOS.
Every now and then, I get duplicate devices in the Mobile integration.

  • To login I have to provide a new name.
  • A new device and entities are created (messing up reporting, charts, etc.)

Question: why would HA not recognize the (existing) client?

The logs contained about 2,000 “login attempt” messages (in 12 minutes) plus a few “ConnectionResetErrors”.

2022-01-16 11:18:46 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from Dxxxxxxx-M-60CG (192.168.2.2). (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2021.12 (io.robbie.HomeAssistant; build:2021.322; macOS 12.1.0) Mobile/HomeAssistant, like Safari)
2022-01-16 11:18:46 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from Dxxxxxxx-M-60CG (192.168.2.2). (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2021.12 (io.robbie.HomeAssistant; build:2021.322; macOS 12.1.0) Mobile/HomeAssistant, like Safari)
2022-01-16 11:18:46 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from Dxxxxxxx-M-60CG (192.168.2.2). (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2021.12 (io.robbie.HomeAssistant; build:2021.322; macOS 12.1.0) Mobile/HomeAssistant, like Safari)
2022-01-16 11:18:47 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 676, in ping
    await self._send_frame(message, WSMsgType.PING)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 653, in _send_frame
    self._write(header + message)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 663, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

Any idea why this happens?

Thank you!
DJ

The unique identifier used by the app to try and avoid duplicates is sensitive to the app being deleted, and possibly other factors. If you get logged out (which is not expected; look in Preferences > Debugging > Event Log for it and click in to see details) and it has a different identifier, it will prompt you for a new name to avoid confusion. You can delete the existing integration in HA’s Configuration and then you can proceed with the existing name.

1 Like