Smart Home Software & Devices Voice Monkey Tutorials

The EASY Way To Trigger Alexa Routines From Home Assistant

Alexa Routines from Home Assistant

Home Assistant (HA) is a piece of free home automation software for controlling your Smart Home.

People use it as the central hub or command centre for their smart home tech.

With HA you can link all your devices in just one place and build cool automations based on the state of all your devices.

Alexa + Home Assistant

Whilst it has support for some Alexa functionality, it has been very difficult until recently to trigger Alexa routines directly from Home Assistant.

Now, services such as Voice Monkey make it as easy as sending an API request to trigger Routines and make dynamic voice announcements through your Echo speakers.

What Is Voice Monkey?

Voice Monkey extends Alexa’s smart home capabilities.

It offers an API to trigger Alexa Routines remotely from services such as Home Assistant and IFTTT.

It also allows you to make dynamic text to speech announcements via the API. Want to announce to one or multiple Alexa devices that a camera detected motion? You can do that with Voice Monkey 🙂

How To Trigger Alexa Routines from Home Assistant

The process is easy.

Firstly, sign up to Voice Monkey and follow the instructions to create your first Monkey and Routine.

A Monkey is simply a virtual doorbell device which can be pressed (or triggered). We can use these doorbells, or Monkeys, as triggers in our Alexa Routines.

But how do we trigger these virtual doorbells from Home Assistant?

Trigger Your Monkey With The RESTful Command

In Home Assistant you can make API calls using the REST command.

Simply add the following to Home Assistant’s configuration.yaml file:

Home Assistant Alexa Routine Config YAML file

Here’s the same code so you can copy and paste:

# Voice Monkey Alexa Routine API call

    method: POST
    verify_ssl: true
    content_type:  'application/json'
    payload: {"access_code":"ACCESS_CODE","secret_code":"SECRET_CODE","monkey":{{monkey}}}'

In the code above you should replace ACCESS_CODE with your own access code found in the Voice Monkey dashboard and SECRET_CODE with your own secret code (make sure you keep it secret!).

Then, go to developer tools and test it out.

First, restart the server (Configuration -> Server Controls -> RESTART) to apply the new changes:

  1. Go to Home Assistant’s Developer Tools -> Services screen
  2. Select “rest_command.trigger_monkey” from the Service menu
  3. Enter this in the Service Data field to trigger your Monkey:
  4. Select the CALL SERVICE button

You must replace MONKEY_ID with the ID of your Monkey found in the Monkey manager section of the dashboard.

And that’s it!

You can now start triggering Alexa Routines from Home Assistant.

Let us know your automation ideas in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *