Help required calling Alexa routines using the Alexa Media Player custom integration

I have been trying to call an alexa routine using the media.play service. I have followed the steps in the wiki trying to create a script first and also an automation. But I am unable to get either working. It looks like it should be pretty straight forward so not sure what I am doing wrong. Below is the script I have tried using (very similar to the automation)

alias: New Script
sequence:
  - service: media_player.media_play
    data:
      media_content_id: routine call
      media_content_type: routine
    target:
      entity_id: media_player.dining_room
mode: single

Automation

alias: test alexa routine call
description: ''
trigger:
  - platform: time
    at: '17:47:00'
condition: []
action:
  - service: media_player.media_play
    data:
      media_content_id: routine call
      media_content_type: routine
    target:
      entity_id: media_player.dining_room
mode: single

The media_content_id is as it is in the alexa app.

Hi,

Your above script/automations look correct to me BUT I would guess the use of the word “routine” as part of the routine might be an issue.

You can name it anything you like. Just stay away from words like routine/media/play/alexa.

I’m only guessing here so may be another issue. Have you checked the logs?

Simon

Hi Simon,

Thanks for getting back to me. I have tried as suggested to update the routine but it still does not work.

The only mention in the log is:

2021-03-18 16:14:36 WARNING (MainThread) [alexapy.alexalogin] No access token found; falling back to credential login instead of oauth.

I think that may be a generic warning as the TTS routines I have set-up are working. I did have extended logging on for the Alexa Media Player integration for another issue when I first installed. But to be honest I have no idea what it was telling as there there was soooooo many lines to trawl through and not much of it made sense to me!

I also notice that I get the below message displayed when I use the developer tools to call a service

image

I found the source of the issue I should have been using media_player.play_media