Echo Devices (Alexa) as Media Player - Testers Needed

Volume range is 0-1. You can check the current volume setting in the States panel.

.10 is the same as .1 lol. 1 is the max.

Thank you.

Could you share that card your using also?

I just not get an echo dot configured in HA and was thinking about doing something similar as far as whole house audio. I have an 90’s NuTone Intercom system in my house with 6 speakers and 5 stations throughout the house. I opened up the master panel and found an RCA Mono jack on one of the boards. I have ordered a connector and some cable. Plan is to connect Echo Dot up to it. Listen to music and get alerts on HA Events.

Any help would be much appreciated.

Thanks

The suggestion (and successful one at that) from @finity was to put my echo and dots into a group and just alexa_tts to the group instead of each dot… it works great.

I have noticed the last couple of mornings the 10 second blank song would re-queue up then play the notification. This was on alexa.py 0.9.5.1.

I have reverted back to 0.9.5 for the time being. Not concerned with the volume at this time.

i dont know if others have this problem too (didntread the whole topic :wink: ) but its not good.
about 6 times every minut i get this error in my log:

Log Details (WARNING)
Sun Oct 14 2018 23:29:47 GMT+0200 (Midden-Europese zomertijd)

Updating alexa media_player took longer than the scheduled update interval 0:00:10 

can be because i have quite a lot going
6x echo dot
2x firestick
firetab
alexa installed on a tablet (not active still found)
echosim on PC (not active still found)
a group
a mobile

all discovered as mediaplayer

Yeah mine is always doing it I have 4 dots, one tab and one echo v2

All the time. 1 echo, 3 dots, 4 firesticks, 3 firetablets.

the update interval is way to short for that amount of devices.
but i dont need several of them (group, mobile,echosim,tablet are all obsolete)

so how to change the interval?
and how to get rid of the devices i dont need.

Same here. But I guess it can be safely ignored cause the notifications still work.

it cant be ignored.
its keeping HA very busy and that makes that HA is slowing down.
and it also makes that any other problem with HA at any time is impossible to find in the log.
so it makes the log useless.

2 Likes

16_19h04m38s_001_
hi, dont get any error in installation, but get unavailable in echo dot, my hass is 0.80.1

Great add-on, thanks for letting me try it. Do you know if there’s an upper limit on the amount of text (TTS) you can send to Alexa as I’m having problems getting it to say longer messages. Thanks

Martokk provided this post, so, maybe this?

if using ‘alexa.py’ version 0.9.5.0, line 212
if using ‘alexa.py’ version 0.9.5.1, line 214

martokk

Here’s how I have been limiting this component to only update for ‘online’ devices.

Find line 212

for device in devices: 

Add the following code below it so it looks like the following:

        for device in devices:

            if device['online'] is False:
                continue

You could also try the following to only return ‘ECHO’ devices:

        for device in devices:

            if device['deviceFamily'] != 'ECHO':
                continue

16_21h50m00s_003_
thanks but dont work, the same, unavailable, and with the other code , media player dont show in hass

unavailable probably means not detected in the same network as home assistant is running.
my firesticks for instance go to unavailable when the tv is running and not the firestick.
the app on the tablet is unavailable because it isnt running
the echo simulator on the pc is unavailable because it isnt running.

change to amazon.co.uk and works

I can’t get this to load with HA at all now… hopefully someone can point out my error?
I used to have this running with the add on ages ago but can’t get the “new way” to work.

custom_component is on v9.5 and my config file details are below:

media_player:
  - platform: alexa
    email: "[email protected]"
    password: “password”
    url: “amazon.co.uk”

error code:

2018-10-18 16:16:17 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform alexa
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/requests/models.py”, line 346, in _get_idna_encoded_host
host = idna.encode(host, uts46=True).decode(‘utf-8’)
File “/usr/local/lib/python3.6/site-packages/idna/core.py”, line 361, in encode
s = alabel(label)
File “/usr/local/lib/python3.6/site-packages/idna/core.py”, line 284, in alabel
check_label(label)
File “/usr/local/lib/python3.6/site-packages/idna/core.py”, line 261, in check_label
raise InvalidCodepoint(‘Codepoint {0} at position {1} of {2} not allowed’.format(_unot(cp_value), pos+1, repr(label)))
idna.core.InvalidCodepoint: Codepoint U+201C at position 1 of ‘“amazon’ not allowed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/requests/models.py”, line 394, in prepare_url
host = self._get_idna_encoded_host(host)
File “/usr/local/lib/python3.6/site-packages/requests/models.py”, line 348, in _get_idna_encoded_host
raise UnicodeError
UnicodeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/media_player/alexa.py”, line 142, in setup_platform
config.get(CONF_DEBUG))
File “/config/custom_components/media_player/alexa.py”, line 608, in init
self.login_with_cookie()
File “/config/custom_components/media_player/alexa.py”, line 631, in login_with_cookie
self.login(cookies=cookies)
File “/config/custom_components/media_player/alexa.py”, line 747, in login
resp = self._session.get(site)
File “/usr/local/lib/python3.6/site-packages/requests/sessions.py”, line 525, in get
return self.request(‘GET’, url, **kwargs)
File “/usr/local/lib/python3.6/site-packages/requests/sessions.py”, line 498, in request
prep = self.prepare_request(req)
File “/usr/local/lib/python3.6/site-packages/requests/sessions.py”, line 441, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File “/usr/local/lib/python3.6/site-packages/requests/models.py”, line 309, in prepare
self.prepare_url(url, params)
File “/usr/local/lib/python3.6/site-packages/requests/models.py”, line 396, in prepare_url
raise InvalidURL(‘URL has an invalid label.’)
requests.exceptions.InvalidURL: URL has an invalid label.
2018-10-18 16:16:24 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

Try re-typing the quotes. If you copy and pasted from the original post, it has smart quotes in it.

1 Like