Echo Devices (Alexa) as Media Player - Testers Needed

I had a bug in my script, i was unaware it was calling alarm_control_panel.alarm_arm_away 1st, then it called alarm_control_panel.alarm_arm_night 2nd . The bug was dormant no issue with arming upto 2.7.9. in 2.8.0 i’m guessing the 2nd call interrupted the 1st call.

Forgive me if I missed this (or maybe doesn’t apply here), but after upgrading to 0.110.x, I’m getting the following log messages:

MediaPlayerDevice is deprecated, modify AlexaClient to extend MediaPlayerEntity
AlarmControlPanel is deprecated, modify AlexaAlarmControlPanel to extend AlarmControlPanelEntity

and

SwitchDevice is deprecated, modify AlexaMediaSwitch to extend SwitchEntity
SwitchDevice is deprecated, modify DNDSwitch to extend SwitchEntity
SwitchDevice is deprecated, modify ShuffleSwitch to extend SwitchEntity
SwitchDevice is deprecated, modify RepeatSwitch to extend SwitchEntity

I’m using Alexa Media Player ver 2.8.0

Yes, this is a known issue. Should be resolved in 2.8.1.

Hmm, there is nothing told how to “include” all needed “add-on” sensors and things via include, can we use a “*” or something like that?
It is said, that you have to name the devices as they are named within alexa. And inside alexa,
I have no sensors and things like that.
And it is said in documentation, that for all found devices timers and alerts are beeing generated.
Can you give some examples how to include these additional components?

Hello I don’t understand a thing,
I have 3 media player and I can control only two of them but not the third.
Do you have an idea ?

entities:
  - entity: input_select.speakers
  - entity: input_select.amazon_selection
  - entity: script.amazon538
    icon: 'mdi:play-circle-outline'
    name: Play
  - entity: media_player.nicolas_echo_studio
    style: |
      :host {
        color: darkblue;
      }
  - entity: media_player.dot_salle_de_bain
    style: |
      :host {
        color: blue;
      }
  - entity: media_player.atelier_nico
    style: |
      :host {
        color: lightblue;
      }
theme: Dark-N-Clear
title: Amazon Music
type: entities

echo studio is currently reading but does not show me anything (not the round image of the current title) and I do not have access to the play and pause command, it does not switch when it is on the way

Hi, I just updated to latest HA and this component on HACS. Seems it stops working. I tried below service call but get error:

{
   "data":{"type":"tts","method":"all"},
   "message": "this is a test",
   "target":["media_player.xxxxx_s_echo_dot"]
}
ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140511864208208] '>' not supported between instances of 'NoneType' and 'int'

I’m hoping to build an automation using this integration. If there is no media playing, then when I press a button it should shuffle my music. If there is already something playing then it should skip to the next track.

I can get these actions to work independently (each as a script). If I go to build an automation, I need to enter a state. What should I enter to determine if something is ‘playing’ or not?
E.g…

  condition:
    condition: state
    entity_id: media_player.living_room_2
    state: 'playing'

Thank you so much.

Just FYI - 2.8.2 has fixed my issues and I am migrated over to Home Assistant Integrations via the UI.
Great job!

Please forgive my very simple question here, but as a Nabu Casa subscriber, is this the correct way to integrate my alexa devices as entities which I can control through automatons? Upon reading the wiki, there are integration instructions which I am unsure whether were written before or after cloud integration was implemented. I simply didn’t want to add an integration if it is already part of the NC linkup and unneeded. Thanks!

Can someone explain me why this service inside an automation is not anymore working as i did not any changes?

    - service: notify.alexa_media_echo_show_5
      data_template:
        data:
          type: tts
        message: >-
          {% if now().strftime("%H")|int < 12 %}
          Buongiorno.
          {% elif now().strftime("%H")|int < 18 %}
          Buon Pomeriggio.
          {% else %}
          Buonasera.
          {% endif %}

Hi, the cloud integration allows to control scripts, switches and other devices vie alexa speech.
“alexa, start script” starts the script in HA. Important is to expose the entities, you like to control in the integration.
The alexa media player works vice versa. You can report automation results, write scripts as questions and you can control media content like music. this integration provides all echos as an entity which you can use via notify service,

Jorg, excellent response. Thank you. That is what I suspected but felt it prudent to ask before wasting time plowing in. I have been trying to figure out a way to send sound from home assistant on doorbell push but have been unsuccessful. This will give me that avenue to program as needed. There have been many times which I have researched an answer, only to find that the solution was something which worked many version iterations ago and no longer valid in the current HA version.

Hi,

I use the following automation to make the Alexa’s say something when the doorbell (ring device) goes, it works great, just though to post something so you can see how to.

- id: doorbell0005
  alias: Ring the door bells
  trigger:
  - platform: state
    entity_id: binary_sensor.front_door_ding
    to: 'on'
  action:
  - service: notify.alexa_media
    data:
      target:
      - media_player.the_kitchen
      data:
        type: tts
      message: Ding.....dong....ding.....dong
  - service: notify.alexa_media
    data:
      target:
      - media_player.lounge
      data:
        type: tts
      message: Is that the doorbell I heard?     Is Bella barking?   You really should
        go answer it.

Simon

1 Like

Simon, thanks for this. It is not different than how I had assumed to code the logic but I appreciate the confirmation.

Simon, as a side note, in this thread there is an example of playing a local mp3 file in your action. I have not been able to utilize it yet since I use the cloud service and it seems to have difficulties playing an mp3 file hosted there rather than on a local machine behind SSL. I will tinker more tonight but maybe something to play with.

As a second note, anyone else have luck creating a custom Alexa command? I have successfully built a custom integration but it doesn’t like any url I send it. my command looks like this:

 # INSERT YOUR URL
        # This is what Alexa says when the Skill is launched. For this purpose i only insert the SSML audio tag 
        # with the Link to the mp3 file but you can also put some text before or after
        # speech = "<audio src='https://4caqzf5u03zmorlpmwxwyfap8sspwj6p.ui.nabu.casa/local/doorbell.mp3'/>"
        speech = "<audio src='https://cdn.electrictime.com/wp-content/uploads/[email protected]'/>"

        handler_input.response_builder.speak(speech).set_card(
        # INSERT YOUR TEXT
        # This may be shown on an Echo Show, change "My Title" and "File is now played" to whatever you whant
        SimpleCard(title="My Title", content="File is now played")) 
        return handler_input.response_builder.response

I’ve searched the forums / wiki but can’t find if it is possible to display onto the clock display on an echo dot with clock ? This suggests it is possible:

Apologies if I’ve missed it.

1 Like

alexa always in standbay mode.
Uninstall, install did not solved the problem

just an update, I didn’t do anything for it, and now it seems worked ok. not really sure what’s happening.

I recently moved my Echoes onto an IoT network, from which I have blocked access to my LAN where my Home Assistant instance is running. I see a blocked ICMP packets from my Echoes to my HA server IP address.

Is that traffic because of this integration? If so, what’s the purpose and should I allow “direct” access?

That’s not enough information for anyone to help you. You can try to make sure it’s the right domain.

No. This component only speaks with Amazon’s servers and not with anything locally.

No. We can do what the official app can do. If the app does it, we may be able to figure it out.

If you try in dev tools does it still work? Your account cookies may have expired or many other things could have happened. Perhaps your internet is down or Amazon’s servers are broken. Again, hard to say without actual information.