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

Hi folks,

Checking if anyone can assist with the errors I’m getting in the logs before raising GitHub issues. Managed to set up the integration fine, although haven’t tested it with any incoming deliveries yet.

Issue 1 Error

 Logger: custom_components.mail_and_packages.helpers
Source: custom_components/mail_and_packages/helpers.py:552
Integration: Mail and Packages (documentation, issues)
First occurred: 22 June 2022 at 22:30:13 (1008 occurrences)
Last logged: 16:15:32

    Error searching emails: 'ascii' codec can't encode characters in position 20-21: ordinal not in range(128)
    Error searching emails: 'ascii' codec can't encode character '\u201c' in position 20: ordinal not in range(128)
    Error searching emails: 'ascii' codec can't encode characters in position 28-29: ordinal not in range(128)
    Error searching emails: 'ascii' codec can't encode character '\u201c' in position 28: ordinal not in range(128)

Racking up a lot of errors with this one - I assume it’s odd characters in email subjects but any way to avoid the errors? I’m using Gmail.

Issue 2 - Warning

 Logger: custom_components.mail_and_packages.sensor
Source: custom_components/mail_and_packages/sensor.py:200
Integration: Mail and Packages (documentation, issues)
First occurred: 22 June 2022 at 22:30:19 (70 occurrences)
Last logged: 16:15:32
External URL not set in configuration.

I’m using Nabu Casa so don’t need to define an external URL. I assume other cloud users also use this integration and may therefore be able to advise? I know it’s just a warning but seems like an unnecessary one.

I did look for any similar issues being raised but couldn’t find anything of use. Thanks in advance for any assistance.

What version of the integration is this?

Version 0.3.4-2

Try the latest beta.

That seems to have sorted the error thanks!

Not the ‘External URL not set in configuration‘ warning though.

It’s just a warning, you can ignore it.

Ok thanks.

I’ve seen some people using the carrier logos with the Mail and Packages plug in on their dashboard, but haven’t been able to figure out how this is being done. Anyone have pointers/code I can look at?

      - entity: sensor.mail_ups_delivering
        image: /local/icons/ups.png

You set the image.

1 Like

Thanks. Does this work in a specific card? I tried it with the default entities one and it doesn’t work. I’ve been using Mushroom and that doesn’t seem to work either (using its entities card)

I use the glance card for this.

Updated HA and also updated with latest Mail and Packages updates. In logs getting:

Error attempting to generate image: all input arrays must have the same shape

Latest beta fixes this.

I updated to the latest beta and I still get the input arrays must have the same shape message. No other settings were changed.

Verify the version you should be running 0.3.5-b12

image

Thanks it’s working now! I rolled back, then reinstalled the latest beta and it’s back again!

1 Like

Looks like the resize issue sticks around a little bit still, I have another beta coming up to sort this.

I had the USPS mail sensors working properly when I first setup the integration a few weeks ago with 0.3.5-b5, but I just noticed that it’s no longer showing number of mail pieces or images anymore. I’ve tried updating to 0.3.5-b13 and still no luck.
I checked my email and I am still receiving the USPS Informed Delivery emails each day in the proper folder and they have not been deleted.
There are no errors in the log file.
I tried a few reboots including the host itself but no luck. My email account is on Yahoo for this integration.
What else should I look for?

Enable debugging to see what’s going on.

The integration is working great for me… I get counts and images. However, I’m getting the following error in my HA logs:

Logger: homeassistant.components.automation.update_usps_mail_camera_path_on_hass_restart
Source: components/automation/__init__.py:526
Integration: Automation (documentation, issues)
First occurred: 12:40:24 PM (24 occurrences)
Last logged: 2:34:47 PM

Error while executing automation automation.update_usps_mail_camera_path_on_hass_restart: Unable to find service local_file.update_file_path

Any ideas why it’s trying to call this service and failing? The automation, automation.update_usps_mail_camera_path_on_hass_restart doesn’t appear in the list in the UI.