Actionable Notifications via Alexa Media Player

Did you actually do what I said in my post and update alexa media player addon to the latest version? If you haven’t then that’s your problem.

Thanks a lot for your reply Davey,
Yes i do have the latest update installed on alexa media and updated instruction for actionable notifications, i see the script as fired but i do not hear anything from Alexa devices and of course i cannot reply …
I thought this si a setup problem with scripts but i actually carefully copy paste everything…
In any case y=tanks and should you have any ideas they would be more than welcomed.
Harris

I had this working on one echo. Changed it to a different echo and had to ask the new echo “Alexa open custom skills” before the new one would accept any response.

I’ve been struggling to get this to work correctly for a couple of weeks and would appreciate some help. I’m so close is frustrating!

I have an automation set up to trigger Alexa when the heating goes on.

Alexa should respond with “The heating has turned on. Do you want me to turn it off” but she doesn’t respond at all.

However, if I say “Alexa, open custom actions” (from the setup test), she responds with the correct phrase, as per the automation. If I reply “Yes”, the heating turns off.

Turning on the heating causes Alexa to get the new message but it doesn’t get relayed to my device.

I hope that’s clear. There’s a disconnect somewhere and I can’t find it.

Any ideas?

Solved !!!
@ashscott
I have been struggling with it since last Friday night.
I reinstalled Home assistant a dozen times, dozens of reinstall of Alexa Media player and unlimited number of Amazon Full installation of Actionable notifications.
I was very much sure that there is something wrong with my media_player_media_play service and Alexa, as i could not hear anything on MY alexa Device , but i could hear the correct Amazon test response from Amazon “open custom actions” but from my PC speakers.
Yesterday late night i was checking the script again and again, changing various elements when i decided to input my Skill Id code without the <> angle brackets or however they are called and as a MAGIC a MIRACLE everything worked perfectly.
I was so happy and almost frustrated as it was sure it was a silly stupid explanation which i could not identify for 5 days and nights.
So i suggest whoever has a problem after following the basic instructions to double check all these “minor” and small details before reinstalling everything

@Ross_Davey

THANKS FOR YOUR HELP

Harris

1 Like

Thank you this. I suspect that this is indeed the problem.

Sadly, HA is no longer seeing my Echo devices. I have the same issue with Google Homes.

Removing the Alexa integration and the Alexa HACS integration and reinstalling hasn’t resolved it.

Did you Update HA and Alexa media player component? I had to resolve a Captcha after an Update this week to See my devices again.

Yes, but I wasn’t asked to resolve a Captcha.

Well if your HA can’t see echos or google homes, then it’s unlikely it’s related to this component

Correct. Several others have this issue. Restarts of HA randomly reconnects them. But there’s no consistency. At least the Alexa issue seems to have been resolved. I just need a recognised device to test it!

Maybe check the Internal & External URLs change associated with 110 HA release.

Please could you expand on that or point me where to look?

this part of configuration changed in 110.
check this part of the release

it affects integrations

1 Like

I am facing problem with the getting the person ID almost 99% of the occurrences. Is there anyone successful getting done?

If I am lucky, I manage to answer and get a person ID, after which I am unable to get the person ID again.

1 Like

I am just about at the end of my tether, and definitely at the end of my skills, with trying to get Alexa to ask me the question.

I hear nothing.

Here’s what I know:

If I call the script below, Alexa speaks “Hello world” to me, so my Echo flex seems to be configured correctly.

  test_alexa:
    sequence:
      - service: notify.alexa_media
        data:
          target:
            - media_player.lounge_2
            - media_player.office
          data:
            type: announce
          message: "Hello World"

If I trigger this automation, I hear nothing:

- alias: Boiler turned on Option to turn off
  trigger:
    platform: state
    entity_id: switch.boiler
    from: 'off'
    to: 'on'
  action:
    - service: script.activate_alexa_actionable_notification
      data_template:
        text: 'The heating has turned on. Do you want me to turn it off for you?'
        event_id: 'actionable_notification_heating_turned_on'
        alexa_device: 'media_player.lounge_2'

However, if I then say “Alexa, open custom actions”, Alexa responds with “The heating has turned on. Do you want me to turn it off for you?”. If I change that text, Alexa changes what she says accordingly, each time the automation triggers - but only when I say “Alexa, open custom actions”.

If I answer “Yes” the automation below triggers and the action executes:

- alias: Turn off heating alexa action
  trigger:
    platform: event
    event_type: alexa_actionable_notification
    event_data:
      event_id: actionable_notification_heating_turned_on
      event_response: ResponseYes      
  action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.heating_on_all_day, input_boolean.heating_on_24hrs

My script is below:

  activate_alexa_actionable_notification:
    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.alexa_actionable_notification
          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.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

My media_content_id: must be correct as I get the action response.

I think I’ve tried all combinations of single, double and zero quotes in various places, to no avail.

What am I missing here? Why can’t I hear Alexa when the automation triggers?

I really need some help here and if anyone has any ideas, I’ll really appreciate it.

Thank you, in anticipation.

From what i know i think you should try check the media_content_id (skill id) again.

What alexa_media_player version do you have installed? check under alexa_media/const.py file.
Triggering a skill was introduced in v2.7.0.

I think your action is fired and therefore input_text.alexa_actionable_notification text is changed but the skill is never triggered from home assistant.
You get the action response cause the Alexa Custom Skill grabs the text from the input_text.alexa_actionable_notification via api.
So there is a problem with alexa_media_player trigger that skill. Is there anything in the logs when you fire the automation action?

1 Like

Thank you, Florian. I was a character out on the Skill ID!

I had incorrectly made the connection between the Skill ID and the action text changing when edited.

It works at last.

I appreciate your time and expertise.

1 Like

I am experience the same behavior. When i speak really near (like 5cm) to the mic and its a longer selection word, i get the person_id. With yes or no i never see it.
But this is some kind of ‘normal’ even the creator @keatontaylor wrote a BIG DISCLAIMER

Me again :slight_smile: i played a while with Person Detection and can recommend two things to improve recognition:

  • Train your voice from an Echo Device (not with the App) or specific from that Echo you use the most and step back from the Device so that Alexa learn your “far away” voice

  • Use longer Utterances for the Intents. Example For Yes: In Alexa Developer Console you click on AMAZON.YesIntent in the left menu, type in do that please in 'What might a user say to invoke this intent? and click + to add. Save Model and Build Model.
    When you trigger your automation and Alexa asks ‘should i turn this off’, ‘do that’, etc. say: ‘do that please’ instead of ‘yes’. With this Alexa has more input to match your voice.

From my experience it’s not perfect but i get a higher chance she recognizes me.

Do you suggest doing this by triggering the subsequent automation from ResponseNone?

Like this:

- alias: Boiler turned on Option to turn off
  trigger:
    platform: state
    entity_id: switch.boiler
    from: 'off'
    to: 'on'
  action:
    - service: script.activate_alexa_actionable_notification
      data_template:
        text: 'The heating has turned on. Do you want me to turn it off for you?'
        event_id: 'actionable_notification_heating_turned_on'
        alexa_device: 'media_player.lounge_2'

- alias: Turn off heating alexa request to office
  trigger:
    platform: event
    event_type: alexa_actionable_notification
    event_data:
      event_id: actionable_notification_heating_turned_on
      event_response: ResponseNone      
  action:
    - service: script.activate_alexa_actionable_notification
      data_template:
        text: 'The heating has turned on. Do you want me to turn it off for you?'
        event_id: 'actionable_notification_heating_turned_on'
        alexa_device: 'media_player.office'

- alias: Turn off heating alexa action
  trigger:
    platform: event
    event_type: alexa_actionable_notification
    event_data:
      event_id: actionable_notification_heating_turned_on
      event_response: ResponseYes      
  action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.heating_on_all_day, input_boolean.heating_on_24hrs

Or is there a more efficient way?