Amazon Alexa Flash Briefing


Flash Briefing Skills

As of version 0.31 Home Assistant supports the new Alexa Flash Briefing Skills API. A Flash Briefing Skill adds a new Flash Briefing source that is generated by Home Assistant.

Requirements

Amazon requires the endpoint of a skill to be hosted via SSL. Self-signed certificates are OK because our skills will only run in development mode. Read more on our blog about how to set up encryption for Home Assistant. Using the Let’s Encrypt and Duck DNS add-ons is the easiest method. If you are unable to get HTTPS up and running, consider using this AWS Lambda proxy for Alexa skills.

Additionally, note that at the time of this writing, your Alexa skill endpoint must accept requests over port 443 (Home Assistant default to 8123). There are two ways you can handle this:

  1. In your router, forward external 443 to your Home Assistant serving port (defaults to 8123) OR
  2. Change your Home Assistant serving port to 443 this is done in the http section with the server_port entry in your configuration.yaml file

Configuring a Flash Briefing skill in Home Assistant

You can use templates for the title, audio, text and display_url configuration parameters.

Here’s an example configuration of a Flash briefing skill that will tell you who is at home:

# Example configuration.yaml entry
alexa:
  flash_briefings:
    password: YOUR_PASSWORD
    whoishome:
      - title: Who's at home?
        text: >
          {%- if is_state('device_tracker.paulus', 'home') and
                 is_state('device_tracker.anne_therese', 'home') -%}
            You are both home, you silly
          {%- else -%}
            Anne Therese is at {{ states("device_tracker.anne_therese") }}
            and Paulus is at {{ states("device_tracker.paulus") }}
          {% endif %}

You can add multiple items for a feed if you want. The Amazon required UID and timestamp will be randomly generated at startup and change at every restart of Home Assistant.

Please refer to the Amazon documentation for more information about allowed configuration parameters and formats.

Configuring your Flash Briefing skill

  • Log in to Amazon developer console
  • Click on the “Create Alexa Skills” button
  • Click the blue “Console” button in the top right
  • Click the light blue “Create Skill” button in the top right
    • Skill Information
      • You can enter whatever name you want
      • For “Choose a model” select “Flash Briefing”
      • Hit “Create Skill” in the top right corner
    • Flash Briefing
      • Enter a custom error message, like “This skill is currently not available.”
      • Add new feed
        • For Preamble, enter “From Home Assistant” (or anything you like)
        • For Name, enter “Home Assistant”
        • Choose Content type “Text”
        • Select a genre, e.g. “Other”
        • For Feed, enter https://YOUR_HOST/api/alexa/flash_briefings/BRIEFING_ID?password=YOUR_PASSWORD where BRIEFING_ID is the key you entered in your configuration (such as whoishome in the above example). NOTE: Do not use a non-standard HTTP or HTTPS port, AWS will not connect to it.
        • You can use this specially sized Home Assistant logo as the Feed Icon
        • Hit “Add”
        • Hit “Save” in the top right corner
    • Test
      • Having passed all validations to reach this screen, you can now click on “< Back to All Skills” as your flash briefing is now available as in “Development” service.
  • To invoke your flash briefing, open the Alexa app on your phone or go to the Alexa Settings Site, open the “Skills” configuration section, select “Your Skills”, scroll to the bottom, tap on the Flash Briefing Skill you just created, enable it, then manage Flash Briefing and adjust ordering as necessary. Finally ask your Echo for your “news”,“flash briefing”, or “briefing”.