Echo Devices (Alexa) as Media Player - Testers Needed

I would LOVE to help test this out as I mainly use my dots for everything and have been waiting for the day for something like this to surface. Unfortunately I’m using hassbian. Do you have an install method for hassbian users for the hass.io addon? I already have node.js installed and working with the amazon dash buttons so it shouldn’t be too difficult.

For those on hassbian I do not currently have it setup, but I can work to get a hassbian install on a spare raspberry pi and see if I can get some type of installation for those of you on that platform.

@3vasi0n since you already have node.js running. You can take a look here: https://github.com/keatontaylor/hassio-addons/tree/master/alexa-api

This contains the node-js code for the Alexa API. You’ll need to setup environment variables USER for your amazon username and PASS for your amazon password like this in console. You’ll also need to install the dependences for the project:

npm install 

or

yarn install
# Setup environment vars
USER=someusername
PASS=somepass
export USER; export PASS

Then you can simply run the index.js node file

node index.js

You may also need to change the host in the custom Alexa component from addon_9ff8aed5_alexaapi to whatever your IP is for hassbian.

Again no guarantees this will work, but I’ll try to look at hassbian tomorrow and see if I can simplify any steps.

What would i need to adjust to make it work with amazon.de? Or does it automatically work with different countries?

@AlmostSerious, no code to automatically select country, but it might work regardless. Could you test and report back?

How do I know if it’s successful after running node index.js? THere’s no error shown or logs to check. I tried doing netstat for process listening on port 8091 but it returns 0 result.

@accelle, should have a log output showing “Logged in” followed by “Internal endpoint:”

By the way, that link doesn’t work. I think you wanted to write: https://github.com/keatontaylor/custom_components/tree/master/media_player

I’m getting this error from the addon:
[FATAL tini (9)] exec /entrypoint failed: Exec format error

What’s wrong?

@keatontaylor Can this component be used to play songs etc on echo devices using Homeassistant?

Not yet. Here’s what @keatontaylor said about this in the initial post:

1 Like

I’ve the same error

Will do :slight_smile: However, currently i am getting the same error as John1, so cannot advance in testing your component:

[FATAL tini (9)] exec /entrypoint failed: Exec format error

Awesome - would love to try this out. are you planning to support HA sending media files to play? I’m thinking alarm/cuckoo clock type sounds as part of the “TTS” system…

1 Like

Getting same error:
[FATAL tini (9)] exec /entrypoint failed: Exec format error

same error here

Sorry guys for the error, this is due to me not cross compiling the add-on right. Working on it now and will post soon.

For those who were experiencing issues I’ve released an update. You should be able to install it and get a working version. Please let me know! :slight_smile:

I tried doing what I could but I was unsuccessful at getting it set up. I think part of the reason why is because I run my system on my unraid server and my node.js is in a separate docker container. I’ll fiddle around with it more in a few hours when I can get more time.

Almost there but now I’m getting this error

Thu, 05 Jul 2018 08:14:24 GMT nightmare queueing action “evaluate”
Thu, 05 Jul 2018 08:14:24 GMT nightmare running
There was an error
Internal endpoint:
curl -X POST -d “tts=Ask Alexa team for a proper TTS API” -d “deviceSerialNumber=deviceSerialNumber” http://localhost:8091/alexa-tts

Almost there too.

ERROR (SyncWorker_12) [custom_components.media_player.alexa] Could not connect to alexa server at http://addon_9ff8aed5_alexaapi (('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',)))

UPDATE: After few Hassio restarts it’s working great! :slight_smile: