I am having problems introducing the notify SMTP platform. When adding to an otherwise functional setup via the entries:
notify:
- name: email_admin
platform: smtp
sender: !secret mail_sender
port: 25
recipient: !secret mail_recipient
server: !secret mail_server
username: !secret mail_account
password: !secret mail_password
encryption: starttls
sender_name: "Home Assistant Instance"
debug: True
This results in the following log entries:
2017-07-23 23:01:26 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform smtp
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/__init__.py", line 101, in async_setup_platform platform.get_service, hass, p_config, discovery_info)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__ yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/smtp.py", line 75, in get_service if mail_service.connection_is_valid():
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/smtp.py", line 120, in connection_is_valid server = self.connect()
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/smtp.py", line 106, in connect self._server, self._port, timeout=self._timeout)
File "/usr/lib/python3.4/smtplib.py", line 242, in __init__ (code, msg) = self.connect(host, port)
File "/usr/lib/python3.4/smtplib.py", line 321, in connect self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python3.4/smtplib.py", line 292, in _get_socket self.source_address)
File "/usr/lib/python3.4/socket.py", line 509, in create_connection raise err
File "/usr/lib/python3.4/socket.py", line 500, in create_connection sock.connect(sa)
socket.timeout: timed out
I am running HASSBIAN with the latest versions of HA.
My email server is local, and is seeing nothing from the RPi running the HAserver.
I have tried varying parameters:
- port 25 or 587
- server:F ip address, netbiod address, or full FQDN
- debug: True and False
I get the same eror whatever the settings!!
How can go about debugging this - I have plenty or computing expertise, but not in Python!
All suggestions welcome.
Thanks