-
Notifications
You must be signed in to change notification settings - Fork 86
Configuration and Email Settings
HACS (Recommended)
- Have HACS installed, this will allow you to easily update
- Click
Integrations
then click the+
in the lower right corner and type inMail and Packages
- Click install under "Mail and Packages", restart your instance.
- Download this repository as a ZIP (green button, top right) and unzip the archive
- Copy the
mail_and_packages
folder inside thecustom_components
folder to the Home Assistant/<config path>/custom_components/
directory- You may need to create the
custom_components
in your Home Assistant installation folder if it does not exist - On Home Assistant (formerly Hass.io) and Home Assistant Container the final location should be
/config/custom_components/mail_and_packages
- On Home Assistant Supervised, Home Assistant Core, and Hassbian the final location should be
/home/homeassistant/.homeassistant/custom_components/mail_and_packages
- You may need to create the
- Restart your instance.
HACS (Recommended)
- Have HACS installed, this will allow you to easily switch between
beta
andstable
. - Open HACS
- Click on
Integrations
- Click the overflow menu (the 3 dots) in the bottom right of
Mail and Packages
- Select
Redownload
from the menu - Check/Enable the
Show beta versions
- Select the latest beta from the list and press the
Download
button
Once you have finished installing through HACS or manually go into Configuration -> Integration
select the +
and add the Mail And Packages
integration. This is a two step process.
If you for some reason need to modify your settings instead of removing the integration and re-adding. Go into Configuration -> Integration
select the Configure
button on Mail And Packages
to re-configure the settings.
Notes about specific email providers.
Setting | Description |
---|---|
Host | The address provided by your email host. |
Port | The port provided by your email host. |
The email address you receive notification emails. | |
Password | The password for your email account. |
In order to check multiple email boxes just add the integration again with the credentials for the additional mail provider you are using. This will create another set of sensors for you that will update based on those emails.
Setting | Description |
---|---|
Mail Folder | The folder in your email account that the notification messages are stored. The default is Inbox. |
Sensor List | Choose the sensors to activate that coordinate with the shipping providers you want to track. |
Amazon forwarded email addresses | Provide the email addresses that you will forward amazon notification from. For multiple, please separate each address with a comma. |
Scanning Interval (minutes) | The amount of time that will pass between checking for new email notifications. |
Time in seconds before connection timeout | Increase the time if your mail provider has a slow connection to allow more time to connect too the mail server. |
Image Duration (seconds) | The amount of time each USPS Informed Delivery image is shown in the generated rotating GIF. |
Create mp4 from image | Create an MP4 fo the USPS Informed Delivery image for possible future use. |
Allow external image use* | Save the image to /path/to/config/www/mail_and_packages/ so it is accessible to use in iOS and Android notifications. |
Please note that files stored in the www
Home Assistant folder are publicly accessible unless you have taken security measures outside of Home Assistant to secure it. For increased security and simplicity the USPS Informed Delivery image name is random by default and no longer has the option to turn it on/off. Two new sensors have been created that provide the local file path or a web accessible url for use in displaying or sending in various Home Assistant notification methods.
sensor.mail_image_system_path
-
sensor.mail_image_url
- Requires that eitherExternal_URL
orInternal_URL
is defined in the general configuration options in Home Assistant.
Please note if you are using GMail for this you will need to setup an App Password
in order for this to work.
Please refer to this link for details on how to setup an App Password
Additional information on GMail settings are here under "Set up Gmail with older versions of Outlook and other clients".
Nothing special is required to setup a Yahoo Mail account in this component, just enter your username (your Yahoo Email address) and password as normal. If you have 2FA enabled you will need to generate an app password as outlined on the Yahoo help pages.
References:
Nothing special is required to setup a Yahoo Mail account in this component, just enter your username (your Outlook/Hotmail/Live Email address) and password as normal.
Reference: Here
-
To allow authentication you first need to register your application at Azure App Registrations.
-
Login at Azure Portal (App Registrations)
-
Create an app. Set a name.
-
In Supported account types choose "Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com)", if you are using a personal account.
-
Set the redirect uri (Web) to:
https://login.microsoftonline.com/common/oauth2/nativeclient
and click register. This needs to be inserted into the "Redirect URI" text box as simply checking the check box next to this link seems to be insufficent. This is the default redirect uri used by this library, but you can use any other if you want. -
Write down the Application (client) ID. You will need this value.
-
Under "Certificates & secrets", generate a new client secret. Set the expiration preferably to never. Write down the value of the client secret created now. It will be hidden later on.
-
Under Api Permissions:
- When authenticating "on behalf of a user":
- add the delegated permissions for Microsoft Graph you want (see scopes).
- It is highly recommended to add "offline_access" permission. If not the user you will have to re-authenticate every hour.
- When authenticating "with your own identity":
- add the application permissions for Microsoft Graph you want.
- Click on the Grant Admin Consent button (if you have admin permissions) or wait until the admin has given consent to your application.
As an example, to read and send emails use:
- Mail.ReadWrite
- Mail.Send
- User.Read
- When authenticating "on behalf of a user":
-