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

Before I put an issue into github:
Would it be feasible to have a count of emails that would be looked at?
Maybe two sets of counts, one for the emails that the integration is using for today and one for all the past emails. Having the count of past emails is the most desirable so I know how many I need to delete.

For any method other than Amazon anything older than “today” doesn’t get looked at.
Amazon is anything in the past 3 days, so today, yesterday and the day before.

I basically just want a count of emails from “informed delivery”, so I can see how many I have to delete.

That’d be technically out of the scope of this integration.

And that is why I asked here first before github.

1 Like

Anybody else notice a very different UPS email format? The subject/sender is the same, but the body of the email is wayyyy different. Doesn’t seem to have picked up a delivery today.

Should be a pretty easy fix.

EDIT: Odd it should have picked that up. Can you enable debugging and post/DM me the results?

My sensor.mail_amazon_packages sensor shows 0 and I received two packages today. Email shows them coming actually tomorrow but shouldn’t it be showing they are coming or since Amazon always delivers earlier than they say it will never show it coming? Or will it show it coming when it’s already here? Running the latest beta as of yesterday. Something I need to share to help troubleshoot?

So in other words, package says it’s coming Wednesday but was already delivered. This generally always happens when Amazon is delivering it themselves.

It’ll show you the packages tomorrow in the sensor, nothing really can be done about it since they don’t send out a “out for delivery” email.

I am starting to get Custom element doesn’t exist: mail-and-packages-card. I uninstalled, reinstalled, the card, cleared cache in chrome. What is even more strange it doe exist on one chrome tab but not on another. I added a new tab, reloaded HA and it works here. Must be cache related, but not sure what is going on and how to fix it and why it started showing up now?

All were working and stopped again on most devices. Also not working on android app. Still have it on one pc using chrome.

So I have one today that seems appropriate but still not seeing anything showing. Sunday I received an email from Amazon.com[email protected] that says something will be delivered on the 13th. Today is the 13th but sensor.mail_amazon_packages is 0. Is this expected?

My Mail and Packages has been working fine until today.
Amazon and USPS works great but UPS and Fedex are causing issues.
In the logs the first notice is

Then in the logs for UPS (Since I have a package coming today)

My delivery notice is similar to the one in a few posts above this.
Thanks

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Sensor: mail_updated Count: Apr-13-2021 11:27 AM

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Attempting to find mail from ([‘[email protected]’]) with subject (Your UPS Package was delivered)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “Your UPS Package was delivered” SINCE “13-Apr-2021”)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Searching for (Tracking Number) in (0) emails

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Search for (Tracking Number) count results: 0

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Search for ([‘[email protected]’]) with subject (Your UPS Package was delivered) results: b’’ count: 0

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Attempting to find mail from ([‘[email protected]’]) with subject (Your UPS Packages were delivered)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “Your UPS Packages were delivered” SINCE “13-Apr-2021”)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Searching for (Tracking Number) in (0) emails

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Search for (Tracking Number) count results: 0

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Search for ([‘[email protected]’]) with subject (Your UPS Packages were delivered) results: b’’ count: 0

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Sensor: ups_delivered Count: 0

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Attempting to find mail from ([‘[email protected]’]) with subject (UPS Update: Package Scheduled for Delivery Today)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “UPS Update: Package Scheduled for Delivery Today” SINCE “13-Apr-2021”)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Searching for (Tracking Number) in (0) emails

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Search for (Tracking Number) count results: 0

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Search for ([‘[email protected]’]) with subject (UPS Update: Package Scheduled for Delivery Today) results: b’’ count: 0

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Attempting to find mail from ([‘[email protected]’]) with subject (UPS Update: Follow Your Delivery on a Live Map)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “UPS Update: Follow Your Delivery on a Live Map” SINCE “13-Apr-2021”)

2021-04-13 11:27:53 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Searching for (Tracking Number) in (1) emails

Hitting the same issue here, only on the android mobile companion app. Browsers are fine (so far), just the companion app showing the error.

UPS has changed their email format, try 0.3.2-b12

Nope, check the debugging for errors.

Should I specifically be checking the home-assistant.log? Only one reference in there to anything containing the word “mail”. Which is the standard it’s a custom integration, bla bla bla.

Should say when the package was delivered and the email came in that the picture is there and shows 1 package delivered so that piece does work.

You’d need to enable debugging per the wiki then your Home Assistant log will have tons of information from mail and packages.

How does one do that.
What needs to downloaded?

Here’s how:
image

1 Like

I must be doing something wrong. Adding:

logger:
  default: warning
   logs:
     custom_components.mail_and_packages: debug

Testing gives:

Configuration invalidCHECK CONFIGURATION

Error loading /config/configuration.yaml: mapping values are not allowed here in “/config/configuration.yaml”, line 187, column 8

Tried doing this thru the GUI and there was no logger.set_level that comes up.

image