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

Should be in /config/www/community if you installed via HACS.

found it… looks like a javascript file, so this will be trial by error for me.
thanks!

sorry to be back so soon…
wondering if the sensor.mail_deliveries_message is something I need to configure?
It isn’t present to select.

That sensor you created via a template.

1 Like

Thanks for the quick reply… (got that working… ended up being my split config causing the issue)
so I’m just full of questions today, here’s another one.

in the HACS card for Mail and Packages, it shows this:
image

However I do not understand why camera.mail_image_url is placed here (I dont have this either).
Is this a typo in the card preview?
Why not have camera.mail_usps instead?
image

Or just one of these cameras
image

That’s how @moralmunky typed in the camera :stuck_out_tongue:
You use a camera entity not one of the URL entities.

hopefully he ( @moralmunky ) sees this post and can update the preview to be correct as I was searching high and low for it.

So I’m back to this issue again…
Finally got an email alert from USPS and Amazon, yet nothing populates for the CARD.
Then reviewed my settings (I changed nothing, just looked at them)… however I try to submit and now I get an error.

To get through this error, I had to remove the 3 email address and replace with “”, submit, then re-edit and re-insert them and submit once more. THen it works. I’ve had this issue several times.

Trying a couple different card/views to see what I like, neither show the updates to the emails I received

this is in the logs

2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity camera.mail_usps_camera (<class 'custom_components.mail_and_packages.camera.MailCam'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity camera.mail_amazon_delivery_camera (<class 'custom_components.mail_and_packages.camera.MailCam'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_amazon_packages_delivered (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_amazon_exception (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_amazon_hub_packages (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_amazon_packages (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_fedex_delivered (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_fedex_delivering (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_fedex_packages (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_updated (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_ups_delivered (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_ups_delivering (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_ups_exception (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_ups_packages (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_usps_delivered (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_usps_delivering (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_usps_exception (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_usps_mail (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_usps_packages (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_packages_delivered (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_packages_in_transit (<class 'custom_components.mail_and_packages.sensor.PackagesSensor'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_image_system_path (<class 'custom_components.mail_and_packages.sensor.ImagePathSensors'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-05 16:38:17 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.mail_image_url (<class 'custom_components.mail_and_packages.sensor.ImagePathSensors'>) implements device_state_attributes. Please report it to the custom component author.

Turned Debug on, it sees the email, but the sensors are not updating to reflect this info:

2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Amazon emails found: 1
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Email Multipart: True
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Content Type: multipart/alternative
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Amazon Subject: Your AmazonSmile order #113-xxxxxxx-xxxxxxx has shipped
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Looking for: will arrive:
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Arrive Date: Thursday, January 6
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Arrive Date: Thursday, January 6
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Arrive Date: Thursday, January 6
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Looking for: estimated delivery date is:
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Looking for: guaranteed delivery date is:
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Looking for: Arriving:
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Looking for: Arriverà:
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] Amazon email search address: ['[email protected]', '[email protected]']
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (OR FROM "[email protected]" FROM "[email protected]" SINCE "02-Jan-2022")
2022-01-05 16:52:48 DEBUG (SyncWorker_3) [custom_components.mail_and_packages.helpers] DEBUG email_search value: ('OK', [b''])

Also noticed the wording is different.

"on" VS "by"
…never saw any of the DEBUG logging search for “Expected Delivery By

image

UPDATE: Went ahead and opened a ticket up so I do not continue posting here.
https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/issues/611

Has anyone converted the value of sensor.mail_updated (date string) to a Unix timestamp for manipulation? As near as I can figure, the format is (’%b-%d-%Y %H:%M %p’), but I’m at a loss as to how to convert a string of that format to a timestamp.

I plan to change that to a proper timestamp, could you open an issue on github requesting this as a reminder for me?

Doing that now, thanks…

EDIT: my intent was to show contextual time/date info… for example, if the last update was today, I only care about the AM or PM time of the last update. If the last update was yesterday, or last week, I’d like to show that additional detail.

1 Like

Per the ticket I opened yesterday @moralmunky quickly got back to me (Awesome guy!!).
He recommended I installed the Beta version, so did that for the Integration and the Card.
The integration now has a device registering which connects all the entities… pretty slick! (guessing this device depends on a couple manual steps to be taken for sensors manually created in the wiki docs).

So far this has cleared up the error I was having when adding forwarded email addresses for amazon.
Also asked if the top 3 icons could have a HOVER OVER function included to show what these are.
I believe they stand for Mail incoming, Pkgs InTransit, and Delivered??

Here is what it looks like now (had to wait for the gif to scroll the the end, but it cycles mail pieces.

1 Like

Great integration. Just have a few questions. I am using the beta version and have USPS, UPS and Fedex working by sending email to my gmail account. I am however having problems getting my amazon info to integrate. My amazon account sends emails to my apple iCloud account. I have tried to forward my amazon emails to my gmail account and add my email to the Amazon Forward Field in the configuration process. It however does not work.

  1. Question 1: Can this integration be used with Apple iCloud. I seem to always get an error
  2. On the amazon forward email addresses I have entered my actual address from iCloud not in quotes. Is this correct?
  3. If the integration does not work with iCloud and will not work with forwarding amazon iCloud email then I read that you can forward email to homeassistant@dnsorhomeassistant (via duckdns) Do I need to set up just duckpins or do I also need to set up an email server etc.

Thanks in advance

No, apple has problems playing correctly with everyone else.

Yes that’s how it should be.

I don’t knokw what duckpins is.

The forwarding should work, can you verify the email address listed in the “FROM” part in gmail, some email services like gmail just forward it as is and don’t change the from address, maybe iCloud is doing the same?

Sorry about the typo #2 - should be duckdns. homeassistant@dns-of-homeassistant (duckdns)

From in my gmail…has [email protected]

Should technically be working, check the debugging output.

I do not see any error in the debug log?

2022-01-12 13:16:52 INFO (MainThread) [custom_components.mail_and_packages] Version 0.3.4-b16 is starting, if you have any issues please report them here: http://github.com/moralmunky/Home-Assistant-Mail-And-Packages
2022-01-12 13:16:52 DEBUG (MainThread) [custom_components.mail_and_packages] Data will be update every 0:05:00
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Created: 12-Jan-2022, Today: 12-Jan-2022
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Image Name: c9deb04b-a1ae-4e23-97b3-7bf8c3c4fd91.gif
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Copying /config/custom_components/mail_and_packages/mail_none.gif to /config/custom_components/mail_and_packages/images/c9deb04b-a1ae-4e23-97b3-7bf8c3c4fd91.gif
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Image name: c9deb04b-a1ae-4e23-97b3-7bf8c3c4fd91.gif
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Created: 12-Jan-2022, Today: 12-Jan-2022
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Image Name: 35c59804-396d-4d16-99f2-77927041c477.jpg
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Copying /config/custom_components/mail_and_packages/no_deliveries.jpg to /config/custom_components/mail_and_packages/images/amazon/35c59804-396d-4d16-99f2-77927041c477.jpg
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon Image Name: 35c59804-396d-4d16-99f2-77927041c477.jpg
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Image path: custom_components/mail_and_packages/images/
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Searching for Amazon delivered email(s)…
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon email search address: [email protected]
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “Delivered: Your” SINCE “12-Jan-2022”)
2022-01-12 13:16:53 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] DEBUG email_search value: (‘OK’, [b’’])
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon delivered email(s) found: 0
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Searching for Amazon image in emails…
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] HTML Amazon emails found: 0
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon email search address: [email protected]
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “Consegna effettuata:” SINCE “12-Jan-2022”)
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] DEBUG email_search value: (‘OK’, [b’’])
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon delivered email(s) found: 0
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Searching for Amazon image in emails…
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] HTML Amazon emails found: 0
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon email search address: [email protected]
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “Delivered: Your” SINCE “12-Jan-2022”)
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] DEBUG email_search value: (‘OK’, [b’’])
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon delivered email(s) found: 0
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Searching for Amazon image in emails…
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] HTML Amazon emails found: 0
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] Amazon email search address: [email protected]
2022-01-12 13:16:54 DEBUG (SyncWorker_7) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “Consegna effettuata:” SINCE “12-Jan-2022”)

Does the log show that it’s looking for your email address at any point?

yes here is what I have

[custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “Consegna effettuata:” SINCE “12-Jan-2022”)
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG email_search value: (‘OK’, [b’’])
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Amazon delivered email(s) found: 0
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Searching for Amazon image in emails…
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] HTML Amazon emails found: 0
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Sensor: amazon_delivered Count: 0
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] [Hub] Amazon email list: [‘[email protected]’, ’ [email protected]’, ‘[email protected]’, ‘[email protected]’]
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SUBJECT “ready for pickup from Amazon Hub Locker” SINCE “12-Jan-2022”)
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG email_search value: (‘OK’, [b’’])
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] Amazon hub emails found: 0
2022-01-12 14:00:36 DEBUG (SyncWorker_1) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM "

[custom_components.mail_and_packages.helpers] Amazon email search address: [email protected]
2022-01-12 14:00:37 DEBUG (SyncWorker_1)

[custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM “[email protected]” SINCE “09-Jan-2022”)