iCloud3 v3 iDevice Tracker - Version 3

Thanks a lot, it’s ok know.

1 more thing please. I’ve got 1 device 100% ok and the other one the app tracker shows unknown:

The second line on the picture is the tracker “device_tracker.iphone_de_yohann” provided by the known_devices.yaml file. As you can see, the tracking works. I don’t know why only my phone and the app tracker isn’t working…

Never mind. I’ve moved a few miles and it’s working now. Thanks for your help.

I’m using iCloud3 for some time now without any issues. Kudos to you Gary for your hard work making this addon and writing the extensive documentation!

There is one issue since the last update (2.3.1) that I would like to address. I think it’s related to the change that the device_name can be the name field used in the app or the entity id as the noted in the releasenotes.

Here in the Netherlands the normal naming convention of a iPhone is “iPhone van Zucht” where Zucht is the persons name. All previous versions of iCloud3 I used, Zucht was also the name thas was used by it. Now since version 2.3.1 the name used in iCloud3 is Vanzucht.

To be clear: in the config_ic3.yaml file I’ve also configured the optional name parameter to the persons name:

devices:

In the documentation I can’t find a configuration parameter to correct this.

Any help would be appreciated.

iCloud3 v2.3.2 was just updated to fix the issues below. Download the new version from HACS.


The following bug was fixed in the iCloud3 v2.3.2 update:

  • The Name parameter was not being decoded correctly due to a bug introduced in iCloud3 v2.3.1.

Also:

  • Added a device_type parameter to override a value extracted from the device_name parameter.
  • Updated the iCloud3 version number which was not updated in the v2.3.1 release.
1 Like

Edit: fixed by editing file to put double quotes around version number.


Hi. Love, love, love this integration.

Not running for me on Core 2021.2.2

2021-02-09 20:51:14 ERROR (MainThread) [homeassistant.bootstrap] Error setting up integration device_tracker - received exception

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/setup.py", line 64, in async_setup_component

return await task # type: ignore

File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component

processed_config = await conf_util.async_process_component_config(

File "/usr/src/homeassistant/homeassistant/config.py", line 826, in async_process_component_config

platform = p_integration.get_platform(domain)

File "/usr/src/homeassistant/homeassistant/loader.py", line 475, in get_platform

cache[full_name] = self._import_platform(platform_name)

File "/usr/src/homeassistant/homeassistant/loader.py", line 480, in _import_platform

return importlib.import_module(f"{self.pkg_path}.{platform_name}")

File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

File "<frozen importlib._bootstrap>", line 991, in _find_and_load

File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 671, in _load_unlocked

File "<frozen importlib._bootstrap_external>", line 779, in exec_module

File "<frozen importlib._bootstrap_external>", line 916, in get_code

File "<frozen importlib._bootstrap_external>", line 846, in source_to_code

File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

File "/config/custom_components/icloud3/device_tracker.py", line 25

VERSION = '2.3.2"

^

SyntaxError: EOL while scanning string literal

2021-02-09 20:51:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 835, in async_forward_entry_setup

result = await async_setup_component(self.hass, domain, self._hass_config)

File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component

return await setup_tasks[domain] # type: ignore

File "/usr/src/homeassistant/homeassistant/setup.py", line 64, in async_setup_component

return await task # type: ignore

File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component

processed_config = await conf_util.async_process_component_config(

File "/usr/src/homeassistant/homeassistant/config.py", line 826, in async_process_component_config

platform = p_integration.get_platform(domain)

File "/usr/src/homeassistant/homeassistant/loader.py", line 475, in get_platform

cache[full_name] = self._import_platform(platform_name)

File "/usr/src/homeassistant/homeassistant/loader.py", line 480, in _import_platform

return importlib.import_module(f"{self.pkg_path}.{platform_name}")

File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

File "<frozen importlib._bootstrap>", line 991, in _find_and_load

File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 671, in _load_unlocked

File "<frozen importlib._bootstrap_external>", line 779, in exec_module

File "<frozen importlib._bootstrap_external>", line 916, in get_code

File "<frozen importlib._bootstrap_external>", line 846, in source_to_code

File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

File "/config/custom_components/icloud3/device_tracker.py", line 25

VERSION = '2.3.2"

^

@avd706
I’ve update the release several times, verified the devices_tracker.py file and installed from HACS myself. There was a file conflict at first but ít seems to be ok now.

1 Like

Thanks @gcobb321 for the quick fix :+1:

1 Like

hello, since the last update i have some problem on running the integration. The only error i see on logs is:

http://192.168.1.99:8123/local/community/icloud3/icloud3-event-log-card.js:1463:71 Uncaught TypeError: Cannot read property 'attributes' of undefined

@Melkor82
The sensor.icloud3_event_log names attribute is accessed to display the names on the Event Log at startup. This error indicates that that entity is not set up. Are any errors displayed in the HA log?

Open an issue and let me see your configuration files for icloud3 including the config_ic3.yaml.

Thanks avd706! Double quotes around version number in device_tracker.py file helped to fix this awesome component!
All works again now!

1 Like

@gcobb321
Hi Gary, I’ve installed your latest release from HACS (iCloud3 v2.3.2) replacing v2.3c, however when I restart iCloud3/HA, there is a reference to v2.3c that persist in the version, as well as to an iCloud3 directory that I was using for the RC release that has subsequently been removed.

This does not affect the functionality of the component, just wanted to bring it to your attention as I may have missed something obvious.

yes, I found the discussion on the github issues tracker. Everything running greater than ever.

thank Mr. Cobb and pauly7300@github. I just scriptkiddied the fix.

@avd706
I ran into the same problem last year and again yesterday after doing a HACS installation to check the release code. HA was giving me an error that the icloud3 v2 directory could not be found and the icloud3 custom component could not be loaded. I ended up restoring the HA configuration and then was able to load icloud3 on my system.

What is the link of the GitHub issue?

@bastero
See my just posted note. I had this problem too, do not what is causing it or how to fix it. The version of iCloud3 you are running is the one displayed in the Event Log. If it says v2.3c, then you are running v2.3c…

Thanks Gary! I’ll delete what is contained in config/custom_components/icloud3 directory, clear browser cache and re-install from HACS tomorrow to see if that loads/installs the latest release.

I don’t understand how I’m running v2.3c when the config/custom_components/icloud3 entire directory was loaded today from HACS and all files timestamps indicate they are from today.

I meant issue 119 in the github repository: https://github.com/gcobb321/icloud3/issues/119

@gcobb321 what is the best way to use your icloud3 zone exit/enter sensors to determine when all are home or away? I currently use Person to set a series of trackers per individual, but it only lets you do device trackers. In your docs, you indicate its best to use the sensor for zone exit/enter since its more reliable. Is the device tracker from icloud3 not setting home/away based on the sensor day from zone exit/enter?

@shmookles
I set up a sensor template to store a value indicating if (1) everyone is home, (2) everyone is far away, (3) all are away or (4) someone is home.

I just updated the Chapter 3.2 - Sample Automations and Scripts to show what I am using. You can find it here.

1 Like

thanks @gcobb321 this is very helpful. Out of curiosity, I read there is a way to convert a sensor to be utilized as a device tracker which would allow me to use it with the Person functionality. Is there a reason you don’t just use that method? Also, why is the sensor entity more reliable for zone enter/exit compared to a device tracker in icloud3?