icloud3
icloud3 copied to clipboard
iCloud3 v3.0.1 (3/20/2024) has been released
Go to the Releases page, download the zip file, unzip it into the icloud3 directory, restart HA and enjoy. --or-- Get it from HACS
Thank you for iCloud3, I like it a lot and always try to keep up to date with it. This time tried to upgrade via HACS, and getting the below error right after restart, was running v3.0.rc10.4. Re-downloading the previous version fixes the issue.
See below the entry in homeassistant logs, the integration doesn't seem to write anything in icloud3-0.log
Logger: homeassistant.setup Source: setup.py:390 First occurred: 18:01:14 (1 occurrences) Last logged: 18:01:14
Error during setup of component icloud3 Traceback (most recent call last): File "/config/custom_components/icloud3/init.py", line 66, in async_setup if tracker['platform'] == DOMAIN: ~~~~~~~^^^^^^^^^^^^ TypeError: string indices must be integers, not 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 390, in _async_setup_component result = await task ^^^^^^^^^^ File "/config/custom_components/icloud3/init.py", line 79, in async_setup log_exception(err) File "/config/custom_components/icloud3/helpers/messaging.py", line 422, in log_exception write_ic3_log_recd(traceback.format_exc()) File "/config/custom_components/icloud3/helpers/messaging.py", line 284, in write_ic3_log_recd Gb.iC3Logger.info(log_msg) ^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'info'
This error was being generated when starting iCloud3 and a check was being done to see if there was an old v2 version of iCloud3 in the HA configuration.yaml file. During the check, an error was generated which then generated another error trying to add a record to the 'icloud3_0.log' file, which had not been set up yet.
None of this needed to be done and it should not effect starting iCloud3 or tracking and devices.
I have made a change to prevent this from occurring. Unzip the init.zip file into the icloud3 directory and restart HA. init.zip
@josefelixh Let me know if the init.py solves your problem. If it does, I’ll promote it as an updated release
EDIT 5/22 5:54p EDT: The icloud3-0.log file is being controlled by the HA logger. See if you have the following in your configuration.yaml file. If not, add them and restart HA
logger:
info
Let me know if the init.py solves your problem. If it does, I’ll promote it as an updated release
It did solve the issue, thank you very much, really appreciated!
A little question, where are the logs now? the integration doesn't seem to log anything in icloud3-0.log
or home-assistant.log
Hello, after installation of v3.0.1 over release candidate system hangs up with two errors: Setup failed for custom integration 'icloud3': Unable to import component: Exception importing custom_components.icloud3 16:55:08 – (FEHLER) setup.py Unexpected exception importing component custom_components.icloud3 16:55:08 – (FEHLER) loader.py
Any idea what went wrong here? Thanks in advance
I assume you downloaded it room HACS. I would do that again and then restart HA
@josefelixh The icloud3-0.log file should be log file should still be in the config directory along with home-assistant.log, Is it still not being created when you restart HA?
If it's not, I also made a slight change to the module that creates it. Unzip messaging.zip into the icloud3/helpers directory and restart HA. See if that creates it. messaging.zip
@josefelixh The icloud3-0.log file should be log file should still be in the config directory along with home-assistant.log, Is it still not being created when you restart HA?
If it's not, I also made a slight change to the module that creates it. Unzip messaging.zip into the icloud3/helpers directory and restart HA. See if that creates it. messaging.zip
The file is there, as always has been, but nothing gets log anymore, the last line is below, which happened when I restarted homeassistant after the upgrade.
03-22 08:02:36 [start_ic3...:0424] HA Shutting Down
Install the messaging.zip and d delete the log file and let’s see if it recreated. What is the log level parameter on the Format Parameters config screen? If it is not created, change it to Debug.
And are there any errors in the _home-assistant.log_file?
Install the messaging.zip and d delete the log file and let’s see if it recreated. What is the log level parameter on the Format Parameters config screen? If it is not created, change it to Debug.
And are there any errors in the _home-assistant.log_file?
@gcobb321 thank you.
- I installed messaging.py as instructed, the file got recreated, yet nothing logging.
- Then the log level parameter was set to
INFO
, I did set it toDEBUG
and restart icloudv3, still nothing in the icloud3-0.log-rw-r--r-- 1 root root 119820 Mar 23 08:23 home-assistant.log
- Next, restarted homeassistant, still nothing logged, file seemed to have been touched though,
-rw-r--r-- 1 root root 0 Mar 23 08:27 icloud3-0.log
, and the integration wouldn't load, found2024-03-23 08:30:04.795 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: icloud3
in home-assistant.log` and eventually.
2024-03-23 08:32:40.804 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry iCloud3 for icloud3
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/icloud3/__init__.py", line 236, in async_setup_entry
await Gb.hass.async_add_executor_job(
asyncio.exceptions.CancelledError: Global task timeout
- Still can't see anything being logged
@josefelixh The default home assistant logger level is Warning. iCloud3 runs under the HA logger and writes all messages at the Info level. I have made a change to iCloud3 to set HA to logger to Info and will send it to you later this morning.
Adding the following to your HA configuration.yaml file will also set it to Info level.
logger:
default : info
logger: default : info
@gcobb321 ok, the logger level made the difference, no need for the messages.py
, with only the __init__.py
patch, I can see logs again, but only with the chatty info level set for home assistant. I will try with setting the level only for icloud3 like
logger:
default: warning
logs:
custom_components.icloud3: info
...and hopefully I can still see icloudv3 logs
The HA log already defaults to Warning. That is why the icloud3 Info is not showing because the Info (internal value=20) is below Warning (internal value=30). I have a few things to try today to see if they work. If not, the HA Info level might be required.
@josefelixh I've added a few parameters to the icloud3-0.log setup and made some other adjustments. This should fix the problem where the HA logger is not setup in the configuration.yaml file or it's default level is Warning.
Unzip icloud3_v3.0.1.1.zip into the icloud3 directory and restart HA. icloud3_v3.0.1.1.zip
I assume you downloaded it room HACS. I would do that again and then restart HA
I tried, but it didn't help. Then I renamed the folder, tried again. No way. I deinstalled, and even with that no success. Same errors.
What I didn't do is to delete the complete config. Maybe that should help? Now it says: not loaded. Is there any workaround to safe the complete config to import later?
Or should I try to go back to the latest rc to use it as it worked?
Thanks a lot in advance.
@DPStaude Delete the iCloud3 integration Delete the iCloud3 directory Restart HA Restart HA again. The 2nd restart will a cache. Rename the config/.storage/icloud3 directory to something else to save the iCloud3 config Reinstall iCloud3. Instead of using HACS, install the v3.0.1.1.zip in a post a few entries above this one. Readd the iCloud3 integration Hopefully it will load. If not, create an issue and we will look at some logs and try a few other things.
@josefelixh I've added a few parameters to the icloud3-0.log setup and made some other adjustments. This should fix the problem where the HA logger is not setup in the configuration.yaml file or it's default level is Warning.
Unzip icloud3_v3.0.1.1.zip into the icloud3 directory and restart HA. icloud3_v3.0.1.1.zip
@gcobb321 This seems to have fixed all the issues, the integration loaded just fine and I can see logging in icloud3-0.log
thank you very much. I assume you'll be pushing this version to HACS, which still showing v3.0.1
, a minor thing.
Not sure if this is the right place for suggestions, but the main thing I use the logs for is to double check that when I receive and email from apple regarding an authentication on my account, is it indeed from icloudV3. It will be very helpul to have a sensor in the iCloud3 v3
Device regarding the authentications, or maybe Logbook there.
Again, thank you very much!
Thank you for v3. I have been using it for a few months, no problems. After the last update it is no longer working. Following error:
Home Assistant Core Unexpected exception importing platform custom_components.icloud3.device_tracker March 26, 2024 at 3:41:49 PM – (ERROR) loader.py - message first occurred at March 25, 2024 at 6:59:54 PM and shows up 5 times
Logger: homeassistant.loader Source: loader.py:842 First occurred: March 25, 2024 at 6:59:54 PM (5 occurrences) Last logged: March 26, 2024 at 3:41:49 PM
Unexpected exception importing platform custom_components.icloud3.device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
Any help appreciated.
What is really strange is the next few lines of code have the same statement and do not generate an error. And I am not having a problem on my system.
Anyway, unzip messaging.zip into the icloud3/helpers directory and restart HA. messaging.zip
What is really strange is the next few lines of code have the same statement and do not generate an error. And I am not having a problem on my system.
Anyway, unzip messaging.zip into the icloud3/helpers directory and restart HA. messaging.zip
Works now! Thanks for being so quick. I really appreciate it.