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

No: [email protected] has no 2FA enabled. So if I login to an ipad I only enter this name and password. I have in that account only two contacts: [email protected] and [email protected]. If I use the FMF app on the ipad I can view the locations of these contacts.

I have no HACS but I would think that that would not matter?

I find it most strange that if I use icloud3 v1.06 HA gives in the logs: device_tracker.icloud3 while with v 2.0 HA gives in the logs: device_tracker. It is just as if HA does not correctly connect to icloud3. Could it be a permission issue in the folder? HA creates within icloud3 folder a folder py cache in which init.cpython-37.pvc is placed.

I installed mine with HCAS and it works. Using HCAS removes human error that is why I suggested it.

@tomdh76 Another thing to try. Rename the icloud3 directory to icloud3_v2. Then change the name on the platform statement to icloud3_v2 and restart HA …

Edit: The pyicache folder is just a precompiled version of the iCloud3 program and wouldn’t have anything to do with your problem. Are you running under hassio?

Thank you for your time and suggestions!
However changing the name of folder to icloudv2 did not make any difference. The device tracker component is not loaded.
I am using ha in docker
Also tried it in ha virtual env (that setup did not have previous versions of icloud)
I will try tomorrow using hacs

@tomdh76 Unfortunately, I know nothing about docker and am running in hassio so I can’t really help you with dealing with docker issues. There must be something in that environment that has hosed some config files somewhere. Possibly one of the registry, entity or config files in the /custom_components/.storage directory. I’ve Googled ‘No setup function defined.’ and there are a number of posts dealing with this same issue with other platforms. Maybe someone else that had this issue will be able to point you in the right direction.

Did you try any of the v1 beta versions that were posted under the icloud3/beta directory or the icloud3_dev repository. I could put the prior versions of icloud3 on the github repository to see if any of the worked if you want.

I did not try beta version, latest that I used was v1.06. If you would like to post previous versions , great!

Quick question… I used the original ic3 component you made and it was great to help keep the battery levels accurate from my other Family Sharing devices…(Pulling right from iCloud I assume) With the new fmf method does it rely only on the HA ios app battery level info for people you track with fmf? Or does it somehow get a battery level from some other source as well?

@bartem Apple iCloud Location Services using FmF does not provide any battery information.The number I get is from the IOS app when it does a location notification. The IOS app also creates sensors that it may update on a regular basis with battery information that might give you the info you want.

@tomdh76 In iC3 v2, I changed the service calls from icloud_service_call to icloud3_service_call and wonder if that has anything to do with the problem. I put just up ‘device_tracker-icloud_svc_call.py’ with the old service calls. Who knows if that is the issue but you can get it in the ‘prerelease’ directory of the icloud3 repository.Rename it to device_tracker.py after downloading it.

It worked finally! It was a long way but it works great right now.
What I did:
In the virtual env setup I installed HACS and then icloud3 from that. After restarting it worked so I knew that my config.yaml was correct. Probably it was some sort of permission error in the custom_components folder. With that in mind I completely reinstalled the docker setup (which was a pain because all Z wave devices were renamed). Then again HACS and icloud3 and it also worked. Maybe the files such as device_tracker.py etc. need to be owned by root. Anyway, thx alot for all this work!

iCloud3 has been added to the HACS default custom components/integrations.

I don’t see installation instructions anywhere, am I missing something? I do have it installed in HACS but how do I go from there?

hi @gcobb321

I upgraded to the latest iCloud3 v2.0 and I am getting this message Failed to call service device_tracker/icloud_update. Service not found. Tracking is not working. Do you know why?
My config is:

- platform: icloud3
    username: !secret icloud3_username
    password: !secret icloud_password
    group: tracking
    tracking_method: fmf
    track_devices:
      - egon_iphone > [email protected], /local/egon.png
    unit_of_measurement: km
    gps_accuracy_threshold: 75
    stationary_inzone_interval: '30 min'
    stationary_still_time: '8 min'
    inzone_interval: '2 hrs'
    ignore_gps_accuracy_inzone: true
    travel_time_factor: .6
    hide_gps_coordinates: false
    distance_method: waze
    waze_region: EU
    waze_min_distance: 1
    waze_max_distance: 9999
    waze_realtime: false
    exclude_sensors: bat,zon2,zon3,lzon2,lzone3

@e6on The iCloud3 service calls were renamed:

  • icloud_update ==> icloud3_update
  • icloud_set_interval ==> icloud3_set_interval
  • icloud_lost_phone ==> icloud3_lost_phone
  • icloud_restart ==> icloud3_restart

Rename the icloud_XXX service calls to icloud3_XXX in your automations and scripts.

@Stooovie Now that iCloud3 is included in the default HACS repositories/integrations, I have updated the installation instructions to include HACS, Go to the iCloud3 Documentation Installation chapter for instructions.

iCloud3 v2.0.1 Maintenance Release is Available for download

There are problems using HACS to install this update. Updating the old fashioned way works fine.

This is a maintenance release that corrects the following issues:

  • If no location data was available while calculating the distance from Home using Waze, iCloud3 would go into an error correction loop and hang up. This has been corrected.
  • If the a location request was made using the icloud3_update service and the notify.mobile_app_devicename service was not available, an unformatted error would be added to the HA log file that did not correctly explain the error. A friendly error message better explaining the problem is now added to the Event Log and HA log file.
  • Stationary zone location information was not being refreshed correctly on subsequent polls. It was showing as (None, None) in the HA log file and may have generated an error message or used the wrong location when moving back to the center of the stationary zone. This has been corrected.
  • Using the FamShr tracking method generated an ‘IndexError: tuple index out of range’ error message and would not iCloud3 load. This has been corrected.
  • Additional error checking has been added to recover from situations when no location information was available when calculating the distance moved from the last location to the current location. If this happens, the distance moved will be 0 km.

  • Complete documentation with all enhancements and breaking changes can be found here
  • Download iCloud3 v2.0.1 here
  • The iCloud3 Repository is here

When I upgraded I found it added the files to a custom_component/device_tracker folder instead of one named icloud3. I also get this error.

Setup failed for device_tracker: No setup function defined.

edit: should mention I used HCAS and made sure there was no extra folders for icloud3.

@shauder Same here. Everything was fine until I did a HACS update.I can’t get any device_trackers to load again, even my icloud_dev development tracker. I did a snapshot restore from yesterday which straightened everything up (almost), then did another HACS restore and hosed again. Doing another restore now.

@shauder rename the custom_components/device_tracker folder to custom_components/icloud3, then restart HA and it should start working again.

I had already done that before replying unfortunately.