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

Understood. I’ll do that now. Thanks for your patience and efforts. I’ll post back here when I’ve got that done with results.

Also, again, in reference to your post about your Resources section and custom card code…

The resources are using ‘/local/custom-cards’, while my instructions show ‘/community_plugin/’.
Additionally, your custom card code doesn’t appear correct, because it has no indentation, mine is:

entities:
  - entity: sensor.icloud3_event_log
title: iCloud Event Log
type: 'custom:icloud3-event-log-card'

Custom cards type also should NOT have a space in them at all…none of mine do, and it would seem your working cards don’t either.

You’re correct. However, when I take the space out of between “custom:” and “icloud3-event-log-card” all the other elements on the screen go away. When I put the space back in, they come back.

But you’re correct, the working weather-card has no space between “custom:” and “weather-card”.

So I made the changes and having the same result. Here’s my resources:

resources:
  - type: module
    url: /community_plugin/lovelace-icloud3/icloud3-event-log-card.js?v=1.000
  - type: module
    url: /local/custom_cards/weather-card/weather-card.js
  - type: module
    url: /local/custom_cards/thermostat-card/thermostat-card.js?v=1

And my card code from the RAW:

      - entities:
          - entity: sensor.icloud3_event_log
        title: iCloud Event Log
        type: 'custom:icloud3-event-log-card'```

I don’t know if this is a partial cause of this issue, but I can’t find any entity called sensor.icloud3_event_log. Shouldn’t I have that?

Yep, that’s the entity that produces the actual contents of the card itself.
That would imply that your icloud3 integration itself isn’t enabled.

Do you have code similar to what I posted about an hour ago in your configuration.yaml?

device_tracker:
# iCloud 3 Integration
  - platform: icloud3
    username: !secret icloud_user
    password: !secret icloud_pass
    track_devices:
      - iphone_x_husband > [email protected]
      - iphone_x_wife > [email protected]

Assuming the three backticks in the code are a typo? There shouldn’t be anything after the single-quote for the card entry.

I was just looking at that. It’s my device_tracker.yaml (referenced in an Include statement in configuration.yaml).

#########################################################
#
#   DEVICE_TRACKERS
#
#########################################################

#----  iCloud iPhone Location Services ------------------------
  - platform: icloud3
    username: !secret alvin_icloud_username
    password: !secret alvin_icloud_password
    track_devices:
      - alvins_iphone > !secret alvin_icloud_username

#----- Second instance of iCloud3 -----
  - platform: icloud3
    username: !secret becky_icloud_username
    password: !secret becky_icloud_password
    track_devices:
      - beckys_iphone > !secret becky_icloud_username

It’s a typo.

I also want to make sure that the card code (both the .js and the .js.gz) are in a folder under www? The full path should be: www/community/lovelace-icloud3/icloud-event-log-card.js (and that .gz as well)

Yes they are. Exactly.

This isn’t correct, you should be using:

  - platform: icloud3
    username: !secret alvin_icloud_username
    password: !secret alvin_icloud_password
    track_devices:
      - alvins_iphone > alvins_icloud_email 
      - beckys_iphone > beckys_icloud_email

I’m not sure you can use !secret in the email area, that’ll probably cause the integration to error out.
Also, if you have 2FA on Alvin’s iCloud account, then you’ll need to provide a MFA code every 30 minutes, forever, to have the integration work continuously. As mentioned previously you should establish a 3rd account without 2FA and use it as the authentication source.

You should be reviewing your HA logs following a reboot, because I’m guessing the icloud3 integration isn’t loading at all due to error.

Actual path is config/www/community/lovelace-icloud3/icloud-event-log-card.js (and .gz)

That part’s good!

OK, I’ll try hardcoding the email, it worked this way on v1 for a long time.

I’m aware of the 2FA issues. I’m just trying to get this working like this, then I’ll tackle that piece.

## Log Details (ERROR)

Sat Jan 04 2020 21:37:44 GMT-0500 (EST)

iCloud3 Error: Setting up-mike_iphone > The email [email protected] is invalid or is not in the Username: [email protected] FMF contact list. Valid [email protected] contacts are .

What does this mean and what should I do?

Rob, it was an iCloud3 setup issue, on my end. Found errors where setup was aborted. It ended up being a combination of things: icloud account info and device name being tracked. The error mentioned that the mobile_app and ios v1 were conflicting with the device name.

So I changed the device name in my iPhone settings (simply removed the ‘s’ from “Alvins_iPhone” making it “Alvin_iPhone”, hence a new device)

Thank you. You’re help and guidance today is very much appreciated.

Well, happy to help you get it going…

1 Like

This most likely means, at least it did for me, that:
a) [email protected] is not in the Contacts list of the up-mike_iphone ON iCloud.com
b) You haven’t rebooted HA recently (since configuring your iPhones)

I had to log into my authentication account and manually add Contacts for my iPhones I wanted to track (using their icloud account emails).

1 Like