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

@gcobb321 device_tracker.iphone_marco state Home

source_type: gps
latitude: xx.yyyyy
longitude: xx.yyyyy
gps_accuracy: 65
zone: home
last_zone: home
zone_timestamp: '03/07/20, 17:22:42'
interval: 2 hrs
travel_time: ''
zone_distance: 0
calc_distance: 0
waze_distance: ''
last_located: '17:23:32'
last_update: '17:23:35'
next_update: '19:23:30'
poll_count: '2:2:0'
dir_of_travel: in_zone
travel_distance: 0
info: ''
battery: 0
battery_status: null
altitude: 0
vertical_accuracy: 0
device_status: 0
low_power_mode: null
trigger: 'NextUpdateTime@17:23:30'
timestamp: '2020-03-07T17:23:35'
authenticated: '03/07/20, 17:22:30'
group: family
tracking: ' iphone_marco(iphone_marco_2)'
icloud3_version: 2.0.5
friendly_name: Marco

and device_tracker.iphone_marco_2 state unknown

source_type: gps
friendly_name: iPhone Marco

i deleted and readded mobile app integration 2 or 3 times but nothing changed.

Zones are correctly configured I think

hidden: true
latitude: ***
longitude: ***
radius: 100
passive: false
editable: true
friendly_name: Casa
icon: 'mdi:home'

Hi,
I have installed the iCloud3 from HACS but I have no idea what to do next
this add-on not adding any entity?
the event log need to add only to the ui.yaml? if I want to keep using the UI Lovlace and iCloud3 device tracker I can do that?

@Barak_Michaeli The first thing you need to do is to review the iCloud3 documentation on the iCloud3 GitHub repository here. It explains everything, has many examples and will get you going.

after reading it I have the question above, its not clear from the guide what need to do next, I need to look for some entity? how to proceed after the installation ?

The Welcome to iCloud3 Chapter has 3 sections - Introduction, Setting up your iCloud Account & Setting up iCloud3.

Follow the steps in Setting up your iCloud Account and then Setting up iCloud3.

I’m seeing similar issues, along with errors in the HA logs (here)

@B1G The editable: true attribute indicates you created the zone using the Configuration/Zone screen. Have you tried deleting them and then setting up the zones using a zone.yaml file instead?

You will need to force close and restart the iOS app after making changes to zone config to reload the zone data. It doesn’t look like Home Assistant pushes zone changes to the iOS app automatically.

iCloud3 v2.1 Release Candidate is now available on the iCloud3 repository.

  • Download it from the development v2.1 directory here.
  • The complete Change.log is here.

Overview of the changes:

  • Major enhancements to the iCloud3 Event Log card including the information reported on the card, visual improvements, debug logging from the card and others.
  • Major changes to how Stationary Zones are set up, located, displayed and used.
  • Updates, bug fixes and enhanced missing data error trapping for device tracking.
  • New sensors.

I will be finishing the v2.1 documentation and making it available for general release this coming weekend if no problems are discovered. I’ve been using it for a few weeks and have only been tweaking the Event Log messages so it’s pretty safe to download and use.

  • Move the Event Log file (icloud3-event-log-card.js) to where your lovelace custom cards are stored.
  • Move the other files (device_tracker.py, pyicloud-ic3.py) to the custom_components/icloud3 directory.

Let me know if you run into any issues.

Thanks

Gary, aka geekstergary

so I have created new iCloud account without 2fa on my iPod and send a friend request to my iPhone, I am able to see the iPhone from the iCloud web site.
I have added again the iCloud integration to HA but I can’t see my iPhone, I can see only the iPod, what am I missing?

@Barak_Michaeli. You said you had “readded the iCloud integration to HA”. Are you talking about the iCloud you add on the Configuration/Integration screen? Or the iCloud3 custom commoner you add as a device tracker in a tank file?

If iCloud3, there are some links to Apple help pages here that might give you some things to check so you can get your devices to share their location. Make sure you are signed into the non-2fa account to see the shared devices.

If you are using the iCloud integration that is part of HA, that is a different program and you’ll need to go to the HA forums for assistance.

I deleted zones and readded using zone.yaml, deleted mobile app integration and reinstalled the home assistant app in all iPhones but It doesn’t work

here the log after a iclud3 restart

2020-03-15 14:21:11 INFO (SyncWorker_11) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_marco, Command: event_log <WARN>
2020-03-15 14:21:11 INFO (SyncWorker_11) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_marco Processed
2020-03-15 14:21:11 INFO (SyncWorker_11) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_marco, Command: event_log . <WARN>
2020-03-15 14:21:13 INFO (SyncWorker_8) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_marco, Command: event_log <WARN>
2020-03-15 14:21:13 INFO (SyncWorker_8) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_marco Processed
2020-03-15 14:21:13 INFO (SyncWorker_8) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_marco, Command: event_log . <WARN>
2020-03-15 14:21:18 INFO (SyncWorker_0) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_silvia, Command: event_log <WARN>
2020-03-15 14:21:18 INFO (SyncWorker_0) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_silvia Processed
2020-03-15 14:21:18 INFO (SyncWorker_0) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_silvia, Command: event_log . <WARN>
2020-03-15 14:21:19 INFO (SyncWorker_16) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_silvia, Command: event_log <WARN>
2020-03-15 14:21:19 INFO (SyncWorker_16) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_silvia Processed
2020-03-15 14:21:19 INFO (SyncWorker_16) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_silvia, Command: event_log . <WARN>
2020-03-15 14:21:20 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_marco, Command: event_log <WARN>
2020-03-15 14:21:20 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_marco Processed
2020-03-15 14:21:20 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_marco, Command: event_log . <WARN>
2020-03-15 14:21:40 ERROR (SyncWorker_15) [custom_components.icloud3.device_tracker] 'friendly_name'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 905, in restart_icloud
    self._initialize_zone_tables()
  File "/config/custom_components/icloud3/device_tracker.py", line 5358, in _initialize_zone_tables
    self.zone_friendly_name[zone_name] = zone_data[ATTR_FRIENDLY_NAME]
KeyError: 'friendly_name'
2020-03-15 14:21:40 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] iCloud3 v2.0.5 Initalization > Stage 2, Setting up tracked devices
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Decoding > iphone_marco > [email protected], /local/images/marco.jpg, Regione
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Scanning </config/.storage/core.entity_registry> for entity registry for IOS App v2 device_tracker for <iphone_marco>
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Matched IOS App v2 entity <iphone_marco_2> with iCloud3 tracked_device <iphone_marco>
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Matched IOS App v2  <sensor.iphone_marco_last_update_trigger> with iCloud3 tracked_device <iphone_marco>
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Decoding > iphone_silvia > [email protected], /local/images/silvia.jpg, Crass
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Scanning </config/.storage/core.entity_registry> for entity registry for IOS App v2 device_tracker for <iphone_silvia>
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Matched IOS App v2 entity <iphone_silvia_2> with iCloud3 tracked_device <iphone_silvia>
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Matched IOS App v2  <sensor.iphone_silvia_last_update_trigger> with iCloud3 tracked_device <iphone_silvia>
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Tracking (IOSApp) > iphone_marco ([email protected])
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] IOS App v2 monitoring > device_tracker.iphone_marco_2, sensor.iphone_marco_last_update_trigger
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Tracking (IOSApp) > iphone_silvia ([email protected])
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] IOS App v2 monitoring > device_tracker.iphone_silvia_2, sensor.iphone_silvia_last_update_trigger
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Tracking Devices >  iphone_marco(iphone_marco_2), iphone_silvia(iphone_silvia_2)
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] iCloud3 v2.0.5 Initalization > Stage 3, Setting up iphone_marco
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Stationary Zone Set > iphone_marco_stationary, GPS-(90, 180)
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] iCloud3 v2.0.5 Initalization > Stage 3, Setting up iphone_silvia
2020-03-15 14:21:41 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] Stationary Zone Set > iphone_silvia_stationary, GPS-(90, 180)
2020-03-15 14:21:43 INFO (SyncWorker_15) [custom_components.icloud3.device_tracker] iCloud3 v2.0.5 Initalization > Stage 4, Locating devices
2020-03-15 14:21:45 ERROR (SyncWorker_0) [custom_components.icloud3.device_tracker] iCloud3 Error: IOS App v2 Entity device_tracker.iphone_marco_2 does not contain location attributes (latitude, longitude). Refresh & restart IOS App on device, request a Manual Refresh, check Developer Tools>States entity for location attributes, check HA integrations for the entity. Restart HA or issue 'device_tracker.icloud3_reset' Service Call. Reverting to IOS App v1.
2020-03-15 14:21:45 ERROR (SyncWorker_0) [custom_components.icloud3.device_tracker] iCloud3 Error: IOS App v2 Entity device_tracker.iphone_silvia_2 does not contain location attributes (latitude, longitude). Refresh & restart IOS App on device, request a Manual Refresh, check Developer Tools>States entity for location attributes, check HA integrations for the entity. Restart HA or issue 'device_tracker.icloud3_reset' Service Call. Reverting to IOS App v1.
2020-03-15 14:21:45 INFO (SyncWorker_0) [custom_components.icloud3.device_tracker] iphone_marco(None) State Change Detected for iphone_marco > not_set to casa
2020-03-15 14:21:45 ERROR (SyncWorker_0) [custom_components.icloud3.device_tracker] iCloud3 Error: An error was encountered processing device `location`request - Unable to find service notify/ios_iphone_marco
2020-03-15 14:21:45 INFO (SyncWorker_0) [custom_components.icloud3.device_tracker] iphone_silvia(None) State Change Detected for iphone_silvia > not_set to casa
2020-03-15 14:21:45 ERROR (SyncWorker_0) [custom_components.icloud3.device_tracker] iCloud3 Error: An error was encountered processing device `location`request - Unable to find service notify/ios_iphone_silvia
2020-03-15 14:21:48 INFO (SyncWorker_9) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_marco, Command: event_log <WARN>
2020-03-15 14:21:48 INFO (SyncWorker_9) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_marco Processed
2020-03-15 14:21:48 INFO (SyncWorker_9) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_marco, Command: event_log . <WARN>
2020-03-15 14:21:50 INFO (SyncWorker_6) [custom_components.icloud3.device_tracker] iphone_marco(None) Device Tracking Complete, Results-BaseZone-home > Zone-home, GPS-(43.510312, 13.261564), Interval-2 hrs, Dist-0 km, TravTime- (in_zone), NextUpdt-16:21:45, Located-13:21:41 (1 hrs ago)
2020-03-15 14:21:51 INFO (SyncWorker_19) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_silvia, Command: event_log <WARN>
2020-03-15 14:21:51 INFO (SyncWorker_19) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_silvia Processed
2020-03-15 14:21:51 INFO (SyncWorker_19) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_silvia, Command: event_log . <WARN>
2020-03-15 14:21:51 INFO (SyncWorker_6) [custom_components.icloud3.device_tracker] iphone_silvia(None) Device Tracking Complete, Results-BaseZone-home > Zone-home, GPS-(43.510312, 13.261564), Interval-2 hrs, Dist-0 km, TravTime- (in_zone), NextUpdt-16:21:45, Located-13:21:41 (1 hrs ago)
2020-03-15 14:21:52 INFO (SyncWorker_3) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_silvia, Command: event_log <WARN>
2020-03-15 14:21:52 INFO (SyncWorker_3) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_silvia Processed
2020-03-15 14:21:52 INFO (SyncWorker_3) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_silvia, Command: event_log . <WARN>
2020-03-15 14:21:54 INFO (SyncWorker_16) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_marco, Command: event_log <WARN>
2020-03-15 14:21:54 INFO (SyncWorker_16) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_marco Processed
2020-03-15 14:21:54 INFO (SyncWorker_16) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_marco, Command: event_log . <WARN>
2020-03-15 14:21:55 INFO (SyncWorker_11) [custom_components.icloud3.device_tracker] iphone_marco(None) Device Tracking Complete, Results-BaseZone-home > Zone-home, GPS-(43.510312, 13.261564), Interval-2 hrs, Dist-0 km, TravTime- (in_zone), NextUpdt-16:22:00, Located-14:21:50 (5 sec ago)
2020-03-15 14:21:55 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] iCloud3 Command Entered, Group: family, Device: iphone_marco, Command: event_log <WARN>
2020-03-15 14:21:55 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] Checking Update iCloud Service for family-iphone_marco Processed
2020-03-15 14:21:55 INFO (SyncWorker_12) [custom_components.icloud3.device_tracker] iCloud3 Command Processed, Group: family, Device: iphone_marco, Command: event_log . <WARN>
2020-03-15 14:21:56 INFO (SyncWorker_11) [custom_components.icloud3.device_tracker] iphone_silvia(None) Device Tracking Complete, Results-BaseZone-home > Zone-home, GPS-(43.510312, 13.261564), Interval-2 hrs, Dist-0 km, TravTime- (in_zone), NextUpdt-16:22:00, Located-14:21:52 (3 sec ago)

@B1G

  • There are still several things going on with the Zones. The Zone friendly name is actually the name of the zone specified in the zone.yaml file so I am not sure why it is generating an error. Look in Developer Tools>States, scroll to the bottom and compare the attributes of all of the zones to see if one is missing anything. One of my zones looks like:
hidden: true
latitude: 27.643783
longitude: -80.36151
radius: 70
passive: false
editable: false
friendly_name: Quail
icon: mdi:ferry
  • There is a new iCloud3 Release Candidate here. There are many changes (see the Change.log for the details) but one change includes a check for the zone friendly name being not available, a new Event Log card with a Debug mode, the ability to restart iC3 and more information is being displayed during initialization. The new Event Log may point to what is going on.

  • Download the updated files to the appropriate locations and lets see what is going on. The Changelog contains some sample screens of the Event Log and a note about what you need to do if the new buttons are not displayed.

Edit: 3/17 Let me know if the update solves your problem. I haven’t released it yet and want to make sure you are ok before I do. And to make fixes if it doesn’t.

iCloud3 v2.1 is available for download here

I’ve updated iCloud3 to add a few new features and to take care of some issues. The Event Log card has also been updated to make it easier to view events, display debug log information on the Event Log and to restart iCloud3 to view startup errors without restarting HA or going through the HA log.

Below is an overview of the new and changed items while the ChangeLog in the documentation lists each item in more detail.

Device Tracking

  • Added checks to recover when no contact data was returned from iCloud Location Services during setup
  • You can specify the device users name on the track-device configuratio
  • Added raw data debug logging
  • Internal changes.

Stationary Zone

  • Changed location of initial Stationary Zone to .5km north or south of the Home Zone
  • The Stationary Zone is not hidden when you exit it
  • Icons associated with the device are displayed on the HA maps
  • The Stationary Zone is relocated as you move within it

Event Log card

  • Added highlighting to major actions
  • The start-finish tracking activity sequence is tied together to easily identify the trigger results.
  • Added Debug & Restart-iC3 buttons
  • The sensor.icloud3-event-log entity is reset to only show the last 15 items after 5-minutes to reduce it’s size
  • Other visual enhancements

Other enhancements

  • iCloud3 Sensor Changes
  • pyicloud-ic3 Support Program Enhancements

See the ChangeLog in the documentation for a detailed list of the enhancements

Hi,

I just managed to get it setup but have some issues in the log:
Error > Event Log v.1.0 is being used. Clear your browser cache or add'?v=2.1' to the ui.

I’ve added the following to configuration.yaml

lovelace:
  mode: yaml
  resources:
  - url: /local/custom_cards/icloud3-event-log-card.js?v=2.1
    type: js

What could be the problem? I’ve cleared the cache multiple times and tried different browsers.

Also. Currently I have one device_tracker from the HA app. and one tracker from icloud3 configuration. Should they co-exists and should I add both to the person?

The Lovelace Dashboard tool shows the event log card as deprecated. Still working on 107.5, but thought I’d mention it.

@Daniel_Lim

  1. I have had problems with new versions of the Event Log card showing up too. Changing the version number would cause the browser to reload the Event Log instead of using it from the cache. However, when going into ‘Inspect’ mode in Chrome, the HTML link to the Event Log still showed the old version number. It was acting like HA/Lovelace was not reloading the configuration information. I suspect it is because of moving the Lovelace resources from the ui-lovelace.yaml file to the configuration.yaml file but can not put my fingure on it. First try restarting HA. If that does not work, try changing the version back to 1.0 (?v=1.0) and see what happens.
  2. You will have a device_tracker for the iOS App and a second one for iCloud3. But the names must be different. The iCloud3 name will be the one on the track_devices parameter (e.g. gary_iphone) and the iOS App will be the one with the suffix (e.g., gary_iphone_mobapp).

@GaryK I still using the Lovelace yaml mode and have not moved to the dashboard. I’ll check it out when I get a chance. I just updated to 0107.1 a few days ago and everything was fine there. Looks like a lot of HA fixes on 3/20 & 3/21 to get to 0.107.5.

Edit: I just upgraded to 0.107.5 and did not see any exceptions in the HA log file for the Event Log card so it must have something to do with the Lovelace Dashboard.

  1. I changed it to v=1.0 and even tried to remove it. Have restarted HA multiple times. Still the same message.
  2. So should I connect both of the trackers to a person?

@Daniel_Lim

  1. I moved the Lovelace resources back to ui-lovelace.yaml file. See if that makes a difference while using the ?v=2.1 suffix.
  2. You can if you want to but iCloud3 doesn’t have any ties to a person. ic3 tries to decode the users name from the devicename but, if it is not what you want, you can specify the person/user name on the track_devices parameter line.

Edit:
3. Does the new version load on your iphone or ipad or a different computer?

Not seeing this with the latest.

Update: Working now. I think.