Echo Devices (Alexa) as Media Player - Testers Needed

Not able to configure the alexa media player externsion.
getting a form without any labels in it

That is interesting.
Good that it finally works, but:
Something strange is going on.
The docs advising us to use the first notation.
And that is the way, I’m using this function as well:

            - service: notify.alexa_media
              data:
                target: "{{states('sensor.last_called_alexa')}}"
                data:
                  type: tts
                message: "Der Bewegungsmelder im Gästezimmer wurde deaktiviert"
````
and you had to change to a notation which is not recommended in order to make it run.
Very strange

@chirad I’ve found that on occasion this happens, all I do is hit Return and more often than not the entry refreshes and presents the information expected.

My integration isn’t working either, tried a reboot and didnt help, it’s not asking to log in either. Looks like the form that was used to access it may have changed?

I haven’t had a problem with it at all. It works every time I ask. Thanks again for the help

Hard refresh your browser cache. Please confirm you used HACS to install. If you manually copied from GitHub, you are likely missing the translation files.

Glad you got it to work. Do you mind adding it to the wiki since this forum thread moves too fast?

1 Like

Sure, I’ve actually moved it on a bit after checking out what @lonebaggie had done so I currently one card which looks after both TTS and commands for all echos, just hitting return after typing in a field triggers the action…

3 Likes

i tried changing the theme color to dark :slight_smile:
And now its coming up fine.
only issue is that the captcha is killing me in spite of repeated attempts i am not getting that

Great job!
I managed to trigger actions to get Alexa to play music from my WD MyCloud.
There is a working skill for MyCloud Home, but I tried it with MyCloud (I have the PR4100), and it works great!
Now from home assistant, I can trigger automations and node red actions to play any audio file stored on my WD MyCloud storage.

media_player.play_media
entity_id: media_player.living_room_echo
media_content_id: 'ask My Cloud to play music by artist {Ariana Grande}'
media_content_type: custom

More commands can be found here

I have a huge music and audiobooks library on my WD MyCloud NAS storage, so this is very convenient for me. Initially I had a problem with audio files that did not have proper tags and metadata. I used an application called Zortam, which enabled me to customize the metadata with ease.
The only problem I am facing right now is that the cover art does not show up in Alexa Show. But it’s not a ‘Show’ stopper :grinning:

1 Like

Make sure that you un-hide your password to be sure it’s correct, also if you are using 2FA you need to enter the captcha and wait for the authentication tool to display a valid code and then quickly enter the 2FA code before it expires and then submit.

I read some posts that we can’t setup to play our own audio file, can you share you detailed setup? Thanks.

I was struggling with playing media files from my local network. I use hassio in a Docker environment on Linux Ubuntu machine, with my own domain with cloudflare dns and certificate. Still could not play media files from uri.
While digging around, I found Alexa MyCloud skill which is an official skill supported by Amazon and WD.
I enabled the skill using my Alexa account, and used the above service, and that’s it really. I am sure many other NAS solutions are supported in a similar way.

I see it is the skill of MyCloud makes a difference.

play_radio_six:
  alias: Play Radio Six
  sequence:
  - service: media_player.play_media
    data:
      entity_id:
      - media_player.lounge_echo_dot
      media_content_id: "play radio 6"
      media_content_type: custom
2 Likes

Having to do a re-auth today.
Not sure if this is still of interested, but thought I’d pass along.

13 days since I last had to re-auth. Here is the log:

2020-12-09 21:12:05 WARNING (MainThread) [alexapy.helpers] alexaapi.get_dnd_state((<alexapy.alexalogin.AlexaLogin object at 0x7f4c29
25a5b0>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments:
('Expecting value: line 1 column 1 (char 0)',)
2020-12-09 21:12:05 WARNING (MainThread) [alexapy.alexawebsocket] Websocket is missing ubid-main and ubid-acbcom cookies; please rep
ort this if anything isn't working.
2020-12-09 21:12:05 WARNING (MainThread) [aiohttp.websocket] websocket connection is closing.2020-12-09 21:12:06 WARNING (MainThread) [alexapy.helpers] alexaapi.get_notifications((<alexapy.alexalogin.AlexaLogin object at 0x7f
4c2925a5b0>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments:
('Expecting value: line 1 column 1 (char 0)',)
2020-12-09 21:12:23 WARNING (MainThread) [alexapy.alexaapi] AlexaLogin session is missing required token: 'csrf' This may result in 
authorization errors, please report

2020-12-09 21:17:05 WARNING (MainThread) [alexapy.helpers] alexaapi.get_bluetooth((<alexapy.alexalogin.AlexaLogin object at 0x7f4c2925a5b0>,), {}): An error occured accessing AlexaAPI: An exception of type TimeoutError occurred. Arguments:
()
2020-12-09 21:17:05 WARNING (MainThread) [alexapy.helpers] alexaapi.get_device_preferences((<alexapy.alexalogin.AlexaLogin object at 0x7f4c2925a5b0>,), {}): An error occured accessing AlexaAPI: An exception of type TimeoutError occurred. Arguments:
()
2020-12-09 21:17:05 WARNING (MainThread) [alexapy.helpers] alexaapi.get_devices((<alexapy.alexalogin.AlexaLogin object at 0x7f4c2925a5b0>,), {}): An error occured accessing AlexaAPI: An exception of type TimeoutError occurred. Arguments:
()

I’m fairly new to HA and just getting all my various bits of kit transferred over. Apologies for the n00b question…

Where would I paste this bit of code to play Radio 6 please?

I’m wanting to add some buttons to play Radio stations on my echos from a wall tablet.

Thanks

MM

Use File Editor and paste it into your scripts.yaml Change the name of the media player to match yours.
Then do a reload scripts from the Configuration / Server Controls. You will then be able to assign that script in a Lovelace card. If you need more detailed instructions just shout.

Magic! I thought it was one of the script files just didn’t know which one!

Thanks a million!

A few days ago Alexa media player stopped working for me. I tried uninstalling and reinstalling and tried turning on two factor. How can I force it to resurgent I ate?

@alandtse i use an old version from alexapy (not async) with appdaemon.

i recently noticed that the changes from amazon result in that i need to renew my password more often.
i suspect thats because when the websocket dies for whatever reason, my app tries to renew the connection.
but if there is any point where amazon asks for a confirmation, the app doesnt see that and still tries to renew the connection.

the result is that amazon thinks its an invalid login trying to relogin, and forcing for a new password.

maybe some of the login/relogin trouble from people using your component come from that.

ill rewrite my app so that it first sees if it can login, before it renews the websocket.
if not it wont try to renew the websocket but send a warning.

maybe my findings can help. i dont know how its handled in the latest versions.
just my thoughts.

greetz rene.

1 Like