[Deprecated] Amazon Alexa Text to Speech (TTS) v0.6.2 - Direct Integration (USA, Canada, UK, Italy, Australia, & Brazil)

Well it is still an early release. I am sure @ogiewon can look into it when he has times. I don't think it should be too hard to include groups in the list.

As to the errors you are getting, it looks like the app is sending too many requests all in a row and making amazon mad...

Yup, looks like 3 is the limit before she starts complaining and giving me the cold shoulder. :wink:

4 Likes

Agreed. I just tried to add a group of Alexa devices in th Alexa app, and it did not show up. I also removed the device filter from the Alexa TTS Manager App to expose the “Everywhere” device as a test. Unfortunately, it does not work either.

How does Spotify access individual echo's and "music" groups (vs device groups) as well as volume?

I have no idea about Spotify! :slight_smile:

I was just thrilled to get Text to Speech working!

I would like to add volume control as the next feature.

Does this help at all?

https://developer.amazon.com/docs/mrm/multi-room-music-sdk-overview.html

I am not a developer so it's all greek to me. It just strikes me that you might be really close to something like this.

I think there are a bunch of us who are beyond thrilled you got this to work!!!!

1 Like

Glad to hear you're enjoying it!

This integration was based upon this Bash Shell Script - GitHub - walthowd/ha-alexa-tts: Alexa Unsolicted TTS for Home Assistant, not a published Amazon Alexa API. I just converted the 'curl' calls in that script into Hubitat 'http' calls to avoid the need for the separate computer to run the script. There are a lot more features in that script that can be converted into the App/Driver. I just figured TTS would be the most useful feature, and it was the one I most wanted!

I'll need to find more time, as this has consumed a few days already, and the family has started to notice... :wink:

1 Like

If people start listing the features they want most, I can try to help getting some of the features added. I will add, I am not a developer, but I can google like a pro to find answers usually. I've converted a few apps over to HE already from ST.

I think first and foremost I am going to try to tackle a bug preventing us from changing the cookie or selecting other devices after the initial install.

1 Like

Have you updated to the latest version? I can change the cookie string each time I open the App. Also, I can change the list of checked devices as well.

What browser and operating system are you running on? Chrome on Windows 10 works very well for me.

Nope. Didn't know there was a new version. I just got done with family time and was about to dive into it.

Yup works. However, when I added a new cookie, it showed my list as nothing had been selected. Not a big deal really since it didn't create a duplicate device.

1 Like

I think the features I would like are:

  1. Volume Control per device per announcement.
  2. Group Access (I'd like to be able to announce something throughout the house.

That would really be it. This is amazing!!!

1 Like

Can't seem to get my device list to populate.

Are you using an .ca or .com account? If it is a .ca account did you change any of the code in the app?

I'm not in Canada but initially had the same issue and had to add a semi-colon to the end of the cookie string before the device list would show up.

It could be I had echo dots before they were available in Canada so I was originally on .com
Even If I go to a .ca to sign in it automatically redirects me and logs me in to a .com site.

I got my cookie using @ritchierich Chrome and I did not have to delete any double quotes or add a semi-colon.

If you go back to https://alexa.amazon.com your cookie will reset so you will have to get a new one.

Just updated to the new app code grabbed a new cookie and added my ecobee4 and fire tablet (as well as all my dots).

I wish I understood cookies better. I have an app that I ported for AT&T Digital Life that grabs your cookie using your login creds and then stores them in the app. If the app ever has problems like a return code other than 200 it attempts to log in again and grabs a new cookie. I would think that code could be used for this as well.

Does anyone understand how this stuff works to take a look at the home cloud hub code and possibly port it over to this app?

2 Likes

Have it working here in the UK :wink:

Updated the sections as below in the App code, as @cwwilson08 had already stated.

        def params = [uri: "https://layla.amazon.co.uk/api/behaviors/preview",
                      headers: ["Cookie":"""${alexaCookie}""",
                        "Referer": "https://alexa.amazon.co.uk/spa/index.html",
                        "Origin": "https://alexa.amazon.co.uk",

and here

    def params = [uri: "https://layla.amazon.co.uk/api/devices-v2/device?cached=false",
                  headers: ["Cookie":"""${alexaCookie}""",
                  "Referer": "https://alexa.amazon.co.uk/spa/index.html",
                  "Origin": "https://alexa.amazon.co.uk",

I used Firefox, added the extension here and emptied my cookies first (makes it much easier to find things). Then visited amazon.co.uk and alexa.amazon.co.uk/spa/index.html, then ran the extension and started editing.

The Cookie was a little tricky to say the least, I don't have the section for "sid=" but attempted it anyway. I mimicked the cookie in @ogiewon's example on github and set out in the same manner:

at-acbuk=
csrf=
sess-at-acbuk=
session-id=
session-id-time=
x-acbuk=
session-token=
ubid-acbuk=

Fantastic :wink: many thanks @ogiewon and @cwwilson08 for the app and the tips! ! :+1:

Cheers
Roy

2 Likes

OMG!!! THIS IS AWESOME AND WICKEDLY EASY TO SETUP!!

Thank you for figuring this out! Incredible!!

2 Likes

@NoWon, thanks for the info. Tried everything I could think of, must have been your .com account or the fact that things are just different in Cow Town.

After seeing @cwwilson08 & @Royski modify the code for different regions I was able to find the server for .ca accounts. I have posted the modified code below. Thank you all for the inspiration!

Thanks @ogiewon for the great app!

        def params = [uri: "https://alexa.amazon.ca/api/behaviors/preview",
                      headers: ["Cookie":"""${alexaCookie}""",
                        "Referer": "https://alexa.amazon.ca/spa/index.html",
                        "Origin": "https://alexa.amazon.ca",

    def params = [uri: "https://alexa.amazon.ca/api/devices-v2/device?cached=false",
                  headers: ["Cookie":"""${alexaCookie}""",
                  "Referer": "https://alexa.amazon.ca/spa/index.html",
                  "Origin": "https://alexa.amazon.ca",
2 Likes

@Christopher and @Royski,

When I get home tonight, I will work on adding a Country selection field to the first page of preferences to automate these changes. Thank you both for successfully figuring out the settings for your countries!

3 Likes