building on @e1miran and @KayXi2014 I made a rest_command that accepts a messge, that message is then converted to voice and sent to alexa as though you spoke it!
It uses the bespoken.io server to set up a “virtual echo”, you can then send strings of text to this virtual echo and it behaves as if it was an Echo device on your account. For example… I can send it “Play The Beatles in the bedroom” and my bedroom Echo starts playing The Beatles.
Simply replace <your-validation-token> with the one you received in step 2 above. Note: you will not include the angle-brackets < >
That’s it! Now you can send alexa any command you would normall speak from, say, an automation like so:
trigger:
- platform: time
at: "06:00:00"
action:
- service: rest_command.ask_alexa
data:
message: "Play my wake up playlist in the bedroom"
You can also change the language and the voice that will be used to “speak” to Alexa (defaults are US English and ‘Joey’). You can find out how to put those parameters in the URL here:
but i am still more comfortable to do more work and reach the same goals without giving away my amazon account to strangers.
allthough this has 1 advantage: you can start (custom) skills by sending a command, and thats about the only thing i still miss in routines.
but ill wait untill they add that to alexa.
Cant this be done with tts? I use tts with speech from amazon polly to f.ex tell me when someone trigger the motion detector outside the front entrance
This is not anything like TTS. You’re not getting Alexa to talk to you… it’s the exact opposite: You’re able to “speak” to alexa (look at my example). You are not giving Alexa things to say, you’re actually sending commands.
For example, If you want to make Alexa start playing music from home assistant (my use case), this is the only way to do it.
You can’t select the media you want to play with Media Player - it will display what is playing and allow you to skip fwd/back, pause, etc. But you can’t pick a song and start to play it.
Please point me to this, as i would be interested as well…
I think you misunderstand. I have a trigger in HA that fire when my wife turn in to our driveway. Now my BLT speaker tells me that Y is on the driveway, but if I had Alexa and the voice said Alexa turn on the front porch light instead I am sure that Alexa would do that. Or what is it I dont understand?
I guess it might be a little confusing… there is no audio involved at all. You send a text string to the Alexa service. Alexa processes that string of text as though you spoke it. It’s a way to send commands to Alexa by text rather than speech.
That was just an example. If I had Alexa I could tell it to do whatever you want using TTS. That was what I meant. I dont use it, I just use TTS to tell me when f.ex dishwaher is ready wife comes home garage door is open 22.03 etc. And all local. no need to leave your credentials to third person
i use it mainly to manage my bring shopping list via snips. since bring does not care to publish a public API, i can emulate an API using their alexa skill. actually by using this it’s possible to use almost any alexa skill out there with snips (if you don’t mind the lag).
Thanks for this - I took a look and set it up - I run in docker, so I need to use the *_plain.sh variant of the script, but it works. It’s certainly way more involved. It will be interesting to see how it holds up long-term as it seems pretty fragile (needing to export cookies, store them in the /tmp dir, etc.). Could be lots of care-and-feeding to keep it operational.
However, as you mentioned, it does cut out the middleman, so there’s that. And it has TTS capability, which I don’t think you can do with Bespoken
its nice to use TTS in that way. i used something simular.
but it has 1 disadvantage, its on 1 place only.
i already got 7(and it will grow up to 16) times alexa around the house. so with alexa TTS i get to use TTS on 7 different locations.
@ha_steve yeah it is a hack, so its always the question how long it holds. but i got it working without a problem for a long time now.
you can do the TTS with bespoken too. its actually nothing more then the simon says functionality.
even if you cant do it directly you could do it by creating a routine and start the routine with bespoken.
but this is way more direct. and indeed without a middleman (and i have a hard time trusting someone, when i cant find name, place, location, etc. etc. and they use an io website)
Its one sentence yeas but I have 3 BLT speakers paired so I hear the same speech in 3 different places in the house. And as I said I have no interest in Alexa or GA, I need the exercise as retired.Just had a look at the script and because each speaker has an entity ID it would probably be possible to control where the speech is sent out. But it is the wrong day to day to investigate
Hey, i am all new at this home assistant , so my question , with the above would i be able to create a switch button on hadassboard to be enable to control a switch wich works with alexa , but not yet with hassio?
I have these livolo switches wich are connected with their on zigbee gateway and their own app , but i would like to build a dashboard with all my stuff in it , so i don’t need to switch between apps. Now livolo isn’t supported by hassio yet but it is by Alexa… So maybe this could be my solution?