iCloud3 v2.1 Device Tracker - iCloud3 v2.2 has been released (10/10/2020)

I’m scratching my head for this error below… why?
I’m using v2.2-rc11
my config:

device_tracker:
  - platform: icloud3
    username: "[email protected]"
    password: "xxx"
    tracking_method: famshr
    config_ic3_file_name: 'config_ic3.yaml'
2020-08-18 11:53:55 ERROR (MainThread) [homeassistant.config] Invalid config for [device_tracker.icloud3]: [config_ic3_file_name] is an invalid option for [device_tracker.icloud3]. Check: device_tracker.icloud3->config_ic3_file_name. (See /home/homeassistant/.homeassistant/trackers.yaml, line 2). Please check the docs at https://gcobb321.github.io/icloud3/#/

@gcobb321 Gary, thanks for the opportunity to comment.

The one thing I think would help with clarity, is if you could be consistent within the documentation when referencing ‘iOS App’ and ‘HA iOS App’, understanding that they are both the same app. To a novice this my be confusing.

Also, the verbiage in your ‘In summary’ section, is actually critical to understanding the inter-relationship between the ‘iPhone name’ and the ‘HA iOS App Device name’ requiring to be the same. You may want to highlight this section differently.


iCloud3 track_devices parameter (gary_iphone) = iPhone > SettingsApp > General > About Name (Gary-iPhone = gary_iphone)
mobile_app device.tracker entity name (device_tracker.gary_iphone_app) = iOS App Device Name (Gary-iPhone-App = gary_iphone_app)
1 Like

I’m not sure what changed between RC10 and RC11, but when I overwrote the RC11 files over RC10, everything stopped working and now my Lovelace card no longer appears either. ic3 can’t find any of my trackers or anything. I went back to 2.1 via HACS and everything works fine. I no longer have RC10 files to try them so had to go all the way back HACS 2.1 release.

@shmookies
No need to do HACS again. Just get the RC11 zip file again here. I did find one error with updating the Event Log which caused it to not copy it to your custom_card directory but it shouldn’t have trashed it.

The only thing that changed was device_trcker.py, icloud3-event-log-card and pyicloud_ic3.py. Everything else was the same. And no config files are overritten.

Weird. All I did was took your RC11 files. Overwrote my existing ones in the icloud3 folder. Then coped over the event card into the custom card folder. Restarted HA and now nothing works.

nevermind, thank you for a great app

@gcobb321
Well, it seems I was too quick on clicking, and too slow on reading… my fault.

That being said, I somehow cannot get it to work back again. I keep having the same error pop-up:

Traceback (most recent call last):
  File "/config/custom_components/icloud/device_tracker.py", line 1172, in _start_icloud3
    self._setup_monitored_iosapp_entities(devicename, iosapp_entities,
  File "/config/custom_components/icloud/device_tracker.py", line 6519, in _setup_monitored_iosapp_entities
    if dev_trk_device_id:
UnboundLocalError: local variable 'dev_trk_device_id' referenced before assignment

What I have tried so far:
-Uninstalled and deleted all iCloud3 files
-Uninstalled and deleted iOS app on phone
-Uninstalled and deleted both Mobile APP and iOS integration in HA
-Deleted all device_trackers related to devices, including all customzing
-Deleted all entries in known-devices.yaml
-Basically came down to a HA instance, stripped down of any mobile device (with HA Restart between each, to ensure everything worked).

Then I:
-Installed iOS HA App
-Installed iOS integration (Mobile APp integration installs itself when installing the app on phone)
-changed the name of the phone completely: went from iphone_xx to fruity_phone_ab
-changed the name of the phone in HA app to fruity_phone_ab, and restarted HA.
-Ensured HA recognized the mobile device correctly, by checking the entities naming, and also the notify-mobile service naming. Everything was perfect.
-Then installed all iCloud3 from scratch, using RC11a, the Event Logger, and Famshr.
-It worked for a while. I then added a second device: it stopped working, and I now have that same error back again.
-Removed the device, restart HA, it starts to work back again.

so: What did I do to mess this up like that ?

Thanks for your help, and for the integration. It’s been very useful.

I update to rc11a and after than ios notification does not work anymore
Log file showing entity name changes, and I follow instruction changes name “iphonexr_2” in ios app but still show the same log error. Anybody find this issue as well?

2020-08-19 10:54:25 ERROR (SyncWorker_31) [custom_components.icloud3.device_tracker]  iCloud3 Error > Error sending test msg to Xr (iphonexr) > Device-`iphonexr_2`, Error-Unable to find service notify/mobile_app_iphonexr_2. -------------------------. The Device Name on the phone must be the same as the iOS App device_tracker being monitored. Select the correct device_tracker entity or do the following to change the Device Name on the phone..  1. Open the iOS App on the phone..  2. Select HA Sidebar>General..  3. Change the Device Name on the phone to `mobile_app_iphonexr_2`..  4. Close, unload and restart the iOS App on the phone to send the new Device Name to HA..  5. Restart HA.

@dony1971
You most likely need to change the name in the app, and also in HA, the reboot HA.

in HA, Go to: Developpers Tools, Services, and start typing “notify” in the box. ‘notify_mobileapp_DEVICE_ID’ should appear. This is the name that you want to make sure matches what you put in your iCloud3 config.

Release Candidate 11b is available

Download the installation zip file here
Full Change Log is here
v2.2.0 Documentation is here
Installation instructions are here

  • iCloud3 now scans the hass.services/notify list and extracts the iOS App Device Name for the phone that is used to send locations requests to. This eliminates the need to make any changes to the Device Name on the phone. They are listed in the Event Log iCloud3 Initialization Stage 3 for reference.

  • The ‘move into stationary zone’ timer is reset if an old location or poor gps trigger is discarded.

  • If an iCloud3 configuration file is specified (config_ic3.yaml), the file locations checked are /config & /config/custom_components/icloud3 directories/

1 Like

I apply icloud3-v2.2.0-rc11b.zip, and don’t see notify error however notification is still not working. I delete mobile app integration in IOS app and apply reset in configuration, restart HA, re-login IOS app, reset push id notification, restart HA again, but notification still does not work.
notify.mobile_app_iphonexr is shown under IOS app > Developer Tools > Services
I don’t have any idea now how to recover IOS notication?
Check log file shows

2020-08-19 13:24:50 ERROR (SyncWorker_8) [custom_components.icloud3.device_tracker]  iCloud3 Error > Xr (iphonexr), iphonexr > iOS App Entity device_tracker.iphonexr_2 does not contain location attributes (latitude, longitude). iCloud3 will be restarted in the 10 minutes if this error continues.. -------------------------. Attributus-not_set, {}

AHHH … IOS notification now is coming back after I restart my iphone
I guess the setting of my iphone somehow screw up

btw, my tracker config

device_tracker:
  - platform: icloud3
    username: "[email protected]"
    password: "xxx"
    tracking_method: famshr
    track_devices:
      - iphonexr > /local/iphonexr.jpg
      - iphonese > /local/iphonese.jpg

Another issue I found since upgraded to v2.2, my iphonese does not set zone to home although entity state already show home. This does not happen in v2.1
icloud3 log shows

Current Entities State in Developer Tools

 device_tracker.iphonese	home	source_type: gps
                                    latitude: 37.49
                                    longitude: -121.9206
                                    gps_accuracy: 0
                                    scanner: AsusWrtDeviceScanner
                                    name: Se
                                    zone: not_set
                                    last_zone: not_set
                                    zone_timestamp: 
                                    interval: 15 sec
                                    travel_time: 
                                    zone_distance: 0
                                    calc_distance: 0
                                    waze_distance: 0
                                    last_located: 00:00:00
                                    last_update: 2:14:45
                                    next_update: 2:15:00
                                    poll_count: 0:0:147
                                    dir_of_travel: 
                                    travel_distance: 0
                                    trigger: iCloud3@00:00:00
                                    timestamp: 2020-08-19 14:14:47
                                    authenticated: 
                                    battery: 0
                                    battery_status: 
                                    info: ●● No Location Coordinates, (0.0, 0.0) ●●
                                    altitude: 0
                                    vertical_accuracy: 0
                                    device_status: 
                                    low_power_mode: 
                                    group: group1
                                    entity_picture: /local/iphonese.jpg
                                    tracking:  iphonexr ( ... _2), iphonese ( ... _2) (FamShr)
                                    icloud3_version: 2.2.0rc11b
                                    ip: 10.168.1.79
                                    friendly_name: IPHONESE
                                    icon: mdi:cellphone-basic

Just a suggestion…try making your ‘home’ zone larger in radius. You may not be triggering entry into your ‘home’ zone.

I don’t think this is zone radius issue since my other iphonexr doesn’t have this issue
But I enlarge zone radius anyway, and as expected problem still exist
As I mention earlier, icloud3 v2.1 doesn’t have this issue
Below is icloud3 log for my iphonexr

Thank you Gary,

RC11b seems to have completely solved my issue. Everything is back to normal now! :slight_smile:

Also find this error while updating HA 0.114.2

2020-08-19 20:02:32 ERROR (SyncWorker_26) [custom_components.icloud3.device_tracker] 'notify'
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/icloud3/device_tracker.py", line 1165, in _start_icloud3
    notify_services = dict(services.__dict__)['_services']['notify']
KeyError: 'notify'

Some more log info regarding this

2020-08-19 20:17:02 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] Initialize Data Fields > iphonese
2020-08-19 20:17:02 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] ◆iphonese◆ SETUP BASE KWARGS zone_name-None, inzone-state-True
2020-08-19 20:17:02 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] ◆iphonese◆ WRITE Attrs ___ (_start_icloud3)
2020-08-19 20:17:02 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] ◆iphonese◆ WRITE Last State-not_set, This State-home
2020-08-19 20:17:02 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] ◆iphonese◆ WRITE Attrs-{'gps': (37.49, -121.9206), 'battery': 0, 'gps_accuracy': 0}{'name': 'Se', 'zone': 'not_set', 'last_zone': 'not_set', 'zone_timestamp': '', 'interval': '', 'zone_distance': 0, 'calc_distance': 0, 'waze_distance': 0, 'last_located': '00:00:00', 'last_update': '00:00:00', 'next_update': '00:00:00', 'poll_count': '0:0:0', 'dir_of_travel': '', 'travel_distance': 0, 'trigger': 'iCloud3@00:00:00', 'timestamp': '2020-08-20T03:17:02', 'battery': 0, 'info': '● HA is initializing dev_trk attributes ●', 'vertical_accuracy': 0}
2020-08-19 20:17:02 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] ◆iphonese◆ Set up sensor name for device, devicename-iphonese, entity_base-iphonese
2020-08-19 20:17:02 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] Initialize Sensors > iphonese

and also

2020-08-19 20:17:22 INFO (SyncWorker_30) [custom_components.icloud3.device_tracker] ◆iphonese◆ Se (iphone) Refreshed FamShr iCloud location data
2020-08-19 20:17:22 INFO (SyncWorker_30) [custom_components.icloud3.device_tracker] ◆iphonese◆ SETUP BASE KWARGS zone_name-None, inzone-state-True
2020-08-19 20:17:22 INFO (SyncWorker_30) [custom_components.icloud3.device_tracker] ◆iphonese◆ WRITE Attrs ___ (DetIntlErrorRetry)
2020-08-19 20:17:22 INFO (SyncWorker_30) [custom_components.icloud3.device_tracker] ◆iphonese◆ WRITE Last State-not_set, This State-home
2020-08-19 20:17:22 INFO (SyncWorker_30) [custom_components.icloud3.device_tracker] ◆iphonese◆ WRITE Attrs-{'gps': (37.49, -121.9206), 'battery': 0, 'gps_accuracy': 0}{'last_update': '8:17:15', 'interval': '15 sec', 'next_update': '8:17:30', 'poll_count': '0:0:1', 'info': '●● No Location Coordinates, (0.0, 0.0) ●●', 'timestamp': '2020-08-19 20:17:22', 'name': 'Se', 'trigger': 'iCloud3@00:00:00'}
2020-08-19 20:17:22 INFO (SyncWorker_31) [homeassistant.components.proximity] IPHONESE: proximity calculation complete
2020-08-19 20:17:23 INFO (SyncWorker_30) [custom_components.icloud3.device_tracker] ◆iphonese◆ ▲▲▲.FAMSHR.▲▲▲.IPHONESE-GROUP1-HOME.▲▲▲▲▲▲.STATE-HOME.▲▲▲▲▲▲.NEXT.UPDATE.TIME.▲▲▲

@dony1971
There is a message in your log file “ IPHONESE: proximity calculation complete”. You need to Remove the HA proximity component. It will mess things up and it’s function is duplicated by iCloud3.

If your problem continues, please open an issue on GitHub rather than posting any the screenshots, Log file info and other stuff here. I’m havinga hard time keeping up with everything. Thanks.

1 Like

I remove proximity but issue still persist
I will open issue on your github