Merge branch 'current' into next
This commit is contained in:
commit
24468cc1ff
47 changed files with 815 additions and 96 deletions
|
@ -22,6 +22,7 @@ feedreader:
|
|||
urls:
|
||||
- https://home-assistant.io/atom.xml
|
||||
- https://github.com/blog.atom
|
||||
- https://hasspodcast.io/feed/podcast
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
@ -48,13 +49,17 @@ automation:
|
|||
platform: event
|
||||
event_type: feedreader
|
||||
action:
|
||||
service: notify.notify
|
||||
data_template: "{{ trigger.event.data.title }}"
|
||||
service: persistent_notification.create
|
||||
data_template:
|
||||
title: "New HA Podcast available"
|
||||
message: "New Podcast available - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
|
||||
notification_id: "{{ trigger.event.data.title }}"
|
||||
```
|
||||
|
||||
*Any field under the `<entry>` tag in the feed can be used for example `trigger.event.data.content` will get the body of the feed entry.
|
||||
|
||||
For more advanced use cases, a custom component registering to the `feedreader` event type could be used instead:
|
||||
For a drop in packaged complete example of Feedreader, you can use the [PodCast notifier](https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/packages/hasspodcast.yaml).
|
||||
|
||||
```python
|
||||
EVENT_FEEDREADER = "feedreader"
|
||||
|
|
19
source/_components/lametric.markdown
Normal file
19
source/_components/lametric.markdown
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
layout: page
|
||||
title: "LaMetric"
|
||||
description: "Instructions on how to integrate LaMetric with Home Assistant."
|
||||
date: 2017-04-02 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
ha_category: Hub
|
||||
ha_release: 0.49
|
||||
---
|
||||
|
||||
```yaml
|
||||
# configuration.yaml example
|
||||
lametric:
|
||||
client_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
|
||||
client_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
|
@ -29,10 +29,10 @@ media_player:
|
|||
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): The IP/Hostname of the Samsung Smart TV, eg. `192.168.0.10`.
|
||||
- **port** (*Optional*): The port of the Samsung Smart TV. Defaults to 10002.
|
||||
- **username** (*Optional*): The username of the Samsung Smart TV. Defaults to admin.
|
||||
- **password** (*Optional*): The password of the Samsung Smart TV. Defaults to password.
|
||||
- **host** (*Required*): The IP/Hostname of the Sharp Aquos TV, eg. `192.168.0.10`.
|
||||
- **port** (*Optional*): The port of the Sharp Aquos TV. Defaults to 10002.
|
||||
- **username** (*Optional*): The username of the Sharp Aquos TV. Defaults to admin.
|
||||
- **password** (*Optional*): The password of the Sharp Aquos TV. Defaults to password.
|
||||
- **name** (*Optional*): The name you would like to give to the Sharp Aquos TV.
|
||||
- **power_on_enabled** (*Optional*): If you want to be able to turn on your TV. Defaults to False.
|
||||
|
||||
|
|
20
source/_components/notify.lametric.markdown
Normal file
20
source/_components/notify.lametric.markdown
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: page
|
||||
title: "LaMetric Notify"
|
||||
description: "Instructions on how to setup the LaMetric notify platform with Home Assistant."
|
||||
date: 2017-04-02 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
ha_category: Notify
|
||||
ha_release: 0.49
|
||||
---
|
||||
|
||||
```yaml
|
||||
notify:
|
||||
name: lametric1
|
||||
platform: lametric
|
||||
display_time: 20
|
||||
icon: i555
|
||||
```
|
|
@ -29,7 +29,7 @@ rest_command:
|
|||
|
||||
Configuration variables:
|
||||
|
||||
- **[service_name]** (*Required*): The name used to expose the service. E.g. in the above example would it be ` rest_command.example_request`.
|
||||
- **[service_name]** (*Required*): The name used to expose the service. E.g., in the above example, it would be `rest_command.example_request`.
|
||||
- **url** (*Required*): The URL (support template) for sending request.
|
||||
- **method** (*Optional*): HTTP method to use (`get`, `post`, `put`, or `delete`). Defaults to `get`.
|
||||
- **payload** (*Optional*): A string/template to send with request.
|
||||
|
@ -39,4 +39,3 @@ Configuration variables:
|
|||
- **content_type** (*Optional*): Content type for the request.
|
||||
|
||||
The commands can be dynamic, using templates to insert values of other entities. Service call support variables for template stuff.
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ sensor:
|
|||
- platform: command_line
|
||||
name: HD Temperature
|
||||
command: "hddtemp -n /dev/sda"
|
||||
# If errors occur, remove degree symbol below
|
||||
unit_of_measurement: "°C"
|
||||
```
|
||||
|
||||
|
@ -65,6 +66,7 @@ Thanks to the [`proc`](https://en.wikipedia.org/wiki/Procfs) file system, variou
|
|||
- platform: command_line
|
||||
name: CPU Temperature
|
||||
command: "cat /sys/class/thermal/thermal_zone0/temp"
|
||||
# If errors occur, remove degree symbol below
|
||||
unit_of_measurement: "°C"
|
||||
value_template: '{% raw %}{{ value | multiply(0.001) }}{% endraw %}'
|
||||
```
|
||||
|
|
|
@ -68,7 +68,7 @@ Configuration variables:
|
|||
- **precip_intensity_max**: Today's expected maximum intensity of precipitation.
|
||||
- **units** (*Optional*): Specify the unit system. Default to `si` or `us` based on the temperature preference in Home Assistant. Other options are `auto`, `us`, `si`, `ca`, and `uk2`.
|
||||
`auto` will let Dark Sky decide the unit system based on location.
|
||||
- **update_inverval** (*Optional*): Minimum time interval between updates. Default is 2 minutes. Supported formats:
|
||||
- **update_interval** (*Optional*): Minimum time interval between updates. Default is 2 minutes. Supported formats:
|
||||
- `update_interval: 'HH:MM:SS'`
|
||||
- `update_interval: 'HH:MM'`
|
||||
- Time period dictionary, e.g.:
|
||||
|
|
|
@ -31,10 +31,27 @@ sensor:
|
|||
|
||||
Configuration variables:
|
||||
|
||||
- **sensor** (*Required*): The sensor type, supported devices are DHT11, DHT22, and AM2302
|
||||
- **sensor** (*Required*): The sensor type, supported devices are DHT11, DHT22, and AM2302.
|
||||
- **pin** (*Required*): The pin the sensor is connected to.
|
||||
- **name** (*Optional*): The name of the sensor
|
||||
- **monitored_conditions** array (*Required*): Conditions to monitor. Available conditions are only *temperature* and *humidity*.
|
||||
- **name** (*Optional*): The name of the sensor.
|
||||
- **monitored_conditions** array (*Required*): Conditions to monitor. Available conditions are only *temperature* and *humidity*.
|
||||
- **temperature_offset** (*Optional*): Add or subtract a value from the temperature.
|
||||
- **humidity_offset** (*Optional*): Add or subtract a value from the humidity.
|
||||
|
||||
The name of the pin to which the sensor is connected has different names on different platforms. 'P8_11' for Beaglebone, '23' for Raspberry Pi.
|
||||
|
||||
### {% linkable_title Example %}
|
||||
|
||||
An example for a Raspberry Pi 3 with a DHT22 sensor connected to GPIO4 (pin 7):
|
||||
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: dht
|
||||
sensor: DHT22
|
||||
pin: 4
|
||||
temperature_offset: 2.1
|
||||
humidity_offset: -3.2
|
||||
monitored_conditions:
|
||||
- temperature
|
||||
- humidity
|
||||
```
|
||||
|
|
|
@ -69,15 +69,36 @@ followed by a command, e.g.
|
|||
|
||||
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/nlu/intentParsed` 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):
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
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).
|
||||
|
||||
## Home Assistant configuration
|
||||
|
||||
By default, the Snips MQTT broker runs on port 9898. We should tell Home Assistant to use this as a broker, rather than its own, by adding the following section to `configuration.yaml`:
|
||||
### 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 `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
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:
|
||||
|
||||
```yaml
|
||||
mqtt:
|
||||
broker: 127.0.0.1
|
||||
port: 9898
|
||||
```
|
||||
### Triggering actions
|
||||
|
||||
In Home Assistant, we trigger actions based on intents produced by Snips. This is done in `configuration.yaml`. For instance, the following block handles `ActivateLightColors` intents (included in the Snips IoT intent bundle) to change light colors:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue