Echo Devices (Alexa) as Media Player - Testers Needed

No. The device setup just enumerates everything Amazon returns from the API. You’ll see the same devices in the Alexa app.

Got EXACTLY the same issue and in my case worse as I’ve renamed them, have Sonos with Alexa in and old fire TV devices. They all show up and I’ve done the same as you and named unused but it took me ages to identify them all as I had quite a few (my own fault, early adopter :grin:)

I’d love to clean them up and get rid of them but no clue how. I’ve even tried renaming them in the entity register but no joy.

Feel your pain!

I see more in HA than shows in the app. It’s a bit of a pain

If those devices no longer exist or they aren’t associated with you then you can deregister them on the Alexa website. it’s under “settings” on the left.

They are not in my alexa app to deregister, haha. Thats the issue. I did deregister them before I gave them away. For me it’s only one., but it looks like others have a few. Weird.

1 Like

Has anyone tried to directly call the media_player.alexa_tts service from IFTTT. I was just thinking I could skip having to create a script or automation for a couple things I use IFTTT for.

I have had good success with calling a script. The simple IFTTT trigger when an alexa timer goes off, has been nice. Just useful if you set a kitchen timer and then happen to be away from the kitchen and get distracted/forget.

Just started thinking if I could just call the service directly, I could save some scripting, and some time, just passing the json for what I wanted to say for those kinds of things

Actually, I think this should work. Might be a nice way to add some TTS notifications to things that are not currently integrated into HA, without having to create scripts, automations, input_booleans, etc.

I’ve been doing exactly that for a few weeks now. When I have an incoming landline call on my Ooma, Ooma tells IFTTT and IFTTT sends a voice string directly to my Alex media player service with who is calling. Works fantastic with very little delay.

1 Like

I think this could be a really good feature request…

OK, as already mentioned before, other langiages is a problem. I tried amazon.de as URL and got a nice captcha loop forever. Then I switched back to .com and was able to pass the captcha. But all Devices were not available as status. Now I modified your script to give a more recent User Agent and accept language to de-DE and now… It works! I tried to reset the cookie and failed, but as it seems it works now, regardless of the cookie still alive. Seems like a tidy up in deps and the py cache folder inside custom_components is not enough ^^

self._session.headers = {
    'User-Agent': ('Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
                  'AppleWebKit/537.36 (KHTML, like Gecko) '
                  'Chrome/68.0.3440.106 Safari/537.36'),
    'Accept': ('text/html,application/xhtml+xml, '
               'application/xml;q=0.9,*/*;q=0.8'),
    'Accept-Language': 'de-DE,de;q=0.5',
    'Referer': site
}

FYI, new version 0.9.1 posted. It fixed some bugs and tried to resolve the captcha loop problem, please try it out. Thanks to @finity for helping debug.

For those still who are working fine with 0.9.0, please make a backup of alexa.py just in case as I switched the url we’re logging into from the generic Amazon sign in to the Alexa sign in. My tests showed it should work the same but I only tested US/UK.

@Daniel_Reimer: Can you please submit an issue for that bug so we don’t lose track of it?

I just installed the new update and it’s still working correctly for me.

@keatontaylor is there any way to add adjust speed and do pauses in the way alexa speaks?
how to go about it?

If you look at the history in your alexa app, you’ll see that a “Simon says INSERT WORDS HERE” is being run. The naitive alexa voice is what is used. I suspect there will not be a way to reduce the speed, unless alexa has that option itself. Hmm, never tried, but can you say “Alexa, talk slower”?

Anyway, she will speak the same way for everything regardless of if its via this or just normal alexa speak

Using another component I had to add comma’s in weird spots in the sentence that would act as natural spot for taking a breath. Otherwise Alexa would just ramble through the sentence quickly.

@Jtmoore81 what component was that

It was TTS through Chromecast and had the Chromecast hooked up to my surround sound. I couldn’t ever get it to work like I wanted and this started to gain some traction.

Quick tip: If you want her to swear put an apostrophe in the word and she’ll say it.

1 Like

You can test this out. have the echo say something via HA and this component, then say, Simon Says “and then say the same thing it said via HA”. the time, delays, pauses, etc will be 100% the same. Now maybe adding a comma or making sure to include proper punctuation will help in how she speaks. I would bet on that. So if your output has no punctionation she will speak as if there is no punctuation.

1 Like

Trying to get a sensor that has the last volume state, so I can change it back once an announcement is made, any idea why the below does not work. I have tried it different ways but this is the only one without a config error.

  - alias: "AlexaChangedVolume_Office"
    initial_state: True
    trigger:
      platform: template
      value_template: '{{states.media_player.Office.attributes.volume_level}}'
    action:
      - service: mqtt.publish
        data_template:
          topic: 'alexa/volume/office'
          payload: '{{states.media_player.Office.attributes.volume_level}}'