Sign inSign up

aneisch/informed-delivery-home-assistant

By aneisch

•Updated over 6 years ago

Retrieves USPS mail and package info from informed delivery emails via IMAP

Image
1

973

aneisch/informed-delivery-home-assistant repository overview

⁠Informed Delivery Home Assistant

Buy Me A Coffee

Retrieves USPS mail and package info from informed delivery emails via IMAP. Publishes mail and package count to MQTT and creates scanned mail gif. This container image was created based on content from the top link, check it out for additional Home Assistant sensor integration info. Credit to @skalavala⁠ and arychj⁠ for the code and writeup!

https://hub.docker.com/r/aneisch/informed-delivery-home-assistant⁠

⁠Usage

⁠Example docker-compose:
version: '3.2'
services:
    informed_delivery:
        container_name: informed_delivery
        image: aneisch/informed-delivery-home-assistant
        volumes:
          - '/etc/localtime:/etc/localtime:ro'
          # volume for mails image output
          - '/tmp/:/output/'
        environment:
          - EMAIL_USERNAME=your_email@your_provider.com
          - EMAIL_PASSWORD=your_password
          - MQTT_USPS_MAIL_TOPIC=/sensor/usps/mails
          - MQTT_USPS_PACKAGE_TOPIC=/sensor/usps/packages
          - SLEEP_TIME_IN_SECONDS=600
⁠Example docker run:
docker run -d -v '/tmp/:/output/' -v '/etc/localtime:/etc/localtime:ro' \
--name informed_delivery -e EMAIL_USERNAME=your_email@your_provider.com \
-e EMAIL_PASSWORD=your_password -e SLEEP_TIME_IN_SECONDS=600 \
aneisch/informed-delivery-home-assistant
⁠Environmental Variables

You only need to specify the environmental variables in docker run or your docker-compose file that you want/need to override:

variabledefaultdescription
MQTT_SERVER10.0.1.22MQTT server address
MQTT_SERVER_PORT1883MQTT server port
MQTT_USERNAMEmosquittoMQTT username (can be ignored if unneeded)
MQTT_PASSWORDpasswordMQTT password (can be ignored if unneeded)
MQTT_USPS_MAIL_TOPIC/usps/mailsTopic where mail count is published
MQTT_USPS_PACKAGE_TOPIC/usps/packagesTopic where package count is published
EMAIL_HOSTimap.gmail.comEmail provider url (see table below)
EMAIL_PORT993Email IMAP port
EMAIL_USERNAME[email protected]⁠Email login
EMAIL_PASSWORDxxxEmail password
EMAIL_FOLDERinformed_deliveryFolder where Informed Delivery mail will be found (you can filter to a specific folder)
GIF_FILE_NAMEtodays_mails.gifMail image gif output name
GIF_MAKER_OPTIONS'/usr/bin/convert -delay 300 -loop 0'Gif creation options
SLEEP_TIME_IN_SECONDS300Sleep time between checks
Email ProviderHost AddressPort
GMailimap.gmail.com993
Yahooimap.mail.yahoo.com993
Outlookimap-mail.outlook.com993
⁠Notes:
  • If using Gmail, you will need to allow less secure apps⁠ to login. I suggest making a separate Google account for this. You will also need to enable IMAP from your Gmail inbox.
  • If MQTT doesn't require login you can leave MQTT_USERNAME and MQTT_PASSWORD as is.

Tag summary

Content type

Image

Digest

Size

67 MB

Last updated

over 6 years ago

docker pull aneisch/informed-delivery-home-assistant