Send Commands to Alexa

That would be awesome, I did get Alexa to send commands to start my car but it never actually started. I know it kinda worked because you can only remote start it twice before having to use the key to start it.

I hope we can get a free version!

So I emailed bespoken to confirm that it would be possible to use the self-hosted CLI with virtual Alexa after the trial ends and they said no. I asked if they had any other ideas… so we’ll see what comes of that.

I see that it’s possible to make a virtual switch or something in Home Assistant and expose it to Alexa. Then on the Alexa side of things (from the Alexa app) it sounds you can make a routine and have it automatically triggered when the state of the switch changes. Interesting idea… going to look into that some more.

there are several ways to communicate with alexa.

  1. add the emulated hue component to HA, and you can expose lights and switches to alexa
  2. use the (custom) alexa mediaplayer, which also has servoces for tts and to start routines
  3. use the shl script that is mentioned elsewhere on the forum, for TTS routines, etc.
  4. combine those things.

i got a virtual light exposed by emulated hue, with routines i change the brightness from that light, HA picks that up and in my case in appdaemon i use that change for automations (works also with HA automations) in those automations i use the script to send TTS to alexa

1 Like

Thanks for the info. Bespoken just seemed so much cleaner than the other methods.

Speaking of which Bespoken got back to me and said that they may introduce a lower-cost (potentially free) option which would use Wit.ai instead of Google TTS behind the scenes. They say it’s not as good but should be fine for this use case, and Wit.ai is free for them to leverage compared to Google TTS.

In the mean time I’m going to try some of the ideas above

why give a third party your amazon credentials, when you can do the same without them :wink:

Maybe I’m overly trusting but that sort of thing doesn’t usually worry me. Plus I’m Canadian and am using a throwaway Amazon account in the USA just for this (Xbox skill isn’t supported in Canada).

I tried creating an input_boolean and a binary_sensor (setup to use the value of the input_boolean). The binary_sensor is device_class: door and I can see it in Alexa just fine, and it updates in real time as I toggle the input_boolean. But when I try to use it in a routine, it fails. I can choose the device but it gives an error about it not being supported.

Then I tried using the alexa media player custom component (which seems like overkill as I’ll never use any of the media player features). But this didn’t work out either because what I want to do is not something that I can put into a routine, apparently.

Bespoken or something like it appear to be the only way, as I need to speak a specific phrase, not trigger a routine :frowning:

I want to tell Xbox to ‘record that’ or ‘take a screenshot’, via Home Assistant. Once I have that working I can trigger it from Google Assistant. I’m basically needing a Google-Alexa bridge, lol.

why use a binary_sensor??
you expose the input_boolean to emulated hue and from alexa you change it (with a routine or by saying ‘turn input_boolean_name’ on)
Alexa cant work with sensors.

the mediaplayer is not used for starting a routine in that case, but to use for TTS.

in your case emulated hue would be enough. and no routines needed.

expose the input boolean and switch it with alexa.

I think you have this backwards. We’re trying to trigger Alexa commands from HA. Not the other way around.

what kind of commands do you want to trigger?

because you talk about putting an input_boolean in a routine, thats alexa to HA

commands from alexa to HA -> emulated hue with a switch boolean or light
commands from HA to alexa -> alexa mediaplayer services to trigger a routine or TTS

if you want alexa just to talk, then the TTS( text to speech) service from the mediaplayer is working perfectly, and you dont need routines for that.

for TTS you can also use the SHL script that i use.

you talk about alexa commands, thats what you use to command alexa to do something.
so i guess you confuse me.

maybe a specific example of what you want to do, would help.

You can use input_boolean or binary_sensor in Alexa as the trigger for a Routine. That’s HA to Alexa. But in my case even triggering an Alexa routine isn’t helpful, as the commands I want to trigger aren’t options in Alexa’s routines anyway.

eg: “Alexa, tell Xbox to record that”
https://www.amazon.com/Microsoft-Xbox/dp/B07H25BSCN

I have devices that are supported by Alexa Skills, but not supported by any Home Assistant component nor Google Assistant Skills. In order to control them I must send a voice command to Alexa.

ah ok, you want to trigger a third party skill from alexa.

thats the only thing that cant be done right now, because amazon doesnt even have that added to routines.
you could however put a google home in the same room as an alexa and then tell google home to say what alexa needs to do :wink:

i dont believe that an input_boolean or sensor that is exposed by emulated hue can be used for trigger from alexa routines. (hence your error) but i could have missed that they added that. (or did you expose the sensor in another way? nabu casa?)

i avoid stuff that can be controlled by alexa directly. i buy stuff that can be controlled by HA (direct or indirect) and then control that with alexa.

if you can control third party skills by bespoken then thats the only option for now that i know of.

Using nahu casa yes.

The Alexa app allows you to choose the device that was exposed from HA when setting up the routine. I got an error when choosing the device but it works for others. Didn’t bother digging deeper when I found that I couldn’t trigger any Xbox commands aside from turning it on, though.

1 Like

I can find a very good use case for something like this. Ring Video doorbells. Amazon dropped the ball on what seems to be a feature of most video doorbell intercoms. If someone presses the doorbell, the video shod automatically be displayed on your Echo Show.

Currently. It’s not supported, you have to ask Alexa to show you the front door, wait for the laggy connection then see the persons back walking away because you answered too late.

So, how does this get fixed? Using this I can probably send Alexa a silent command directly to the ring skill “Alexa show me the front door” as an automation when someone presses the doorbell. But have a condition that only do this if we are home. I don’t think ring will dual fork the call between apps. It’s just using basic SIP signalling after all.

So this is the ultimate use case. Ring Video owners rejoice … after several years we have a solution .:joy::joy:

1 Like

what you want can be done in other ways.
HA can pick up the doorbell signal and you send a HAdashboard with the camera on it to the echo show immediatly. (conditions are also possible)

How do you send a HAdashboard to the echo show ? I’m interested in this solution …

echo show has a browser. (unless i am mistaken, i dont own one)
and on a browser you can open a dashboard. and if a dashboard is opened you can send any other dashboard.

you just need to make sure its activated again after you use the show for something else.

Yeah it’s got a browser. Still, the only way to activate the browser is to say “Alexa open firefox”, then you actually need to type in the URL or open a bookmark. It’s not very practical for automation. The browser also times out and closes after a few minutes of not sensing touch.

However I can see some practical use for the browser if one was able to send silent commands directly to the echo as if it was being spoken to. I could create an input Boolean switch when switched on using an Alexa routine, it could send a command to Alexa to “Alexa open Firefox to http://Plex…/tv/channel7”. Something like that if it can understand the URL part.

Looks like bespoken.io could work for both these use cases, and perhaps more if the browser could understand URLs being spoken to as well, and not just opening the browser to a blank screen.

I just tried saying to my echo show, “show me www.aws.com” and it didn’t work

Also tried “open Firefox to www.aws.com” that didn’t work either so I guess alexa can only open a browser using voice. The rest is up to the user.

it probably times out because there is nothing happening on the website.
you could try to open a dashboard (or a HA page) which does get info all the time and see if it stays open.
if so then you can use dashboard.

you could also try to install fully kiosk. which would give the option to have the browser active all the time.

https://community.home-assistant.io/t/the-haaska-super-thread/76994?u=jgrob1

Hey guys, found this discussion after I already posted this elsewhere. I found a solution to triggering Alexa routines via HA sensors triggered by MQTT call. no additional scripts or components if you already have Hasska running (which I massively recommend)