I had email notification via SMTP configured and working in HA v73. I am now trying to do the same in HA v87 but as soon as I call the service Developer Tools-Services I am receiving the following message
failed to call service notify/notifier_name
This is a copy of the relevant section of the configuration.yaml relating to notify:
The settings are exactly the same as they were for HA v73 so I am wondering if there is any additional settings that need to be added/edited to get the notify function working
Would it be possible for anyone who has this service working after the major upgrade to the authentication to paste a copy of their configuration.yaml here.
I’m particularly interested in the authentication section and the notify section. I just want to compare it with mine to see if there’s anything I’ve missed.
As I mentioned earlier this service was working perfectly in HA 73. I did a fresh install of HA 88 and copied over all my settings but still cannot get it to work. It’s acting like smtp notify is not installed or configured properly.
I’ve been using SMTP notifier via gmail for quite some time and haven’t made any changes for the new authentication system, etc. Of course I’m still on 0.84.6, so can’t really say for versions after that. But, FWIW, here is my redacted config:
Note that [email protected] & password represent the e-mail account I use just for sending e-mail from HA, whereas [email protected] represents my personal e-mail address to receive the messages. (Obviously those are not the actual e-mail addresses.)
Can you expand on what you mean by that? Are you seeing an error, and if so, what is it? Do you see the service listed on the Services page? I don’t know what “key” you’re referring to.
Ii’s just the section relating to authentication I was interested in. Are you using a long term access token. Are you still using legacy api password.
There’s something here thats blocking my access to these services.
Yes notify.notifier_name is listed on the Services page. When I call it issues that error message
I’m trying to imagine a 2600 line configuration.yaml file. Now I know why you didn’t post it.
No, I do not use any long term access tokens. Besides, that, and how I log into Home Assistant has nothing to do with how SMTP gets out of Home Assistant. At least, not that I see.
I’m asking about errors shown on the Info page and/or in home-assistant.log.
I tracked an error on the HA log with one of the service calls that indicated that a valid key was required.
I’ll need to do a little more testing on my setup. Everything else appears to be functioning correctly. I was even surprised to get HA Dashboard working on v87 with help from other users here.
I did try to do an update from v73 to v87 but that didn’t work too well. I actually found it easier to install v87 and move the various files like configuration.yaml, appdaemon.yaml and the various dash files over to the new install.
@pnbruckner I’ve tried everything possible to get SMTP Notify to work. When I call the service in Dev Tools Services all i’m getting is a message Failed to call service notify even though I’m providing a valid json message.
There’s no error messages showing up in the home-assistant.log to give me an idea where to look. It’s like notify is not installed/configured but it does show in the drop down list in Dev Tools Services.
It’s not the only service that is failing either. I wonder if something in v87 could be blocking it. As I mentioned notify is working perfectly in v73 so it can’t be blocked by my router or my ISP
Are you sure there’s nothing in home-assistant.log? Do you have logger set to debug (for everything)? I find it hard to believe that it’s not working, yet there’s no indication why in the log.
FWIW, here’s what I see in my log (with some details redacted and irrelevant details removed) at startup and when I use the notify.email_xxx service with service data = {"message": "test"}:
pi@raspberrypi:/home/homeassistant/.homeassistant $ grep notify home-assistant.log
2019-02-23 12:02:42 INFO (MainThread) [homeassistant.loader] Loaded notify.smtp from homeassistant.components.notify.smtp
2019-02-23 12:02:42 INFO (MainThread) [homeassistant.setup] Setting up notify
2019-02-23 12:02:48 INFO (MainThread) [homeassistant.components.notify] Setting up notify.smtp
2019-02-23 12:02:56 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=notify, service=email_xxx>
2019-02-23 12:02:56 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 13.2 seconds.
2019-02-23 12:02:56 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=notify>
2019-02-23 12:06:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=email_xxx, service_data=message=test>
2019-02-23 12:06:21 DEBUG (Thread-3) [homeassistant.components.notify.smtp] Building plain text email
I renamed my configuration.yaml to configuration.old. I powered down the Raspberry Pi3 and powered it back up creating a new configuration.yaml. I rebuilt the configuration.yaml and I finally have smtp notify working.
Thanks @pnbrucknerfor having a look at the problem.