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

@baestro All the information I have was from the iOS App Forum and issues/responses raised by others. From what I read, the change happened in iOS 13 and effected the way the iOS App updates the last_update_trigger sensor. The device’s location information is still being updated correctly.

I have uploaded v2.2.0 Release Candidate to the development v2.2.0 iCloud3 GitHub directory that added some new tracking features (see the Change Log). One of them was to create a location change trigger that is detected when the location is changed and the last_update_time is changed. I’ll be posting more information about it’s availability in the next few days. But it appears solid and you might want to check it out.

The other major change is the ability to use the Family Sharing tracking method and log into the 2fa iCloud account. Using this method, you do not have to create the non-2fa account, set up the devices you want to track and monitor the location with the Find-my-Friends tracking method. Both methods are available so you now have a choice as to the tracking method to use.

1 Like

@b1nuzz It happens. There are times when my wife’s phone tracks better than mine. I get ‘old location’ notifications with iCloud3 and she doesn’t. Then it settles down. A lot of times, but not always, restarting the phone ties it in to a better cell tower and the location is updated more timely. There are a lot of variables, most of it being cell towers, cell reception, iCloud servers, etc. None of which we have control over.

More information on the sensor update issue:
Mobile App never updates sensors after initial setup #35812

1 Like

You may see error messages similar to this when HA starts:

  • Entity id already exists - ignoring: sensor.gc_last_update_trigger_mobapp. Platform mobile_app does not generate unique IDs
  • Entity id already exists - ignoring: sensor.lc_last_update_trigger_mobapp. Platform mobile_app does not generate unique IDs

This is a known iOS App issue that has been around for a few versions and can be ignored.

1 Like

@gcobb321 Firstly, thank you for your response and direction, I will certainly check it out.

Thank you!

Thanks for the heads up!. Upon HA restart I didn’t see the any of the errors you described. I did however see the following error:

Logger: custom_components.icloud3_dev.device_tracker
Source: custom_components/icloud3_dev/device_tracker.py:656
Integration: icloud3_dev
First occurred: 5:28:20 PM (6 occurrences)
Last logged: 5:31:15 PM

'dict' object has no attribute 'find'
Traceback (most recent call last):
  File "/config/custom_components/icloud3_dev/device_tracker.py", line 2635, in _update_location_data
    self.log_debug_msg(devicename, location_data)
  File "/config/custom_components/icloud3_dev/device_tracker.py", line 7192, in log_debug_msg
    if (self.log_level_eventlog_flag and instr(log_msg, 'None (None)') == False):
  File "/config/custom_components/icloud3_dev/device_tracker.py", line 656, in instr
    return string.find(find_string) >= 0
AttributeError: 'dict' object has no attribute 'find```

PS: iCloud3 appears to be updating correctly, but I'll need to test while moving in and out of my zones. Cheers!

First off thanks for this plugin, a lot of my tracking woes are resolved!

I am using the FmF and iOS 2 app and have noticed that the battery attributes are 0 or blank which is expected since the docs say:

The battery level of the device. This is not available for the Find-my-Friends tracking method or when using the IOS App version 2.

I understand why iCloud does not use FmF battery data since it does not report but my device tracker for the iOS app shows ‘battery_level’ could this not be combined into the iCloud3 data?

EDIT: My wife went out and now the iCloud3 device tracker is showing a battery value which matches the iOS battery level. My phone still shows 0 but 50 on the iOS sensor.

@MattEL The iOS battery sensor could be scanned for the current value. I’ll look into it.

I have been using the following card in lovelace:

entities:
  - entity: sensor.icloud3_event_log
    icon: 'mdi:information-outline'
    type: 'custom:icloud3-event-log-card'
show_header_toggle: false
title: Tracking Info
type: entities

And I just noticed I’ve been getting this error. I have the iCloud3 repository installed. Should a card exist in the front end?

Custom element doesn't exist: icloud3-event-log-card.
entity: sensor.icloud3_event_log
icon: 'mdi:information-outline'
type: 'custom:icloud3-event-log-card'

I have a directory In my home assistant root directory named custom_components/ which has the directories hacs and icloud3. I’m assuming this is the directory that I need to point to in order to use the card. I’ve tried everything to no avail. Like:

/local/custom_components/icloud3/icloud3-event-log-card.js?v=1.000

Any ideas?

@FutureTense My set up is as follows:

configuration.yaml contains:

  mode: yaml
  resources:
    - url: /local/custom_cards/icloud3-event-log-card.js
      type: module

lovelace.yaml contains:

  - title: iCloud Event Log
    icon: mdi:information-outline 
    cards: 
      - type: custom:icloud3-event-log-card
        entity: sensor.icloud3_event_log

icloud3-event-log-card.js in in the config\www\custom_cards directory

iCloud3 v2.2.0 Release Candidate Update
Release Candidate 4 has been uploaded to the iCloud3 Development directory in the iCloud3 repository here. The Change Log details the changes but the highlights are:

  • A new trigger has been added that will update the device’s information the when the iOS App device tracker location data is changed. This provides a work around to the current problem where the iOS App’s triggers are not being logged by HA.
  • The Family Sharing tracking method works and supports 2fa accounts.
  • A special config_ic3.py configuration file lets specify most of the iCloud3 parameters. It is read when HA starts and when iCloud3 is restarted using the Event Log screen. You can specify the devices to be tracked, intervals, timings, log levels, operational items, etc. without restarting HA.
  • Several new configuration parameters.
  • The Event Log is smaller and information that has not changed since the last event is no longer displayed which improves the readability.
  • A lot of tuning has reduced the number of calls to the iCloud Web Services. This improves the performance in poor cell areas.
  • Improved zone exit monitoring for GPS wandering.
  • Other bug fixes, code optimization, cleanup, etc.

The Change Log contains instructions on how to install this development version in another directory so you still have the v2.1.0 version to fall back on if you encounter problems.

Although it has been extensively tested, you may encounter a problem. If so, create an issue on the iCloud GitHub repository here and indicate the version of HA you are running.

1 Like

I don’t have that directory. How is it created? Does this occur when you install with HACS? I’ve tried uninstalling iCloud3 with HACS, but it’s not being removed. Do you know how to fix this?

@FutureTense What kind of setup do you have? - Raspberry Pi? Windows10 that can log into the RPi? Are you familiar with Windows Explorer? Do you have the HA File Editor installed? Do you have Samba Share installed? Have you ever mapped a network drive?

If you do not have a lot technical/computer experience, wait until the next HACS release. I am going to try and have the Event Log automatically installed into the correct directory.

But basically, you are going to have to access the RPi file system, go to the ‘\config’ directory, make the ‘www’ directory, then go to the ‘www’ directory and copy the Event Log file to that location.

@gcobb321 yeah, I’ve got the technical chops. I was just assuming HACS would put everything where it belonged. And turns out I had to completely rebuild my HACS integrations in order to reinstall iCloud3 and noticed the file wasn’t being copied over there.

2020-06-03 15:15:25 ERROR (SyncWorker_9) [custom_components.icloud3.device_tracker] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 5661, in _setup_tracked_devices_for_fmf
    for contact in contacts:
TypeError: 'NoneType' object is not iterable

I have been struggling all day unfortunately trying to get everything running. I finally found this error in my logs. I am running HassIO on a Pi3. I am running the latest versions of pretty much everything, HassIO, icloud3, IOS, HAiOS, etc. Not sure what is going on.

This is my tracker setup. device_tracker is in my main config.

Copy to clipboard

# iCloud3
  - platform: icloud3
    username: !secret icloud3_user
    password: !secret icloud3_pass
    track_devices:
      - ross_iphone_ic3 > [email protected], ross.jpg

Any help would be greatly appreciated.

Just a guess, but do you have associated contact info at icloud.com?

I’ll be honest I don’t know what feature that is but I’ll investigate…

Ok I checked and didn’t find anything specifically calling it that. Are you referring to perhaps multiple phones, google contact sync, or Facebook contact sync?

Find my Friends(fmf) tracking requires contact information for each tracked device. You’d need to login to your Non-2fa iCloud account and create the contact for your device. I’m guessing your attempting to use fmf based on the error you posted.

Check out the ic3 documentation on how fmf is setup. If you want to use your @fa account, you need to specify that as part of the config: tracking_method: famshr

My device_tracker.yaml (altered to hide personal info):

  - platform: icloud3
    username: !secret icloud_user 
    password: !secret icloud_passwd
    group: tracking
    tracking_method: famshr
    track_devices:
      - user > [email protected], pic.jpg, User
      - user2 > [email protected], pic2.jpg, User2
    unit_of_measurement: mi
    gps_accuracy_threshold: 75
    stationary_inzone_interval: '15 min'
    stationary_still_time: '10 min'
    old_location_threshold: '3 min'
    inzone_interval: '2 hrs'
    ignore_gps_accuracy_inzone: true
    travel_time_factor: .6
    hide_gps_coordinates: false
    distance_method: waze
    waze_region: US
    waze_min_distance: 1
    waze_max_distance: 9999
    waze_realtime: false
    exclude_sensors: alt,bat,batstat,zon2,zon3,lzon2,lzone3

@martoq. Follow the step-by-step instructions in the iCloud3 documentation on setting up your iCloud account here. See #2.

Thank you. That was indeed the problem. I am tracking now. Still messing with the sensors though. Battery is 0.

Thank you again for all your work on this!