Skip to content

Commit 72cac87

Browse files
robbiet480fabaff
authored andcommitted
Add Alexa Flash Briefing docs (home-assistant#1299)
1 parent cffbc6e commit 72cac87

File tree

3 files changed

+68
-8
lines changed

3 files changed

+68
-8
lines changed

source/_components/alexa.markdown

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ ha_category: Voice
1212
featured: true
1313
---
1414

15-
There are two ways that you can use Amazon Echo and Home Assistant together.
15+
There are a few ways that you can use Amazon Echo and Home Assistant together.
1616

17-
No matter which method(s) you decide to use, please remember that Amazon Echo requires an active Internet connection to function. If your Internet is down or experiencing issues (or Amazon's infrastructure is having issues), neither of these methods will work.
17+
- [Turning devices on and off](#i-just-want-to-turn-devices-on-and-off-using-echo)
18+
- [Build custom commands to use](#i-want-to-build-custom-commands-to-use-with-echo)
19+
- [Create a new Flash Briefing source](#flash-briefing-skills)
20+
21+
No matter which method(s) you decide to use, please remember that Amazon Echo requires an active Internet connection to function. If your Internet is down or experiencing issues (or Amazon's infrastructure is having issues), none of these methods will work.
1822

1923
Amazon has released [Echosim], a website that simulates the Alexa service in your browser. That way it is easy to test your skills without having access to a physical Amazon Echo.
2024

@@ -56,22 +60,25 @@ The built-in Alexa component allows you to integrate Home Assistant into Alexa/A
5660

5761
### {% linkable_title Requirements %}
5862

59-
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][blog-lets-encrypt] about how to set up encryption for Home Assistant. If you are unable to get HTTPS up and running, consider using [this AWS Lambda proxy for Alexa skills](https://forums.developer.amazon.com/forums/thread.jspa?messageID=18604).
63+
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][blog-lets-encrypt] about how to set up encryption for Home Assistant. If you are unable to get HTTPS up and running, consider using [this AWS Lambda proxy for Alexa skills](https://community.home-assistant.io/t/aws-lambda-proxy-custom-alexa-skill-when-you-dont-have-https/5230).
6064

6165
[blog-lets-encrypt]: https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/
6266

6367
To get started with Alexa skills:
6468

65-
- Log in to [Amazon developer console](https://developer.amazon.com)
66-
- Go to Apps & Services => Alexa => Alexa Skill Kit - Get Started
67-
- Add a new skill
69+
- Log in to [Amazon developer console][amazon-dev-console]
70+
- Click the Alexa button at the top of the console
71+
- Click the yellow "Add a new skill" button in the top right
72+
- Skill Type: Custom Interaction Model (default)
6873
- Name: Home Assistant
6974
- Invocation name: home assistant (or be creative, up to you)
7075
- Version: 1.0
7176
- Endpoint:
7277
- https
7378
- https://YOUR_HOST/api/alexa?api_password=YOUR_API_PASSWORD
7479

80+
You can use this [specially sized Home Assistant logo][large-icon] as the large icon and [this one][small-icon] as the small one.
81+
7582
### {% linkable_title Configuring your Amazon Alexa skill %}
7683

7784
Alexa works based on intents. Each intent has a name and variable slots. For example, a `LocateIntent` with a slot that contains a `User`. Example intent schema:
@@ -119,7 +126,6 @@ You can use [templates] for the values of `speech/text`, `card/title` and `card/
119126

120127
Actions are using the [Home Assistant Script Syntax] and also have access to the variables from the intent.
121128

122-
[templates]: /topics/templating/
123129
[Home Assistant Script Syntax]: /getting-started/scripts/
124130

125131
Configuring the Alexa component for the above intents would look like this:
@@ -256,7 +262,7 @@ Then add the intent to your Alexa Section in your HA config file:
256262

257263
Now say `Alexa ask homeassistant to run <some script>` and Alexa will run that script for you.
258264

259-
## {% linkable_title Giving Alexa Some Personality%}
265+
## {% linkable_title Giving Alexa Some Personality %}
260266

261267
In the examples above, we told Alexa to say `OK` when she successfully completed the task. This is effective but a little dull! We can again use [templates] to spice things up a little.
262268

@@ -298,3 +304,57 @@ text: !include alexa_confirm.yaml
298304
Alexa will now respond with a random phrase each time. You can use the include for as many different intents as you like so you only need to create the list once.
299305

300306

307+
## {% linkable_title Flash Briefing Skills %}
308+
309+
As of version [0.31][zero-three-one] Home Assistant supports the new [Alexa Flash Briefing Skills API][flash-briefing-api]. A Flash Briefing Skill adds a new Flash Briefing source that is generated by Home Assistant.
310+
311+
### {% linkable_title Configuring a Flash Briefing skill in Home Assistant %}
312+
313+
You can use [templates] for the `title`, `audio`, `text` and `display_url` configuration parameters.
314+
315+
Here's an example configuration of a Flash briefing skill that will tell you who is at home:
316+
317+
```yaml
318+
{% raw %}# Example configuration.yaml entry
319+
alexa:
320+
flash_briefings:
321+
whoishome:
322+
- title: Who's at home?
323+
text: >
324+
{%- if is_state('device_tracker.paulus', 'home') and
325+
is_state('device_tracker.anne_therese', 'home') -%}
326+
You are both home, you silly
327+
{%- else -%}
328+
Anne Therese is at {{ states("device_tracker.anne_therese") }}
329+
and Paulus is at {{ states("device_tracker.paulus") }}
330+
{% endif %}
331+
```
332+
333+
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.
334+
335+
Please refer to the [Amazon documentation][flash-briefing-api-docs] for more information about allowed configuration parameters and formats.
336+
337+
### {% linkable_title Configuring your Flash Briefing skill %}
338+
339+
- Log in to [Amazon developer console][amazon-dev-console]
340+
- Click the Alexa button at the top of the console
341+
- Click the yellow "Add a new skill" button in the top right
342+
- Skill Information
343+
- For Skill Type select Flash Briefing Skill API
344+
- You can enter whatever name you want
345+
- Hit next
346+
- Interaction Model
347+
- Nothing to do here
348+
- Configuration
349+
- Add new feed
350+
- 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)
351+
- You can use this [specially sized Home Assistant logo][large-icon] as the Feed Icon
352+
- All other settings are up to you
353+
354+
[amazon-dev-console]: https://developer.amazon.com
355+
[flash-briefing-api]: https://developer.amazon.com/alexa-skills-kit/flash-briefing
356+
[flash-briefing-api-docs]: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/flash-briefing-skill-api-feed-reference
357+
[large-icon]: /images/components/alexa/alexa-512x512.png
358+
[small-icon]: /images/components/alexa/alexa-108x108.png
359+
[templates]: /topics/templating/
360+
[zero-three-one]: /blog/2016/10/22/flash-briefing-updater-hacktoberfest/
13.5 KB
Loading
89.1 KB
Loading

0 commit comments

Comments
 (0)