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

Those are just info messages, debugging is far more verbose.

yeah, i guess my point is that even though Iā€™ve enabled debug logging, Iā€™m not getting any.

my configuration.yaml snippet:

logger:
  default: info
  logs:
#    custom_components.wyzesense: debug
#    wyzesense.gateway: debug
#    homeassistant.components.ozw: debug
#    homeassistant.components.mqtt: debug
#    homeassistant.components.automation: debug
#    aiopulse2: debug
    custom_components.mail_and_packages.sensor: debug

Whoops, typo in the wiki.

Try this:

logger:
  default: info
  logs:
#    custom_components.wyzesense: debug
#    wyzesense.gateway: debug
#    homeassistant.components.ozw: debug
#    homeassistant.components.mqtt: debug
#    homeassistant.components.automation: debug
#    aiopulse2: debug
    custom_components.mail_and_packages: debug

sensor.mail_usps_mail show currently with an image attribute of e1532108-3acc-439d-87d0-44f580ce667f.gif (which does update per a template sensor i made to monitor that value) but the actual image downloaded has not changed. it still shows as 954842f7-f486-4490-9afd-eb0c4d93f5d4.gif which is what was created during the last reset

What version of the integration are you running?

aha. there are the logs.

2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Attempting to find Informed Delivery mail
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Informed delivery search date: 08-Dec-2020
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (FROM "[email protected]" OR FROM "[email protected]" SUBJECT "Your Daily Digest" SENTON "08-Dec-2020")
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Cleaning up image directory: /config/images/mail_and_packages/
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Checking for overlay files in: /config/images/mail_and_packages/
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Copying file to: /config/images/mail_and_packages/overlay.png
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Copying file to: /config/images/mail_and_packages/vignette.png
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Copying file to: /config/images/mail_and_packages/white.png
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Informed Delivery email found processing...
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Removing duplicate images.
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Removing USPS announcement images.
2020-12-08 10:26:20 DEBUG (SyncWorker_13) [custom_components.mail_and_packages.helpers] Image Count: 0
2020-12-08 10:26:20 INFO (SyncWorker_13) [custom_components.mail_and_packages.helpers] No mail found.

Says here that it found your email.
Removed any duplicate images
Removed the announcement and junk mail images
and in the end no real mail was found.

strange. the digest has 5 pieces of mail listed

If they look like this:

They get removed as junk mail.

1 Like

yeah, i figured that. iā€™m only counting the scans of actual envelopes.

Whatā€™s more is that the Daily Digest email is never marked read by the integration, which leads me to think itā€™s not actually reading the message.

so i was running the current version of 0.2.2 but it was having the same issueā€¦ so i moved back to an old version to see if it would workā€¦ same thingā€¦ so i updated backā€¦ same thing

soā€¦ i once again removed everything and started freshā€¦ suddenly itā€™s workingā€¦ weird

Sounds like it may have been a configuration setting that got scrambled.

I just got my daily message Iā€™ll see what my debug reports.

I found the issue, looks like the IMAP command syntax was off. b5 inbound.

great. that seemed to fix the parsing of the email. the message in my inbox is read and the debug logs show the extraction.

2020-12-08 14:01:18 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Attempting to find Informed Delivery mail
2020-12-08 14:01:18 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Informed delivery search date: 08-Dec-2020
2020-12-08 14:01:18 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] DEBUG imap_search: (OR FROM "[email protected]" FROM "[email protected]" SUBJECT "Your Daily Digest" SENTON "08-Dec-2020")
2020-12-08 14:01:18 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Cleaning up image directory: /config/images/mail_and_packages/
2020-12-08 14:01:18 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Checking for overlay files in: /config/images/mail_and_packages/
2020-12-08 14:01:18 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Copying file to: /config/images/mail_and_packages/overlay.png
2020-12-08 14:01:19 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Copying file to: /config/images/mail_and_packages/vignette.png
2020-12-08 14:01:19 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Copying file to: /config/images/mail_and_packages/white.png
2020-12-08 14:01:19 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Informed Delivery email found processing...
2020-12-08 14:01:22 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Extracting image from email
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Extracting image from email
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Extracting image from email
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Extracting image from email
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Extracting image from email
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Extracting image from email
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Removing duplicate images.
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Removing USPS announcement images.
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Image Count: 5
2020-12-08 14:01:23 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Resizing images to 724x320...
2020-12-08 14:01:26 DEBUG (MainThread) [custom_components.mail_and_packages] Finished fetching Mail and Packages (imap.gmail.com) data in 10.113 seconds
2020-12-08 14:01:27 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Creating array of image files...
2020-12-08 14:01:29 DEBUG (SyncWorker_4) [custom_components.mail_and_packages.helpers] Generating animated GIF
2020-12-08 14:01:31 INFO (SyncWorker_4) [custom_components.mail_and_packages.helpers] Mail image generated.

Now, the entities are unavailable again. Iā€™ve restarted a couple times but no dice :frowning:

Try going thru the options on the integration and hit submit.

Ah yes. I get an ā€œUser input malformedā€ error. There is no place to select the entities anymore. Let me try reinstalling