I’m sure I won’t be the first to have asked … but is there any rock-solid way to get Alexa to speak through Node-Red ? I currently using node-red-contrib-alexa-remote2 which works most of the time, except when it doesn’t ! - That damn cookie keeps going AWOL as and when it feels like it and then it complains about the JSON being wrong, when nothing has changed, then it miraculously starts working again.
I know there are some offshoots of the remote2 collection i.e. Cakebaked etc. - but are they any better than remote2 ?
I’m a Nabu Casa subscriber (yes, we should all be supporting the dev crew !) so I can use that if its an option - although I can’t see how to get NR to push speech to their service.
Thanks in advance
In NodeRED, I use a service call node that calls tts
with cloud_say
as the service, to whatever media_player.*
I want, and then I fill in the data
as the example in NR shows:
{
"message": "My name is hanna",
"language": "en",
"options": "platform specific"
}
This allows me to abandon using Google Home for TTS, but still be able to play the TTS through the Google Home speakers (i.e. Alexa media player in your case.)
Thanks Jon,
Very helpful suggestion - and I’m trying it out now !
I’ve installed the Alexa Media Player through HACS which seems to have installed correctly.
I’m having a bit of trouble configuring the call service node though - any chance you could drop a screenshot of one of yours to use as reference ?
Many Thanks
See if this flow configuration helps.
[{"id":"890c1261.5a3b2","type":"api-call-service","z":"5d820ca2.1e4494","name":"","server":"c7cbc76b.fd06a8","version":5,"debugenabled":false,"domain":"tts","service":"cloud_say","areaId":[],"deviceId":[],"entityId":["media_player.picoreplayer"],"data":"{\"message\":\"this is a test\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":670,"y":80,"wires":[[]]},{"id":"f7925054.ba747","type":"api-call-service","z":"5d820ca2.1e4494","name":"","server":"c7cbc76b.fd06a8","version":5,"debugenabled":false,"domain":"media_player","service":"volume_set","areaId":[],"deviceId":[],"entityId":["media_player.picoreplayer2"],"data":"{\"volume_level\":1.0}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":80,"wires":[["890c1261.5a3b2"]]},{"id":"8a6e5fd3.1d6b2","type":"inject","z":"5d820ca2.1e4494","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":80,"wires":[["f7925054.ba747"]]},{"id":"c7cbc76b.fd06a8","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true,"credentials":{}}]
Many thanks Jon, very useful and I have it working. Although there is one issue which I fear may be insurmountable, unless anyone has been here before.
Your method works great with any media player except for Alexa.
She just pipes up with “Sorry, I’m have trouble accessing your simon says EU skill right now”.
A quick Google suggests this is a known issue with Alexa devices and I’m not sure there is an easy fix for it.
Hey - ho !! I’ll keep trying to sort it, if I can’t, I think I’ll just use your method with non-alexa media players !
Bummer.
I have no experience with Alexa.
My thoughts exactly !!
Whooooop ! Cracked it !!!
It’s all about the Call Service Node settings !
Doing a bit of research I concluded Alexa does not like the settings - Domain=tts and Service=cloud_say
After a bit of faffing I found if I set Domain=notify and Service=name_of_your_media_player, she sings like an angel !
Thanks so much for pointing me in the right direction !