Create an alarm on your Sonos when a new mail is received
Create your Dockerfile
as follows:
pip install -r requirements.txt
python main.py IMAP_HOST IMAP_USER IMAP_PASS
export IMAP_HOST="imap.gmail.com"
export IMAP_USER="mail.example.com"
export IMAP_PASS="secret"
export IMAP_ALARM_LABEL="some-label"
docker run --rm -p 9001:80 fstehle/email-sonos-alarm -v --port 9001 $IMAP_HOST $IMAP_USER $IMAP_PASS $IMAP_ALARM_LABEL
export IMAP_HOST="imap.gmail.com"
export IMAP_USER="mail.example.com"
export IMAP_PASS="secret"
export IMAP_ALARM_LABEL="some-label"
docker run --rm -p 9001:80 fstehle/rpi-email-sonos-alarm -v --port 9001 $IMAP_HOST $IMAP_USER $IMAP_PASS $IMAP_ALARM_LABEL
- Add a valid email address under the
Contact Information
tab in your PagerDuty profile and make sure it receives emails for incidents in theNotification Rules
tab. - Add a rule in your mail program / Gmail to sort the mail from PagerDuty into a specific IMAP folder / Gmail label.
- Start the email-sonos-alarm program like described in the previous section