Finally Shelly has a voice...

  • ... 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:

    Code
    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 8)

  • Nice, but here is a way easier way of doing this, just create a Shelly scene that triggers Alexa and then create an Alexa routine that gets triggered by this Shelly event and says whatever you preset inside the routine.

    (You can trigger a Shelly scenes via http call inside a script.) Or just use the Alexa rutine api, as probably mentioned in your link, which I cannot view.

    .Screenshot_20231029-203641.png

    3 Mal editiert, zuletzt von _[Deleted]_ (29. Oktober 2023 um 20:50)

  • Good Morning!

    Yes, that's what I did before I found the described solution. BUT:

    1. Alexa notifications from Shelly scenes are limited to 3 (with basic plan)
    2. Scenes can't handle dynamic information. They are preset and can't include dynamic information like e.g. a date or any other dynamic value. I wanted Shelly to speak whenever my script has some information for me. And a scene for every possible sentence is just... <X
    3. The "Alexa Says" action in the routine won't let you give Shelly her personal voice 8)