Alexa Integration and Music

Hi All

I’ve been playing with HA for around a year and now have Nabu Casa subscription.

I have Alexas all over the house and they were my main way of interacting with my smart home prior to HA. The move to HA was to reduce reliance on cloud services (Hue is next to go!).

I have two questions with respect to Alexa:

  1. Is there a way for HA to consume the voice commands? At the moment, my HA devices appear in the Amazon environment and I have to create automations in the Alexa app to interact with them. This creates a disconnect between HA and Alexa with the potential for conflicting requests of entities.

  2. How do I request (from HA) my Alexa devices to start streaming music from my Amazon Prime Music library? I have playlists configured and can request them with voice, but what I would like to do is connect my Prime playlists with other automations. Seems you can’t use HA to request music playback and it needs to be done in the Alexa app, but as per #1, I want to remove the potential/requirement for multiple triggers.

Thanks and apologies if these are basic/silly questions.

1 Like

Look at the Alexa Media Player custom integration in HACS.

As Nathan commented, the Alexa Media Player custom integration is one way to have HA control Alexa devices. Once you have set up AMP, each of your echo devices will have a media player entity that provides information about the device and acts as a target for commands.

The most recent voice command is available through the last_called_summary attribute of each echo’s media player entity. While you can use this directly in HA automations, I do not do mine that way because the Alexa side of it gets annoying. When you try to use a command phrase that Alexa doesn’t have a defined routine for, she either gives a “I don’t understand” message or she starts telling you slightly related facts she found on the internet.

AMP translates HA’s media player service calls into Alexa routine commands to control streaming services on the Echo devices. In the event those methods don’t work, the custom command function can, in effect, emulate any voice command you would use.

Perfect response! Thanks guys!

Time to have a play!