iCloud3 v2.0 Device Tracker - Advanced tracking features with HA iOS App integrated monitoring (Updated)

Hi everyone… still a HA newbie but have updated from the iphone to iphone3 plugin and love the new capabilities. Just one thing: is it possible to hide all of the sensors? (I think that’s what they’re called? - the circles @ top of overview with direction, speed, next poll time, etc) My overview has at least 150 of these and it clogs the view. This might be more a general HA question and not iphone3-specific… dunno?

@ericcwebb Version 2.0 has 2 new configuration parameters that let you exclude a list of sensors or exclude all sensors except the ones you specify.

Code is ready but I have to finish the docs. Everything should be done in a few days.

1 Like

Hello @gcobb321 how are you?
first setup of icloud3 and I’m getting this error:

2019-10-09 22:49:11 ERROR (SyncWorker_4) [custom_components.icloud3.device_tracker] ‘NoneType’ object is not iterable
Traceback (most recent call last):
File “/config/custom_components/icloud3/device_tracker.py”, line 4982, in _setup_tracked_devices_fmf
for contact in fmf.contacts:
TypeError: ‘NoneType’ object is not iterable

any help?
thanks!

Assuming you are running v1.1.0beta8, the line you refer to is trying to cycle through the devices using the Find-my-Phone tracking method but no device information was returned from iCloud.

  1. Check the ‘device_tracker._tracking’ attribute to see if any devices are are listed. It should show something like ‘gary_iphone’.
  2. Restart HA and check the HA log file. Entries show what devices are being tracked.
  3. Check the iCloud3 Event Log custom Lovelace Card after startup to see some of the same information.
  4. Make sure iCloud is up and running and you can use the Find My or Find My Friends app to locate yourself and your friends.
  5. Was it working before and now stopped? That might indicate a problem accessing your iCloud account.

If everything seems OK, repost with the version of iCloud3 you are running and your iCloud3 config parameters.

iCloud3 v2.0 Release Candidate is now available

This is a major update to iCloud3 with many new features.

  • Support iCloud tracking methods Find-my-Friends and Family Sharing (2fa accounts with notifications and non-2fa accounts without notifications)
  • Support HA IOS app tacking method (version 1 & version 2)
  • iCloud3 Event log Lovelace custom card
  • Many new attributes & sensors
  • Customize the list of sensors that are created
  • Track devices from multiple zones
  • Updated and reformatted documentation
  • Many new and updated automations, scripts and Lovelace cards
  • And much more…

There are many breaking changes in this release. Be sure to review the Change Log in the iCloud3 Documentation

This is the release candidate in the icloud3_dev repository. It will be promoted to General Availability on 10/27/2019 if there are no unforeseen issues.

  • Complete documentation with all enhancements and breaking changes can be found here
  • Download iCloud3 v2.0rc here
  • The iCloud3 Development Repository is here
2 Likes

Good Morning Gary. This morning I’ve been working to integrate your new version. I have it running in fmf mode for two devices. The HA error log is filling with:

2019-10-24 08:49:12 ERROR (SyncWorker_17) [custom_components.icloud3.device_tracker] 'zone_distance'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 3440, in _get_distance_data
    last_dist_from_zone_s  = attrs[ATTR_ZONE_DISTANCE]
KeyError: 'zone_distance'
2019-10-24 07:31:35 ERROR (SyncWorker_5) [custom_components.icloud3.device_tracker] ►►INTERNAL ERROR-RETRYING (_get_distance_data:SetupLocation-'zone_distance')

The above appears in sensor.gary_info. I have piss-poor cell coverage at home. Phones run on wifi calling.

In addition to the repeating error above, I’m getting hundreds of these:

2019-10-24 08:49:12 ERROR (MainThread) [homeassistant.components.device_tracker] The see service is not supported for this entity device_tracker.gary
2019-10-24 07:31:35 ERROR (MainThread) [homeassistant.components.device_tracker] The see service is not supported for this entity device_tracker.gryphon

The see errors were occurring in a previous version. HA 0.100.3, iOS App build 68, iPhone 8 and 7 running 13.1.3. FMF is running on an iPhone 5 @ 10.3.4

I’d also like to know how I could limit the icloud3 event log from filling the states page.

Am I reading the documents correctly that if you have 2FA enabled this is basically useless? That is definitely kind of a bummer (but understand it’s out of your control). Perhaps I can use a dummy iCloud account added as a family member though.

@shauder If you have 2fa set up on your account, then you will get constant notifications.

The Find-my-Friends tracking method was add to get around this problem. With Find-my-Friends, you create another iCloud account on a computer, do not implement 2fa on this account and then add friends to track to this account. It is discussed in detail in the iCloud3 documentation in the Setting up your iCloud Account chapter.

Thanks I was reading that. I seem to be getting these errors when I set it up using fmf or Family sharing.

Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 3440, in _get_distance_data
    last_dist_from_zone_s  = attrs[ATTR_ZONE_DISTANCE]
KeyError: 'zone_distance'
►►INTERNAL ERROR-RETRYING (_get_distance_data:SetupLocation-'zone_distance')
The see service is not supported for this entity device_tracker.ishane
- platform: icloud3
  username: non-2fa account email
  password: !secret password
  tracking_method: fmf
  track_devices:
    - ishane > 2fa account email > images/shane.jpg

iCloud3 v2.0 Release Candidate is now available (Updated Fri, 10/25)

This is a major update to iCloud3 with many new features.

  • Support iCloud tracking methods Find-my-Friends and Family Sharing (2fa accounts with notifications and non-2fa accounts without notifications)
  • Support HA IOS app tacking method (version 1 & version 2)
  • iCloud3 Event log Lovelace custom card
  • Many new attributes & sensors
  • Customize the list of sensors that are created
  • Track devices from multiple zones
  • Updated and reformatted documentation
  • Many new and updated automations, scripts and Lovelace cards
  • And much more…

There are many breaking changes in this release. Be sure to review the Change Log in the iCloud3 Documentation. Manyu configuration parameters have been replaced with the new ‘track_devices’ parameter and the device_tracker service calls have been changed from icloud_svcname to icloud3_svcname

This is the release candidate in the icloud3_dev repository. It will be promoted to General Availability in a week around 11/3 if there are no unforeseen issues.

  • Complete documentation with all enhancements and breaking changes can be found here
  • Download iCloud3 v2.0rc here
  • The iCloud3 Development Repository is here
1 Like

@shauder, @garyk

  1. I can not duplicate the ‘zone_distance’ error message you are getting but it may be caused by using a previous version of iCloud3. The ‘distance’ attribute was changed to ‘zone_distance’ to avoid conflicts with the IOS App v2. It may clear up once iCloud3 does its first locate. I have added error catching code so it will not generate an error message.
  2. I can not duplicate the ‘see service’ error message but it may have something to do with an error I came across a long time ago. Months ago, other HA components were getting this same message and when they implemented the entity_registry and got away from known_devices.yaml. Around v0.89, HA put out a ‘legacy’ version of the device_tracker platform, which I was using, to fix this. i never gave this another thought until you got it. I changed iCloud3 to not use the legacy platform and lets see if that goes away.It it continues after this update, try commenting out the entries in known_devices.yaml for the devices you are tracking and see what happens. Let me know if the problem is solved (or not solved).

@shauder
The track_devices parameter in your post above is not correct.
You have …: - ishane > 2fa account email > images/shane.jpg
It should be.: - ishane > 2fa account email, images/shane.jpg
A greater than (>) separates the devicename from the parameters, comma (,) separates the parameters.

Thanks for the reply but I do not see any new release on github. I also do not see any component file changes in any of the branches. I tried to update via HCAS but I am getting the same errors.

I didn’t put a new release out there but updated the files in the one that was there. The two items changed are device_tracker.py and icloud3_event_log.js. Not sure about the tie in to HACS yet but will check it out this weekend. HACS rebuilds everything when Home Assistant starts so I have it turned off.

I replaced those two files and the only error I am still getting is the see service error. I removed all but one item in my known_devices file (because I need it) and I am still getting it.

EDIT: I also just edited out any extra ishanes in the core.entity_registry and did not have any luck getting rid of the error.

Also the addon seems to be working but this error is spamming A LOT. Over 10000 times in less than an hour.

I’ve replaced the two files and restarted a few times. Still seeing this:

2019-10-25 16:19:00 ERROR (SyncWorker_6) [custom_components.icloud3.device_tracker] 'zone_distance'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 3440, in _get_distance_data
    last_dist_from_zone_s  = attrs[ATTR_ZONE_DISTANCE]
KeyError: 'zone_distance'
2019-10-25 16:19:00 ERROR (SyncWorker_6) [custom_components.icloud3.device_tracker] ►►INTERNAL ERROR-RETRYING (_get_distance_data:SetupLocation-'zone_distance')

In addition, “see” errors persist for both devices. A new error appears as HA starts up at the bottom where connection lost usually appears. Failed to call service device_tracker_icloud3_update.

EDIT: Tracked devices aren’t in known_devices.yaml.

Do you happen to use the iPhone detect custom components so?

If you’re asking me, No.

Yeah I was just trying to rule it out since it’s the only thing in my known_devices.yaml

Does this release still get the 2fa notifications if not using the fmf method?

@Bartem If the iCloud Account used as the basis for tracking (username configuration parm ) has 2fa on it, it will get the notification from Apple. If it does not have the 2fa, it will not get the notification.