Echo Devices (Alexa) as Media Player - Testers Needed

Its critical for you to download the raw file format from the github repository. Those errors you have are because you didn’t copy and paste or download the raw file. You can search for the word RAW in this thread if you’re not familiar with how to do that. Here is more info:

1 Like

You were spot on! Thanks!!
Now I’m getting this error:


2019-03-25 22:33:57 ERROR (MainThread) [homeassistant.setup] Error during setup of component alexa_media
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/setup.py”, line 154, in _async_setup_component component.setup, hass, processed_config) # type: ignore
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 91, in setup from alexapy import AlexaLogin
ModuleNotFoundError: No module named ‘alexapy’


Thanks so very much.
I will try this again now.

Really appreciate your quick responses and I apologize if my questions are basic. I am trying to learn.
Cheers.

1 Like

Triple backtick before and after on it’s own line. `

You may have to restart hass.io. It’s not downloading the dependency it needs.

Thanks. The problem was I didn’t put the files in in the custom components directory…only the alexa_media.

Sorry…Not sure what you mean by triple backtick…when I c&p the log from hassio, it doesn’t format it correctly…I have to manually do this. If I copy this, how do I paste it formatted correctly?

You type ``` on it’s own line before and after the log data or you can use the gui.

Awesome! Thanks.
I’ve a lot to learn…

With this “plug in”, I notice in the guide that there are commands, such as:

{
  "entity_id": "media_player.guest_room",
  "media_content_id": "cats the musical",
  "media_content_type": "AMAZON_MUSIC"
}

Where does the above get inserted? Is this to just play a routine…no way to select music from spotify favourites or something? With the sonos plug in, when you click source I end up getting a bunch of previously played songs but with this source just shows local speaker.

Thanks.

Cheers

Just a quickie post here to state that all is well running with most current version of Home Assistant and Alexa scripts.

and

Moving this configuration over to an Octocore ARM CPU with 4Gb of RAM and eMMC on an RPi sized CPU and box. I have tested Home Assistant to run fine using the aarch64 bit version.

I am having an issue running or finding an aarch 64 bit version of Node Red. Any suggestions?

You need to setup a script and then execute it - see example below

talksport:
sequence:
- service: media_player.play_media
data:
entity_id: media_player.study
media_content_id: “TalkSport”
media_content_type: “TUNEIN”

If you are going to post examples to help others you need to make sure that you properly format your code. If they copy/paste your code the way you have it posted they will get errors and it will just confuse things even more.

1 Like

Thanks Traverst.
So this script will play the podcast(I assume) “talksport” from the provider “Tunein”?
Where is the list of commands at?
Thanks

Fresh install on a Debian 9 server, HA is set as a python3 venv based on the manual install under another username instructions…

Folder for custom components/alexa_media/ is set correctly with all four python files just added today

For some reason, everytime I try to load with the config file populated with the correct setup info, it hangs, soon as I comment it out, pulls fine. Log file pulls the following

2019-03-26 22:11:44 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: Secret alexa_password not defined

This is my config for the alexa_media at the bottom of my configuration.yaml, proper indents, and user/pass is plain text to eliminate a possible secret.yaml issue

alexa_media:
accounts:

Ive tried with the secrets file, without it… Ive even installed a fresh Debian/HA install with no components on a test box to try to see if this is a localized problem, and im getting the same issue, not sure whats going on, but would love some insight.

HA Version is 0.90.1

Dev Tools - Services

Wiki

It looks like a formatting error. If you want us to be able to help, please don’t use blockquotes but appropriate quoting so it doesn’t destroy the yaml indents/chars.

having trouble figuring out the new format on the service call…

If anyone happens to have time, what do I need to do to get this working?

- alias: 'front_door'
  trigger:
    platform: state
    entity_id: binary_sensor.eco_front_door
    to: 'on'
  action:
    service: notify.alexa_media
    data:
      target:
        - media_player.livingroom
      data:
        type: announce
      message: "Front Door"

try this:

  action:
    service: notify.alexa_media
    data:
      target:
        - media_player.my_echo
      data:
        type: announce
      message: "Hello World"

EDIT: This is the first post in this thread, after installing an extra pytho module in Hassio this component works really well for me, no issues so far :slight_smile:

we can’t tell where your formatting is wrong because you haven’t posted the code as you have it right now in the correct format to view in the forum.

edited my post, still no luck so far. Don’t seem to be receiving any errors in the log either.

my bad for blockquotes, copypaste from github for the same issue…

this is my config

alexa_media:
  accounts:
    - email: "[email protected]"
      password: REDACTED
      url: amazon.com

Ive got the files in the correct place, and have the user and pass in plaintext, since secrets was having some issue, and still got the error message in my earlier post without using secrets.
When the config above isnt commented out, HA hangs, and the only error in the log file is

2019-03-26 22:11:44 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: Secret alexa_password not defined

when you look in the dev-states page is the automation ‘on’?

can you manually trigger the automation?

Otherwise, I can’t see any problems so I think it should work.

Please double check; somewhere in your configuration file has !secret alexa_password. Otherwise it wouldn’t be complaining about the secret.

Turn on alexapy logging.

Could you provide the line you had to change ?