iOS icon indicating copy to clipboard operation
iOS copied to clipboard

"A device already exists with that name"

Open jcoetsie opened this issue 2 years ago • 8 comments

Device model, version and app version

Model Name: MacBook Pro (16-inch, 2019) macOS Version: macOS Big Sur 11.6.2 App Version: 2022.2 (2022.345) Safari Version: 15.0

Home Assistant Core Version core-2022.2.9

Describe the bug When starting app, I had to select HA server again. Once done and once logged on, It complains my device name already exists. Of course it does as it was working before.

To Reproduce I think it happened after I upgraded my app to latest release.

Expected behavior should just connect and see that existing device has same name so it should just work

Screenshots N/A

Additional context N/A

jcoetsie avatar Feb 19 '22 09:02 jcoetsie

If you got signed out you can see the reason in Preferences > Debugging > Event Log. Likely an issue with the auth token, e.g. trusted_networks.

When setting the all up again, we use a device identifier from Apple which isn't stable across app installs. I'm really not sure when it changes on Mac (on iOS it persists until you delete the app), but it has for you, which means the app can't avoid duplicating the device name. You'll need to delete the existing integration to preserve the name.

zacwest avatar Feb 19 '22 16:02 zacwest

tx, ok, deleting did the trick...

Maybe allow to use an existing name? Is more user friendly or offer to delete current device an replace it with same same?

Important as automations break when name changes

jcoetsie avatar Feb 21 '22 08:02 jcoetsie

This happened to me after my reverse proxy changed network subnets and my trusted_proxies was no longer valid.

You'll need to delete the existing integration to preserve the name.

@zacwest What "existing integration" needs to be deleted?

griley avatar Apr 18 '22 03:04 griley

seeing the same issue, I deleted the integration, I also deleted all the auth tokens in the profile, reboot the HAOS, but still getting prompted when logging in. not seeing anything about this in the full error logs in HA.

hoping not to have to rename my device and update all the notification automations i have.

briodan avatar Jun 03 '22 23:06 briodan

Experiencing this currently, after moving my reverse proxy to another subnet. I cannot get logged back in on my phone no matter what I try or how many times I tell home assistant to delete the integration.

doodlebro avatar Aug 23 '22 00:08 doodlebro

I am using the latest version of Home Assistant (2023.9.2) and the app on an up-to-date iPhone Xs. Every time I log out of the application on my phone, when I log in it will prompt me with the "A device already exists with that name" message.

Normally I don't log out on the phone but this will occur if you want to change your password (as that prompts you to log out on all devices).

You can delete the "old" device in the HA UI but it seems to cache the name until you restart HA but even then there seems to be some caching of entity names that can be frustrating to work through.

ianrifkin avatar Sep 21 '23 15:09 ianrifkin

Important as automations break when name changes

This bit is particularly annoying.

I access my Home assistant through a proxy behind Tailscale. Sometimes when I'm away from home I forget to turn Tailscale on and being unable to access the server causes it to log out.

I think, maybe if the app then updates while I'm logged out I get into this scenario.

When this happens I need to remove the device and have to update every automation that referenced the device.

jeffutter avatar Jan 24 '24 19:01 jeffutter

There's also what happens when you replace your phone. There needs to be a way to take over another entity.

Tam-Lin avatar Apr 07 '24 14:04 Tam-Lin