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

Both are applicable. The first link is current. Have you specified a tracking method?
Here’s my working device_tracker config:

  - platform: icloud3
    username: !secret icloudfmf_user 
    password: !secret icloudfmf_passwd
    group: tracking
    tracking_method: fmf
    track_devices:
      - gary8 > [email protected], hatsmall.jpg
      - gryphon7 > [email protected], cowgirl.jpg
    unit_of_measurement: mi
    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: US
    waze_min_distance: 1
    waze_max_distance: 9999
    waze_realtime: false
    exclude_sensors: bat,zon2,zon3,lzon2,lzone3

Are you getting the code here?(https://github.com/gcobb321/icloud3_dev/releases)

I upgraded to the latest one and then my HA would no longer start. The only logs I could produce was the initial loading of custom components. Like 6 lines in the log in total so it is not very helpful.

Check your manifest.json file. Does it look like this?

{
  "domain": "icloud3",
  "name": "iCloud3 Device Tracker",
  "documentation": "https://gcobb321.github.io/icloud3_dev/#/",
  "dependencies": [],
  "codeowners": ["@gcobb321"],
  "requirements": []
}

Yeah it seems to be the same. I have to remove the files for HA to start again.

calvin% cat manifest.json
{
  "domain": "icloud3",
  "name": "iCloud3 Device Tracker",
  "documentation": "https://github.com/gcobb321/icloud3",
  "dependencies": [],
  "codeowners": ["@gcobb321"]
}
calvin%

You need to add ‘requirements’ as shown in the example above.

1 Like

Yeah, it is working now thanks! I missed that completely.

I am having a problem with GPS accuracy throwing away information. I don’t know if it’s HA Companion Beta (latest release) or icloud3 (or somewhere else?) that’s causing the problem…but the result is that although I am sitting at home at my desk…and my iphone is telling me that it’s current accuracy is around 65’ (it varies, but never gets above 300 ft)…and icloud3 keeps telling me that the accuracy is 2323 ft.

In configuration I have:

stationary_still_time: 999
gps_accuracy_threshold: 1500
ignore_gps_accuracy_inzone: true

I can see that the iphone is being polled (polling times change), but the GPS accuracy never varies from 2323 ft.

I am using FMF…and maybe that’s causing the issue. The phone is registered to my a 2FA account so I am using a dummy FMF in the middle between IOS and HA/IOS/icloud3.

HA and Icloud3 think I am somewhere near my home (but within the home “circle” on the map)…my phone has me dead on my home (GPS)…and if I look at the HA MAP, it shows me near my home, not at my home. The accurate GPS is not getting through the software.

Note for completeness…I have wifi off on the phone so all communications is over my external phone line with a strong LTE signal

Any thoughts???

@ghstudio

  1. The ios app checks the gps accuracy and will throw away transactions. Look at the ios pp event log to see what it is doing (HA sidebar>app configuration>event log (scroll to the bottom).
  2. iCloud3 checks gps accuracy and throws away transactions (see iCloud3 Event Log lovelace card).
  3. The ios app reports the gps accuracy to ic3 so if it is wrong or inaccurate, you will have to look into the ios app and how apple passes the information into it.
    4.You can look at the actual device_tracker attributes for iC3 and the ios app and compare the values. (Ha sidebar>developer tools>states) and scroll to the device_tracker entries. look for the gps_accuracy in the ones belonging to your phone.

Thank you but I have already reverted back to the old version. If it works I don’t fix it…:slight_smile:

I will try another time.

I have not messed with it a ton yet but everything seems to be working great the last week or so.

iCloud3 v2.0 Release Candidate #7 (11/13) is now available

Edited 11/13 - OK to update to rc.7

This version fixes a few items and adds more entries to the Event Log. Given any unforeseen issues,this is probably the final release candidate before it is promoted to General Availability.

  • This one gets a little complicated to explain. If you were having poor gps accuracy and the last distance traveled was < 1km, the calculated distance and travel time from the zone on this poll was discarded and the last good distance & time data was used. If you were entering a zone (i.e., home), the distance and time from the last good poll was overriding the home zone data when it should not have been. The result was the current zone would show as Home but the Distance would still show as being away (i.e., 1.08 mi instead of 0mi. Automations that had a distance check on a zone change would then not be triggered. This has been corrected.
  • Made some formatting changes to error and information messages.
  • If the Stationary zone was being exited and you were experiencing poor gps or the location data was old, iCloud3 would sometimes change the devices location to the center of the zone. In this case, it would change it to the North Pole, causing an error condition to occur and iCloud3 would be restarted. This has been fixed.
  • If the device was in a zone and was within the zone’s radius on an ios app trigger, it was being moved back to the previous poll location when it should have been moved to the center of the zone.
  • If a zone Enter notification was received but the gps location was outside of the zone, the location was being overridden and the transaction was being discarded, resulting in a missed zone Enter event. This has been fixed.
  • Added an IOSAPP Monitor that reports details regarding state and trigger changes detected from the iOS App v2.
  • (11/13) Fixed a problem that occurred if you Entered and then Exited a zone with no other locate polls in between and were tracking with more than one zone.

Documentation and Download links:

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

I’m trying to track two iphones… Since my regular account has 2FA, I’ve set up a dummy account without 2FA and added the two phones to FMF. Icloud3 is set up for fmf. That appears to be working…but many of the badges have no values because for example, fmf doesn’t send battery level…etc. Further, by working, it means that occasionally I get a change since I don’t have HAC running to detect and send zone changes…it’s really borderline useful to me.

I would like to run HAC on one phone to get more accurate and complete information…it used to be easier with earlier IOS (pre-13), the old HAC and icloud3. That’s all changed. Let’s Encrypt/duckdns security complicates things further due to IOS handling of self signed certificates.

I’m willing to try to get that working but I’m wondering if what I’m trying to do will even work. How do I set it up in icloud3? I currently have both phones on one tracker using fmf. If I run HAC on one of the phones will it update the fmf and icloud3 information much more quickly? Will Icloud3 change it’s polling intervals? Will it augment the information from fmf by sending information directly to the icloud3 rpi?

I’ll try to address your questions with my limited experience. I’m tracking two devices through a dummy iCloud non-2FA, account. I run HAC on both devices giving me two trackers for each device. Device status information (battery, etc.) is provided by HAC. You can disable the creation of these sensors in iCloud3 if you’re run in FMF mode. I do not run the Let’s Encrypt/Duckdns add-ons.

Yes, things were easier back in the old days :-). It’s been a struggle keeping up. However, I now have my arrival automation’s working reliably again. Reliance on HAC 2.0 alone wasn’t working for me as I have very poor cell coverage and our iPhone GPS results tend to wander.

iCloud3 is working for me as advertised. Sure, I have occasional errors related to location, but they’re fairly infrequent and not usually associated with icloud3. I’ve put safety conditions in my automation’s to mitigate these errors.

gcobb321 can answer your questions better, but finding what works for you is a personal endeavor. I’m enjoying myself most days. Good luck.

@ghstudio I know you have been trying to get device tracking using icloud3 working to your satisfaction for quite a while.To review some of my earlier answers to your questions:

  1. Without using HAC, you will not get zone enter/exit notifications so ic3 relies on setting the location information based on it’s own polling interval calculation based on what is reported by FmF/iCloud Location services. The pros and cons of not using HAC are discussed extensively in the ic3 documentation.
  2. The data iC3 uses for it’s tracking is the gps location, the location timestamp, accuracy and various triggers that can be detected. All of the other data is just passed along. Apple has chosen the data that it wants to make available. You will have to find another source of the data that is not available to ic3.
  3. My own configuration is:
    3.1 I have an FmF account set up with my icloud account and my wife’s icloud account.
    3.2 I have HAC v1 and v2 on my iphone. My wife has HAC v1 on her phone.
    3.3 I am using HACv2 to track on my phone. HACv1 has been assigned a devicename that is not being tracked.
    3.4 My wife is using HACv1 to track her phone, the devicename being tracked by ic3.
    3.5 Duckdns/Lets Encript is being used by HA running on a Pi3b+.
    3.6 Cell service in my area is ok most of the time but there are times when it is poor and enter/exit notifications are not reported. This probably happens 10% of the time.
  4. The documentation contains a lot of example device_tracker, automation & scripts. They are the ones I use on a regular basis. For the most part, everything seems to work OK. When they don’t, it is usually because of poor gps accuracy so transactions are discarded until good data is available.

Your set up closely mirrors my own. However, I am running HACv2, HACv1, and Duckdns/Lets Encrypt. You need to install HAC v1 or v2 on all the devices you want to track. If you only install it on one device, you will get enter/exit/significant location updates/ etc on that device and the FmF data for the other device will be picked up when device1 is updated but device2 is still on it’s own.

You are wondering that if you go through the trouble of setting it up, will it work. All I can say is it works for me and others using ic3. But I am using the necessary support components that are essential in making it work. If you consistently have poor cell service, then it probably won’t. But if it is so-so or ok, it will probably work most of the time.

Any plans to add this great integration to HACS for easy installation and upgrading?

It’s there already, and has been for a while:

It does not show up for me in HACS. Did you add it yourself as a custom repository?

Ah, yes, I probably did.
Silly of me. But it’s been a while, and I must have forgot.

I’m out of the house at the moment, but will post the repository URL when I’m back, unless someone beats me to it.

edit: It is gcobb321/icloud3

1 Like

iCloud3 v2.0 Released for General Availability (11/17/2019)

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

  • (New) Find-my-Friends (FmF) tracking method to locate devices with the iCloud Location Services if you have 2fa on your iCloud account.
  • (New) Family Sharing (FamShr) tracking method to locate devices with the iCloud Location Services if you do not have 2fa on your iCloud account.
  • (New) Integration with the Home Assistant Companion App version 2
  • (New) Use either HA iOS App version 1, version 2 or both on the same device_tracker platform.
  • (New) iCloud3 Event log Lovelace custom card.
  • (Updated) Additional attributes & sensors
  • (New) Customize the list of sensors that are created by iCloud3.
  • (New) Track devices from multiple zones.
  • (New) The iCloud3 documentation has been updated and reorganized to make it easier to reference.
  • (New) Display debug information related to processing the device’s location data reported by the iCloud Location Services and the HA iOS App. This data can also be displayed in the iCloud3 Event Log Card.
  • 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. The method of specifying how tracked devices are selected has been completely rewritten to support the new Find-my-Friends tracking_method using the track_devices parameter.

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

This topic should be closed with the release of iCloud3 v2.0

I have created a new topic for support of v2.0 here .

This topic now has over 450 posts, is getting quite large and pretty much outdated. With the release of v2.0, I want to close it and have opened a new one for v2.0. Please refer to that topic for any discussions, problems, questions, answers and support.

Thanks for trying it out and hope the new version works for you.

Gary Cobb, aka GeeksterGary