Duplicate iPhone entries for iOS mobile application

Hi Folks,
I don’t know how it happened or how to resolve it. I think it may be due to me changing the friendly name to something different for my iPhone entity, but my logs keep showing me the error “Found duplicate device name XXX iPhone X.”
When I go to Integrations > Mobile App I see my phone listed twice with the actual name from Settings > General > About and another entity with the friendly name I entered in Lovelace or somewhere, but there is not an option to disable one of the entities
I do also have UniFi controller running but I have relabeled entities in UniFi to have “unifi” after the name so I know it’s not the HA iOS app.
Running HA 0.111.1
iOS 13.5
Can anyone help please?
Is it related to me having a Nabu Casa account also?
Thanks :pray:

1 Like

Chiming in to say this happened to me, too. I’m not using Nabu Casa.

Our two phones have suddenly been duplicated (full Hassio / HassOS on an RPi). The old ones are now “stuck” in their last state, and (of course) everything related to them is now broken.

I don’t think we did anything to cause it. We didn’t have to re-log in or anything.

When I dig around config/.storage/core.device_registry , I can see the duplicate entries. Weirder, the identifiers section is showing different types of keys for the old and new (old is a basic hex string, newer appears to be a UUID).

I’m not sure how to fix it, since I can’t seem to remove the old devices, and I don’t really want to manually fix all my automations & notifications.

The iOS companion app developer has reached out on Reddit to explain what happened and the solution:

This should be fixed in 2020.2 (which is the current latest) so it won’t happen to others out there. You can safely work around this by removing all of the mobile_app integrations and run the app; it will re-create them with the original names (assuming your device name hasn’t changed).

What happened was: when the app figured out a sensor wasn’t updatable because you removed the integration, it tries to set up the integration again (a new thing in 2020.1). Unfortunately a bug in this logic made it set up the integration again if it failed to update a sensor due to a network error.

The identifier change which you noticed is going from a non-stable to stable identifier; if it attempts to set up the integration again, it’ll find the existing one and use that instead. So, for example, you can sign out and sign in and it won’t create a duplicate. Before this, it would create a new integration every time you signed in (with similar results to the _2 versions you see now).

The upside, at least, since you ran into this bug is that it’s not possible to hit it again. Integrations using the stable ID are protected from t his bug.

Hi,

I have the same issue but not clear to me how to solve it.

You can safely work around this by removing all of the mobile_app integrations and run the app

does this mean to remove the iOS integration in Home assistant an set it up again?

Not quite that. Just go into the integrations, and remove all of the phones individually. Then go and re-open the app on each phone, and it’ll recreate all the devices & entities again automatically.

It’s pretty painless.

Mmm almost clear…but can’t find how to remove phones from iOS integration!

1 Like

I’m on the latest HA which groups integrations, so for me, I go to the Integrations page, then click on a phone (e.g., “Bob’s iPhone”) for that phone’s details. Then, click the 3 dots at the bottom right of the card, and choose DELETE.

If it’s an older HA, I believe you would skip the first step, and just click the 3 dots and choose DELETE.

Hopefully that helps!

I am sure it’s me and sorry in advance for that but can’t find the 3 dots…

@OverZealous can you help me with this?

That’s the devices tab. Go one tab left:

1 Like

thanks for you answer tom, thing is if I go into integration page I can only delete the whole integration.

is that what I should do? delete the whole integration and re-add again?

Oh right, no. You do not want to do that. I should have read the rest of OZ’s instructions.

Unfortunately I just upgraded to the 0.114 beta version so I cant take screenshots of the device page for you.

Hi tom.

thank you again!
I will soon upgrade to 0.114 once released: so can you take a screenshot on it and show where I am supposed to remove the unwanted phone?

Honestly you could update now. The 0.114b2 beta is stable as a rock with only one minor style issue (the supervisor page is light when dark theme is selected).

Click here

Untitled1

Then here and here:

Untitled

4 Likes

This option seems to be gone from the Home Assistant UI now (e.g. no way to admin devices)

Nope. It’s still there.

I am blind, was looking under the iOS integration! It is indeed still there.

1 Like