OK, understand. There were indeed many code updates in the last couple of weeks. You may want contact the author. Probably best is to flag an issue here: https://github.com/custom-components/alexa_media_player/issues
Hey all,
I have a device in HA that I want to trigger a routine in Alexa (sleep sensor), but I have no idea how to do it? Is there a step by step guide for newbies on how to connect animations to alexa routines.
Even if someone can just post some screenshots of already existing routines and config and I can work it out.
I have had a look at the Automation routines section on github, but I have no context for it, so no idea what goes where.
Thanks guys, I really appreciate it
Thanks mate,
I know, how easy would that be HAHA. But it shows as a switch that cant be a device that triggers a routine
Unless I can change the device type?
Thanks!
The sleep sensor is not the right device class to start a routine.
But hopefully I can get this to work, I’ve got this at the end of the script. Is this all I have to do to kick off the routine? obviously I have Alexa Media Player installed and am using the right devices ect.
This should work too. But this is using the alexa media player custom component which is different from the nabu casa cloud solution provided in the link above.
Thanks,
I got it working, found this legends blog with all the info, hope this helps someone
- create the Alexa routines
- create the scripts (I just pasted these directly into the scripts.yaml and edited to what I needed)
radioparadise:
alias: Play Radio Paradise
icon: "mdi:play"
sequence:
- service: media_player.play_media
data:
media_content_id: Radio Paradise
media_content_type: routine
entity_id: media_player.den_echo_dot
mode: single
stopmusic:
alias: Stop playing music on Alexa
icon: "mdi:stop"
sequence:
- service: media_player.play_media
data:
media_content_id: stop playing music
media_content_type: routine
entity_id: media_player.den_echo_dot
mode: single
- Put the following in your configuration.yaml
homeassistant:
customize: !include customize.yaml
packages: !include_dir_named packages # package setup
- Create a “customize.yaml” in the HA config folder and add this code block (edit for your own context)
script.radioparadise:
friendly_name: Start Playing
icon: mdi:play
script.stopmusic:
friendly_name: Stop Playing
icon: mdi:stop
- I also created a lovelace card to test it out, but up to you
entities:
- action_name: Play
entity: script.radioparadise
- action_name: Stop
entity: script.stopmusic
show_header_toggle: false
title: Radio Paradise
type: entities
Maybe somebody cab figure out my issue. I have my Echo devices set up as a group called “Everywhere”. I can control each individually and they will play media,tts,etc.
I created a card that included the media_player.everywhere. If I try to play to all my Echo devices using the “Everywhere” card,the devices do respond by showing the current volume level,but no music plays.
I’m not using any sort of streaming service,just for radio,so I’m not sure thats the issue or not.
+1 same for me too
When I re-authenticate I get the following confusing message.
I get to this step…Change the url to https://alexa.amazon.com/api/behaviors/automations (or region specific url). This is the page showing your automations.
I get this response.
This alexa.amazon.com page can’t be found
No webpage was found for the web address: https://alexa.amazon.com/api/behaviors/automations
HTTP ERROR 404
I have multiple routines,so I don’t know why.
How to stop, in an automation, a routine previously activated? I tried with the media_player.media_stop service but unsuccesfully.
My automation is:
action:
- service: media_player.play_media
data:
entity_id: media_player.echo_plus
media_content_type: routine
media_content_id: Caccia i ladri
ignore “aborted” everything’s fine when alexa works
maybe simply like this:
- service: media_player.play_media
data_template:
entity_id: "media_player.echo_plus"
media_content_id: "stop"
media_content_type: custom or routine
Yes, that’s a very good solution… i’ll try it asap… Thanks!
EDIT: Why u use data_template and not only data?
hmm…I had issues with data: some weeks ago.
I was too lazy, to try it only with data again
But you’re right, there is no template, so data ist the right way!
Since several versions (0.115 I think) service and data accept templates