I am quite new to Home Assistant, I am trying my hardest to get Alexa TTS working, Ultimately I want Alexa to speak in certain automations but atm I’m just trying to get it to work at all in testing, I don’t know what I am doing wrong. I have the Alexa media player installed from Hacs, I can do things like enable / disable Alexa guard via HA so the Alexa media player add on seems to be working fine but I just can not get the TTS working at all.
I was following this guide:
I’m just trying to get Alexa to say something testing from the developer Tools services page but I just keep getting errors.
‘Failed to call service notify/alexa_media. expected a dictionary for dictionary value @ data[‘target’]. Got ‘media_player.office’’
I have the code copied from that guide exactly although the service page does look different for me, I’m sorry if its really simple I just cant work out what I’m doing wrong.
I also had such issues with alexa_media service. Instead of using notify.alexa_media as service, you must be having a service with your device name like notify.alexa_media_<your_device_name>. Please try using that and in that you dont have to mention the target device.
Thanks for your response, I tried that but I am getting the same thing, I removed the target device and used alexa_media_office but still not having it
Hi there… Always happy to help. Please the automation yaml below. I have explained the yaml below that.
alias: Motion Trigger Voice Notification
description: ''
mode: single
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor
from: 'off'
to: 'on'
condition: []
action:
- service: notify.alexa_media_office
data:
message: Attention. Motion Triggered.
data:
type: announce
method: all
So with the automation we first have to specify what is the trigger which means in what condition the automation should start. In our case its the motion detected which would be seen as the change of state of the motion sensor entity. Here I have mentioned the motion sensor entity as binary_sensor.motion_sensor but you need to change it to the entity_id of your sensor. So this automation will be triggered when this sensor changes from off to on state.
Next is the action side, where we have just copied the alexa notification from above. Here also you need to change the entity id of the alexa notify service.
There is also a feature of providing a condition in between trigger and action which can check a condition like time or if a switch is on or so before proceeding with the action. It is useful in limiting the working of this automation to specific periods or conditons.
There is also one thing to note. This is just the standard method to do this but this can vary according to the type of sensors you have. In that case we may need to teak somethings in this automation. Please do ask if you need any more help.
If you have trouble copying the yaml. Please see the gif below.
take note that i have a grouped device in the alexa app that refers to both of my Echo Dots , and they are called ‘both speakers’
in the [ Developer Tools > Services ] page, under the service dropdown menu, only ‘notify.alexa_media_both_speakers’ was in the list, and not ‘media_player.both_speakers’ but at somepoint i found older documentation or reports of people having to add the ‘target:’ line and i checked in [ Developer Tools > States ] and found that i did have a media_player to target, that fit the description of the both speakers. And using that script above, used the
[ Developer Tools > Template ] tab with this:
service: script.sendalexa
data:
msg: hello! this test worked!
and the same in automations that i wanted to have passed to alexa tts.
Is there some issue with Alexa Media Player and Sonos One?
I am using this script to test the service in the developer tools but I got no error and nothing is played.
service: notify.alexa_media_buro_2
data:
message: Attention. The water pump has been switched on.
data:
type: announce
method: all
The domain is “notify”, similar to light, climate, etc.
You could try in DevTools / Service test section the proposed above solution. It worked for me today after delaying the solution of this problem for some months.
I am adding the relevant screenshots from the call notify service for Alexa TTS in NodeRed (the call service and the json entry - took me a while to figure it out).
i’ll be great full for the correct syntx for playing my own mp3 files on echo
I followed this youtube but without success, I tried all kind of syntx but no music
Thanks
Hello. For some reason I remember Alexa being able to speak voice notifications without the ding dong noise first. I also remember not having to put “announce.” Did something change or is this possible? I may have been wrong, but, when I was using them as speakers in my alarm system I don’t think they did that.