Is there a way to send a command to Alexa as if spoken?

Here’s the scene.

I provided a button that sends a “dinnertime” message by MQTT. In Home Assistant, I push a “Dinnertime” voice message to Alexa. My wife typically presses this ten minutes before dinner is ready to serve. What I would like to do is find a way to set a timer to the Echo device in my office to five minutes.

Any ideas?

You can do it thru the Alexa media custom integration using custom media_content_type command

I am not finding this. Not in Palette manager, GitHub or Google.

Either here of though HACS:

I do the same with this script, it announces it’ll be 10 minutes, then in 5 minutes announces it will be 5 minutes and then ready after that 5 minutes. Note I use an everywhere group setup in the Alexa App

everywhere_message_dinners_ready_10m:
  alias: Dinner's Ready in 10 Mins
  sequence:
  - service: notify.alexa_media
    data_template:
      target: media_player.alexa_everywhere
      data:
        type: announce
      message: Dinner will be ready in 10 minutes
  - delay:
      minutes: 5
  - service: notify.alexa_media
    data_template:
      target: media_player.alexa_everywhere
      data:
        type: announce
      message: Dinner will be ready in 5 minutes
  - delay:
      minutes: 5
  - service: notify.alexa_media
    data_template:
      target: media_player.alexa_everywhere
      data:
        type: announce
      message: Dinner is ready

Thanks for the point to the integration. But I think you missed my question.
I am already using the Alexa Routine node in Node Red to speak the notification to all Echo devices. No problem, she pushes the button and everyone hears the dinner announcement.

What I am looking for is a way to set a timer in my Echo Dot. Normally, I just say “Alexa, set timer to five minutes”. But I am looking for a way to set the timer programmatically.

(When I am deep in thought with a project, I need the second reminder).

the Alexa Media Player integration above can do that.

see here

Cool. This is exactly what I want to do.
However, I am having trouble with configuring the integration. Assistance would be appreciated.

I used the Amazon Authenticator App to generate a long key:
XXXX CECN 54LF U5QO A5UW UMLF XXXX TNYE NSJG XXXX P53T WJ4U XXXX
Is this the “Built-in 2FA app key”

In Amazon, the last step for using the Authenticator App says:
“Enter OTP. After you’ve scanned the barcode, enter the OTP generated by the app:”
How do I get the OTP generated by the app to verify it from Amazon, or is this verification unnecessary?

I get “Not all required fields are filled in.” whether “Use Login Proxy Method” is selected or not.

The only blank fields are “Included device” and “Excluded device”.
Do I have to list every Alexa davice on my net here? What format?

Thanks

TBH, It’s been a while since I’ve done it I really don’t remember what was needed. And a lot has changed so even if I did remember how I originally did it it might not be valid any longer.

I recommend that you ask in the (really loooong) dedicated thread for the integration:

All of the devices on your account will be auto discovered after installation. Some of those you might not want to be included so you can exclude them. You have to know the device name in the account tho. I think those instructions should be included in the wiki.

But other than that you don’t have to fill anything in for those two fields so the errors aren’t referencing those.

Update. I started over and this time it worked.

From Developer Tools, Services, this worked:

I am experimenting with other commands now.

Thanks for the tips.

1 Like

Yes. The integration shows that it added 19 devices and 120 entities. Lots to think about.

You will likely never use most of those.

Personally, I disabled almost all of them except, obviously, the media player entities.

Try this its like giving command direct to alexa “node-red-alexa-voice-service (node) - Node-RED

1 Like

This works great, but only for original Echo speakers. I’ve got 2 of them, but in the Bedroom I have Sonos Beam with Alexa enabled and it does not work :frowning: I wanted to use “continue playing here” command to create music follow scenario based on room presence. If I say the phrase to Sonos it still works, but not using the service call. Any ideas?