Echo Devices (Alexa) as Media Player - Testers Needed

if I copy the init.py file from alexapy I get an error “The following components and platforms could not be set up:” and if I leave the one from alexa media let me connect, but then I get csrf error again

See https://github.com/keatontaylor/alexa_media_player/issues/258 for the csrf error. Known bug.

Tried to install the AlexaPy dependency using

pip3 install --target /config --no-dependencies git+https://gitlab.com/jfautley/alexapy

Removed the pickle file.

It asked for the Re-CATCHA for amazon. Did that and still doesn’t find the alex_media component after a restart. This is on a docker install. I’m guessing it has something to do with the new Debian/Buster but not sure where to go from here.

I’ve just updated to HA 0.97.0 and now this seems to have stopped working.

I’ve got this in the Log file:

Unable to prepare setup for platform alexa_media.media_player: Platform not found (cannot import name 'MEDIA_PLAYER_SCHEMA' from 'homeassistant.components.media_player' (/usr/src/homeassistant/homeassistant/components/media_player/__init__.py)).

It looks like MEDIA_PLAYER_SCHEMA function has been removed from the file in 0.97.0:

Mine is working now! YESSSS
on .97, all I had to do was remove the MEDIA_PLAYER_SCHEMA

Now it looks like this.

from homeassistant.components.media_player import (
                                                   MediaPlayerDevice)
from homeassistant.components.media_player.const import (

Deleted the pickle file and restarted, all is well and a very easy fix.

2 Likes

So, when will this be an official integration/component? This thread is so convoluted that, if you are not following from the beginning, it’s crazy difficult to keep up with…and my setup is working. Any ETA to calling this official and wrapping some consistent docs around it?

1 Like

How to get back normal volume after tts or announce?

doorbell:
  sequence:
  - service: media_player.volume_set
    entity_id: media_player.downstairs
    data:
      volume_level: '1.0'
  - service: notify.alexa_media
    data:
      data:
        type: tts
      target: 
        - media_player.downstairs
        - media_player.upstairs
      message: 'Ding-dong. Someone is at the door.'

After this volume stay at max. I have playing music or radio on volume 0.3, but tts/announce let it on max 1.0

@joselito1

doorbell:
  sequence:
  - service: media_player.volume_set
    entity_id: media_player.downstairs
    data:
      volume_level: '1.0'
  - delay:
      seconds: 1
  - service: notify.alexa_media
    data:
      data:
        type: tts
      target: 
        - media_player.downstairs
        - media_player.upstairs
      message: 'Ding-dong. Someone is at the door.'
  - delay:
      seconds: 1
  - service: media_player.volume_set
    entity_id: media_player.downstairs
    data:
      volume_level: '0.3'
1 Like

Thanks! The last delay must be longer, 3 or more seconds, so that can Alexa finish

I updated to 97 delete pickle file updated component via hacs. Don’t get no errors but my media players are gone and Alexa component doesn’t load.
Running pi 4 docker and Hass. Had to roll back a snapshot

Update to Alexa Media Player 1.4.1
Look into HACS, it supports many custom components, notifies you of updates and makes life easier!

1 Like

The Alexa Media Player wiki is updated with latest info on installation.


From time to time there are breaking changes that need to be fixed, many are due to changes on Amazon’s end, some are due to changes in Home Assistant. THis is not supported by Amazon, so patience is needed if you wish to use this custom component.

I updated to 1.4.1 still wouldn’t work

Upgraded to 0.97 and 1.4.1 and all works fine (inlcuding the new switches) but get this in logs at startup for every switch (16 similar errors):

2019-08-08 13:41:35 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 243, in async_update_ha_state
    "No entity id specified for entity {}".format(self.name)
homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity Ben's Room repeat switch

Tried downgrading to 1.4.0 but still the same

Reading thru this, frankly I’m lost. I upgraded to .97.0 and get the media_player_schema error.

I see a workaround, but then I see that it doesn’t fix everything.

What’s the current fix to get the alexa interface working again?

Have you updated to 1.4.1 ? That got it working for me (albeit with errors in log)

This is what I did:

  • Removed v1.3.1
  • Restarted HA
  • Deleted pickle file
  • Install v1.4.1 with HACS
  • Restarted HA

It seems to be working now

Got it working on .97 not sure what made the difference but
Updated to 1.41 Via hacs
Then updated to .97 via hassio
Left the pickle file intact took two reboots of home assistant but now everything working great again.
Thank you for the component

Updated to 1.4.1 deleted pickle file. Now when I try to enter the capcha i see


2019-08-08 11:27:12 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved

Traceback (most recent call last):

  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

    result = self.fn(*self.args, **self.kwargs)

  File "/config/custom_components/alexa_media/__init__.py", line 123, in setup_platform_callback

    login.login(data=callback_data)

TypeError: login() got an unexpected keyword argument 'data'

2019-08-08 11:27:12 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved

Traceback (most recent call last):

  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

    result = self.fn(*self.args, **self.kwargs)

  File "/config/custom_components/alexa_media/__init__.py", line 123, in setup_platform_callback

    login.login(data=callback_data)

TypeError: login() got an unexpected keyword argument 'data'

2019-08-08 11:27:12 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved

Traceback (most recent call last):

  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

    result = self.fn(*self.args, **self.kwargs)

  File "/config/custom_components/alexa_media/__init__.py", line 123, in setup_platform_callback

    login.login(data=callback_data)

TypeError: login() got an unexpected keyword argument 'data'

2019-08-08 11:27:12 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved

Traceback (most recent call last):

  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

    result = self.fn(*self.args, **self.kwargs)

  File "/config/custom_components/alexa_media/__init__.py", line 123, in setup_platform_callback

    login.login(data=callback_data)

TypeError: login() got an unexpected keyword argument 'data'

You need to delete the non-standard version of Alexapy you installed.