Echo Devices (Alexa) as Media Player - Testers Needed

Weird. I think you should open an issue on GitHub.

Agreed. Issue #1217 opened.

Thanks for the assistance!
Terry

This is the only way I was able to get it work. So many other examples that are supposed to work but dont. Thank you. I want to play a media file now. Do you know how to do that? YThanks.

AMP won’t play local media files if that is what you hope to do.

see this which is a lot higher up this thread.

Has anyone gotten this to work via node red? I use NR for all my automations, I have it tied to Home Assistant and I can have Alexa speak things using the notify command. However when I try the media.play command with this in for data I get an API error.

{
   "media_content_id": "what time is it",
   "media_content_type": "custom",
   "target": {
      "entity_id": "media_player.echo_show"
   }
}

Has anybody issues with the new media_content_type ‘custom’?
Since 4 to 6 hours no command works.
When I speak exactly the same command to the echo, everything is fine.
The command via HA is ignored.

What do you mean by ‘new’ when referring to media_content_type: custom ?
Just tried it from Developer tools and mine works fine - so the answer is No in my case.

1 Like

Nope, this add-on hasn’t missed a beat for months now.

1 Like

I will give more context in a moment, my bottom line issue is in routines. I have not tested all actions, but “Alexa Says” and scenes are not working from a trigger word. It does work if you press the play button.
I can create a test routine with a sound action and the trigger word work.

Some background on what all was done. I have had an echo in my shop for almost a year. That is the only place where I have any “Echo” type device. There are two routines, “hello” and “goodbye” as trigger words. The hello would “say ‘hello Paul’”, “set volume”, “play KLove”, “run 'enter shop”. Then goodbye would “say ‘see you later’”, “shut off-stream”, “run ‘leave shop’”. Both “enter shop” and “leave shop” are HA scripts that would turn on lights, then turn off shop lights with timer and turn on pack porch lights with timer. Last few times into the shop, it would not automatically play the station, I would have to ask Alexa to play it. But everything else was working.

Saturday I installed the “Alexa Media Player” (AMP) via HACS. Ran the integration and it found the Echo and some Fire Sticks.

I wanted to use the TTS. I have a charger in the shop and when I executed the “leave shop” script, I wanted it to look at the charging sensor, it on then tell me not to forget the phone. I installed and tested the AMP with no issues. Then I brought Alexa into the house. It would connect to the same SSID. Then I tested TTS. Before I got too far, I wanted to change the name from “my name” to shop. Did and refresh the integration and all still look good. I then retested TTS and it still worked. I wanted the script to loop until I took the phone off the charger, so I thought I would play with a python script. So then I started changing the routine to use the new script and after speaking the trigger word, I was not seeing any actions executed. That was when I created the simple test with the sound and it worked.
So out of desperation:
I dissociated/associate the device. Same symptoms.
I removed AMP. Same symptoms.
I reinstalled AMP. Same symptoms
That is where I am at now.

My most basic question, has anyone experience Echo issues, that is not part of the AMP, but started when it was installed, but the AMP functions seem to work?

Any thoughts on other troubleshooting steps?

from your description it has nothing to do with AMP.
you changed the routine to use a new script and then it stopped working.
so there are a few options:

  1. alexa writes the words you say different then you think (look at history if you did write it correct)
  2. alexa doesnt see the new script (but you can trigger it by pushing the routine in the app, so probably not)
  3. the script itself is incorrect and isnt working
  4. something at the first part from the script is incorrect, preventing any other actions.

AMP is not able to interfere between your spoken words and starting a routine, so if a routine isnt started by the words you say, then it cant be related to AMP and it must be something in the routine.

I agree to Rene Tode.
What I did is, when it comes to larger sequences, I put everything into the HA script and simply call the script via speech. So the speech is handled in the script as well. I never created a mixture out of routine actions and script services.
That gives a better possibility to control the sequence via log entries.
For example my good_night script:

command_szene_good_night:
  sequence:
    - service: alexa_media.update_last_called
    - delay: "00:00:01"
    - condition: template
      value_template: "{{ is_state('sensor.last_called_alexa','media_player.wohnzimmer') or is_state('sensor.last_called_alexa','media_player.kuche') }}"
    - service: script.turn_on
      entity_id: script.add_log
      data:
        variables:
          name: "script szene_good_night"
          message: "is being used"
    - service: remote.turn_off
      data:
        entity_id: remote.wohnzimmer
    - service: notify.alexa_media
      data:
        target: media_player.wohnzimmer
        data:
          type: announce
        message: >
          Gute Nacht und träum was schönes. Das Licht werde ich in 4 Minuten ausstellen.
          {% if is_state('group.check_window','off') %}
              Die Fenster sind alle geschlossen.
          {% else %}
              Bitte die Fenster 
              {%- for entity_id in states.group.check_window.attributes.entity_id if states(entity_id) == 'on' -%}
                  {% if loop.first %} im {% elif loop.last %} und im {% else %}, {% endif -%}
                  {{ ' ' + state_attr(entity_id,'friendly_name') }}
             {%- endfor %}
               prüfen
          {% endif %}
          {% if now().isoweekday() not in(6,7) and states('sensor.days_to_leave') |int > 0 %}
            {% if  is_state('input_boolean.yvonne_stays_at_home','off') %}
              Morgen kein Home Office für Yvonne.
            {% else %}
              Morgen bleibt Yvonne im Home Office.
            {% endif %}
          {% endif %}
          {% if states('sensor.waschmaschine_watts') | float > 0 or states('sensor.trockner_watts') |float > 0 %}
              {% if states('sensor.trockner_watts') |float > 0 and states('sensor.waschmaschine_watts') |float > 0 %}
                Waschmaschine und Trockner laufen noch oder es ist noch Wäsche enthalten
              {% elif states('sensor.waschmaschine_watts')|float > 0 and states('sensor.trockner_watts')|float == 0 %}
                Die Waschmaschine läuft noch
              {% elif states('sensor.waschmaschine_watts')|float == 0 and states('sensor.trockner_watts')|float > 0 %}
                Der Trockner läuft noch oder es ist noch Wäsche enthalten
              {% endif %}
          {% endif %}
    - service: cover.close_cover
      entity_id: cover.rolladen_wohnzimmer
    - service: camera.enable_motion_detection
      entity_id: camera.blink_garten
    - service: input_boolean.turn_off
      data:
        entity_id: input_boolean.guest_mode
    - service: light.turn_off
      entity_id: light.haustuer
    - delay: "00:04:00"
    - service: light.turn_off
      entity_id: light.wohnzimmer
    - condition: template
      value_template: "{{ state_attr('cover.rolladen_wohnzimmer','current_position') | int > 0 }}"
    - service: cover.close_cover
      entity_id: cover.rolladen_wohnzimmer
1 Like

Thanks, guys. I am not 100% sure what broke it. I did not think AMP had anything to do with it but had to ask.
Just to be clear, it is not just the one routine. So if I create a routine that uses the trigger word “test two”. The action is play sound x. That works. But if I change it to “say ‘how are you’” that does not work.
As I was typing this, the one thing I did not try is both at the same time. I was trying to keep HA out of the equation.

always check the alexa history, when she doesnt react to a command.
its possible that she translates:
how are you
to
how are you?
or
How are you.

and if it doesnt match the exact text from your routine, it isnt triggered.

1 Like

I even had trouble with a routine that used “Philip’s” i had to add “Philips” also or it didn’t work

Last night I created a routine that played a sound. That worked. Then I added a “say customize phrase” It was above the play sound. Neither one worked. I then moved the play sound above the say phrase and the play sound worked but not the phrase. I wonder if the issue is anything that has to go over the internet. One thing I did do was add 2FA for the integration. Now it gets strange, I was going to get a screen shot of my routine, and the Alexa app crashes. It like a melt down, I deleted the app and reinstalled it, still crashes. Then I went into the amazon app, it was crashing. I used a web browser to turn off 2FA and still crashing. It moved to Gmail crashing. Now I am wondering if my phone is dying.

@ReneTode I don’t think it a translation issue, if I am understanding you. I am using the same trigger when I add other actions to the routine. I getting to the point o factory reset. I not too worried since most data is backed up. The one thing I need to research before resetting is the google authenticator app. Most of the 2FA seeds can be reset, but I not sure about my Unifi account.

at least it sound like your phone has serious issues.
but not just your phone.

this to me sounds like a network/internet problem.

but i think you should open another topic for this, because its not related to AMP in my eyes.

@ReneTode Will do, thanks.
I did not think it did, if it was an issue I would have expected more users with issues. I thought someone might tell me if I did something wrong.

I did hook my phone up to ADB, and it was throwing a massive amount of errors. To be fair, this is the first time I tried looking at debug logs on a production phone, usually, it is a testing device. So it seems a lot to me.
Here is a sample …

I did do a factory reset, and now can get into the Alexa app. I am still restoring so it might go down, but I feel like something was glitched. I Will not know if that was the issue with routines until tonight. I would not think it will since I had the issue way before the phone started its meltdown.
If not as per your suggestion I will start a new thread, thanks again.

1 Like

Just a final update before moving to a new thread.
Still not working. I found this thread in the Amazonforum, I will move to that thread.
I had a friend test on his 1st Gen Echo and my example for the issue, which is 100% reproducible on my device, worked in his. The firmware is update on the device. Sorry for the bunny trail and thanks again.

Here is the thread if anyone runs across this issue again. At the time of this posting, there was no answer there.
https://www.amazonforum.com/s/question/0D54P000084fxqVSAQ/1st-gen-echo-wont-run-routines

Hey all,

EDIT: So of course the machine god seen this post and said… Ok let it work now LOL so worked for the first time this morning. See if it keeps working though.

Anyone having issues with routines on Echo Show 10s (2nd gen)?

I have an Echo dot and the show both calling the same script that calls a routine. Plays a flash briefing then a playlist on spotify.

Echo dot plays the flash briefing and music
Show 10 only plays the flash briefing

I’m also seeing some routine issues with people using cakebaked Alexa Remote in node red.

So just wanting to see if anyone here is also having this kinda issue?

Thanks all

How can I prevent the notification sound when I change the alexa volume through this addon? Or is this something I’d have to configure in alexa itself somehow?

I worked for a year already, but since a few days alexa gives a notification sound before I change volume, and another notification sound before the TTS is executed.

alexa_setvolume:
  sequence:
    - service: media_player.volume_set
      data_template: 
        entity_id: media_player.my_echo_dot
        volume_level: "{{ alexa_volume }}"