Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iCloud integration causes pin code requests on Apple devices. #67510

Open
JeroenTuinstra opened this issue Mar 2, 2022 · 101 comments
Open

iCloud integration causes pin code requests on Apple devices. #67510

JeroenTuinstra opened this issue Mar 2, 2022 · 101 comments
Assignees

Comments

@JeroenTuinstra
Copy link
Contributor

The problem

Apple iCloud integration causes pin code authentication on Apple devices. It used to just generate an email warning. With recent updates op home assistant to 2022.3.0 it now generates an authentication request. While the integrations is properly registered and does not request a pin code.

What version of Home Assistant Core has the issue?

core-2022.3.0

What was the last working version of Home Assistant Core?

core-2022.2.9

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Apple iCloud

Link to integration documentation on our website

https://www.home-assistant.io/integrations/icloud/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

icloud documentation
icloud source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @Quentame, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (icloud) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@GazTheGeek
Copy link

I'm having this same issue too. Since upgrading to version 2022.3.1

@Drun555
Copy link

Drun555 commented Mar 5, 2022

Yup, same issue. Very annoying. Deactivated integration for now.

@ZeddicPrime
Copy link

Note for others: After disabling the integration, you need to restart HA. Tried without and was still getting many signin prompts.

@FrancoLoco
Copy link

Same issue and thanks for the tip about the restart, cause I disabled also and kept getting prompts still...!

@svaeyens
Copy link

Same issue here

3 similar comments
@mehdic
Copy link

mehdic commented Mar 20, 2022

Same issue here

@KruseLuds
Copy link

Same issue here

@DaveYYZ
Copy link

DaveYYZ commented Mar 21, 2022

Same issue here

@Frucoboti
Copy link

same...

@ewelin34
Copy link

I too am having this problem. My account PW didn't work. I randomly decided to try just the 2fa code that pops up on my iphone and that, for some strange reason, worked!

@eamonnsullivan
Copy link

I'm still getting this issue on 2022.3.8. I had to finally disable the integration. Is there anything the developers need here to help?

@eamonnsullivan
Copy link

I was able to fix this (I think) for me by following the troubleshooting advice in the docs. I removed my icloud folder in .storage and just reconfigured it. I think the issue is that it's not correctly showing us when we need to reconfigure any longer.

@funkybunch
Copy link
Contributor

@eamonnsullivan any issues since you deleted the folder in .storage? I had disabled this a while ago and am trying to decide if I should try this and turn it back on.

@DaveYYZ
Copy link

DaveYYZ commented Apr 24, 2022

I've been deleting the /config/.storage/iCloud folder and re-signing on with 2FA over and over again. I still get the notifications on my iOS devices every 20 minutes or so. I've had to delete the integration.

@FrancoLoco
Copy link

FrancoLoco commented Apr 24, 2022 via email

@eamonnsullivan
Copy link

I'm getting this again, and I'll need to do the same workaround again. It's definitely just not telling us when we have reconfigure the integration. This used to work. I'm surprised at the silence here, actually. Is this only happening to a small subset of users? I'm using the container version of HA.

@eamonnsullivan
Copy link

@eamonnsullivan any issues since you deleted the folder in .storage? I had disabled this a while ago and am trying to decide if I should try this and turn it back on.

The issue returned, approximately three weeks later, but the same workaround did the trick again. Again, probably temporarily.

@DaveYYZ
Copy link

DaveYYZ commented Apr 29, 2022

I’m using the Home Assistant blue and the apple integration is set to family. Deleting storage folder prevents integration from asking me to re-verify for about 25 minutes each time. It was just my phone and watch, I would be OK with it… But the Mrs. has other thoughts :-)

@FrancoLoco
Copy link

FrancoLoco commented Apr 29, 2022 via email

@Seidlabier
Copy link

Same problem here. HA 2022.4.7. I had this issue a few weeks ago then it was gone. No it is back. There is no way to enter apple's confirmation code.

@gdgeist
Copy link

gdgeist commented May 4, 2022

Ditto

@ewelin34
Copy link

ewelin34 commented May 6, 2022

+1 icloud was working well then last night I had to restart the server and now every trick I try to login fails.

I've deleted the .storage/icloud folder, tried just the password, tried the password and generate confirmation code, nothing seems to be working allowing a valid login.

@lithium-ap
Copy link

I too am having this issue. Same work around, not a permanent fix as it comes back. Latest version of HA.

@krbuck
Copy link

krbuck commented May 7, 2022

Same issue here. Was working find until update.

Edit: finally prompted for passcode and took it. Seems to be fine for now.

@N3rdix
Copy link
Contributor

N3rdix commented May 9, 2022

ran into the same confusion and was flooded by pin code requests (~1 each 30 minutes). Deactivating the integration, deleting the icloud folder in .storage and restarting home assistant did the trick for me.

Would appreciate a fix to show that reconfigurtion is required

@asinla
Copy link

asinla commented Mar 16, 2023

For me it's more than just tracking. Being able to see all the entities is really useful and I don't think iCLoud3 does that. Or am I wrong?

@ifuchs
Copy link

ifuchs commented Mar 17, 2023

Same problem. Very annoying.

@KruseLuds
Copy link

KruseLuds commented Mar 17, 2023 via email

@magicus
Copy link
Member

magicus commented Mar 17, 2023

@KruseLuds That the iCloud integration is dead is annoyingly obvious for all of us who are trying to use it. :-(

If we take one step back, I think there are two problems here:

  1. A component that is part of Home Assistant core has been allowed to fall in disrepair. This is bad for the Home Assistant project as a whole, and seems to indicate failure on a project management level. If the component can not be fixed so it can be used, it should be removed from HA core.

  2. There are still a lot of users who want this functionality, and do not want to "move on", but want to get the functionality working again. Using a separate component like iCloud3 is probably fine; the problem here is that iCloud3 is extremely complex to setup, which might be motivated if you need all the special functionality it provides, but contrasts sharply with the ease of use for common tasks that were provided by this iCloud integration.

@ikeurb
Copy link

ikeurb commented Mar 17, 2023 via email

@ifuchs
Copy link

ifuchs commented Mar 18, 2023

I would be happy to move to icloud3 if I could get it to work.

@nsotnikov
Copy link

Yep this should definitely be removed, it's not functional and hasn't been for a long time.

@morrisonpeter
Copy link

morrisonpeter commented Mar 20, 2023 via email

@FaserF
Copy link
Contributor

FaserF commented Mar 20, 2023

I still use the iCloud integration and have always followed the directions to delete the iCloud folder and reconfigure when I get the verification code on my device. It means 1 minute of maintenance about once every month or two. In my experience trying iCloud3 this integration works much better than icloud3. Especially with a family’s worth of devices, when I tried iCloud3 I was constantly looking up and reconfiguring each device, say when my kids changed their phone names (it happens regularly). With this iCloud integration that all happens automatically. And iCloud integration is half of my use case for home assistant. I hope this one remains. Perhaps someone could make an automation that deletes the iCloud folder so we can avoid using the terminal when we need to reauthenticate?

You could just use the icloud3 version 3 beta: https://github.com/gcobb321/icloud3_v3
This one provides GUI setup and can handle name changes of ios devices. Also the setup itself got way easier.

@FaserF
Copy link
Contributor

FaserF commented Mar 20, 2023

Also it looks like icloud3 version 3 could be the new official icloud integration from what I can read in the beta docs:
https://github.com/gcobb321/icloud3_v3/blob/main/docs/chapters/0.0-change-log-v3.0.0.md#icloud3-is-now-a-home-assistant-integration--docsify-ignore

@Phoenix-DH
Copy link

I got the feeling thst with todays release also something happened:
I hVe the feeling thst when a device is sending an update, a PIN is triggered, but not needed to approve.

Can I fix this?
What about deleting the icloud folder?
Are then all devices gone?
Do I have to restart HA?

@SolarSciencePup
Copy link

Same here

@philippe-tc
Copy link

philippe-tc commented Jul 17, 2023

The same here, I have to re-configure the integration every few months. This is indicated by 'Devices and services'. At first after this indication I don't do anything. And when Apple comes with a popup with a code, I will go to 'Devices and Services' and tap on the red 'Re-configure' button at the iCloud integration. There I enter my password and then the code of the popup on my phone. That works great with me.
The integration then keeps hiding again for a few months.

I find this procedure a lot easier than reinstalling or removing a directory, with any collateral damage.
And even when HA tells me that I have to re-configure the integration, I can wait for weeks. Indeed, I get one or two days with popups with security codes, but I simply accept the code and do nothing with it. No problem. The integration does NOT stop working! The last time I really entered a security code from the popup must have been something like 3 months ago. Some two weeks ago I got two days with some popups. I pressed OK and ignored them for the rest. After one or two days the popups stopped. I didn’t really enter the security code from the popup anywhere.

The main reason that I use this integration is to save the battery of my iPhone: I’ve put the charger of my phone in a Shelly plug at my bedside and it switches off if my battery is 90% full. Because my battery is not loading to 100% now, it remains in a much better condition. Apple's standard system (delay the last charging part until short before you get up) does not work for me because I lead a too irregular life for that.

@hardrockhodl
Copy link

I was able to fix this (I think) for me by following the troubleshooting advice in the docs. I removed my icloud folder in .storage and just reconfigured it. I think the issue is that it's not correctly showing us when we need to reconfigure any longer.

Thank you, this helped me!

so what I did.

  1. go to iCloud integration
  2. press the 3 dots and choose delete
  3. ssh into home assistant (I use the add-on "Terminal & SSH!"
  4. delete icloud folder
    rm -rf /config/.storage/icloud
  5. add your icloud account in the integration again
  6. Now the box will popup for you to put in the verification code.

@ifuchs
Copy link

ifuchs commented Sep 17, 2023

Interesting. I tried the steps you list and when I add the integration (or try to) and enter my credentials, it says iCloud is already configured and the integration dos not appear in the list of installed integrations.

@morrisonpeter
Copy link

morrisonpeter commented Sep 17, 2023

I second the switch to iCloud3. The code issue has gone away, I've been using it for months. It's a lot more transparent with logs and requesting a code or entering it when you need to, right in the integration's interface. I liked how simple the older iCloud install was but got sick of deleting the integration and folder every week or two. iCloud3 is actively updated too.

@ifuchs
Copy link

ifuchs commented Sep 18, 2023

When I go to add an Integration, I don't see icloud3, only iCloud. How to install it?

@N3rdix
Copy link
Contributor

N3rdix commented Sep 18, 2023

You need to install the custom component first (https://github.com/gcobb321/icloud3) via HACS, then you can install the integration

@ifuchs
Copy link

ifuchs commented Sep 18, 2023

@N3rdix Thanks. I installed the iCloud3 integration via HACS. Am I correct that the icloud3 Device Tracker now needs to be installed by modifying the configuration.yaml file? Also, I presume I now ignore the integration Apple->Apple Cloud (it is superseded by this iCloud3 integration?)

@N3rdix
Copy link
Contributor

N3rdix commented Sep 18, 2023

No more YAML needed, after installing via HACS and restarting HA you can add it in the integrations list.
Very well documented here as well: https://gcobb321.github.io/icloud3_v3/#/

@ifuchs
Copy link

ifuchs commented Sep 18, 2023

@N3rdix Thanks. I got as far as Step 5.2 and that's when things went awry. I don't see the entities associated with my iPhone, only devices that I presume were there from an earlier incarnation of iCloud integration. Everything seemed to go as the docs detailed until then.

@ifuchs
Copy link

ifuchs commented Sep 18, 2023

This is where I am:
Screenshot 2023-09-18 at 5 55 10 PM

@bcutter
Copy link

bcutter commented Sep 18, 2023

Is this issue now an iCloud3 support chat?

@ifuchs
Copy link

ifuchs commented Sep 18, 2023 via email

@gdgeist
Copy link

gdgeist commented Nov 18, 2023

@Quentame @nzapponi Is this integration abandoned and needs to be removed?

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@Phoenix-DH
Copy link

Issue is still existing with the latest version 2024/02.
From time to time the files have to be cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests