diff --git a/atom.xml b/atom.xml index a6a499e689..fbca1df80d 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
The Snips Voice Platform is installed as a Docker image on Raspberry Pi with the following command:
-(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.
$ 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:
+sudo apt-key adv --keyserver pgp.surfnet.nl --recv-keys D4F50CDCA10A2849
+
+Snips assistants are created via the Snips Console. Once trained, the assistant should be downloaded and copied to the Raspberry Pi:
-$ scp assistantproj_XXX.zip pi@pi_hostname:/home/pi/assistant.zip
+Head over to the Snips Console 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:
+$ scp -r ~/Desktop/assistant pi@<raspi_hostname.local_or_IP>:/home/pi/.
-and installed locally via the snips-install-assistant
helper script:
-(pi) $ sudo snips-install-assistant assistant.zip
+Now ssh into your Raspberry Pi:
+$ 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:
+(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:
+(pi) $ sudo rm -r /usr/share/snips/assistant
+(pi) $ sudo mv /home/pi/assistant /usr/share/snips/assistant
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.
-Start the Snips Voice Platform using the snips
command:
-Raspberry Pi:
-(pi) $ snips
-
-
-Debian/Ubuntu:
+Start the Snips Voice Platform by starting the snips-*
services:
$ sudo systemctl start "snips-*"
@@ -126,37 +131,26 @@
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.
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:
-$ 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.
+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 article.
Home Assistant configuration
Specifying the MQTT broker
-Messages between Snips and Home Assistant are passed via MQTT. We must tell Home Assistant which MQTT broker 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 to use by adding the following entry to the configuration.yaml
file:
mqtt:
broker: MQTT_BROKER_IP
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:
mqtt:
broker: 127.0.0.1
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.
Triggering actions
-In Home Assistant, we trigger actions based on intents produced by Snips using the 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
component. For instance, the following block handles a ActivateLightColor
intent to change light colors:
snips:
intent_script:
@@ -168,8 +162,9 @@
color_name: {{ objectColor }}
-The variables that can be used in the template are of the form ‘slotName = value’.
-Snips intents that utilize builtin slot types will contain extended information along with the value and can be exposed using this format:
+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
.
+ 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:
SetTimer:
speech:
type: plain
diff --git a/sitemap.xml b/sitemap.xml
index bd607ba102..36b9cbd12f 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -4022,7 +4022,7 @@
https://home-assistant.io/components/switch.hook/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/cookbook/automation_for_rainy_days/
@@ -4706,131 +4706,131 @@
https://home-assistant.io/docs/autostart/init.d/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/api/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/configuration/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/example_apps/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/installation/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/operation/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/reboot/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/running/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/updating/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/windows/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/certificates/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/hadashboard/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/hass-configurator/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/ios/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/nginx/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/notebooks/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/scenegen/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/ecosystem/synology/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/benchmark/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/check_config/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/credstash/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/db_migrator/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/dev-tools/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/ensure_config/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/hass/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/influxdb_import/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/influxdb_migrator/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/keyring/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/docs/tools/scripts/
-2018-02-21T02:29:01+00:00
+2018-02-21T02:39:25+00:00
https://home-assistant.io/faq/after-upgrading/
@@ -6013,62 +6013,62 @@
https://home-assistant.io/demo/frontend.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/index.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:31+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:32+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:32+00:00
https://home-assistant.io/static/mdi-demo.html
-2018-02-21T02:28:22+00:00
+2018-02-21T02:38:32+00:00