Echo Devices (Alexa) as Media Player - Testers Needed

Justing confirming - does Alexa as a Media Play only support TTS at this stage? Or is it now capable of playback of media files?
Thanks

it can be used to start media you normally can start with alexa
it cannot be used to play media from a local system

Thanks Rene - as usual, one can always rely on your fine self for clarity. You should be on the payroll :slight_smile:

2 Likes

Will the new NTTS have any effect on this component? Other then it sounding better :slight_smile:

what do you mean with new NTTS?

Amazon are upgrading Alexa to neural text-to-speech, Allowing her to sound a lot more natural and human. I would assume it has no impact on this component.

no i dont think that will change the functionality from alexa and the alexa app.
and what is used here is an hack from the alexa app.

Any word on being able to adjust the volume of the Echo’s with an automation? My kids like to play music and will usually leave the volume so low that the tts can barely be heard.

Hi

I seem to having problems
my config file

 media_player:
    platform: alexa
    email: “[email protected]”
    password: “password”
    url: amazon.co.uk

I get the captcha in which i enter several times then i get box saying

Alexa media player - begin

I confirm the box a few times and nothing happens.

Under Dev-info I get

Log Details (ERROR)
Tue Nov 27 2018 13:00:53 GMT+0000 (Greenwich Mean Time)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/media_player/alexa.py", line 155, in setup_platform_callback
    verificationcode=callback_data.get('verificationcode'))
  File "/config/custom_components/media_player/alexa.py", line 859, in login
    self._data = self.get_inputs(post_soup)
  File "/config/custom_components/media_player/alexa.py", line 644, in get_inputs
    for field in form.find_all('input'):
AttributeError: 'NoneType' object has no attribute 'find_all'

And nothing showing up for media_player under dev-state

Hope someone has any ideas

Thanks

I just wanted to say a bloody well done… I have been waiting for this feature and it worked perfectly… Even with 2FA.

If i could buy you a beer i would :slight_smile:

Check your " " mate… If you copy and paste it the characters are not quite right.

In your config file replace ” and manually type it.

Great stuf! Got it working in minutes, flawlessly. If there only was a way to switch language for TTS service, that would be ultimate solution

I am unable to get this to work. What am I missing? Here is my config.

media_player:
  - platform: plex

  - platform: alexa
    email: "[email protected]"
    password: "password"
    url: amazon.com

I have the alexa.py located at config\custom_components\media_player

I should also note that my alexa is found at alexa.com and is currently working.

Resolved, for some reason my alexa.py didn’t save any of the text I pasted. It is now working as expected.

Im currently looking for a way to also send text (written) commands to the Alexa. Seems like it already works on OpenHab2 Binding:
https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.amazonechocontrol

Is there somebody with more knowledge to point me into a direction what i would need to modify in the alexa.py to try to get this working? I believe the TTS just uses an extra “hidden” command that it automatically puts before the text i have written. Like this:

I write: Message 1
It sends: Simon Says: Message 1

If this is correct, we could also just send the command if we leave out the TTS command. So it works in both ways… as TTS and as a command sender like it does in Amazon.it

this component was created to use as mediaplayer and for TTS, also in the hope to get is as default HA component.
changing the TTS to do the stuff you show would make it not acceptable.

to create the options to do those things, you can use the alexa_remote.sh that is mentioned earlier in this topic.

It does’t send the “Simon Says” command. It is relying on the ability of routines to say custom phrases which on the amazon side is simply using the “Simon Says” skill.

I looked at the openhab docs and did not see a way to directly initiate other commands, where are you seeing this in their documentation?

if you click on the link you see the list of what can be done:

  • use echo device as text to speech from a rule
  • volume
  • pause/continue/next track/previous track
  • connect/disconnect bluetooth devices
  • start playing tuneIn radio
  • start playing Amazon Music
  • control of multi room music
  • show album art image in sitemap
  • speak a reminder message
  • plays an alarm sound (cant be done with this component)
  • start traffic news (cant be done with this component)
  • start daily briefing (cant be done with this component)
  • start weather report (cant be done with this component)
  • start good morning report (cant be done with this component)
  • start automation routine (cant be done with this component)
  • activate multiple configurations of flash briefings (cant be done with this component)
  • start playing music by providing the voice command as text (Works with all music providers)

but the things that this component cant do dont belong to a mediaplayer.
the alexa_remote.sh can do those things though.

if those things are integrated in a complete alexa component they should be seperate services.

Ideally, the goal going forward would likely be to move the Alexa component up into the components area and have it spawn the appropriate lower level components similarly to how if you link a blink camera it creates sensors, binary switches, alarm control panel and cameras all from a single config. I do want to extend functionality and keep it in check with what makes sense for segregation of components without re-calling the Amazon APIs for everything.

1 Like

I cant get alexa tts in my echo plus. I want spanish tts .Im from mexico and I try to conect to http://alexa.amazon.com.mx but not work. It only work with amazon.com. But i get this error in log Updating alexa media_player took longer than the scheduled update interval 0:00:10 and sometimes this error Error executing service <ServiceCall tts.google_say AttributeError: ‘NoneType’ object has no attribute ‘group’ any idea?

This error is experienced by a lot of people and I consider it normal. It doesn’t affect the performance.

Updating alexa media_player took longer than the scheduled update interval 0:00:10

This error appears to have nothing to do with Alexa:

Error executing service &lt;ServiceCall tts.google_say AttributeError: ‘NoneType’ object has no attribute ‘group’