How to trigger Alexa routines from Home Assistant

Can Alexa skills be exposed into HA?
For example I have skylink alarm that is connected to Alexa…would like it to communicate back to HA

I have a similar issue - my binary_sensor is of device_class ‘opening’ and it is shown in the Alexa app. I can see the status change in the Alexa app as well, so it looks like the communication from HA to Alexa works. However, the routines that I created never trigger.The trigger looks like this: when ‘First Amazon Plug opens’. The routine works fine if I trigger it manually. I have another routine with a trigger when ‘First Amazon Plug closes’. That works fine as well.
Is this just a matter of waiting for the routines to be enabled? Or is something else going on?

Have you enabled proactive events in the skill setup?

1 Like

I am using Amazon Alexa Smart Home Skill - Home Assistant (home-assistant.io) which is basically a lambda function running on AWS. Have not seen proactive events as an option, but I will take a look.

On that page you refered, see https://www.home-assistant.io/integrations/alexa.smart_home/#proactive-events

1 Like

yeah, I see it now. I had to enable it, did not have it enabled previously. Did not know it was a thing :slight_smile: Thanks. It works!!

Hi,

So I was able to get this kind of working but am stumped at whats wrong.

I setup an inputboolean switch on lovelace, I have a binary door sensor setup to check the state of the input boolean. Alexa is seeing the status of the sensor as open or closed when I toggle the switch. I have a routine in Alexa to turn a smart plug on/off depending if the state is open or closed. But the routine in Alexa is not triggering the powerbar outlet to turn on/off for some reason.

I have a smart power bar that I cant integrate natively into HA but has an Alexa skill.

EDIT: realized I didn’t have the Alexa report states turned on, in the cloud settings.

Thanks.

does anyone have any extra information on this? i do use haaska… but i removed it all to try this as i’m looking to trigger routines via HA. however, after deleting and starting over multiple times… i’m stuck on unable to link my HA with alexa… any tips?

Update: i have not fixed it yet, but i think i may have figured out the issue is probably because of the beginning of the directions which states “The Alexa Smart Home API requires your Home Assistant instance to be accessible from the internet via HTTPS on port 443 using an SSL/TLS certificate.” I have not set my forwarding to this port which is probably the issue. if someone could inform me of this that’d be great…

Update 2: after reading the documentation further i found that it was the port number that i had to correct in order to link my account.

Can anyone explain what exactly “expose” the sensor to Alexa means?

I have my Echos connected to HA already. It’s syncing my scenes created in HA but that’s it.

I created a binary sensor that detects whether a boolean switch is on:

binary_sensor:
  - platform: template
    sensors:
      door:
        friendly_name: "sensor - trigger for alexa"
        value_template: '{{ is_state("input_boolean.trigger_for_alexa","on") }}'

I was hoping to use that to trigger an Alexa routine but my Echo is not discovering the sensor. I’m knew to HA so maybe I just don’t know how to “expose” things to Alexa properly. I’ve restarted HA and clicked sync entities to Amazon several times.

Any ideas?


Well I figured out what expose means. If any other noobs like me happen across this, you have to open “manage entities” under home assistant cloud to see what’s exposed and what isn’t. As soon as I did that I got a notification on my phone that Alexa discovered a new device.

It shows up in the list of all devices but it doesn’t show up as an option for routine triggers though which is frustrating.

1 Like

Have you enabled proactive reporting?

1 Like

I did, didn’t make a difference. But I just found out I can trigger routines directly with Alexa Media Player so I’m giving up on the virtual binary sensor for now anyway. Thanks for trying to help!

Another way to trigger an Alexa routine from anything that can do an http request:
https://www.virtualsmarthome.xyz/url_routine_trigger/

Contact sensors and motion sensors aren’t supported in all regions: List of Alexa Interfaces and Supported Languages | Alexa Skills Kit

1 Like

It works perfectly for me.

How did you do that? I would love to know! :slight_smile:

There is a very simple work around for this, I am doing a article on smart home tech for a site from a newbies perspective, ( I am a month into it and just have to wait for a few more items to turn up to get finished up, were I explain how to have simple connection on devices only supported by alexa and even have automations setup with it.

its a dirty way but works, my robot vac for example only works with alexa but I have a home assistant routine to turn it on and send it back if need be.

Once article is live ill post the details here (without linking to article).

1 Like