Playback via Alexa media player only works with an Echo

Hi there,

I have successfully set up the Alexa media player.
All devices are recognized.
If I enter a text to be spoken in the Lovelace for each Echo device, I get the voice output with a reference to the wiki.

Now I have created an automation for each playback device for testing. Unfortunately, it only works with the Echo-Flex.

Here are the codes:

Functions:

alias: Klingeln test
description: ''
trigger:
  - type: not_opened
    platform: device
    device_id: b57c883c33d3bab4ee5edcc89263baa
    entity_id: binary_sensor.ewelink_ds01_ad45ff22_ias_zone
    domain: binary_sensor
condition: []
action:
  - service: notify.alexa_media_evas_echo_flex
    data:
      message: 'Achtung '
      title: A
      data:
        type: announce
        method: all
mode: single
max: 10

It does not work:

alias: Klingeln test
description: ''
trigger:
  - type: not_opened
    platform: device
    device_id: b57c883c33d3bab4ee5edcc89263baa
    entity_id: binary_sensor.ewelink_ds01_ad45ff22_ias_zone
    domain: binary_sensor
condition: []
action:
  - service: notify.alexa_media_bose_smart_soundbar_300_bose
    data:
      message: 'Achtung '
      title: A
      data:
        type: announce
        method: all
mode: single
max: 10

It does not work:

alias: Klingeln test
description: ''
trigger:
  - type: not_opened
    platform: device
    device_id: b57c883c33d3bab4ee5edcc89263baa
    entity_id: binary_sensor.ewelink_ds01_ad45ff22_ias_zone
    domain: binary_sensor
condition: []
action:
  - service: notify.alexa_media_echo_dot_bad
    data:
      message: 'Achtung '
      title: A
      data:
        type: announce
        method: all
mode: single
max: 10

What could be the reason.

Greetings Werner

Hi,

I use this. Not sure if you have to use “target:” to get it to work but all my echos (version 2) work using something similar.

- id: doorbell0005
  alias: Ring the door bells
  trigger:
  - platform: state
    entity_id: binary_sensor.down_ring_ding
    to: 'on'
  action:
  - service: media_player.play_media
    data:
      entity_id: media_player.the_kitchen
      media_content_type: sound
      media_content_id: amzn_sfx_doorbell_chime_01
  - service: notify.alexa_media
    data:
      target:
      - media_player.jukefire
      data:
        type: tts
      message: Quickly, it could be Amazon, the doorbell has just been rung.

Simon

1 Like

OK. Many thanks.

Would like to test it with me, but I don’t understand a few lines what they stand for.
I do not understand these:

      media_content_id: amzn_sfx_doorbell_chime_01

  - service: notify.alexa_media

      target:
      - media_player.jukefire

I would be happy to find out which variables belong here.

Greetings Werner

Hello again,

thank you, it works.
Also found out the variables.

Still one more question:

Can I set the tone and announcement to be output on multiple devices?

Greetings Werner

Hi,

My automation is triggered when someone rings the doorbell, it pays a sound file from amazon (ding dong ding dong) in the kitchen and makes an announcement in the lounge.

I have a button I push in the kitchen which calls a script. This announces on all the echo’s.

alexa_food_call:
  sequence:
  - data:
      volume_level: '0.8'
    entity_id: group.alexatts_wholehouse
    service: media_player.volume_set
  - data:
      data:
        type: tts
      message: Dinner is on the table, don't keep me waiting
      target:
      - media_player.nanny
      - media_player.sarah
      - media_player.vicky
      - media_player.jukefire
    service: notify.alexa_media
  alias: Call Everyone To the Kitchen using Alexa

I did origionally have the target as “group.alexatts_wholehouse” but some seemed to get skipped every now and then so I just split them out.

Simon

1 Like

Hi there,

Thanks for the answer.
The example is great, but unfortunately I still don’t understand everything exactly.

My automation for the doorbell currently looks like this:

alias: Klingeln Ring the door bells
trigger:
  - platform: state
    entity_id: binary_sensor.down_ring_ding
    to: 'on'
action:
  - service: media_player.play_media
    data:
      entity_id: media_player.evas_echo_flex
      media_content_type: sound
      media_content_id: amzn_sfx_doorbell_chime_01
  - service: notify.alexa_media
    data:
      target:
        - media_player.echo_dot_bad
      data:
        type: tts
      message: Achtung.
mode: single

But I would like to include several echoes.
Would this go like this:?

alias: Klingeln Ring the door bells
trigger:
  - platform: state
    entity_id: binary_sensor.down_ring_ding
    to: 'on'
action:
  - service: media_player.play_media
    data:
      entity_id: media_player.evas_echo_flex
      entity_id: media_player.echo_dot_bad
      media_content_type: sound
      media_content_id: amzn_sfx_doorbell_chime_01
  - service: notify.alexa_media
    data:
      target:
        - media_player.evas_echo_flex
        - media_player.echo_dot_bad
      data:
        type: tts
      message: Achtung.
mode: single

Greetings Werner