Skip to content

Latest commit

 

History

History
82 lines (66 loc) · 4.75 KB

alexa.flash_briefings.markdown

File metadata and controls

82 lines (66 loc) · 4.75 KB
title description logo ha_category ha_release
Amazon Alexa Flash Briefing
Instructions on how to create your Flash Briefing skills with Home Assistant.
amazon-alexa.png
Voice
0.31

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. When running Hass.io, 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:

{% raw %}# Example configuration.yaml entry
alexa:
  flash_briefings:
    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 %}{% endraw %}

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 the Alexa navigation tab at the top of the console
  • Click on the "Get Started >" button under "Alexa Skills Kit"
  • Click the yellow "Add a new skill" button in the top right
    • Skill Information
      • For Skill Type select "Flash Briefing Skill API"
      • You can enter whatever name you want
      • Hit "Next"
    • Interaction Model
      • Nothing to do here
    • Configuration
      • Add new feed
        • For URL, enter https://YOUR_HOST/api/alexa/flash_briefings/BRIEFING_ID?api_password=YOUR_API_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
        • All other settings are up to you
        • Hit "Next"
    • 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".