Home Assistant with Virgin Media SMTP Server
As it took a while for me to get the settings correct to enable me to send email alerts using Virgin Media in the UK, I thought I would document the process.
Add a new user to Virgin Media
First off add a new user to Virgin Media instead of using the main login for the account, this will make it to keep track of things and also interms of security, you don’t reeally want your Virgin account password stored in plain text on a device connected to the internet.
- Login to your account here:
https://my.virginmedia.com/home/index
- Then go to My profile and choose Manage Accounts.

- Then click Create a new account.
- Choose a suitable First and Last name – I went for Home Assistant.
- Then pick an email address for the mailbox, I started mine with ha so I could easily know what it was. It must be at least 6 characters with no spaces or underscores. You can use . full stops though.
- Once that is confirmed, you will be promoted to set a password.
Unfortunately Virgin Media wont accept a password longer than 10 characters for some reason, c’mon Virgin make it longer! - Now you are all ready, just head over to https://my.virginmedia.com/my-apps/email/mailbox to test you can login first though.
Email Notifications in Home Assistant
Go to you Home Assistant, then Supervisor > File Editor > Open Web UI
You want to open your configuration.yaml file
In here create a new section called notify and add the following sections:
- name: a descriptive name for this notifier
- platform: smtp
- sender: the full email address of the virgin media account you just set up
- recipient: the email address of who you want to receive the emails
- server: smtp.virginmedia.com
- username: the Virgin Media email you just setup above
- password: the password you set when creating the account
- port: 465
- encryption: tls
- timeout: 15
It should look like this

Now save and we are ready to test it.
Testing email Notifications in Home Assistant
Now we are all setup we now want to do a quick test and the easiest way to do this it to got to Developer Tools and then Services.
In the Service drop down scroll down to notify.xxxx and find the name you gave it above.
Then in the Service Data box enter something like:
{
“title”: “Test Email”,
“message”: “Hello this is a test”
}
Then click Call Service

You will get no feedback from the web form but you should get an email in the account of the recipient you setup, this shows that email notifications are now working.
Email Notifications in Home Assistant Automations
You are now ready to include the email notifications in your Home Assistant Actions, below is one that I use to notify me that my Floodlight has been triggered.

For more information on Home Assistant SMTP Notifications visit:
https://www.home-assistant.io/integrations/smtp/
For Virgin Media email settings visit:
https://www.virginmedia.com/help/updating-virgin-media-mail-settings-on-android
Comments
Post a Comment