Make alexa say anything you want script...

So I have been waiting for Amazon to allow us to trigger Alexa to say/play stuff and I am running out of hope. However, I finally ran across this: GitHub - walthowd/ha-alexa-tts: Alexa Unsolicted TTS for Home Assistant

It was a little tricky setting up as the login method didn’t work because a captcha was being presented. I think maybe switching out the login function to something with casperjs/phantomjs might help. I ended up using a plugin called “cookies.txt” in Firefox to login to alexa.amazon.com and save the cookies. Once I had the cookies the script worked.

I have copied the script and cookie file over to Vera yet to test it out yet, but running it from the CLI of my desktop everything is working except it does not support announcements.

I did figure this out instead of announcements you can do:

alexa_remote_control.sh -d "ALL" -e speak:"This is a test of all  Amazon Echo devices" 

Keep us posted please

The openHAB guys have this pretty well figured out. You can have all sorts of control over the announcements and can play music and change other settings. You could look at their binding for possible enhancements to your script. But the big issue is that for some users (including me) Amazon kicks you out after a week or so and you have to re-login - and it’s hard to automate the captcha. This doesn’t hit all users for currently unknown reasons.

https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.amazonechocontrol

[quote=“jswim788, post:4, topic:199683”]The openHAB guys have this pretty well figured out. You can have all sorts of control over the announcements and can play music and change other settings. You could look at their binding for possible enhancements to your script. But the big issue is that for some users (including me) Amazon kicks you out after a week or so and you have to re-login - and it’s hard to automate the captcha. This doesn’t hit all users for currently unknown reasons.

https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.amazonechocontrol[/quote]

I haven’t used openhab in a year since we moved. Barely enough time to get my new vera all reconfigured…

However, this is something I want to get integrated more.

I never get the captcha when logging in from the browser… so I am thinking either casperjs or recaptcha with php to get the cookie - Utiliser reCAPTCHA avec PHP  |  Google Developers