Echo Devices (Alexa) as Media Player - Testers Needed

Without a doubt I can confirm this now! I was able to recreate the Simon Says instructional message (to multiple Echos) by sending the following to the “media_player.alexa_tts” service.

{
  "entity_id": "media_player.echo_living_room, media_player.echo_family_room",
  "message": ""
}

Makes sense. As the Alexa would see simply “Simon Says” any nothing else, so then go on and on about the Simon Says feature.

@lostage, I’m unsure about local media playback. I know that there was mention of that working with the MPD Bluetooth enqueue process, which works quite differently to my component, but as far as I know I do not think that amazon has the ability to play local files from the web API that I am using.

For those that are having errors getting login to work, I have a theory. I think the issue might be due to a timeout when attempting to login with your credentials as I’ve seen it at times with my setup. It might also explain why @VladTepz had issues. When rebooting the host OS it might’ve been too busy to give the add-on the time it needed to complete so it timed out. I’m going to double the sign-in timeout in 0.6 and see if that helps those having issues.

@keatontaylor Is there a way for me to see what exactly the error is that amazon is spitting back to me? I know there was a log with that other script that had captcha issues. It would write a log in the temp folder, but I cant seem to find any location of logs for nightmare.

Unfortunately it doesn’t log out like that yet and I didn’t add it to the most recent 0.5 version because I was still trying to decide exactly how I was going to do that logging. I think I am going to make 0.6 a debugging release, clean up logging end-to-end so that those experiencing issues can get more insight.

I am really sorry it isn’t working and it is taking me so long to get more information to you. Working as fast as I can.

1 Like

@keatontaylor no worries your doing a great job from what I can tell from it working for everyone else. I was thinkin maybe I’ll try someone else’s account and see if it logs in correctly. That won’t effect anything in the future will it? I don’t know if it keeps a database somewhere of devices or clears itself out every time the image is run.

Thanks for taking the time to create this project not to mention support it.

2 Likes

The login info is just stored in the config that you set within the add-on. Swapping credentials around shouldn’t hurt anything.

@keatontaylor no I figured that, I was just wondering if when I put someone else’s login information in and say it worked, then put mine in later once we figure out what the issue is I was concerned it would mash all my devices with the other accounts devices.

I tried playing with the wait(1000) value to see if it helps the login, no joy. Also setup my synology (which is where my docker is running) as a http proxy to connect to http://alexa.xxxx via it via a browser and that works fine, no captcha or temp blacklisting that I can tell.

Guess the issue is elsewhere… looking forward to the increased logging. And thanks of course for all this… Can’t wait to get it working :wink:

1 Like

I am thrilled to learn someone is working on this! Thank you. Unfortunately i Have trouble from the start. I am not running HASSIO but rather HA on Ubuntu 18 within virtualenv. I think I do have the correct commands.

First I run:

docker pull keatontaylor/amd64-addon-alexa-api:0.5

Output looks good and returns

Status: Image is up to date for keatontaylor/amd64-addon-alexa-api:0.5

When I try to run the docker

docker run -id -v /your-directory-containing-options-json:/data -p 8091:8091 -t alexa-api

I get this:

Unable to find image 'alexa-api:latest' locally
docker: Error response from daemon: pull access denied for alexa-api, repository does not exist or may require 'docker login'.

The full path to the optiosn file I setup is /home/homeassistant/.homeassistant

Any help is appreciated!

you need to replace alexa-api with amd64-addon-alexa-api

docker run -id -v /your-directory-containing-options-json:/data -p 8091:8091 -t keatontaylor/amd64-addon-alexa-api

You also need to adjust -v /your-directory-containing-options-json:/data to where you want the data folder to be…

1 Like

Thanks! I got it working. I didn’t mean to paste ‘your-directory’ in my previous message but I did have the last part wrong. The value you suggested didn’t work for me but this one did :

docker run -id -v /home/homeassistant/.homeassistant:/data -p 8091:8091 -t keatontaylor/amd64-addon-alexa-api

Trouble here:
After restarting HA I get this is from my HA log file.

File “/config/custom_components/media_player/alexa.py”, line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax
Fatal error while loading config:

There’s more but I figured this would point to the problem.
ideas?

Looks like a copy paste error for the custom component. Double check to make sure the alexa.py file matches the one on GitHub.

[https://github.com/keatontaylor/custom_components/blob/master/media_player/alexa.py]

This thing is fantastic! It’s working great.

You solved a big problem for me. I have a Sonos AND a dot in most rooms.

Sonos for home audio notifications didn’t work out so well, especially with several sources (spotify, sirius, local, etc) and group possibilities, so I gave up on it. Don’t get me wrong, it worked okay but wasn’t perfect. I can elaborate if anyone would like to know.

I’ve always wanted to use Dots for this purpose because they are much cheaper than Sonos and sit around and do nothing unless prompted, so why not use them.

Looking forward to working with this! Thanks again.

EDIT: Hoping that Dot price drops on Amazon Prime Day! I can ‘dotize’ the other rooms.

I totally knew that… just testing you… :sunglasses:

3 Likes

Has anyone figured out a way to ‘mute’ or ‘unmute’ the mic on a given Dot/Echo? I’d love to be able to automatically mute them via automation when I have a few guests over. In other words, will not respond to what the wife and I call ‘The A word’

2 Likes

Moved today to HassOS and I can’t install the add-on

18-07-12 01:37:18 INFO (SyncWorker_13) [hassio.docker.interface] Pull image keatontaylor/aarch64-addon-alexa-api tag 0.5.
18-07-12 01:37:21 ERROR (SyncWorker_13) [hassio.docker.interface] Can't install keatontaylor/aarch64-addon-alexa-api:0.5 -> 404 Client Error: Not Found ("pull access denied for keatontaylor/aarch64-addon-alexa-api, repository does not exist or may require 'docker login'").

@SouzaaThales, I have not compiled the add-on for devices running on 64bit ARM processors. Still trying to get cross platform builds working easily.

1 Like