iCloud3 v2.2.1 Device Tracker-Advanced tracking features, iOS App monitoring

Hello.

Finally started testing iCloud3 in my setup and still trying to figure out a lot of things, so please bare with me if I’m asking a basic question.

I’m currently using v2.2.1 with ‘Find My Friends’ tracking method with a separate account (at least until 2FA is working properly for ‘Family Sharing’) and wondering if I can update manually a specific device before the next scheduled update arrives.

I was looking at the icloud3_update service, but command ‘location’ seems to do the update only via iOS app, is that right? Or will sending command ‘location’ will trigger a new ‘Find my Friends’ update (as when the next update time would be reached)?

Thanks in advance for any help.

Gary,
I am trying RC8a and it is getting really close compared to RC7. It now finds all of my devices, including the one that is only in Find My Friends, but it has a problem retrieving info for the four devices that are connected to my account. Only the device that is configured last in the list shows information being retrieved. The other three say Discarded.

image

    track_devices:
      - rod_iphone > [email protected], Rod-iPhone
      - rod_ipad > [email protected], Rod-iPad
      - rod_wristwatch > [email protected], Rod-Watch, noiosapp
      - rod_old_iphone > [email protected], Rod-iPhone-SE, noiosapp

If I change the order of the devices in the config, the one that works continues to be the last one listed.

image

    track_devices:
      - rod_ipad > [email protected], Rod-iPad
      - rod_wristwatch > [email protected], Rod-Watch, noiosapp
      - rod_old_iphone > [email protected], Rod-iPhone-SE, noiosapp
      - rod_iphone > [email protected], Rod-iPhone

I’ve just uploaded rc8b.

@poudenes
It fixes the problem where an error msg was added to the Event Log if the track_device does not have an email address.

@rodpayne
I’ve beat on the code pretty good and can not see what is going on in your situation. So I added some debug statements to iC3 that will add entries to the ha log file when the data is being decoded. That might let me see how you are configured and the data being returned from iCloud.

Install rc8b and add log_level:debug+rawdata to your iCloud3 configuration file. Then email the home-assistant.log file to [email protected].

Thanks.
‘’’

‘’’

@rodpayne
The HA log file didn’t have the info I was looking for but the Event Log did. The config you posted also showed the setup problem but I missed it.

The email address on the track_devices parameter is used to indicate you want to track that device using the Find My app > People list and links the person in that list with the device on each parameter line. It should only be used for one track_device item. You have the same email address on all your phones and watches so only the last one will be tracked.

Since you are really tracking your devices, remove the email address from all parameter lines so the each phone and watch is tracked by its entry in the Family Sharing list instead of the Find My app people list.

Updated, and now the error is gone !! Not any red lines :smiley:

Hi @gcobb321, thanks a lot for your job. I have updated to rc7, and tried to create new icloud account, in order to be able to locate my iphone. I have used mac for that, and I can see all people in Find My app. But in the icloud3 I don’t see my iphone, and I don’t see one more person. The errors are the same
The email address [email protected] is invalid or is not in the FmF contact list and will not be tracked.
What could be wrong?
May be I need to wait some time?

After updating to the latest version everything works. So never mind :grinning:

@gcobb321 You are correct, that is what was wrong. It seems to be working perfectly. Thanks for your help.

iCloud3 Release Candidate 9 is now available.

Major Enhancements in v2.2.2:

  1. iCloud3 now works with the Apple Verification ID Code and support 2-factor-authentication.
  2. The fmf and famshr tracking methods have been combined into a single icloud tracking method and now operates on a per device basis.

Download the zip file from the development-v2.2.2 directory here , unzip it into the icloud3 directory and restart HA.

Change Log:

  1. The FmF and FamShr tracking method for each device are now analyzed to minimize calls to iCloud Web Services. The goal is to have all devices using either FmF or FamShr but not both. If you are tracking a friend (their email address is specified) that is not on your Family Sharing list, the friend will be located using the FmF method like it always has and the other devices will use FamShr.
  2. Added check for an email address that is used for more than one devicename. Only the first one will be valid. The rest of the devices that also use that email address will use the FamShr tracking method.
1 Like

Hey guys,
I have tried to use the standard HA method of configuring the track_devices parameter several times over the past few years and can never get past the HA errors generated when it validates the configuration items. I’ve given up several times and am about ready to again and keep the ‘short hand’ way of doing it.

This is how it is configured now:
</s> <s> track_devices:</s> <s> - gary_iphone > [email protected], gary.png, Gary</s> <s> - lillian_iphone > [email protected], lillian.png, Lillian</s> <s>
What I have tried to implement is:
</s> <s> track_devices:</s> <s> - devicename: gary_iphone</s> <s> email: [email protected]</s> <s> picture: gary.png</s> <s> name: Gary</s> <s> - devicename: lillian_iphone</s> <s> email: [email protected]</s> <s> picture: lillian.png</s> <s> name: Lillian</s> <s>
Within iCloud3, HA controls how the configuration parameters are passed into the program. I have tried all kinds of things from defining lists, strings, dictionary items, nothing, etc and always end up with an error:
</s> <s>Invalid config for [device_tracker.icloud3]: value should be a string for dictionary value @ data['track_devices']. Got [OrderedDict([('devicename', 'gary_iphone'), ('email', '[email protected]')]), ... ]</s> <s>
If anyone can help, I’d like some advice on what I’m doing wrong and what the code should look like. I’ve added a test_list parameter to be used for testing. The configuration validation and definition is around line 750 in icloud3.py.

I figured it out and will be adding a devices parameter

Thanks.
Gary

1 Like

I am no good whatsoever in Python, but the obvious to me (and surely to you too when I think of it…) is that HA is expecting a string, but you are giving it an array/(or a list?)…

@alexh1285
Thanks for the suggestion Alex. Yes, I’ve tried that and a lot more. What I’m looking for is someone that has actually done it or is familiar with what needs to be done at the coding level. Something I can plug into iCloud3 without having to revisit all the things I’ve already tried.

1 Like

Yes, I figured as much. I was just in the mind of : “sometimes you just have to sleep on it, and then look back at it with a fresh eye”. And I figured maybe that would be the “click” that would help you figured out the issue! :slight_smile:

Anyways! Thank you for the hard work you are putting in on this integration!

And Merry Christmas to you and your loved ones!

You can’t ask the big developers behind HA ? Maybe they can help you?
Or check the development HA page, but assume you already did that…

I’m getting the error “The see service is not supported for this entity” a ridiculous number of times in my log. Last time I checked it was 250,000+ times since I restarted my instance yesterday. Everything seems to be working for me, except for that error. Any ideas?

System specs:
Home Assistant OS pre-built VM image on a Mac Mini
Version 2020.12.7
Latest iCloud3 version

@garrettbeachy

  • iCloud version (v2.2.1 v2.2.2rc8) or something else? Did you install from HACS? Or reinstall it?
  • Did it just start with the HA update?
  • Can you tell the entity name? It will be associated with device_tracker platform.
  • If you remove the iCloud3 platform, does it continue?
  • What does the HA log look like when it starts up? Delete home-assistant.log and restart HA.
  • Are there any conflicts with the iOS App device_tracker entity name?
  • Look at the HA Sidebar > Developer Tools > States for iCloud3. Anything look odd?
  • Does iCloud3 start? Any errors in the Event Log?

iCloud3 v2.3 Release Candidate is now available.

Download the zip file from the development-v2.3 directory here , unzip it into the icloud3 directory and restart HA.

This should be the last Release Candidate until the actual release. There is some documentation that needs to be updated before HACS is updated and will probably be complete in the two weeks.

Changes in v2.3 Release Candidate:

  1. Additional error messages.
  2. Minor changes to the Event Log.
  3. Bumped the version number to 2.3
  4. Enhanced the method of specifying the devices to be tracked in the configuration files (see below).
  5. Code cleanup in iCloud3 and pyicloud_ic3.py.

Enhancement to the method of configuring the devices to be tracked

The track_devices configuration parameter has been used to specify the devices to be tracked and used the format of

track_devices:
  - gary_iphone > [email protected], gary.png, _app
  - lillian_iphone > [email protected], lillian.jpg, noiosapp

In addition to the track_devices parameter, iCloud3 now supports the standard HA method of specifying the devices to be tracked with new configuration parameters. They can be specified in the HA configuration.yaml file or the iCloud3 config_ic3.yaml file.

devices:
  - device_name: gary_iphone
    email: [email protected]
    name: Gary
    iosapp_suffix: -app
  - device_name: lillian_iphone
    email: [email protected]
    name: Lillian
    picture: lillian.jpg
    noiosapp: True

or you can use both methods.

devices:
  - device_name: gary_iphone
    email: [email protected]
    name: Gary
    iosapp_suffix: -app
  - device: lillian_iphone > [email protected], lillian.jpg, noiosapp

Other parameters include:

  • iosapp_entity to specify the device_tracker.entity_id to be used for the device.
  • zone to specify additional zones to be used in the tracking calculations.
2 Likes

Will install new version tomorrow… Nice to see you fixed the HA standard syntax way

So if im right the “track_devices” is replaced by “devices” ?

track_devices:
  - peter_iphone > local/images/person/peter-home.jpg
  - cenkay_xr > local/images/person/kay-home.jpg, noiosapp

become:

devices:
  - device_name: peter_iphone
    name: Peter iCloud3
    picture: local/images/person/peter-home.jpg
    iosapp_suffix: -app

  - device_name: cenkay_xr
    picture: local/images/person/kay-home.jpg
    name: Kay iCloud3
    noiosapp: true

is this correct? I use family share.

- platform: icloud3
  username: !secret icloud_peter_username
  password: !secret icloud_password
  tracking_method: famshr
  config_ic3_file_name: "/config/package/config_ic3.yaml"

EDIT: Test it and seems to work this way… :slight_smile:

@poudenes
iosapp_suffix - This is only needed if you have the iOS app device tracker entities devices several times due to reinstalling. I would remove it. iCloud 3 will find the one to use for you.
name - That is fine but I would only make it ‘Peter’ or ‘Kay’ so it doesn’t take up as much room on the Event Log items.
tracking _method - Only needed to not use iCloud Location Services (fmf and famshr). You could remove this.

But it looks good.

The track_devices is not being removed and will continue to work. It is only being depreciated. However, any device parameters added in the future would only be supported by the new method.

1 Like