Echo Devices (Alexa) as Media Player - Testers Needed

I’ll for sure look into it deeper over the weekend! I appreciate your help and suggestions @keithh666

So, I’m kind of stuck. This was working great for me a few versions ago, but I just can’t figure out why TTS stopped working. The media player is working fine, but I can’t get the TTS service to do anything.

In my logs I’m noticing these messages looping over all of my dots:

Log Details (WARNING)

Thu Sep 27 2018 23:48:54 GMT-0700 (Pacific Daylight Time)

Update of media_player.family_room_dot is taking over 10 seconds

Is anyone else seeing this? I’m not getting much for error details sadly.

Resolved this - for anyone else who may be stuck in this situation though…

Deleting the pickle file in the HA config directory and the contents of the py_cache folder worked and I am up and running.

Probably should have read through this thread properly first! :blush:

1 Like

I get those “over 10 seconds.” messages all the time but it doesn’t seem to affect my dots. Although I get those “over 10 seconds.” messages often regarding a lot of other devices also.

this worked for me!

Thanks

Been reading this thread for a while. I am still trying to adjust the volume of the echo in an automation at a set time. i.e. turn it down when the kids go to bed.

If there is media playing then it works. If it’s done something else or played TuneIn radio then the media player is in standby and the volume does not change.

I have seen surgestions to do a “…” Message and change the volume while it is playing.

I have tried to make this work with no success.

Has anyone actually done this and can share there code.

First of all I want to say Thank you for this work! Its A great addition to my set up.
The players show up and work (some times)

Stil trying to resolve Some problems:
-Correct status not always showing. (Stays idle)
-Error message for retreiving data (time-out)
-Add tts (can seem to get it working)
-Auto play tunein (not working)

Does someone have the correct code for starting a media_player.play_media service call?

Do I need an extra code for activating tts?

Thank you all for testing en creating this code!

Same problem. Seeing the same massages and idle state for my players. (Amazon uk)

Are there any plans to implement a way to send commands directly to Alexa? e.g. “What is my flash briefing?” This would be nice for use in automations.

1 Like

What if you stored the “wanted” volume locally, and then next time Alexa starts playing, always set the volume to that. For example, if you add an input_number.alexa_volume to the front end, and anytime that is changed, it would set the Alexa volume. Anytime Alexa starts playing music, it also sets that volume. Something like that.

Otherwise, if you don’t like the idea of adding another volume slider to the front end, you could keep it hidden, and have an automation that sets it to the same volume that you set the Alexa volume to, and use the same premise from above. Hopefully that makes sense.

Anyone know how to get the TTS service to cuss? Anytime I type a swear word, it bleeps it out. That’s no fun! lol

Use 2 u’s in fword

I can use the volume from an input or a fixed value but can’t get it to change the volume as it sends a TTS. The media player stays in standby and so sending a volume_set message does nothing. I can only make in change if it is playing form Amazon music

Any examples of the code you think might work I am willing to give them a go.

Been trying the components out with amazon.co.uk but after selecting either sms or email as an option nothing appears to happen - no code is returned through either medium. Not seen this mentioned much in the thread so wanted to check this approach was supported…?

018-10-02 16:30:07 DEBUG (MainThread) [custom_components.media_player.alexa] Status: {'claimspicker_required': True, 'claimspicker_message': 'Option: sms = `As a text message - +44*********2`.\nOption: email = `In an email - j**n@***.co.uk`.\n'} got captcha: None securitycode: None Claimsoption: sms VerificationCode: None
2018-10-02 16:30:07 DEBUG (MainThread) [custom_components.media_player.alexa] No valid cookies for log in; using credentials
2018-10-02 16:30:07 DEBUG (MainThread) [custom_components.media_player.alexa] Loaded last request to https://www.amazon.co.uk/ap/signin/259-1305911-6560632 
2018-10-02 16:30:07 DEBUG (MainThread) [custom_components.media_player.alexa] Preparing post to https://www.amazon.co.uk/ap/signin Captcha: None SecurityCode: None Claimsoption: sms VerificationCode: None
2018-10-02 16:30:07 DEBUG (MainThread) [custom_components.media_player.alexa] Performing second login to: https://www.amazon.co.uk/ap/signin
2018-10-02 16:30:08 DEBUG (MainThread) [custom_components.media_player.alexa] Another login requested to: https://www.amazon.co.uk/ap/signin
2018-10-02 16:30:08 DEBUG (MainThread) [custom_components.media_player.alexa] Creating configurator to start new login attempt
2018-10-02 16:33:03 DEBUG (MainThread) [custom_components.media_player.alexa] Status: {'login_failed': True} got captcha: None securitycode: None Claimsoption: sms VerificationCode: None

See post this post regarding the pay_media.

For TTS, use the service: media_player.alexa_tts with json like this:

{“entity_id”: “media_player.bedroom_echo_dot”, “message”: “Test message”}

First, thanks a lot to the dev! I have been waiting for this!

I can see the media_player.alexa in the front-end, but it’s state is Unavailable so I cannot use the media player.

No errors in the log file

Here’s what I have done so far:

  • I can login to alexa.amazon.com with my Amazon account.
  • I do not se any captchas when login in.
  • I have logged in using the web broser from the same device where I am running HASS to avoid any cookies-reated problems.
  • I have followed the instructions putting the .py-file in the correct directory, the correct settings in configuration.yams
  • I got no error.logs in the log file.

Any ideas of what I might do wrong?

I had the same issues … I had to remove the “” in the yaml file

1 Like

So did I. Gaaah!!!

Ok, I just barely installed this component, so I don’t have much experience or knowledge of how it works quite yet. What If you record your own “song” that is just silence; maybe only 3-5 seconds long. Upload that to your Amazon Music library, and when you want to change the volume at a specific time, send a command to play your silent song and then immediately send another command to set the volume. Would that work?

I have the quotes and it works fine… I think some of these issues are stemming from when people copy and paste the code from here into their yaml file. Depending on your editor, it may use the “smart quotes” which will cause issues.