Echo Devices (Alexa) as Media Player - Testers Needed

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.

I’ve been troubleshooting a speaker group issue with the Alexa app, unrelated to home assistant, however I’ve just noticed that in my devices under the integration I have old Echo devices removed from my amazon account, as well as speaker groups I have deleted. Is there a way to purge these from Home Assistant? They aren’t on my amazon account anymore.

I just started using the component, so it is very possible that I am doing something wrong. Does anyone know if media_content_type: sound works with Sonos speakers? The following works for me on an echo dot, but not on a Sonos Move. Thoughts?

    - service: media_player.play_media
      data:
        entity_id: media_player.ben_s_echo_dot
        media_content_type: sound
        media_content_id: amzn_sfx_doorbell_chime_01

Hi!
I am trying to figure out how to call a skill that I have installed on the Echo. I have the notification working fine and have my custom skill where it is easy to find the skill_id. But for the love of my life I cant figure out how to call a skill (non-custom).
What I am trying to do is to use MyTuner skill to play my radio. I know…iTunes is there and I use it today but it is not good enough since many channels aren’t working and it is also random what channel work what day etc.
However I have iTunes working and I have alexa notification working with response etc.

I just need to figure out how to find the skill_id from MyTuner.

To find the skill id, do this:

  • Open https://alexa.amazon.tld (e.g. https://alexa.amazon.co.uk) in Google Chrome
  • Open the Developer Tools and open the Network tab
  • Click on Skills and then on the Your Skills button
  • Click the clear button for the Network tab in developer tools (this makes finding the URL easier in the next step)
  • Click on the particular skill you want to find the id for
  • You should see a URL something like https://skills-store.amazon.tld/app/dp/… show in the Network tab of Developer tools. Click on this
  • Switch to the Response tab
  • Copy the JSON from there into a text editor and search for anything which contains “ask.skill” - that is your skill id (you can actually search directly in the Response tab but copying it into a text editor makes it easier).
4 Likes

Thanks a million! That was super easy when you pointed me where to look. I had found all the way till the response tab. That was the piece I was missing. Now I have the skill ID so now I can continue to play and get MyTuner to be my radio on my Alexa devices :slight_smile:

Got it to work half way. I get it to open the skill but I cant seem to be able to parse the radio station name.

I am using the same setup as the Alexa Notification where I have the following defined in a script:

mytuner_alexa_skill:
description: ‘Activates an actionable notification on a specific echo device’
fields:
text:
description: ‘The text you would like alexa to speak.’
event_id:
description: ‘Correlation ID for event responses’
alexa_device:
description: ‘Alexa device you want to trigger’
sequence:
- service: input_text.set_value
data_template:
entity_id: input_text.mytune_alexa_radio
value: ‘{“text”: “{{ text }}”, “event”: “{{ event_id }}”}’
- service: media_player.play_media
data_template:
entity_id: “{{ alexa_device }}”
media_content_type: skill
media_content_id: amzn1.ask.skill.94c477e7-61c0-43f5-b7d9-36d7498a4d04

This is what I use in the service call:
text: ‘play Sveriges Radio P3’
event_id: mytuner_test
alexa_device: media_player.kitchen_dot

I don’t think that will work with a skill you haven’t created yourself. It would need to knwo to connect to your Home Assistant instance and read the station name from that input_text.

I previously tested out one way of doing it, using a skill called Routine Stream. That skill allows you to enter a stream URL on a website, and it plays it when the skill is launched. I successfully pointed it to an .m3u file in the www folder in Home Assistant via the external URL (I use Nabu Casa remote access). It would then be possible to have a process which switches the content of the .m3u file depending on what you want to play.

Alternatively, you would need a skill which allows you to set a favourite station and will then play it, without prompting, when you launch the skill.

A couple weeks ago, I started moving everything from smartthings to Home Assistant. Everything had been working perfectly until last night. I noticed my echo notifications weren’t working. After some investigation, I found the configurator prompting to enter the captcha. I did this but had to restart HA to get it working again. After a few tests, I thought everything was working properly again. Went outside for a few minutes and came back in. Alexa was supposed to tell me that the garage door was closed but didn’t. The captcha prompt was back. I went through all the recommendations including removing the integration, removing the pickle file, etc, etc. During the integration installation, it took many tries to get past the logon page to where it gave me the captcha. This happened when I initially installed the Alexa Media Player integration.

After several tests, everything was working properly…Until it wasn’t. The captcha was back.

I never had this issue when using echo speaks with smartthings.

Anyone else having the issue?

I just checked over on the echo speaks smartthings forum and this has started happening for some with that integration as well.