Mail and Packages: Custom component for UPS, FEDEX, and USPS

yes it does
image

Has the error re-occurred?

yes as everything is unavailable?

Check your home-assistant.log file either your IMAP connection is timing out, or your IMAP server is denying your login.

This error originated from a custom integration.

Logger: custom_components.mail_and_packages
Source: helpers/update_coordinator.py:360
integration: Mail and Packages (documentation, issues)
First occurred: 6:16:02 PM (1 occurrences)
Last logged: 6:16:02 PM

Timeout fetching Mail and Packages (imap.gmail.com) data

that’s what I got from the logs

That’s not the log.

where would i find the log info for imap?

home-assistant.log in /config

from the logs i get these:

are there any files in /config/www/mail_and_packages/ ?
If so please delete them.

I have deleted all the files and i still have the same error

any files in /config/custom_components/mail_and_packages/images/amazon/ ?

Yes, tons of files.

go ahead and delete those

With Microsoft deprecating App Passwords for IMAP. Is Gmail now the only email that can be used?
I tried iCloud but it doesn’t seem to work.

From MS

The deprecation of basic authentication also prevents the use of app passwords with apps that don’t support two-step verification.

I’m getting the same error from the integration:

This error originated from a custom integration.

Logger: custom_components.mail_and_packages
Source: helpers/update_coordinator.py:360
integration: Mail and Packages (documentation, issues)
First occurred: 8:11:30 AM (103 occurrences)
Last logged: 1:22:37 PM

Timeout fetching Mail and Packages (imap.gmail.com) data

I’ve emptied H:\www\mail_and_packages. I’ve enabled debug logging for the integration, but I’m not seeing anything meaningful other than “Error updating sensor data:”.

2024-10-28 13:29:06.498 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Found html email processing...
2024-10-28 13:29:06.619 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Unexpected html format found.
2024-10-28 13:29:06.619 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Extracting image from email
2024-10-28 13:29:06.619 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Discarding junk mail.
2024-10-28 13:29:06.619 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Extracting image from email
2024-10-28 13:29:06.619 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Discarding junk mail.
2024-10-28 13:29:06.619 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Extracting image from email
2024-10-28 13:29:06.623 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Removing duplicate images.
2024-10-28 13:29:06.650 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Removing USPS announcement images.
2024-10-28 13:29:06.651 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Image Count: 1
2024-10-28 13:29:06.651 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Resizing images to 724x320...
2024-10-28 13:29:06.772 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Creating array of image files...
2024-10-28 13:29:06.773 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Generating animated GIF
2024-10-28 13:29:06.789 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Mail image generated.
2024-10-28 13:29:06.791 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Generating mp4: /config/custom_components/mail_and_packages/images/70ea2586-a6de-486f-9cc6-21d1682355fb.mp4
2024-10-28 13:29:09.301 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Sensor: usps_mail Count: 1
2024-10-28 13:29:09.301 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Sensor: usps_packages Count: 0
2024-10-28 13:29:09.301 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Sensor: zpackages_delivered Count: 0
2024-10-28 13:29:09.301 DEBUG (SyncWorker_43) [custom_components.mail_and_packages.helpers] Sensor: zpackages_transit Count: 0
2024-10-28 13:29:27.615 INFO (MainThread) [custom_components.mail_and_packages] Version 0.4.0 is starting, if you have any issues please report them here: http://github.com/moralmunky/Home-Assistant-Mail-And-Packages
2024-10-28 13:29:27.615 DEBUG (MainThread) [custom_components.mail_and_packages] Data will be update every 0:05:00
2024-10-28 13:29:28.970 DEBUG (SyncWorker_63) [custom_components.mail_and_packages.helpers] Created: 28-Oct-2024, Today: 28-Oct-2024
2024-10-28 13:29:28.973 DEBUG (SyncWorker_63) [custom_components.mail_and_packages.helpers] Image Name: 70ea2586-a6de-486f-9cc6-21d1682355fb.gif
2024-10-28 13:29:28.973 DEBUG (SyncWorker_63) [custom_components.mail_and_packages.helpers] Copying /config/custom_components/mail_and_packages/mail_none.gif to /config/custom_components/mail_and_packages/images/70ea2586-a6de-486f-9cc6-21d1682355fb.gif
2024-10-28 13:29:28.975 DEBUG (SyncWorker_63) [custom_components.mail_and_packages.helpers] Image name: 70ea2586-a6de-486f-9cc6-21d1682355fb.gif
2024-10-28 13:29:28.995 DEBUG (SyncWorker_63) [custom_components.mail_and_packages.helpers] Created: 25-Oct-2024, Today: 28-Oct-2024

The integration continuously fails setup over the last week or so.

Increase your IMAP timeout setting.

That did the trick. My previous setting was 30 seconds; I doubled it to 60 seconds and the add-in started successfully. Thanks :+1:t2:

1 Like

I have some packages coming for the holidays and my family loves this integration. Meaning they are going to know “packages” are coming with alerts on their phone within minutes of them ariving. Want to intercept the gifts before they see them. Is there any way to temporarily disable this integration and then enable it again later? Also if so would HA then alert the packages came?

Yeah, just disable it.

Settings – Devices & Services – Mail & Packages – Three dots – Disable