its possible to play a short mediafile on alexa in a custom skill, the problem is that you only can trigger that custom skill by saying something to alexa.
the TTS way we use is an hack from the alexa app and from the alexa app you cant play local files.
All good. Thought I’d ask. Oh well. Guess I’ll just deal with the delay. Would be good if it could process on the local AWS servers rather than those in the US.
Not sure if this is related or to this thread or HA in general. However, this is causing Alexa to stop responding to commands until HA is restarted.
An error occured accessing the API: An exception of type ConnectionError occurred. Arguments: (MaxRetryError(“HTTPSConnectionPool(host=‘alexa.amazon.com’, port=443): Max retries exceeded with url: /api/np/player?deviceSerialNumber=G090LF1175150Q4U&deviceType=A3S5BH2HU6VAYF&screenWidth=2560 (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ea265be10>: Failed to establish a new connection: [Errno 110] Operation timed out’,))”,),)
Edited: Appears Alexa is having issues. But, still need to understand the above error…
Could someone take a look and let me know why this script will not work with 2 elements, a doorbell from spotify and an alexa tts both played on same echo dot?
Individually, both work as expected but when combined (see below), it will only play the tts element.
OK I think I have a couple of very “cludgy” fixes for the volume problem
I am now running a bit of a Frankenstein configuration. I am running this custom media player and the python script
As we know when the media player goes into standby the volume controls fail to work. So the first “cludge” is to use a binary template to monitor the state of the media player. It is triggered on when the media player goes into standby. This then triggers a shell command which runs
alexa_remote_control.sh -d “echo name” -r “any valid radio station” - e pause
This will take the echo out of standby but is too quick for the radio station to play. As I said “cludgy” it will fill your history and stop the echo going into power standby.
*EDIT After more testing this is not reliable command is too quick, as I said cludgy sorry
The second cludge is to trigger a routine in the Alexa app. You can create multiple routines in the app that change the volume. You can run them with this
alexa_remote_control.sh -d “echo name” -e automation “name of routine”
I code in appdeamon so can supply code if required
First of all thank you very much for sharing this and relentlessly ironing bugs. Since my first failed attempt at running it back in July I’ve been following the progress and today I downloaded VERSION 0.9.5 and pretty much worked right away!
Could you perhaps consider adding the json tracker which works with this component.
I see you are in Australia. How have you managed to get it to be instant? Would you mind sharing your setup? Also, is your echo setup on an AU account or US?
It takes about about a second or so for my chime to sound, and then the echo starts when the chime is finished. That’s how long it takes the echo to process.
Could also be that HA gets the button press from the ring servers, so there is a few trips to US servers before my Echo makes a sound.
My Amazon account is set to US, I am running HA on PC running Ubuntu so not sure if that would make the diffrence, I have it also pause spotify on the echos if it’s playing so I don’t need to turn it off when people arrive (this is also instant). If you use TTS with the echos is it instant from HA?
Hmm. If I manually invoke a TTS message, it seems to be next to instant. This is the same way that I have my automation setup for my doorbell. Maybe it’s taking time for the Ring sensor to get the data for a ring event. Hmm…
I’ve set up an automation, triggered by an input boolean, to play a radio station but don’t know how to stop it when the input boolean is switched off… to start, the service command is “media_player.play_media” and I’ve tried “media_player.stop_media” but it doesn’t work. What would the command for that be?
alias: Alexa Play BBC1 on
trigger:
platform: state
entity_id: input_boolean.alexa_bbc1
from: ‘off’
to: ‘on’
action:
alias: Alexa Play BBC1 off
trigger:
platform: state
entity_id: input_boolean.alexa_bbc1
from: ‘on’
to: ‘off’
action:
service: media_player.stop ???
edit…not that it really matters actually now that i have already asked, because once the media player is live one uses the media player for control and if the “media” is stopped you still end up with an out of position switch. I guess I should just change it to a script so I get an " execute"/“activate” button instead.
Sorry for the dumb question
I love these media players. big thanks to Keatontaylor!
Maybe, Mine also turns on the porch light when it detects motion which is also instant,I would re-add the ring component again and redo the automations to try and track down the delay. How far is your router from the doorbell?
It’s not that far. Maybe less than 10m. RSSI in the app is in the green showing good signal. I contacted Ring support a few months back about something else and they insisted that my wifi was to blame. Seems to be a common answer with them. I have no issues with any other device on my network.
Unfortunately, I don’t think removing the component will do much. Not without removing any Ring specific dependencies that the component installs, and this is beyond my knowledge.
thanks Willy! And thanks for reminding me of the service menu, after all this time with HASS I still find myself setting up yaml lines to test things…
is there anyway of adjusting the volume through a yaml command?
I’m using the media player as an alarm clock with a mix of tts messages and media but the tts is so much louder than the media it would be good to adjust these levels within the automation