... with the help of Amazon Alexa.
If you hate cloud based stuff, then stop reading
Challenge: I wanted to trigger (unlimited) Alexa routines from a Shelly Script. And especially I wanted Alexa (Shelly) to give spoken feedback.
The solution I found is based on triggering Alex routines with a single HTTPS call. Somehow like described in this existing forum thread.
The steps in short are:
1. Install the 'TextVorlesen' Skill and let Alexa speak anything.
- Go to https://esp8266-server.de/alexa/TextVorlesen/ to find out how to make Alexa speak your text. This includes installing the 'TextVorlesen' Skill.
- Log on to Amazon on that site to get your personal API access HTTPS call. Now you're able to send any text to Alexa with that call.
2. Automate the process of speaking your text
- Normally you have to say "Alexa, Text vorlesen" to have your text spoken, but this can be automated by a second skill: Webhook Routine Trigger Skill
- For this you first need to create triggers on this site: https://trigger.esp8266-server.de/
- Every created trigger shows up under your Alexa Smarthome devices after searching for new ones (just like the limited Shelly Alexa notifications). These "virtual devices" can be "activated / pressed" by the trigger URL.
- finally create a Alexa routine that is triggered by your new device and ultimately calls the "Text Vorlesen Skill".
3. Use your trigger(s) in Shelly script to make Alexa / Shelly say something
- Just like any normal HTTPS Call. Here's an example:
Shelly.call('HTTP.GET',
{url: 'https://trigger.esp8266-server.de/api/?id=4498&hash=[your-personal-hash]'}
);
Sounds complicated? Only on the first sight.
Hint: Give your Shelly a personal sound by choosing an available voice in your language and using SSML commands