Hi, I’m facing the problem, that alexa media updates its status much slower then around until two weeks ago.
The problem is for example, that I’m connecting bluetooth with my receiver when starting music. When I change the source to another echo group, then the blutooth status of my speeker is still not updated and therefore empty so that the script to connect bluetooth is called again and the echo answers correctly that its already conncted to bluetooth. Thats annoying and leads in other cases to issues.
The update of the echo status (show the music source picture and set status playing) needs around 3 to 15 minutes.
Has anybody else recognized a decrease in speed of alexa media?
Maybe in relation to my post above, I have an issue I don’t understand.
In order to switch the ligt off by saying the same “alexa, light off” in every room I have the following script exposed to alexa:
The script worked without issues until last friday.
Then it starts, that I’ve had to give the command always twice. In the beginning I thought, that alexa didn’t understood me, but then I recognized these issues in my log:
Logger: homeassistant.components.script.command_light_off
Source: helpers/script.py:1138
Integration: Skript (documentation, issues)
First occurred: 12:14:47 (3 occurrences)
Last logged: 17:51:42
command_light_off: Error executing script. Invalid data for call_service at pos 3: not a valid value for dictionary value @ data['entity_id']
command_light_off: Error executing script. Invalid data for call_service at pos 4: not a valid value for dictionary value @ data['entity_id']
Ok for pos4, it seems that the sensor isn’t set.
So I added the log entry in order to check, if the sensor really isn’t set. I’m wondering why this could be because the sensor alwas has a value at least the old one.
But the error for pos 3 confuses me completely because I just write the active state of an entity in the log. I expected an empty value but not the same error like pos4.
By the way: I use the same sequence in many scripts, but the issue appears only in this command.
Just a thought. Could it be that the state of sensor.last_called_alexa is somtimes (for whatever reason) none of the tested states ? In this case entity_id ist not set and an error is logged. It might help to add an else path that sets entity_id to a default media_player that is used in case all of the above tests fail.
Thanks, yes. I was thinking about that as well. But the ‘else’ can only be the wrong light That would cause confusion when you are in the livingroom, want to switch off the light and the lights in the office react
What I’m missing is an error handler like in other languages in order to give the user a response.
That would be the easiest way.
What I have done so far is to increase the delay. Will see if it helps. But imo it’s just a workaround and doesn’t explain, why all other scripts with exactly the same sequence work with a delay of 1 second and this one needs 3.
To make it short:
I tested it out this morning as it still did not work:
I had to increase the delay up to 5 seconds before sensor.last_called alexa is updated.
Last week it worked with 1 second. So something changed over the last two eeks.
Wait_template is no solution because the script will work with the old value and continue
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.
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.
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
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.