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

Now I’m getting a ton of SQL errors, all related to my iOS devices. Note, these sensors such as sensor.dena_iphone_info don’t appear as entities. I’m assuming this is an entity that the cloud3 package is expecting to create/exist.

What entities should Cloud3 be creating? How do I know when Cloud3 is installed successfully? I should see some new entities, yes?

Error in database connectivity: (MySQLdb._exceptions.OperationalError) (1366, "Incorrect string value: '\\xE2\\x97\\x8FOld...' for column `homeassistant`.`states`.`state` at row 1")
[SQL: INSERT INTO states (domain, entity_id, state, attributes, event_id, last_changed, last_updated, created, context_id, context_user_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: ('sensor', 'sensor.dena_iphone_info', '●Old.Location, Age-3.9 min (#5)', '{"icon": "mdi:information-outline", "friendly_name": "Dena-iPhone-Info"}', 7216372, datetime.datetime(2020, 1, 5, 5, 7, 30, 245398, tzinfo=<UTC>), datetime.datetime(2020, 1, 5, 5, 7, 30, 245398, tzinfo=<UTC>), datetime.datetime(2020, 1, 5, 5, 23, 16, 128281), 'c4722a49854645fe9b6b5ceb2e252ec6', None)]
(Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)

Let me get this straight. You have to create contacts for each family member and each member must have every other member in their contacts?

So if it’s just me and my wife, and I created a non F2A account called Dummy (bless you Redd Foxx) I need to create contacts for my wife and me in Dummy?

Yes. You need to follow each step described in the iCloud3 docs here including verifying that your non-2fa account can find your 2fa accounts after you add them to the contacts in the non-2fa account. If you run into problems, see the Trouble Shooting section. If there are errors in the config, the information in the error message provides instructions on what steps might fix the problem.

Some new and unusual lovelace rendering issues with 103.5. In Firefox, I get the full ic3 log in the states view. However, this is what appears in the v2.0 iOS app:

As shown below, the UI Editor is also rendering a new heading as entries are added to the log.

This doesn’t appear to effect ic3 function, but does represent a change.

Some of my confusion was over the verbiage over the “primary” account. If you’re creating a non-2FA AppleID account, that is the primary, yes? That account can get the GPS location for the tracked devices without having to authenticate with 2FA.

I’m literally testing Cloud3 right now and it looks great. I didn’t specify a tracking method in configuration.yaml, so it’s using FmF by default . However when I put in

tracking_method: famshr

HA won’t load after a restart. This despite the configuration passes the configuration check. When I look at the logs, I get a ton of SQL insert errors that are related to the tracking devices.

Is the only difference in setup and configuration between FmF and famshr is just that one line?

Is the following correct?

device_tracker:
  - platform: icloud3
    username: !secret fmf_username
    password: !secret fmf_password
    tracking_method: famshr
    track_devices:
      - mike_iphone > [email protected]
      - dena_iphone > [email protected]

I noticed some people have configs where the track devices entries don’t specify the email address like I do, but rather graphic files. Is the email needed? I thought it is required. How can Cloud3 find the associated email otherwise?

Perhaps I’m jumping ahead of myself, but has anyone created an automation so you can get notified when the Waze prediction of ETA for a device to home falls under 10 minutes? Is this possible?

I’m certainly no expert, just look back at all of my issues in this thread LOL, but in my case, using the famshr method, I didn’t need the email address. Because it’s already coordinated with Family Sharing.

Rob,

Good morning. Don’t worry, today won’t be another 10+ hour day. I created a tertiary iCloud account that doesn’t have 2FA. It’s a gmail email address. When I log into that account on the web (icloud.com) I don’t have access to FMF. Any ideas?

You have to send them invites to “share data” as friends…
https://gcobb321.github.io/icloud3/#/chapters/1-setting-up-icloud-account?id=find-my-friends-fmf-tracking-method

So I have to be logged into the non-2FA icloud account via an i-device? I’m trying to do it entirely from the iCloud website. Not possible? I added myself to the contacts of the non-2FA account via the site.

The graphic files are an optional configuration item that allows you to associate a picture with the account.

As an optional element, it is configured AFTER the email address if you’re using FmF or AFTER the device name if you’re using FAMSHR.

Note: You can ONLY use ‘famshr’ if the iCloud account you’re using to authenticate DOES NOT have 2FA. However, in this day and age, not having 2FA on your primary iCloud account is not recommended.

From my iphone, I sent the non-2FA account an invite. Which I then accepted via the email. From my iphone I can see the non-2FA account in my friends list.

Right, you need to probably do the invites from your iPhone. Basically, you’d just have to have each 2FA account invite the non-2FA account to see their location. You don’t have to do the other way around. Basically, the “Dummy” account needs to be able to see the location of both your primary devices, via the website, before the HA integration will work. I had long ago set up such a “Dummy” account for myself, so I didn’t have to go through that part for HA.

Gary, hopefully a legit question…

I posted a Docs issue on Github, so this is related. I’m trying to get the “Driving” info to display on a 4x3 card. I’ve updated my code to properly render the 4x3 card example you had in the documentation, here. That said, I’m guessing you used a template to render “Driving” based on the zone.phone_stationary entity? However, I’m having trouble with it, can you post the code needed for that badge (with the multi-color checkbox)?

Much appreciated.

Again, many thanks. All working as expected. Have a great day!

:+1: Glad it’s working for you.

I glad everyone is up and running. Thanks to everyone for helping.

  1. There are some sample Lovelace config files in a zip file installed with iCloud3 in the iCloud3 custom components directory and on the iCloud3 github repository in the 'sample_lovelace_cards directory here. One is a 4x3 layout. I must have grabbed the wrong one when putting the docs together. I have about 10 on my system I use for testing and was getting confused myself that day. I’ll update the docs,

  2. The ‘driving’ check box really has nothing to do with iCloud3 and is an input Boolean controlled by an automation with a trigger to turn on when the sensor.gary_iphone_zone_distance > 2. (see gary_driving_flag_turn_on automation in the sample_automations_and_scripts directory on the iCloud3 GitHub repository here). It is then used as one of the conditions in the automation gary_arrives_home (same example file) to open the garage door. My thinking is, If I just went for a walk around the neighborhood, I’d leave the home zone but The car was still in the garage so I didn’t want the garage door to open when I arrived home and 2 miles seemed like a good number to use when I’m driving. Naturally, if I drove, but didn’t go 2miles, the flag wouldn’t be set and the door wouldn’t be open. There are lots of ways to control the flag but that is what I did.

  3. For clarification, the difference between fmf and famshr tracking methods is:

  • famshr-in the ‘real’ iCloud account, the Family Members records in the Family Shariing list contain the location (and other information) for that device. This information is requested when iCloud3 polls the device using the real account. That is why the username points to the real account. This is how iCloud3 v1 worked.Last July, Apple changed the way the accounts with 2fa worked to log out programs that were accessing the account every 30 minutes or so and to issue a notification when the account was access again, leading to constant notifications and an unworkable situation.
  • fmf-A dummy account without 2fa is created. That account contains the contact information (name and real account username/email address). The real account location is shared with the non-2fa/dummy account. When location information is needed, this account is polled, the devices that are sharing their location with it are located and this information is returned to iCloud3. Since it is a non-2fa account, no notifications are sent to the device.

I have learned that the original iCloud component has been rewritten to be able to access 2fa accounts and might work without the constant notification when the device is polled for location data. If that turns out to be true, I’ll spend a few months figuring out how to do that in iCloud3 and remove the fmf tracking method so it works with the famshr method like it did in v1.

I’ll add the above description to the iCloud3 docs when I can to make the differences between how iCloud3 uses each method clearer.

Thanks for all you do, Gary. You are appreciated.

Since I have v2 of the companion running on my iPhone, is it safe to remove the iOS integration?

I have “Home Assistant iOS: Home Assistant iOS” integration as well as a “Mobile App: Alvins_iPhone” Are they redundant or should I leave the iOS integration alone?

Before it gets lost in the weeds, @gcobb321, is there a way to determine a device’s “Waze ETA to home” value in minutes AND if the device’s direction is headed towards home? I’d like to be able to create automations that do things as a phone owner is close to home