Hi there, I’m trying to add an SMTP account to my HA config file but for some reason it seems to not be working.
I followed the instructions on: https://www.home-assistant.io/integrations/smtp BUT I can’t add the SMTP integration in the addons and don’t know why t s not visible to me !
This is the my config yaml part :
data:
message: Intruder Alert At Home yahoo
title: Intruder Alert YAhoo
service: notify.yahoo1
service: notify.notify
data:
message: On Off Fenstersensor ist ON yahoo
mode: single
This is also the log :
2021-01-11 18:23:09 ERROR (MainThread) [homeassistant.components.automation.new_yahoo_automation] New Yahoo Automation: Error executing script. Service not found for call_service at pos 1: Unable to find service notify.yahoo1
2021-01-11 18:23:09 ERROR (MainThread) [homeassistant.components.automation.new_yahoo_automation] While executing automation automation.new_yahoo_automation
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 404, in async_trigger
await self.action_script.async_run(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 1026, in async_run
await asyncio.shield(run.async_run())
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 242, in async_run
await self._async_step(log_exceptions=False)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 250, in _async_step
await getattr(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 457, in _async_call_service_step
await service_task
File “/usr/src/homeassistant/homeassistant/core.py”, line 1395, in async_call
raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service notify.yahoo1
Operating System : Home Assistant OS 5.10
i trayed everything but i still not receive any email
can you please help ?
Mnay thanks in advance
Looka like that your notifier is not recognized. Try commenting out the automation and restart. If the smtp configuration is vorrect, you should see a service called notify.yahoo1 under Developer Tools -> Services. Otherwise there should be an error in your logs.
thanks for your quick reaction and your comment. I did commented out the automation and restarted but still the issu: i can’t activat the smtp platform and i don’t know why !
hier ist the last log :
2021-01-11 20:38:34 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: notify
2021-01-11 20:39:05 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform smtp
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 268, in async_setup_platform
notify_service = await hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/smtp/notify.py", line 87, in get_service
if mail_service.connection_is_valid():
File "/usr/src/homeassistant/homeassistant/components/smtp/notify.py", line 141, in connection_is_valid
server = self.connect()
File "/usr/src/homeassistant/homeassistant/components/smtp/notify.py", line 127, in connect
mail = smtplib.SMTP(self._server, self._port, timeout=self._timeout)
File "/usr/local/lib/python3.8/smtplib.py", line 253, in __init__
(code, msg) = self.connect(host, port)
File "/usr/local/lib/python3.8/smtplib.py", line 337, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/local/lib/python3.8/smtplib.py", line 308, in _get_socket
return socket.create_connection((host, port), timeout,
File "/usr/local/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/usr/local/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
socket.timeout: timed out
thansk for your support . I just restarted after the changes you recommanded but still not working .The SMTP is still not available as integration too and the relevant sevices also not available !
and this is the last log
2021-01-11 21:01:19 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform smtp
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 268, in async_setup_platform
notify_service = await hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/smtp/notify.py", line 87, in get_service
if mail_service.connection_is_valid():
File "/usr/src/homeassistant/homeassistant/components/smtp/notify.py", line 141, in connection_is_valid
server = self.connect()
File "/usr/src/homeassistant/homeassistant/components/smtp/notify.py", line 134, in connect
mail.login(self.username, self.password)
File "/usr/local/lib/python3.8/smtplib.py", line 721, in login
(code, resp) = self.auth(
File "/usr/local/lib/python3.8/smtplib.py", line 633, in auth
(code, resp) = self.docmd("AUTH", mechanism + " " + response)
File "/usr/local/lib/python3.8/smtplib.py", line 423, in docmd
return self.getreply()
File "/usr/local/lib/python3.8/smtplib.py", line 396, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed
2021-01-11 21:04:35 ERROR (MainThread) [homeassistant.components.generic.camera] Error getting new camera image from Generic Camera: Cannot connect to host 192.168.178.47:80 ssl:default [Connect call failed ('192.168.178.47', 80)]
Happy for you too
the confusion for me was that some integrations needs to be visible in order to be used, but as hade to learn not for SMTP ! I don’t know for other integrations.
the other confusion is that it will only work if aeverthing is correct means : even the username needs to be 100% and if not you will not see any clear error message refering to it
Thanks to the community for the support !
Thanks, @Burningstone for that tip. I’ll try to get that posted properly. Right now something isn’t working quite right an my post keeps showing incorrectly.
This seems so easy yet I have been fighting getting notifications with smtp setup for a week now.
I even copied the config from ronpro and pasted it in my yaml file. Restarted and yet i still cant call notify.email up in services under dev tools. It just doesnt show up as a notify.email.