Merge remote-tracking branch 'origin/current' into next

This commit is contained in:
Paulus Schoutsen 2018-02-25 16:49:29 -08:00
commit d282343710
51 changed files with 378 additions and 171 deletions

View file

@ -58,7 +58,7 @@ The following configuration variables from the base manual alarm platform are av
- **pending_time** (*Optional*): State specific setting for **pending_time** (all states except **disarmed**)
- **trigger_time** (*Optional*): State specific setting for **trigger_time** (all states except **triggered**)
See the documentation for the [manual alarm platform](/component/alarm_control_panel.manual/) for a description.
See the documentation for the [manual alarm platform](/components/alarm_control_panel.manual/) for a description.
Additionally, the following MQTT configuration variables are also available:

View file

@ -375,7 +375,7 @@ which accepts and returns messages conforming to the
[Smart Home v3 payload](https://developer.amazon.com/docs/smarthome/smart-home-skill-api-message-reference.html).
You must then create an Amazon developer account with an Alexa skill and Lambda
function to integrate this endpoint. See
[Haaska](https://github.com/auchter/haaska) for an example.
[Haaska](https://github.com/mike-grant/haaska) for an example.
[amazon-dev-console]: https://developer.amazon.com
[flash-briefing-api]: https://developer.amazon.com/alexa-skills-kit/flash-briefing

View file

@ -28,6 +28,7 @@ Generate a Client ID and Client Secret on [Google Developers Console](https://co
1. Click 'Create credentials' -> OAuth client ID.
1. Set the Application type to 'Other' and give this credential set a name then click Create.
1. Save the client ID and secret as you will need to put these in your configuration.yaml file.
1. Click on "Library", search for "Google Calendar API" and enable it.
### {% linkable_title Basic Setup %}

View file

@ -61,16 +61,16 @@ vertical_flip:
default: 0
type: int
timelapse:
description: Takes a picture every millisecond.
description: Takes a picture every this many milliseconds (thousands of a second) - the default means one picture a second.
required: false
default: 1000
type: int
file_path:
description: Save the picture in a custom file path.
required: false
default: The camera components folder.
default: A temporary file is used.
type: string
{% endconfiguration %}
The given **file_path** must be an existing file because the camera platform setup make a writeable check on it.
The given **file_path** must be an existing file because the camera platform setup performs a writeable check on it. Also, keep in mind that the path should be [whitelisted](/docs/configuration/basic/).

View file

@ -1,119 +0,0 @@
---
layout: page
title: "Alexa via Home Assistant Cloud"
description: "Enable the Alexa integration via Home Assistant Cloud integration."
date: 2017-11-17 20:00
sidebar: true
comments: false
sharing: true
footer: true
logo: home-assistant.png
ha_release: "0.60"
ha_category: Cloud
ha_iot_class: "Cloud Push"
---
The Alexa integration allows users to control the entities via the [Home Assistant Smart Home skill for Alexa][alexa skill]. This means that you can say things like "Alexa, turn on the kitchen light" to control your local Home Assistant.
To use this integration, you need to have:
- The cloud component set up. [Learn more](/components/cloud/)
- An Alexa enabled device like the Amazon Echo
- Activated the [Home Assistant Smart Home skill for Alexa][alexa skill]
<p class='note warning'>Only Amazon US is currently supported. Other regions are being certified.</p>
You can use `configuration.yaml` to configure the entities that are being shown to Alexa and how they are exposed.
```yaml
# Example configuration.yaml entry configuring Alexa
cloud:
alexa:
filter:
include_entities:
- light.kitchen
- light.kitchen_left
include_domains:
- switch
exclude_entities:
- switch.outside
entity_config:
light.kitchen:
name: Custom Name for Alexa
description: The light in the kitchen
switch.stairs:
display_categories: LIGHT
```
{% configuration %}
alexa:
description: Configuration options for the Amazon Alexa integration.
required: false
type: map
keys:
filter:
description: Filters for entities to include/exclude from Alexa.
required: false
type: map
keys:
include_entities:
description: Entity IDs to include.
required: false
type: list
include_domains:
description: Domains to include.
required: false
type: list
exclude_entities:
description: Entity IDs to exclude.
required: false
type: list
exclude_domains:
description: Domains to exclude.
required: false
type: list
entity_config:
description: Entity specific configuration for Alexa
required: false
type: map
keys:
'`<ENTITY_ID>`':
description: Entity to configure
required: false
type: map
keys:
name:
description: Name of entity to show in Alexa
required: false
type: string
description:
description: Description of entity to show in Alexa
required: false
type: string
display_categories:
description: The display category to use in Alexa. [Available categories](https://developer.amazon.com/docs/device-apis/alexa-discovery.html#display-categories)
required: false
type: string
{% endconfiguration %}
### {% linkable_title Possible values for customizing %}
_Configuration via `customize:` is no longer available. Use the entity config as described above._
### {% linkable_title Available domains %}
Currently, the following domains are available to be used with Alexa:
- alert
- automation (enables/disables)
- cover
- fan (supports on/off and set speed)
- group
- input_boolean
- light
- lock (lock and unlock, but unlock is untested as Amazon has disabled unlock for now)
- media_player (play, pause, stop, set volume, adjust volume, next track, and previous track)
- scene
- script (enables/disables)
- switch
[alexa skill]: https://alexa.amazon.com/spa/index.html#skills/dp/B0772J1QKB/?ref=skill_dsk_skb_sr_2

View file

@ -1,98 +0,0 @@
---
layout: page
title: "Google Assistant via Home Assistant Cloud"
description: "Enable the Google Assistant via Home Assistant Cloud integration."
date: 2017-11-17 20:00
sidebar: true
comments: false
sharing: true
footer: true
logo: home-assistant.png
ha_release: 0.61
ha_category: Cloud
ha_iot_class: "Cloud Push"
published: false
---
The Google Assistant integration allows users to control the entities via the Home Assistant Smart Home skill for Google Assistant. This means that you can say things like "Ok Google, turn on the kitchen light" to control your local Home Assistant.
To use this integration, you need to have:
- The cloud component set up. [Learn more](/components/cloud/)
- A Google Assistant enabled device like the Google Home
- Activated the Home Assistant Smart Home skill for Google Assistant
You can use `configuration.yaml` to configure the entities that are being shown to Google Assistant and how they are exposed.
```yaml
# Example configuration.yaml entry configuring Google Assistant
cloud:
google_actions:
filter:
include_entities:
- light.kitchen
- light.kitchen_left
include_domains:
- switch
exclude_entities:
- switch.outside
entity_config:
switch.kitchen:
name: Custom Name for Google Assistant
aliases:
- bright lights
- entry lights
type: 'action.devices.types.LIGHT'
```
{% configuration %}
google_actions:
description: Configuration options for the Google Assistant integration.
required: false
type: map
keys:
filter:
description: Filters for entities to include/exclude from Google Assistant.
required: false
type: map
keys:
include_entities:
description: Entity IDs to include.
required: false
type: list
include_domains:
description: Domains to include.
required: false
type: list
exclude_entities:
description: Entity IDs to exclude.
required: false
type: list
exclude_domains:
description: Domains to exclude.
required: false
type: list
entity_config:
description: Entity specific configuration for Google Assistant
required: false
type: map
keys:
'`<ENTITY_ID>`':
description: Entity to configure
required: false
type: map
keys:
name:
description: Name of entity to show in Google Assistant
required: false
type: string
aliases:
description: Aliases that can also be used to refer to this entity
required: false
type: list
type:
description: Override the type of the entity in Google Assistant. [List of available types](https://developers.google.com/actions/smarthome/guides/)
required: false
type: string
{% endconfiguration %}

View file

@ -13,27 +13,7 @@ ha_category: Voice
ha_iot_class: "Cloud Push"
---
<p class='note'>The Home Assistant Cloud is currently in open beta and will become part of the upcoming Community Support Package. [Learn more](/blog/2017/12/17/introducing-home-assistant-cloud/)</p>
The Home Assistant Cloud allows you to quickly integrate your local Home Assistant with various cloud services like Amazon Alexa.
The following integrations are currently available:
- [Amazon Alexa (Amazon Echo)](/components/cloud.alexa/)
<!-- - [Google Assistant (Google Home)](/components/cloud.google_assistant/) -->
### {% linkable_title How does it work? %}
The Home Assistant Cloud has been designed with security in mind. When you activate the Cloud component, your instance will create a secure connection to the Home Assistant Cloud. There is no need for any further configuration or to expose your instance to the internet.
Integrations like Alexa will deliver messages to our cloud which we will forward to your local instance for processing. We just forward the response back to Alexa. This means that we do not have to store the state of your house in our cloud, were just the messenger!
You can find a list of frequently asked questions (and their answers) in [this blog post](/blog/2017/12/17/introducing-home-assistant-cloud/#faq).
### {% linkable_title Enabling the cloud %}
The Home Assistant Cloud is enabled by default. If not, add this to your configuration:
The Home Assistant Cloud allows you to quickly integrate your local Home Assistant with various cloud services like Amazon Alexa. [Learn more.](/cloud)
```yaml
# Example configuration.yaml entry to enable the cloud component

View file

@ -19,7 +19,7 @@ To add a counter to your installation, add the following to your `configuration.
```yaml
# Example configuration.yaml entry
counter:
counter:
my_custom_counter:
initial: 30
step: 1
```

View file

@ -12,10 +12,6 @@ ha_category: Cover
ha_release: 0.59
---
To use your tahoma covers in your installation, add the following to your `configuration.yaml` file:
The `tahoma` cover platform lets you control covers added to your Tahoma Box in Home Assistant.
```yaml
# Example configuration.yml entry
cover:
platform: tahoma
```
Covers will be added automatically. Please refer to the [component](/components/tahoma/) configuration on how to setup Tahoma.

View file

@ -56,7 +56,7 @@ Right after enabling, the app will take you to the **Log to custom URL** setting
The relevant endpoint is: `/api/gpslogger`
```text
http://[IP address Home Assistant]:[Port]/api/gpslogger?
https://[IP address Home Assistant]:[Port]/api/gpslogger?
latitude=%LAT&longitude=%LON&device=%SER&accuracy=%ACC
&battery=%BATT&speed=%SPD&direction=%DIR
&altitude=%ALT&provider=%PROV&activity=%ACT
@ -65,8 +65,8 @@ http://[IP address Home Assistant]:[Port]/api/gpslogger?
Add the above URL after you modified it with your settings into the **URL** field. Remove the line breaks as they are only there to make the URL readable here.
- It's HIGHLY recommended to use SSL/TLS.
- Use the domain that Home Assistant is available on the internet or the public IP address. Can be a local IP address if you are using a VPN setup.
- Only remove `[Port]` if your Home Assistant instance is using port 80. Otherwise set it to 8123.
- Use the domain that Home Assistant is available on the internet or the public IP address. This can be a local IP address if you are using an always on VPN from your mobile device to your home network.
- Only remove `[Port]` if your Home Assistant instance is using port 443. Otherwise set it to the port you're using.
- For Home Assistant only the above URL, as written, will work - do not add or remove any parameters.
- Make sure to include your [API password](/components/http/) if you have configured a password. Add `&api_password=[Your password]` to the end of the URL.
- You can change the name of your device name by replacing `&device=%SER` with `&device=[Devicename]`.

View file

@ -15,10 +15,6 @@ ha_release: 0.55
OwnTracks is a free and open source application that allows you to track your location in Home Assistant. This is a platform that supports OwnTracks via their HTTP publishing method.
<p class='note'>
The Android app for OwnTracks is no longer developed or supported. Consider [GPS Logger](/components/device_tracker.gpslogger/) as an alternative.
</p>
To integrate Owntracks tracking via HTTP in Home Assistant, add the following section to your `configuration.yaml` file:
```yaml

View file

@ -29,6 +29,10 @@ A physical Hue Bridge is required for Philips Hue lights to function - this virt
It is recommended to assign a static IP address to the computer running Home Assistant. This is because the Amazon Echo discovers devices by IP addresses, and if the IP changes, the Echo won't be able to control it. This is easiest done from your router, see your router's manual for details.
</p>
<p class='note'>
Both Google Home and Alexa use the device they were initially set up with for communication with emulated_hue. In other words: if you remove/replace this device you will also break emulated_hue.
</p>
### {% linkable_title Configuration %}
To enable the emulated Hue bridge, add one of the following configs to your `configuration.yaml` file:

View file

@ -136,8 +136,8 @@ If you're not using Linux, you can use sites such as [this one](https://www.brow
### {% linkable_title Setup %}
1. Download the [gactions CLI](https://developers.google.com/actions/tools/gactions-cli) to be used later. You can download and run this anywhere and on any machine. Just remember where you put it for later and don't forget to run `chmod +x gactions` to make it executable on Mac or Linux.
2. Create a new file named `project.json` (in the same directory you downloaded `gactions` to) and replace the `[YOUR HOME ASSISTANT URL]` below with the URL you use to access Home Assistant.
Note: This must be an HTTPS URL to work.
2. Create a new file named `project.json` (in the same directory you downloaded `gactions` to) and replace the `[YOUR HOME ASSISTANT URL:PORT]` below with the URL you use to access Home Assistant.
Note: This must be an HTTPS URL to work. Don't forget to include the port number if you're not using port 443.
```json
{
@ -153,7 +153,7 @@ If you're not using Linux, you can use sites such as [this one](https://www.brow
"automation":
{
"name": "automation",
"url": "https://[YOUR HOME ASSISTANT URL]/api/google_assistant"
"url": "https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant"
}
}
}
@ -195,7 +195,7 @@ The request_sync service requires that the initial sync from Google includes the
The request_sync service may fail with a 404 if the project_id of the Homegraph API differs from the project_id of the Actions SDK found in the preferences of your project on [developer console](https://console.actions.google.com). Resolve this by:
1. Removing your project from the [developer console](https://console.actions.google.com).
2. Add a new project to the [cloud console](https://console.cloud.google.com). Here you get a new project_id.
2. Add a new project to the [cloud console](https://console.cloud.google.com). Here you get a new `project_id`.
3. Enable Homegraph API to the new project.
4. Generate a new API key.
5. Again, create a new project in the [developer console](https://console.actions.google.com/). Described above. But at the step 'Build under the Actions SDK box' choose your newly created project. By this, they share the same project_id.
5. Again, create a new project in the [developer console](https://console.actions.google.com/). Described above. But at the step 'Build under the Actions SDK box' choose your newly created project. By this, they share the same `project_id`.

View file

@ -31,32 +31,24 @@ If you are using [Hass.io](/hassio/) then just move forward to the configuration
#### {% linkable_title Symlinking into virtual environment %}
Create a symlink to the `cec` installation. Keep in mind different installation methods will result in different locations of cec.
Create a symlink to the `cec` installation including the _cec.so file. Keep in mind different installation methods will result in different locations of cec.
```bash
$ ln -s /path/to/your/installation/of/cec /path/to/your/venv/lib/python3.4/site-packages
$ ln -s /path/to/your/installation/of/cec /path/to/your/venv/lib/python*/site-packages
$ ln -s /path/to/your/installation/of/_cec.so /path/to/your/venv/lib/python*/site-packages
```
##### {% linkable_title Symlinking examples: %}
For the default virtual environment of a [HASSbian Image for Raspberry Pi](/getting-started/installation-raspberry-pi-image/) the command would be as follows.
```bash
$ ln -s /usr/local/lib/python3.4/dist-packages/cec /srv/homeassistant/lib/python3.4/site-packages
$ ln -s /usr/local/lib/python*/dist-packages/cec /srv/homeassistant/lib/python*/site-packages
$ ln -s /usr/local/lib/python*/dist-packages/_cec.so /srv/homeassistant/lib/python*/site-packages
```
For the default virtual environment of a [Raspberry Pi All-In-One installation](/getting-started/installation-raspberry-pi-all-in-one/) the command would be as follows.
```bash
$ ln -s /usr/local/lib/python3.4/site-packages/cec /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages
```
For the default virtual environment of a [Manual installation](/getting-started/installation-raspberry-pi/) the command would be as follows.
```bash
$ ln -s /usr/local/lib/python3.4/site-packages/cec /srv/hass/hass_venv/lib/python3.4/site-packages
```
<p class='note'>If after symlinking and adding `hdmi_cec:` to your configuration you are getting the following error in your logs,
`* failed to open vchiq instance` you will also need to add the user account Home Assistant runs under, to the `video` group. To add the Home Assistant user account to the `video` group, run the following command. `$ usermod -a -G video <hass_user_account>`
</p>

View file

@ -65,7 +65,7 @@ input_datetime:
A datetime input entity's state exports several attributes that can be useful in automations and templates.
| Attribute | Description |
| --------- | ----------- |
| ----- | ----- |
| `has_time` | `true` if this entity has a time.
| `has_date` | `true` if this entity has a date.
| `year`<br>`month`<br>`day` | The year, month and day of the date.<br>(only available if `has_date: true`)
@ -75,3 +75,47 @@ A datetime input entity's state exports several attributes that can be useful in
### {% linkable_title Restore State %}
This component supports the `restore_state` function which restores the state after Home Assistant has started to the value it has been before Home Assistant stopped. To use this feature please make sure that the [`recorder`](/components/recorder/) component is enabled and your entity does not have a value set for `initial`. Additional information can be found in the [Restore state](/components/recorder/#restore-state) section of the [`recorder`](/components/recorder/) component documentation.
### {% linkable_title Services %}
This component provides a service to modify the state of the `input_datetime`.
| Service | Data | Description |
| ----- | ----- | ----- |
| `set_datetime` | `time` | This can be used to dynamically set the time.
| `set_datetime` | `date` | This can be used to dynamically set the date.
## {% linkable_title Automation Examples %}
The following example shows the usage of the `input_datetime` as a trigger in an automation (note that you will need a [time sensor](/components/sensor.time_date/) elsewhere in your configuration):
{% raw %}
```yaml
# Example configuration.yaml entry
# Turns on bedroom light at the time specified.
automation:
trigger:
platform: template
   value_template: "{{ states('sensor.time') == (states.input_datetime.bedroom_alarm_clock_time.attributes.timestamp | int | timestamp_custom('%H:%M', False)) }}"
 action:
service: light.turn_on
entity_id: light.bedroom
```
{% endraw %}
To dynamically set the `input_datetime` you can call `input_datetime.set_datetime`. The following example can be used in an automation rule:
```yaml
# Example configuration.yaml entry
# Sets input_datetime to '05:30' when an input_boolean is turned on.
automation:
trigger:
platform: state
entity_id: input_boolean.example
to: 'on'
action:
service: input_datetime.set_datetime
entity_id: input_datetime.bedroom_alarm_clock_time
data:
time: '05:30:00'
```

View file

@ -143,7 +143,7 @@ white_value_state_topic:
description: The MQTT topic subscribed to receive white value updates.
required: false
type: string
white_value_value_template:
white_value_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the white value."
required: false
type: string

View file

@ -54,6 +54,7 @@ Currently known supported models:
- D6300SF
- U6000 (port must be set to 8001)
- U6300 (port must be set to 8001, and `pip3 install websocket-client` must be executed)
- K5579 (port must be set to 8001, On/Off, Forward/Backward, Volume control, but no Play button)
- K6500AF (port must be set to 8001)
- KS8005 (port must be set to 8001, and `pip3 install websocket-client` must be executed)
- KU6290 (port must be set to 8001)

View file

@ -60,3 +60,7 @@ You need to add the `homeassistant` user to the `audio` group:
```bash
sudo usermod -a -G audio homeassistant
```
##### {% linkable_title VLC currently not supported with Hass.io %}
According to the forum topic ["How to add VLC into my Hassio"](http://community.home-assistant.io/t/how-to-add-vlc-into-my-hassio/23000/5), it is not possible to install packages like VLC on Hass.io.

View file

@ -8,7 +8,7 @@ comments: false
sharing: true
footer: true
logo: hunter-douglas-powerview.png
ha_category: Cover
ha_category: Scene
ha_release: 0.15
---

View file

@ -17,8 +17,8 @@ The `lifx_cloud` scene platform allows you to activate the scenes that LIFX smar
```yaml
# Example configuration.yaml entry
scene:
platform: lifx_cloud
token: YOUR_LIFX_TOKEN
- platform: lifx_cloud
token: YOUR_LIFX_TOKEN
```
Configuration variables:

View file

@ -14,7 +14,7 @@ ha_release: 0.32
---
The `random` sensor platform is creating random sensor values (integers) out of a given range. This can be useful if you want to test automation rules. It generates a new value every time it is polled.
The `random` sensor platform is creating random sensor values (integers) out of a given range. Returned values form a [discrete uniform distribution](https://en.wikipedia.org/wiki/Discrete_uniform_distribution), meaning that each integer value in the range configured is equally likely to be drawn. This can be useful if you want to test automation rules. It generates a new value every time it is polled.
To enable the random sensor, add the following lines to your `configuration.yaml`:

View file

@ -8,14 +8,10 @@ comments: false
sharing: true
footer: true
logo: tahoma.png
ha_category: Cover
ha_category: Sensor
ha_release: 0.59
---
To use your tahoma sensors in your installation, add the following to your `configuration.yaml` file:
The `tahoma` sensor platform lets you see sensors added to your Tahoma Box in Home Assistant.
```yaml
# Example configuration.yml entry
sensor:
platform: tahoma
```
Sensors will be added automatically. Please refer to the [component](/components/tahoma/) configuration on how to setup Tahoma.

View file

@ -27,55 +27,63 @@ Snips takes voice or text as input and produces *intents* as output, which are e
### {% linkable_title Installation %}
The Snips Voice Platform is installed as a Docker image on Raspberry Pi with the following command:
```bash
(pi) $ curl https://install.snips.ai -sSf | sh
```
Snips can also be installed on a Debian/Ubuntu machine as well:
The Snips platform can be installed via the Snips APT/Debian repository. If you prefer to install the platform using the Docker distribution, check out our [Docker Installation Guide](https://github.com/snipsco/snips-platform-documentation/wiki/6.--Miscellaneous#using-docker).
```bash
$ sudo apt-get update
$ sudo apt-get install -y dirmngr
$ sudo bash -c 'echo "deb https://debian.snips.ai/$(lsb_release -cs) stable main" > /etc/apt/sources.list.d/snips.list'
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys F727C778CCB0A455
$ sudo bash -c 'echo "deb https://raspbian.snips.ai/$(lsb_release -cs) stable main" > /etc/apt/sources.list.d/snips.list'
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D4F50CDCA10A2849
$ sudo apt-get update
$ sudo apt-get install -y snips-platform-voice
```
Note: if the keyserver pgp.mit.edu is down try to use another one in the 4th line , like pgp.surfnet.nl:
```bash
sudo apt-key adv --keyserver pgp.surfnet.nl --recv-keys D4F50CDCA10A2849
```
### {% linkable_title Creating an assistant %}
<div class='videoWrapper'>
<iframe src="https://player.vimeo.com/video/223255884" width="700" height="380" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
Snips assistants are created via the [Snips Console](https://console.snips.ai). Once trained, the assistant should be downloaded and copied to the Raspberry Pi:
Head over to the [Snips Console](https://console.snips.ai) to create your assistant. Launch the training and download by clicking on the "Download Assistant" button.
The next step is to get the assistant to work on your device. Unzip and copy the assistant folder that you downloaded from the web console to the path. Assuming your downloaded assistant folder is on your desktop, just run:
```bash
$ scp assistantproj_XXX.zip pi@pi_hostname:/home/pi/assistant.zip
$ scp -r ~/Desktop/assistant pi@<raspi_hostname.local_or_IP>:/home/pi/.
```
and installed locally via the `snips-install-assistant` helper script:
Now ssh into your Raspberry Pi:
```bash
(pi) $ sudo snips-install-assistant assistant.zip
$ ssh pi@<raspi_hostname.local_or_IP>
```
By default, this command is `ssh pi@raspberrypi.local`, if you are using the default Raspberry Pi hostname.
Then, move the assistant to the right folder:
```bash
(pi) $ sudo mv /home/pi/assistant /usr/share/snips/assistant
```
Note: if you already have an assistant installed and wish to replace it, start by removing the previous one, and then move the new one in its place:
```bash
(pi) $ sudo rm -r /usr/share/snips/assistant
(pi) $ sudo mv /home/pi/assistant /usr/share/snips/assistant
```
### {% linkable_title Running Snips %}
Make sure that a microphone is plugged to the Raspberry Pi. If you are having trouble setting up audio, we have written a guide on [Raspberry Pi Audio Configuration](https://github.com/snipsco/snips-platform-documentation/wiki/1.-Setup-the-Snips-Voice-Platform-on-your-Raspberry-Pi#configuring-the-audio).
Start the Snips Voice Platform using the `snips` command:
Raspberry Pi:
```bash
(pi) $ snips
```
Debian/Ubuntu:
Start the Snips Voice Platform by starting the `snips-*` services:
```bash
$ sudo systemctl start "snips-*"
@ -89,32 +97,17 @@ followed by a command, e.g.
> Set the lights to green in the living room
We should see the transcribed phrase in the logs, as well as a properly parsed intent. The intent is published on MQTT, on the `hermes/intent/<slotName>` topic. The Snips Home Assistant component subscribes to this topic, and handles the intent according to the rules defined in `configuration.yaml`, as explained below.
As the Snips Platform parses this query into an intent, it will be published on MQTT, on the `hermes/intent/<intentName>` topic. The Snips Home Assistant component subscribes to this topic, and handles the intent according to the rules defined in `configuration.yaml`, as explained below.
#### {% linkable_title Optional: specifying an external MQTT broker %}
By default, Snips runs its own MQTT broker. But we can also tell Snips to use an external broker by specifying this when launching Snips. In this case, instead of running the `snips` command above (which assumes we are using the internal MQTT broker), we use the full launch command with explicitly specified parameters (replace `MQTT_BROKER_IP` and `MQTT_BROKER_PORT` with appropriate values):
Raspberry Pi:
```sh
$ docker run -t --rm --name snips --log-driver none \
-v /home/pi/.asoundrc:/root/.asoundrc \
-v /opt/snips/config:/opt/snips/config \
--privileged -v /dev/snd:/dev/snd snipsdocker/platform \
--mqtt MQTT_BROKER_IP:MQTT_BROKER_PORT
```
Debian/Ubuntu:
Edit the `/etc/snips.toml` file. See snips documentation for more information on configuring this
For more details on launch options, check the documentation on [Snips Platform Commands](https://github.com/snipsco/snips-platform-documentation/wiki/6.--Learn-more:-Platform-Commands#using-a-custom-mqtt-bus).
By default, Snips runs its own MQTT broker. But we can also tell Snips to use an external broker by specifying this when launching Snips. In this case, we need to specify this in the `/etc/snips.toml` configuration file. For more information on configuring this, see the [Using an external MQTT broker](https://github.com/snipsco/snips-platform-documentation/wiki/6.--Miscellaneous#using-external-mqtt-broker) article.
## {% linkable_title Home Assistant configuration %}
### {% linkable_title Specifying the MQTT broker %}
Messages between Snips and Home Assistant are passed via MQTT. We must tell Home Assistant which [MQTT broker](/docs/mqtt/) to use by adding the following entry to the `configuration.yaml` file:
Messages between Snips and Home Assistant are passed via MQTT. We can either point Snips to the MQTT broker used by Home Assistant, as explained above, or tell Home Assistant which [MQTT broker](/docs/mqtt/) to use by adding the following entry to the `configuration.yaml` file:
```yaml
mqtt:
@ -122,7 +115,7 @@ mqtt:
port: MQTT_BROKER_PORT
```
As explained above, Snips by default runs an MQTT broker on port 9898. So if we wish to use this broker, the entry will look as follows:
By default, Snips runs an MQTT broker on port 9898. So if we wish to use this broker, and if Snips and Home Assistant run on the same device, the entry will look as follows:
```yaml
mqtt:
@ -130,11 +123,11 @@ mqtt:
port: 9898
```
Alternatively, MQTT can be configured to bridge messages between servers if using a custom MQTT broker such as `mosquitto`.
Alternatively, MQTT can be configured to bridge messages between servers if using a custom MQTT broker such as [mosquitto](https://mosquitto.org/).
### {% linkable_title Triggering actions %}
In Home Assistant, we trigger actions based on intents produced by Snips using the [`intent_script`](/components/intent_script) component. For instance, the following block handles `ActivateLightColors` intents (included in the Snips IoT intent bundle) to change light colors:
In Home Assistant, we trigger actions based on intents produced by Snips using the [`intent_script`](/components/intent_script) component. For instance, the following block handles a `ActivateLightColor` intent to change light colors:
{% raw %}
```yaml
@ -150,9 +143,11 @@ intent_script:
```
{% endraw %}
The variables that can be used in the template are of the form 'slotName = value'.
In the `data_template` block, we have access to special variables, corresponding to the slot names for the intent. In the present case, the `ActivateLightColor` has two slots, `objectLocation` and `objectColor`.
Snips intents that utilize builtin slot types will contain extended information along with the value and can be exposed using this format:
### {% linkable_title Special slots %}
In the above example, the slots are plain strings. However, when more complex types are used, such as dates or time ranges, they will be transformed to rich Python objects, for example:
{% raw %}
```yaml

View file

@ -23,7 +23,7 @@ Supported devices (tested):
Supported Firmwares (tested):
- FRITZ!OS: 06.80 / FRITZ!DECT: 03.83
- FRITZ!OS: 06.60 / FRITZ!DECT: 03.83
- FRITZ!OS: 06.98-51288 (Beta) / FRITZ!DECT: 03.87
To use your AVM FRITZ!DECT switch(es) in your installation, add the following to your `configuration.yaml` file:
@ -41,6 +41,7 @@ Configuration variables:
- **password** (*Required*): The password for your Fritz!Box.
- **host** (*Optional*): The IP address/hostname of your Fritz!Box. Defaults to `fritz.box`.
It is recommened to create a dedicated user for Home Assistant and only allow access to "Smart Home".
<p class='note warning'>
If this component throws an error when starting home-assistant you should check if all actors are plugged in and connected to the FritzBox. Inactive actors that are not deleted from FritzBox configuration might lead to errors.

View file

@ -174,7 +174,7 @@ To fetch the token follow these instructions depending on your mobile phone plat
2. Enable developer mode, USB debugging and plug the Android phone into the computer.
3. Get ADB e.g. `apt-get install android-tools-adb` or `apt-get install adb`
4. `adb devices` should list your device. Consult ADB manual if necessary.
5. Issue a backup command via adb: `adb backup -noapk com.xiaomi.smarthome -f backup.ab` (set a password if prompted on your phone)
5. Issue a backup command via adb: `adb backup -noapk com.xiaomi.smarthome -f backup.ab` (set a password if prompted on your phone). Some devices may required single quotes in the command `adb backup '-noapk com.xiaomi.smarthome -f backup.ab'`
6. Download the 'ADB Backup Extractor' from [here](https://sourceforge.net/projects/adbextractor/files/latest/download)
7. Extract the data from the backup: `java -jar Android\ Backup\ Utilities/Android\ Backup\ Extractor/android-backup-extractor-20171005-bin/abe.jar unpack backup.ab unpacked.tar` (enter the password, if prompted)
8. Untar the unpacked data: `tar -xvf unpacked.tar`