Echo Devices (Alexa) as Media Player - Testers Needed

Yeah, I had the refresh set to “1 days”, but would still have to re-auth. So that’s why i now refresh cookie every 60 minutes.

1 Like

Good to know. Thanks. For me, I never have to re-auth on that node, but frequently on this component. It is same amazon account :frowning:

I have the following setting in notifiers.yaml which doesn’t work. What am I doing wrong?

- name: broadcast
  platform: group
  services:
    - service: tv
    - service: hangouts_chatgroup
    - service: alexa_media
      data:
        type: announce
      target:
        - media_player.bedroom

I also tried using notify.alexa_media_bedroom without the target, but no luck.
I even tried defining a new notifier for a certain target and then used it as a service in the group notifier (like with my hangouts_group) and that doesn’t work as well.

I want to continue using my notification group, as I have complex templated messages that I don’t want to copy/paste in several automations.

Thanks for posting. Currently working on this here in case anyone wants to try to help (as in code as I’m stuck).

1 Like

I have a simple Node-Red sequence that triggers an announcement to all our devices if someone rings the doorbell, which is great. However, if I’m on a conference call in my office I’d like to stop my Echo Dot from announcing. If I enable the Do Not Disturb switch it doesn’t seem to stop it. Any ideas?

1 Like

Any idea why I am seeing this in the Supervisor CORE logs:

/usr/local/lib/python3.8/site-packages/alexapy/aiohttp/connector.py:999: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  hosts = await asyncio.shield(

I’ve followed this to setup my office and kitchen echo dots, I am able to send command and announcement to them individually. However when select ‘all’, which map to ‘Everywhere’, none of the echo dot responds. In Alexa app, I have a speaker group “Everywhere” which includes both echo dots.

Below is my sensor section:

sensor:
  - platform: template
    sensors:
      alexa_selector:
        friendly_name: "Alexa Selector Sensor"
        value_template: >
          {%- set room = states("input_select.alexa_state")|replace('media_player.','') -%}
          {%- if room == "office" -%}
            office_dot
          {%- elif room == "kitchen" -%}
            kitchen_dot
          {%- elif room == "all" -%}
            Everywhere
          {%- endif -%}

What could be the issue and how to do troubleshooting? I don’t see any error on the log file. Thanks.

You should not write “Everywhere” in capital letters. Write everywhere

Henry,

As Jörg replied, “everywhere” needs to be all lowercase just like “office_dot” and “kitchen_dot”. The names you use in the selector can be capitalized if you prefer (i.e. Office, Kitchen, All) but not the device name that is used in the template.

Thanks @Pirol62 @Didgeridrew, this works. I was thinking it should be same as what in the Alexa app which is wrong.

Btw: where can I find more information about the syntax of the script?

Henry,

Check out these pages in the docs:
YAML
Templating

1 Like

It’s because in python 3.10 the version of aiohttp we use will be deprecated. Now that HA is actually using updated versions of aiohttp again I may decide to switch back to using the HA version assuming I upstream my bug fixes back to aiohttp.

2 Likes

I have exactly the same problem. Except my second screen does not show anything, its blank:

I never receive a message anywhere (OTP authenticator app, Amazon app, email etc)

If I chose amazon.com on the authentication page, I can successfully complete the authentication process. However, all the echo devices that are created are shown as UNAVAILABLE and cannot be used.

It’s a bug which should be fixed in 3.4.3. Thanks for reporting.

2 Likes

After Update to 3.4.3 the integration could not be set up. The error:

Logger: homeassistant.config_entries
Source: custom_components/alexa_media/__init__.py:267
First occurred: 11:11:12 (1 occurrences)
Last logged: 11:11:12

Error setting up entry [email protected] - amazon.de for alexa_media
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/alexa_media/__init__.py", line 267, in async_setup_entry
    await login.login(cookies=await login.load_cookie())
  File "/usr/local/lib/python3.8/site-packages/alexapy/helpers.py", line 141, in wrapper
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/alexapy/alexalogin.py", line 577, in login
    missing_params = self._populate_data(site, data)
  File "/usr/local/lib/python3.8/site-packages/alexapy/alexalogin.py", line 1251, in _populate_data
    self._password + securitycode
TypeError: can only concatenate str (not "NoneType") to str

Tried to rollback. Then I went into the bug mentioned before.
Now, reinstalled 3.4.3. Same bug.

Thanks. Should be fixed in 3.4.4.

2 Likes

Was running 3,4,1 and today got must login every 10 days error, updated to 3.4.3 and all working fine again with no need to do anything else.

Just an update, the latest 3.4.4 works fine now with 2FA.

I have all media devices showing and can issues TTS commands using notify.alexa_media

Is it possible to use the alexa devices as a media endpoint for local media, or media stored on publicly accessible locations (EG outside of Amazon media ecosystem)?

Tried 3.4.4.
No error log but I have to enter the captcha 5 Times. Then this message appears:
image
Translation:
“The ‘amazon forgotten password function’ detected. Amazon might need action before a new authentication can be started”
Rolled back to 3.4.1 - authentication works - everythings fine so far.