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

configurator.apple_id_verification_code entity is unavailable #264

Open
gaborbozoky opened this issue May 9, 2023 · 30 comments
Open

configurator.apple_id_verification_code entity is unavailable #264

gaborbozoky opened this issue May 9, 2023 · 30 comments

Comments

@gaborbozoky
Copy link

Dear All,

I needed to reinstall iCloud3 integration but since reinstall the iCloud3 has some issue at the end of iCloud registering process. If I request a reset for the iCloud interface the issue is the same:

  • I request the iCloud interface reset
  • the 6 number pin come from Apple
  • the iCloud3's configurator notification come in HA
  • I enter the pin in HA
  • the HA notification disappear
  • I receive an error message "configurator.apple_id_verification_code" This entity is unavailable.
  • I can only close the error message window
  • then the iCloud3 has an Alert in logs: "iCloud Alert > FmF or FamShr Tracking Method is disabled until Verification has been completed. iOD App Tracking Method will be used."

Has anyone encountered this error? How can I solve it?

Thanks in advance for any suggestions!

Thanks, Gabor

@gcobb321
Copy link
Owner

gcobb321 commented May 9, 2023

Are you running iCloud3 v2.4.7 using the yaml configuration or the v3 beta version?

@gaborbozoky
Copy link
Author

It's v2.4.7 with manual yaml setup. Downloaded and installed with HACS.

@DeWiseOne
Copy link

I am seeing the same issue running a similar setup ( iCloud 2.4.7 with yaml). I already tried reinstalling couple of times both HACS and iCloud.

  1. iCloud Alert > FmF or FamShr Tracking Method is disabled until Verification has been completed. iOS App Tracking Method will be used.
  2. Tried resetting the Apple 2-factor authentication id couple of times after putting in the code I get the error " configurator.apple_id_verification_code" This entity is unavailable"

Would appreciate any help

@DamageDoctor
Copy link

Pretty sure its related to this

@gcobb321
Copy link
Owner

In the iCloud3 config file, remove all of the email statements for all of your devices. This will (might) stop trying to set up the FmF tracking method for the devices since it can not be used. Then restart HA and try again.

@gaborbozoky
Copy link
Author

I believe this may different.

  • I use FamShr instead of FmF

  • my error message is different

  • I can not receive any data, device attribute (e.g. battery related) from iCloud. The issue what you linked say connection is live and only location service changed moreover FamShr tracking method is still working fine...

@gaborbozoky
Copy link
Author

gaborbozoky commented May 10, 2023

I tried but did not help.

config_ic3

devices:

  • device_name: gabor_iphone
    name: Gabor iPhone
    inzone_interval: 1

Then HA rebooted and I reset the iCloud interface. Apple PIN come, error message the same.

However the log say: Initializing iCloud v2.4.7 "iCloud Alert > iCloud Account Verification completed"

Later in Stage 2b the Alert come again: "FmF or FamShr Tracking Method is disabled until ....."

@gcobb321
Copy link
Owner

The next thing to consider is installing v3. It’s still in beta but is solid. I just fixed a couple of issues with the latest and will do an update tomorrow. Beta 15 was installed by over 300 users.

Go here and follow the links to the Release page and docs for more info. Go to the docs link first, then review the features and migrating from v2.4 first.

@gaborbozoky
Copy link
Author

ok, I'll do the upgrade soon and update the case

@DeWiseOne
Copy link

In the iCloud3 config file, remove all of the email statements for all of your devices. This will (might) stop trying to set up the FmF tracking method for the devices since it can not be used. Then restart HA and try again.

Tried that it didn't work

@DeWiseOne
Copy link

The next thing to consider is installing v3. It’s still in beta but is solid. I just fixed a couple of issues with the latest and will do an update tomorrow. Beta 15 was installed by over 300 users.
Go here and follow the links to the Release page and docs for more info. Go to the docs link first, then review the features and migrating from v2.4 first.

I tried installing beta v16a last night and ran into the same issue #122 "500 Internal Server Error Server got itself in trouble" gcobb321/icloud3_v3#122 (comment). I was able to make it work by first installing Beta 15 configure the devices and then upgrade to Beta 16a. Everything is working fine now. Version 3 is looking really good.

I also noticed the direction for installation for beta 16 states - unzip it into the /config/icloud3 whereas the Beta 15 and documentation for manual installation say unzip it into the /config/custom_components/icloud3 directory. I went with beta 15 directions.

@gaborbozoky
Copy link
Author

I tried the V3 upgrade as DeWiseOne described above and it is now working for me too: now I receive attributes from iCloud again. The new iCloud V3 seems cool!

I would note that the new version is loading very slowly for me after HA restart. I mean I see this message for ca 2 minutes: "Starting Device tracker, not everything will be available until it is finished."

Then I found the following two error log records:

===============================
Logger: homeassistant.setup
Source: setup.py:204
First occurred: 21:54:54 (1 occurrences)
Last logged: 21:54:54

Unable to set up dependencies of ios. Setup failed for dependencies: device_tracker

Logger: homeassistant.setup
Source: setup.py:206
First occurred: 21:54:54 (1 occurrences)
Last logged: 21:54:54

Setup failed for ios: (DependencyError(...), 'Could not setup dependencies: device_tracker')

But the data is coming from iCloud well !!!

@groenmarsmannetje
Copy link

I experience the same error, but not after a new install. The existing integration stopped working and even after a restart and entering the valid verification code I also get this error: “iCloud Alert > FmF or FamShr Tracking Method is disabled until Verification has been completed. iOD App Tracking Method will be used."

This doesn’t make sense because all these devices do not have the iOS App installed and also set to false in the yaml configuration. So I think v2.4.7 now died and there is a need to make the v3 release final. Will try out the beta version during this week.

@gcobb321
Copy link
Owner

That message is probably not looking to see it’s you have the iOS app installed and it’s just a general message.

@FrancoLoco
Copy link

I also have this problem: "the new version is loading very slowly for me after HA restart. I mean I see this message for ca 2 minutes: "Starting Device tracker, not everything will be available until it is finished. Setup failed for dependencies: device_tracker"

i also tried to remove the device_tracker config in my configuration.yaml, but then it doesn't track.. which I find weird because I thought you did not need to leave this with v3..

device_tracker:

  • platform: icloud3
    ...

For the moment I then chose to keep the broken v2 version because the v3 makes my HA restarts very slow and seems to break things for my other integrations... so no tracking for me at the moment..

@gaborbozoky
Copy link
Author

For me the icloud3 blocks HA restart for 4-5 minutes but after this time the tracking is stable and working well.

@gcobb321
Copy link
Owner

Edit the manifest.json in the iCloud3 directory.
Remove the history and iOS from the after_dependicies line so it looks like:
”after_dependencies": [],
Save the file and restart HA

@gaborbozoky
Copy link
Author

Works - restart time as before upgrade ....

Thank you your great work, Gary!

@gaborbozoky
Copy link
Author

Unfortunately since I removed the history and iOSfrom manifest.json I've got a new error message - see attachement..

image

@gcobb321
Copy link
Owner

Hmm. I'm running 2023.05.2 and mine started without any issues. I'm running on a [plain RPi (no virtual environments or anything like that). Try adding 'history' only back and see what happens. It's almost like iCloud is starting too early.

Look in home-assistant.log and see where iCloud3 is getting set up.
Select the Debug log_level. That will show when the device_tracker and sensor entities are set up.

@gaborbozoky
Copy link
Author

I use QNAP VM for HA 2023.05.3 (the same errors were on v2023.05.2 too)

First I put back both "history" and "ios". Result - start delay back and Error gone

With "history" only - starting is fast but the error come again, see logs below.

Now I put back both "history" and "ios" again...

===============================

Logger: homeassistant.components.device_tracker
Source: custom_components/icloud3/device_tracker.py:55
Integration: Device tracker (documentation, issues)
First occurred: 22:08:00 (1 occurrences)
Last logged: 22:08:00

Error setting up platform legacy icloud3
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 299, in async_setup_legacy
setup = await self.platform.async_setup_scanner(
File "/config/custom_components/icloud3/device_tracker.py", line 55, in async_setup_scanner
if Gb.conf_profile[CONF_VERSION] == 1:
NameError: name 'CONF_VERSION' is not defined

Logger: homeassistant.components.device_tracker
Source: helpers/entity_platform.py:554
Integration: Device tracker (documentation, issues)
First occurred: 22:08:04 (1 occurrences)
Last logged: 22:08:04

Platform icloud3 does not generate unique IDs. ID icloud3_gabor_iphone is already used by device_tracker.gabor_iphone - ignoring device_tracker.gabor_iphone

Logger: icloud3
Source: helpers/entity.py:578
First occurred: 22:08:04 (2 occurrences)
Last logged: 22:08:08

Attribute hass is None for <DeviceTracker: gabor_iphone/iphone>
Traceback (most recent call last):
File "/config/custom_components/icloud3/support/start_ic3.py", line 1110, in create_Devices_object
Device.write_ha_device_tracker_state()
File "/config/custom_components/icloud3/device.py", line 1317, in write_ha_device_tracker_state
self.DeviceTracker.write_ha_device_tracker_state()
File "/config/custom_components/icloud3/device_tracker.py", line 510, in write_ha_device_tracker_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 578, in async_write_ha_state
raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <DeviceTracker: gabor_iphone/iphone>

This error originated from a custom integration.

Logger: icloud3
Source: custom_components/icloud3/helpers/messaging.py:584
Integration: iCloud3 (documentation, issues)
First occurred: 22:08:08 (1 occurrences)
Last logged: 22:08:08

Traceback (most recent call last): File "/config/custom_components/icloud3/icloud3_main.py", line 805, in process_updated_location_data self._update_all_tracking_sensors(Device, update_requested_by) File "/config/custom_components/icloud3/icloud3_main.py", line 901, in _update_all_tracking_sensors Device.write_ha_device_tracker_state() File "/config/custom_components/icloud3/device.py", line 1317, in write_ha_device_tracker_state self.DeviceTracker.write_ha_device_tracker_state() File "/config/custom_components/icloud3/device_tracker.py", line 510, in write_ha_device_tracker_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 578, in async_write_ha_state raise RuntimeError(f"Attribute hass is None for {self}") RuntimeError: Attribute hass is None for <DeviceTracker: gabor_iphone/iphone>

Logger: homeassistant
Source: components/sensor/init.py:583
First occurred: 22:08:10 (2 occurrences)
Last logged: 22:08:10

@gcobb321
Copy link
Owner

Are you running v2 with the platform:icloud3 statement. I saw the message 'Error setting up platform legacy icloud3' or v3 set up as an integration or both? If both, remove the platform:icloud3

@gaborbozoky
Copy link
Author

gaborbozoky commented May 15, 2023

I'm sorry it seems I missed something during the upgrade from 2.4.
So, now I've commented out everything in configuration.yaml regarding device_tracker.
Starting is fast but error come again however both history and ios is included....

=========================
Logger: homeassistant.components.device_tracker
Source: helpers/entity_platform.py:554
Integration: Device tracker (documentation, issues)
First occurred: 22:24:00 (1 occurrences)
Last logged: 22:24:00

Platform icloud3 does not generate unique IDs. ID icloud3_gabor_iphone is already used by device_tracker.gabor_iphone - ignoring device_tracker.gabor_iphone

Logger: icloud3
Source: helpers/entity.py:578
First occurred: 22:24:00 (2 occurrences)
Last logged: 22:24:04

Attribute hass is None for <DeviceTracker: gabor_iphone/iphone>
Traceback (most recent call last):
File "/config/custom_components/icloud3/support/start_ic3.py", line 1110, in create_Devices_object
Device.write_ha_device_tracker_state()
File "/config/custom_components/icloud3/device.py", line 1317, in write_ha_device_tracker_state
self.DeviceTracker.write_ha_device_tracker_state()
File "/config/custom_components/icloud3/device_tracker.py", line 510, in write_ha_device_tracker_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 578, in async_write_ha_state
raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <DeviceTracker: gabor_iphone/iphone>

This error originated from a custom integration.

Logger: icloud3
Source: custom_components/icloud3/helpers/messaging.py:584
Integration: iCloud3 (documentation, issues)
First occurred: 22:24:04 (1 occurrences)
Last logged: 22:24:04

Traceback (most recent call last): File "/config/custom_components/icloud3/icloud3_main.py", line 805, in process_updated_location_data self._update_all_tracking_sensors(Device, update_requested_by) File "/config/custom_components/icloud3/icloud3_main.py", line 901, in _update_all_tracking_sensors Device.write_ha_device_tracker_state() File "/config/custom_components/icloud3/device.py", line 1317, in write_ha_device_tracker_state self.DeviceTracker.write_ha_device_tracker_state() File "/config/custom_components/icloud3/device_tracker.py", line 510, in write_ha_device_tracker_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 578, in async_write_ha_state raise RuntimeError(f"Attribute hass is None for {self}") RuntimeError: Attribute hass is None for <DeviceTracker: gabor_iphone/iphone>

@gcobb321
Copy link
Owner

Error message - Platform icloud3 does not generate unique IDs. ID icloud3_gabor_iphone is already used by device_tracker.gabor_iphone - ignoring device_tracker.gabor_iphone

remove the iicloud3 ntegration.
restart ha, wait until it is operational
restart ha again
add icloud3 integration on the devices & setting screen

go to configure if it will let you
delete the gabor_iphone on the Update Devices screen
restart ha
go to devices & settings > icloud3 configure> and add gabor_iphone back.

we are trying to clean up some stuff in ha, with the gabor_iphone d_t entity.

@gaborbozoky
Copy link
Author

okay, I'll try this tomorrow - update soon :)

@gaborbozoky
Copy link
Author

So,

  • iCloud integration removed, restart, etc - gabor_iphone was still there as "Device tracker" integration

  • I've removed the HACS iCloud V2.4 integration, removed all configs, folders, then restart - gabor_iphone was still there as "Device tracker" integration.

  • I've added iCloud V3 manually to HACS and installed pure V3 (not as V2.4 upgrade as before). Strange for me that HA remembered which two devices tracked before and for Apple login/pwd too ... iCloud devices deleted then added (one iPhone and one watch). gabor_iphone still there and iCloud V3 added a new gabor_iphone_2 entity. Now I do not have error message in logs (neither Ha or iCloud V3's Event Log) and tracking seems to be okay.

But gabor_iphone entity from V2.4 is still there in "gray" - how can I delete it? :)

image

@gcobb321
Copy link
Owner

See if it is in known_devices.yaml

@gaborbozoky
Copy link
Author

yes, I found it in known_devices, so I deleted from yaml

HA restarted then rebooted for sure - but gabor_iphone is still there ....

@FrancoLoco
Copy link

FrancoLoco commented May 16, 2023

I no longer have v3 installed in my devices but I still get this message when I try to reinstall.. what should I do (I did try restarting) ?
"iCloud3 is already installed and can not be installed again. Select CONFIGURE in the iCloud3 Integration entry to configure iCloud3. If you are deleting and then reinstalling, restart HA first and then reinstall iCloud3"

@FrancoLoco
Copy link

oops my bad it was installed I just disabled it and was not seeing it because of the filters

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

No branches or pull requests

6 participants