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

Yes, it is OK to have multiple entries under resources. I just noticed new headers are being created and appear in the editor.

Something isn’t right.

I can’t even get that far! LOL

Well, I do have it working. I’m going to restart HA and see if the issue goes away.

That didn’t fix it. We’ll have to wait for @gcobb321 to chime in to give us a hand.

OK. Thank you for your time, GaryK. I appreciate it. Obviously it’s something on my end. But I just can’t find it.

Here’s a simple question for you: when it says “/local/custom_cards/…” that’s under the www subdir in my config directory, right? Because in the iCloud3 documentation, under “HACS”, it says:

“If you are updating or reinstalling iCloud3 from HACS, the icloud3-event-log-card.js is installed in the custom_components\icloud3 directory. This file needs to be moved to the custom_omponents\www\custom_cards directory or the directory you are using for Lovelace custom cards. If you do not move this file, any update to the Event Log card will not be applied and you may get an HA error message indicating you have a duplicate custom card installed.”

It states that “www” is under “custom_components”. That’s a typo, isn’t it?

Here’s my experience and what I did to get the custom card working:

  1. I installed icloud3 via HACS, this is important because if you manually install your mileage may vary
  2. I created a directory in www/community (not custom_cards) called lovelace-icloud3 (so full path would be “www/community/lovelace-icloud3”
  3. I copied the custom card ‘icloud3-event-log-card.js’ AND the ‘icloud3-event-log-card.js.gz’ from custom_components/icloud3/ to www/community/lovelace-icloud3, so there were now TWO files in that directory
  4. I edited my Lovelace UI, as RAW, and added the following lines at the top:
  - type: module
    url: /community_plugin/lovelace-icloud3/icloud3-event-log-card.js?v=1.000

NOTE: this is a MODULE not a JS!!
5) I added the following card, using the code editor, to my lovelace UI (Configure UI) and then + sign to add a card, then add a “manual” card and type in this code:

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

Reboot HA and it’s working.

1 Like

Yes, local is www. I’ve installed manually as I test a lot. If you use HACS, files are in different places.

Rob, I’m guessing your url in the post has a type? You said that you created “www/community/lovelace-icloud3” but in the RAW it says “url: /community_plugin/lovelace-icloud3…”

Not a typo…

“/community_plugin” is mapped to “www/community” within HA.

-Rob

OK. I didn’t know that. Thank you.

I think what I’m seeing in many folks posts is that they have it incorrectly listed as a “js” type when in fact it’s a “module” type. There is an error in the installation documentation on the site.

I have duplicated your setup and I’m still getting the error that the card doesn’t exist. This is very frustrating. I have gone over the details many times but can’t figure this out.

Four questions:

  1. Did you install via HACS, or did you manually download and install?
  2. Did you copy both the .js and the .gz into the appropriate icloud3 subdirectory?
  3. Did you set the card type in the resources in Lovelace to “module” instead of “js”?
  4. Have you rebooted HA after making any changes?

Can you post your Resources code and your card code?
Also post your file paths.

I’d like to add to the discussion but I am away from my computer right now and am getting certificate errors when I access it using the iOS app on all of my devices.

I’m running HA v0.102.0 and using the lovelace-ui.yaml setup with the code shown in the iCloud3 documentation. I have not converted to the UI but probably need to add that to my list of ‘things to do’.

What would be ideal is to leave the icloud3-event-log-card.js file in the /custom_components/icloud3 directory and have the Lovelace resources statement point to it there. Then it wouldn’t have to be moved after a HACS or non-HACS installation. Maybe one of you could figure out how to do that and I’ll change the docs to that method.

BTW, I have learned that the base iCloud component has been rewritten and have been told that it logs into the 2fa iCloud account without giving the constant notifications. If that is the case, one of my priorities will be to incorporate that code into iCloud3 so the fmf tracking method will no longer be needed. It looks like a lot of changes will be needed which will probably take at least 3 months with my current schedule. I would look for a springtime release but don’t hold me to it.

Here’s the answers:

1 - HACS
2 - yes, based on your suggestion
3 - yes, based on your suggestion
4 - yes

Resources code:
resources:

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

Card code:
entities:

  • entity: sensor.icloud3_event_log
    title: iCloud Event Log
    type: ‘custom:icloud3-event-log-card’

What really throws me is when I have no space in the “custom:icloud3-event-log-card” statement, all the rest of the page elements immediately disappear. Put the space between “custom:” and “icloud3” and all elements come right back.

Is there any special things I need to know as far as special characters like quotes? I’m simply using the apostrophe on the keyboard in the custom card statement in RAW or manual card.

Humor me and try removing the version (?v=1.000) from the resource designation. i don’t think it’s required with HACS.

Way ahead of you. I tried that already. Although I haven’t tried it since I changed the type to Module instead of JS.

Hold please…

Made no difference. I think the whole problem revolves around the system thinking that the custom card doesn’t exist.

Still have the error: “Custom element doesn’t exist: icloud3-event-log-card”

The v=1.0 is for your browser to know you are using a new version of the JavaScript module so it will download it instead of using the one in it’s cache.

What happens if you add/remove the space on another card that you are using and is working. Maybe there is a bug in UI.