Merge branch 'next' into device-class

This commit is contained in:
Fabian Affolter 2017-02-11 17:55:16 +01:00 committed by GitHub
commit f19ab6fa7f
35 changed files with 653 additions and 84 deletions

View File

@ -131,10 +131,10 @@ social:
# Home Assistant release details
current_major_version: 0
current_minor_version: 37
current_patch_version: 1
date_released: 2017-02-02
current_minor_version: 38
current_patch_version: 0
date_released: 2017-02-11
# Either # or the anchor link to latest release notes in the blog post.
# Must be prefixed with a # and have double quotes around it.
patch_version_notes: "#release-0371---february-2"
patch_version_notes: "#"

View File

@ -46,13 +46,13 @@ An extended configuration for the same sensor could look like this if you want/n
```yaml
# Example configuration.yml entry
binary_sensor:
platform: mqtt
state_topic: "home-assistant/window/contact"
name: "Windows contact"
qos: 0
payload_on: "1"
payload_off: "0"
device_class: opening
value_template: '{% raw %}{{ value.x }}{% endraw %}'
- platform: mqtt
state_topic: "home-assistant/window/contact"
name: "Windows contact"
qos: 0
payload_on: "1"
payload_off: "0"
device_class: opening
value_template: '{% raw %}{{ value.x }}{% endraw %}'
```

View File

@ -1,6 +1,6 @@
---
layout: page
title: "Home Assistant 0.37"
title: "Home Assistant 0.38"
description: ""
date: 2016-12-16 17:00
sidebar: true
@ -9,7 +9,7 @@ sharing: true
footer: true
logo: home-assistant.png
ha_category: Other
ha_release: 0.37
ha_release: 0.38
---
Details about the latest release can always be found at:

View File

@ -0,0 +1,104 @@
---
layout: page
title: "Rflink Light"
description: "Instructions how to integrate Rflink lights into Home Assistant."
date: 2016-01-04
sidebar: true
comments: false
sharing: true
footer: true
logo: rflink.png
ha_category: Light
ha_release: 0.38
---
The `rflink` component support devices that use [Rflink gateway firmware](http://www.nemcon.nl/blog2/), for example the [Nodo Rflink Gateway](https://www.nodo-shop.nl/nl/21-rflink-gateway). Rflink gateway is an Arduino firmware that allows communication with 433Mhz devices using cheap hardware (Arduino + 433Mhz tranceiver).
First you have to set up your [rflink hub](/components/rflink/).
After configuring the Rflink hub lights will be automatically discovered and added.
New/unknown lights can be assigned to a default group automatically by specifying the `new_devices_group` option with a group name. If the group doesn't exist it will be created.
For example:
```yaml
# Example configuration.yaml entry
sensor:
platform: rflink
new_devices_group: "New Rflink Lights"
```
Rflink switch/light ID's are composed of: protocol, id, switch. For example: `newkaku_0000c6c2_1`.
Once the ID of a light is known it can be used to configure the light in HA, for example to add it to a different group, hide it or configure a nice name.
Configuring a device as light with a nice name:
```yaml
# Example configuration.yaml entry
light:
platform: rflink
devices:
newkaku_0000c6c2_1:
name: Living room
```
Configuration variables:
- **devices** (*Optional*): A list of devices with their name to use in the frontend.
- **new_devices_group** (*Optional*): Create group to add new/unknown devices to.
- **device_defaults**: (*Optional*)
- **fire_event_** (*Optional*): Set default `fire_event` for Rflink switch devices (see below).
- **signal_repetitions** (*Optional*): Set default `signal_repetitions` for Rflink switch devices (see below).
Device configuration variables:
- **name** (*Optional*): Name for the device, defaults to Rflink ID.
- **type** (*Optional*): Override automatically detected type of the light device, can be: switchable, dimmable or hybrid. See 'Light Types' below.
- **aliasses** (*Optional*): Alternative Rflink ID's this device is known by.
- **fire_event_** (*Optional*): Fire an `button_pressed` event if this device is turned on or off (default: False).
- **signal_repetitions** (*Optional*): Repeat every Rflink command this number of times (default: 1)
### {% linkable_title Light state %}
Initially the state of a light is unknown. When the light is turned on or off (via frontend or 433Mhz remote) the state is known and will be shown in the frontend.
Sometimes a light is controlled by multiple 433Mhz remotes, each remote has its own code programmed in the light. To allow tracking of the state when switched via other remotes add the corresponding remote codes as aliasses:
```yaml
# Example configuration.yaml entry
light:
platform: rflink
devices:
newkaku_0000c6c2_1:
name: Living room
aliasses:
- newkaku_000000001_2
- kaku_000001_a
```
Any on/off command from any allias ID updates the current state of the light. However when sending a command through the frontend only the primary ID is used.
### {% linkable_title Light types %}
Light devices can come in different forms. Some only switch on and off, other support dimming. Dimmable devices might not always respond nicely to repeated `on` command as they turn into a pulsating state until `on` is pressed again (for example KlikAanKlikUit). The Rflink component support three types of lights to make things work in every situation:
- *Hybrid*: This type sends a `dim` followed by an a `on` command; and `off` commands. This will make dimmable devices turn on at the requested dim level and on/off devices on. One caveat is this type is not compatible with signal repetition as multiple `on` signals will cause dimmers to go into disco mode.
- *Switchable*: Device type that sends only `on` and `off` commands. It work for both on/off and dimmable type switches. However dimmables might have issues with signal repetition (see above).
- *Dimmable*: Sends only `dim` and `off` commands. This does not work on on/off type devices as they don't understand the `dim` command. For dimmers this does not cause issues with signal repetitions.
By default new lights are assigned the `switchable` type. Protocol supporting dimming are assigned the `hybrid` type. Currently only `newkaku` protocol is detected as dimmable. Please refer to Device Support to get your dimmers supported.
### {% linkable_title Hiding/ignoring lights %}
Lights are added automatically when the Rflink gateway intercepts a 433Mhz command in the ether. To prevent cluttering the frontend use any of these methods:
- Configure a `new_devices_group` for lights and optionally add it to a different `view`.
- Hide unwanted devices using [customizations](/getting-started/customizing-devices/)
- [Ignore devices on a platform level](/components/rflink/#ignoring-devices)
### {% linkable_title Device support %}
See [device support](/components/rflink/#device-support)

View File

@ -11,12 +11,13 @@ logo: apple.png
ha_category: Media Player
ha_iot_class: "Local Polling"
ha_release: 0.38
featured: true
---
The `apple_tv` platform allows you to control an Apple TV (3rd and 4th generation).
<p class='note'>
Currently you must have Home Sharing enabled for this to work. Support for pairing Home Assistant with your device will be supported in a later released.
Currently you must have Home Sharing enabled for this to work. Support for pairing Home Assistant with your device will be supported in a later release.
</p>
If you want to automatically discover new devices, just make sure you have `discovery:` in your `configuration.yaml` file. To manually add an Apple TV to your installation, add the following to your `configuration.yaml` file:

View File

@ -176,6 +176,6 @@ void receive(const MyMessage &message) {
Sending a heartbeat from the MySensors device to Home Assistant activates the SmartSleep functionality in Home Assistant. This means that messages are buffered and only sent to the device upon receiving a heartbeat from the device. State changes are stored so that only the last requested state change is sent to the device. Other types of messages are queued in a FIFO queue. SmartSleep is useful for battery powered actuators that are waiting for commands. See the MySensors library API for information on how to send heartbeats and sleep device.
Visit the [library api] of MySensors for more information.
Visit the [library api][MySensors library api] of MySensors for more information.
[MySensors library api]: http://www.mysensors.org/download

View File

@ -10,7 +10,6 @@ footer: true
logo: neato.png
ha_category: Hub
ha_release: 0.33
featured: true
---
The `neato` component allows you to control your [Neato Botvac Connected](https://www.neatorobotics.com/robot-vacuum/botvac-connected-series/botvac-connected/).

View File

@ -37,7 +37,7 @@ Configuration variables:
- Go to [https://console.cloud.google.com/apis/credentials/domainverification](https://console.cloud.google.com/apis/credentials/domainverification) and verify your domain.
- After that, go to [https://console.firebase.google.com](https://console.firebase.google.com) and select import Google project, select the project you created.
- Then, click the cogwheel on top left and select "Project settings".
- Select Cloud messaging tab if under server key is button Regenerate key, click that.
- Select 'Cloud Messaging' tab, listed beneath Project Credentials will be your 152 character 'Server Key' and 12 digit ID 'Sender ID'.
### {% linkable_title Requirements %}

View File

@ -26,7 +26,7 @@ notify:
Configuration variables:
- **api_key** (*Required*): Enter the API key for Pushbullet. Go to https://www.pushbullet.com/ to retrieve your API key.
- **api_key** (*Required*): Enter the API key for Pushbullet. Go to [https://www.pushbullet.com/#settings/account](https://www.pushbullet.com/#settings/account) to retrieve your API key/access token.
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
### {% linkable_title Usage %}

View File

@ -16,7 +16,7 @@ The `recorder` component is storing details in a database which then are handled
Home Assistant uses [SQLAlchemy](http://www.sqlalchemy.org/) as Object Relational Mapper (ORM). This means that you can now use **any** SQL backend for the recorder that is supported by SQLAlchemy, like [MySQL](https://www.mysql.com/), [MariaDB](https://mariadb.org/), or [PostgreSQL](https://www.postgresql.org/).
The default database engine is [SQLite](https://www.sqlite.org/) which doesn't require any configuration. The database is stored in your Home Assistant configuration directory (`.homeassistant`) and called `home-assistant.db`.
The default database engine is [SQLite](https://www.sqlite.org/) which doesn't require any configuration. The database is stored in your Home Assistant configuration directory (`.homeassistant`) and called `home-assistant_v2.db`.
To setup the `recorder` component in your installation, add the following to your `configuration.yaml` file:

View File

@ -0,0 +1,104 @@
---
layout: page
title: "Rflink"
description: "Instructions how to integrate Rflink gateway into Home Assistant."
date: 2016-01-04
sidebar: true
comments: false
sharing: true
footer: true
logo: rflink.png
ha_category: Hub
ha_release: 0.38
---
The `rflink` component support devices that use [Rflink gateway firmware](http://www.nemcon.nl/blog2/), for example the [Nodo Rflink Gateway](https://www.nodo-shop.nl/nl/21-rflink-gateway). Rflink gateway is an Arduino firmware that allows communication with 433 Mhz devices using cheap hardware (Arduino + 433 Mhz tranceiver).
The 433 Mhz spectrum is used by many manufacturers mostly using their own protocol/standard and includes devices like: light switches, blinds, weather stations, alarms and various other sensors.
A complete list of devices supported by Rflink can be found [here](http://www.nemcon.nl/blog2/devlist)
This component is tested with the following hardware/software:
- Nodo Rflink Gateway V1.4/Rflink R44
To enable Rflink in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
rflink:
port: /dev/serial/by-id/usb-id01234
```
Configuration variables:
- **port** (*Required*): The path to Rflink usb/serial device or TCP port in TCP mode.
- **host** (*Optional*): Switches to TCP mode, connects to host instead of to USB/serial.
- **wait_for_ack** (*Optional*): Wait for Rflink to ackowledge commands sent before sending new command (slower but more reliable). Defaults to `True`
- **ignore_devices** (*Optional*): List of devices id's to ignore. Supports wildcards (*) at the end.
- **reconnect_interval** (*Optional*): Time in seconds between reconnect attempts.
Complete example:
```yaml
# Example configuration.yaml entry
rflink:
port: /dev/serial/by-id/usb-id01234
wait_for_ack: False
ignore_devices:
- newkaku_000001_01
- digitech_*
```
### {% linkable_title TCP mode %}
TCP mode allows connect to a Rflink device over TCP/IP network. This is for example useful if placing the Rflink device next to the HA server is not optimal or desired (eg: bad reception).
To expose the usb/serial interface over TCP on a different host (Linux) the following command can be used:
```bash
$ socat /dev/ttyACM0,b57600 TCP-LISTEN:1234,reuseaddr
```
Other methods of exposing the serial interface over TCP are possible (eg: ESP8266 or using Arduino Wifi shield). Basically the serial stream should be directly mapped to the TCP stream.
```yaml
# Example configuration.yaml entry
rflink:
host: 192.168.0.10
port: 1234
```
### {% linkable_title Ignoring devices %}
Rflink platform can be configured to completely ignore a device on a platform level. This is useful when you have neighbors which also use 433 Mhz technology.
For example:
```yaml
# Example configuration.yaml entry
rflink:
port: /dev/serial/by-id/usb-id01234
wait_for_ack: False
ignore_devices:
- newkaku_000001_01
- digitech_*
- kaku_1_*
```
This configuration will ignore the button `1` of the `newkaku` device with ID `000001`, all devices of the `digitech` protocol and all switches of the `kaku` protocol device with codewheel ID `1`.
Wildcards only work at the end of the ID, not in the middle of front!
### {% linkable_title Device support %}
Even though a lot of devices are supported by Rflink, not all have been tested/implemented. If you have a device supported by Rflink but not by this component please consider testing and adding support yourself or [create an issue](https://github.com/home-assistant/home-assistant/issues/new) and mention `@aequitas` in the description.
### {% linkable_title Technical overview %}
- The`rflink` Python module a asyncio transport/protocol is setup that fires an callback for every (valid/supported) packet received by the Rflink gateway.
- This component uses this callback to distribute 'rflink packet events' over the HASS bus which can be subscribed to by entities/platform implementations.
- The platform implementions take care of creating new devices (if enabled) for unsees incoming packet id's.
- Device entities take care of matching to the packet ID, interpreting and performing actions based on the packet contents. Common entitiy logic is maintained in this main component.

View File

@ -25,9 +25,15 @@ script:
# This is Home Assistant Script Syntax
- service: notify.notify
data_template:
message: Current temperature is {% raw %}{{ states.sensor.temperature.state }}{% endraw %}
         message: Current temperature is {% raw %}{{ states.sensor.temperature.state }}{% endraw %}
```
<p class='note'>
Script names (e.g. `message_temperature` in the example above) are not allowed to contain dash (minus) characters, i.e. `-`.
The preferred way to separate words for better readability is to use underscore (`_`) characters.
</p>
# Turns on the bedroom lights and then the living room lights 1 minute later
```yaml
 # Turns on the bedroom lights and then the living room lights 1 minute later
wakeup:
alias: Wake Up
sequence:

View File

@ -0,0 +1,71 @@
---
layout: page
title: "Rflink Sensor"
description: "Instructions how to integrate Rflink sensors into Home Assistant."
date: 2016-01-04
sidebar: true
comments: false
sharing: true
footer: true
logo: rflink.png
ha_category: Sensor
ha_release: 0.38
---
The `rflink` component support devices that use [Rflink gateway firmware](http://www.nemcon.nl/blog2/), for example the [Nodo Rflink Gateway](https://www.nodo-shop.nl/nl/21-rflink-gateway). Rflink gateway is an Arduino firmware that allows communication with 433Mhz devices using cheap hardware (Arduino + 433Mhz tranceiver).
First you have to set up your [rflink hub](/components/rflink/).
After configuring the Rflink hub sensors will be automatically discovered and added.
New/unknown sensors can be assigned to a default group automatically by specifying the `new_devices_group` option with a group name. If the group doesn't exist it will be created.
For example:
```yaml
# Example configuration.yaml entry
sensor:
platform: rflink
new_devices_group: "New Rflink Sensors"
```
Rflink sensor ID's are composed of: protocol, id and type (optional). For example: `alectov1_0334_temp`. Some sensors emit multiple types of data. Each will be created as its own
Once the ID of a sensor is known it can be used to configure the sensor in HA, for example to add it to a different group, hide it or configure a nice name.
Assigning name to a sensor:
```yaml
# Example configuration.yaml entry
sensor:
platform: rflink
devices:
# assign name to a sensor
alectov1_0334_temp:
name: Temperature Outside
```
Configuration variables:
- **devices** (*Optional*): A list of devices with their name to use in the frontend.
- **new_devices_group** (*Optional*): Create group to add new/unknown devices to.
Device configuration variables:
- **name** (*Optional*): Name for the device, defaults to Rflink ID.
- **sensor_type_** (*Optional*): Override automatically detected type of sensor.
- **unit_of_measurement** (*Optional*): Override automatically detected unit of sensor.
- **aliasses** (*Optional*): Alternative Rflink ID's this device is known by.
### {% linkable_title Hiding/ignoring sensors %}
Sensors are added automatically when the Rflink gateway intercepts a 433Mhz command in the ether. To prevent cluttering the frontend use any of these methods:
- Configure a `new_devices_group` for sensors and optionally add it to a different `view`.
- Hide unwanted devices using [customizations](/getting-started/customizing-devices/)
- [Ignore devices on a platform level](/components/rflink/#ignoring-devices)
### {% linkable_title Device support %}
See [device support](/components/rflink/#device-support)

View File

@ -14,7 +14,7 @@ ha_release: 0.36
---
The `sma` sensor will poll a [SMA][http://www.sma-america.com/] solar inverter and present the values as sensors (or attributes of sensors) in Home Assistant.
The `sma` sensor will poll a [SMA](http://www.sma-solar.com/) [(US)](http://www.sma-america.com/) solar inverter and present the values as sensors (or attributes of sensors) in Home Assistant.
To enable this sensor, add the following lines to your `configuration.yaml` file:
@ -60,7 +60,8 @@ Example:
custom:
yesterday_consumption:
key: 6400_00543A01
unit: W
unit: kWh
factor: 1000
```
Over time more sensors will be added as standard sensors to the [pysma library](https://github.com/kellerza/pysma/blob/master/pysma/__init__.py#L18). Feel free to submit additional sensors on that repository.

View File

@ -0,0 +1,82 @@
---
layout: page
title: "Rflink Switch"
description: "Instructions how to integrate Rflink switches into Home Assistant."
date: 2016-01-04
sidebar: true
comments: false
sharing: true
footer: true
logo: rflink.png
ha_category: Switch
ha_release: 0.38
---
The `rflink` component support devices that use [Rflink gateway firmware](http://www.nemcon.nl/blog2/), for example the [Nodo Rflink Gateway](https://www.nodo-shop.nl/nl/21-rflink-gateway). Rflink gateway is an Arduino firmware that allows communication with 433Mhz devices using cheap hardware (Arduino + 433Mhz tranceiver).
First you have to set up your [rflink hub](/components/rflink/).
The Rflink component does not know the difference between a `switch` and a `light`. Therefore all switchable devices are automatically added as `light` by default.
Rflink switch/light ID's are composed of: protocol, id, switch. For example: `newkaku_0000c6c2_1`.
Once the ID of a switch is known it can be used to configure it as a switch type in HA, for example to add it to a different group, hide it or configure a nice name.
Configuring a device as switch with a nice name:
```yaml
# Example configuration.yaml entry
switch:
platform: rflink
device_defaults:
fire_event: true
signal_repetitions: 2
devices:
newkaku_0000c6c2_1:
name: Ceiling fan
icon: mdi:fan
conrad_00785c_0a:
name: Motion sensor kitchen
icon: mdi:run
```
Configuration variables:
- **devices** (*Optional*): A list of devices with their name to use in the frontend.
- **device_defaults**: (*Optional*)
- **fire_event_** (*Optional*): Set default `fire_event` for Rflink switch devices (see below).
- **signal_repetitions** (*Optional*): Set default `signal_repetitions` for Rflink switch devices (see below).
Device configuration variables:
- **name** (*Optional*): Name for the device, defaults to Rflink ID.
- **aliasses** (*Optional*): Alternative Rflink ID's this device is known by.
- **fire_event_** (*Optional*): Fire an `button_pressed` event if this device is turned on or off (default: False).
- **signal_repetitions** (*Optional*): Repeat every Rflink command this number of times (default: 1)
### {% linkable_title Switch state %}
Initially the state of a switch is unknown. When the switch is turned on or off (via frontend or 433Mhz remote) the state is known and will be shown in the frontend.
Sometimes a switch is controlled by multiple 433Mhz remotes, each remote has its own code programmed in the switch. To allow tracking of the state when switched via other remotes add the corresponding remote codes as aliasses:
```yaml
# Example configuration.yaml entry
switch:
platform: rflink
devices:
newkaku_0000c6c2_1:
name: Ceiling fan
icon: mdi:fan
aliasses:
- newkaku_000000001_2
- kaku_000001_a
```
Any on/off command from any alias ID updates the current state of the switch. However when sending a command through the frontend only the primary ID is used.
### {% linkable_title Device support %}
See [device support](/components/rflink/#device-support)

View File

@ -33,7 +33,7 @@ switch:
Configuration variables:
- **host** (*Required*): The IP address of your myStrom switch, eg. `http://192.168.1.32`.
- **host** (*Required*): The IP address of your TP-Link switch, eg. `http://192.168.1.32`.
- **name** (*Optional*): The name to use when displaying this switch.

View File

@ -51,6 +51,7 @@ from Home Assistant running on another Linux computer (the **server**).
6. On the **target**, we need to let the hass user execute the program needed to suspend/shut down the target computer. I'm using `pm-suspend`, use `poweroff` to turn off the computer. First, get the full path: `which pm-suspend`. On my system, this is `/usr/sbin/pm-suspend`.
7. On the **target**, using an account with sudo access (typically your main account), `sudo visudo`. Add this line last in the file: `hass ALL=NOPASSWD:/usr/sbin/pm-suspend`, where you replace `hass` with the name of your user on the target, if different, and `/usr/sbin/pm-suspend` with the command of your choice, if different.
8. On the **server**, add the following to your configuration, replacing TARGET with the target's name:
```yaml
switch:
- platform: wake_on_lan

View File

@ -56,6 +56,7 @@ automation:
- platform: state
entity_id: media_player.htpc
from: 'playing'
to: 'idle'
condition:
- condition: state
entity_id: sun.sun
@ -69,6 +70,7 @@ automation:
- platform: state
entity_id: media_player.htpc
to: 'playing'
from: 'idle'
condition:
- condition: state
entity_id: sun.sun

View File

@ -1,7 +1,7 @@
---
layout: page
title: "Sonos say script to speak with text-to-speech"
description: "Sonos say script to speak with text-to-speech."
description: "Sonos say script to use text-to-speech with Sonos"
date: 2017-01-18 00:00
sidebar: true
comments: false
@ -12,7 +12,7 @@ ha_category: Automation Examples
#### {% linkable_title Sonos say script to speak with text-to-speech %}
This script allow you to use TTS on sonos in a easy way with all features.
This script allows you to use [TTS](https://home-assistant.io/components/#text-to-speech) on Sonos.
```yaml
script:
@ -21,30 +21,36 @@ script:
sequence:
- service: media_player.sonos_snapshot
data_template:
entity_id: {% raw %}{{ sonos_entity }}{% endraw %}
- service: media_player.sonos_unjoin
data_template:
entity_id: {% raw %}{{ sonos_entity }}{% endraw %}
- service: media_player.volume_set
data_template:
entity_id: {% raw %}{{ sonos_entity }}{% endraw %}
volume_level: {% raw %}{{ volume }}{% endraw %}
- service: tts.voicerss_say
data_template:
entity_id: {% raw %}{{ sonos_entity }}{% endraw %}
message: {% raw %}{{ message }}{% endraw %}
- delay: {% raw %}{{ delay }}{% endraw %}
- service: media_player.sonos_restore
data_template:
entity_id: {% raw %}{{ sonos_entity }}{% endraw %}
entity_id: {% raw %}"{{ sonos_entity }}"{% endraw %}
- service: media_player.sonos_unjoin
data_template:
entity_id: {% raw %}"{{ sonos_entity }}"{% endraw %}
- service: media_player.volume_set
data_template:
entity_id: {% raw %}"{{ sonos_entity }}"{% endraw %}
volume_level: {% raw %}"{{ volume }}"{% endraw %}
- service: tts.voicerss_say
data_template:
entity_id: {% raw %}"{{ sonos_entity }}"{% endraw %}
message: {% raw %}"{{ message }}"{% endraw %}
- delay: {% raw %}"{{ delay }}"{% endraw %}
- service: media_player.sonos_restore
data_template:
entity_id: {% raw %}"{{ sonos_entity }}"{% endraw %}
```
We call this now with:
```yaml
service: script.sonos_say
data:
sonos_entity: media_player.kitchen
volume: 0.3
message: 'Your husband comming home!'
delay: '00:00:05'
automation:
- alias: 'test'
trigger:
- platform: state
entity_id: input_boolean.mytest
action:
- service: script.sonos_say
data:
sonos_entity: media_player.office
volume: 0.5
message: 'Your husband comming home!'
delay: '00:00:05'
```

View File

@ -0,0 +1,189 @@
---
layout: post
title: "0.38: Alert, AppleTV, MQTT discovery, and Yeelight"
description: "Faster and more configurable frontend, "
date: 2017-02-11 08:04:05 +0000
date_formatted: "February 11, 2017"
author: Fabian Affolter et al.
author_twitter: fabaff
comments: true
categories: Release-Notes
og_image: /images/blog/2017-02-0.38/social.png
---
0.38, hurry :tada: In this release we (special thanks to [@pvizeli]) have migrated all core components to work asynchronous.
The configuration checking support was expanded. We have now `homeassistant.check_config`. This means that the service `homeassistant.restart` will now only restart your Home Assistant installation if the configuration is valid.
### {% linkable_title Rewritten frontend core %}
The core of the frontend has been completely been rewritten, optimizing for speed and lost connection recovery. Even on the slowest phones it should fly now.
### {% linkable_title Custom state-card UI %}
A nice new feature is the possibility to create [custom state-card][custom-ui] in the frondend. Go ahead and write your own state-card for [lights][light], sensors, locks, etc.
### {% linkable_title MQTT discovery %}
The latest MQTT feature is [discovery][mqtt-discovery] support. Do not confuse this which the Home Assistant [Discovery][discovery]. MQTT Discover is for MQTT-only. Similar to the HTTP sensor/binary sensor allows this to use devices with minimal configuration.
### {% linkable_title Alert component %}
If you left your front door open, then the [`alert`][alert] component can be used to remind you of this by sending you repeating notifications at a given interval.
### {% linkable_title Yeelight %}
The [`yeelight`][yeelight] component has been ported to use a more stable and feature-complete [python-yeelight][python-yeelight] backend, and supports now both white and RGB bulbs. The component also supports transitions and can be configured to save the settings to the bulb on changes. The users currently using custom components for Yeelight are encouraged to move back to use the included version and report any problems with it to our [issue tracker][issue].
### {% linkable_title All changes %}
#### {% linkable_title New platforms/components %}
- Sensor: Support for monitoring [OpenEVSE][openevse] chargers ([@miniconfig])
- Voice command [API.AI][apiai] ([@adrianlzt])
- [Alert][alert] Component ([@rmkraus])
- [Rflink][rflink] 433Mhz gateway platform and components ([@aequitas])
- Lock: Support for [Nuki.io][nuki] smart locks ([@pschmitt])
- Sensor: [QNAP][qnap] Sensor ([@colinodell])
- Switch: Add support for [FRITZ!DECT][fritz] wireless switches based on fritzhome ([@BastianPoe])
- Sensor: Add [moon][moon] sensor ([@fabaff])
- Media player: Support for the [Orange Livebox Play TV][orange] appliance ([@pschmitt])
- Media player: Initial support for [Apple TV][apple] ([@postlund])
- MQTT: [MQTT discovery][mqtt-discovery] support ([@balloob], [@fabaff])
- Notify: [Mailgun][mailgun] notify service ([@pschmitt])
#### {% linkable_title Improvements %}
- Switch - Pilight: Validation no longer rejects alphanumeric IDs ([@DavidLP])
- Device tracker - ASUSWrt: Fixes `ip neigh` regex to handle the possible IPv6 "router" flag ([@kylehendricks])
- Light - MySensors: Fix mysensors RGB and W light turn on ([@MartinHjelmare])
- Light - Yeelight: new yeelight backend lib, new features ([@rytilahti])
- Climate - Eq3btsmart: Cleanup modes & available, bump version requirement ([@rytilahti])
- Sensor - SMA: Handle units correctly ([@kellerza])
- MQTT eventstream: Prevent infinite loop in cross configured MQTT event streams ([@aequitas])
- Light - [Hue][hue]: Fix lightgroups not syncing state ([@tboyce1])
- Dvice tracker - Owntracks: Fix OwnTracks state names ([@tboyce1])
- Wink: Wink AC and additional sensor support ([@w1ll1am23])
- Modbus: Modbus write_register accept list ([@benvm])
- Device tracker - Ping: Add devices detected by ping as SOURCE_TYPE_ROUTER instead of GPS ([@michaelarnauts])
- Climate - Ecobee: Cleanup climate and ecobee ([@Duoxilian])
- Sensor - Miflora: Allow specification of bluetooth adapter ([@Danielhiversen])
- Sensor - [Systemmonitor][systemmonitor]: Add average load to systemmonitor ([@eagleamon])
- Sensor - [Openweathermap][owm]: Add wind bearing ([@fabaff])
- Notify - Facebook: Allow to use data for enhanced messages ([@adrianlzt])
- Light - Hyperion: Change CONF_DEFAULT_COLOR CV type ([@Joeboyc2])
- Mysensors: Fix validation of serial port on windows ([@MartinHjelmare])
- Notify - Webostv: Store the key file in the configuration directory ([@pschmitt])
- TTS: TTS ID3 support ([@robbiet480])
- Switch - Broadlink: Add send packet service ([@Yannic-HAW])
- Wink: Add support for position on Wink cover ([@albertoarias])
- Light - Flux: Make brightness display work for RGB devices. ([@aequitas])
- Media player - Roku: Fix attribute error for media_player/roku ([@tchellomello])
- Light - MQTT template: Fix brightness slider for MQTT template lights ([@ray0711])
- Template: Add `min` and `max` Jinja2 [filters][filters] ([@sbidoul])
- Device tracker - Skyhub: Improve Sky Hub error handling ([@alexmogavero])
- Notify - SMTP: Add error checking to the MIMEImage encoding ([@stratosmacker])
- Light - MQTT: Check for command topics when determining the capabilities of an MQTT light ([@herm])
- Core: Check config before restarting ([@andrey-git])
- Light - [Hue][hue]: Fix groups with same names ([@tboyce1])
- Template: Add icon_template to template sensor ([@tboyce1])
- Recorder: Refactoring, scoping, and better handling of SQLAlchemy Sessions ([@kellerza])
- Light - Flux: Add support for fluxled discovery. ([@aequitas])
- Media player - AppleTV: Add discovery support to Apple TV ([@postlund])
- Sensor - Template: Improve warning message in template rendering ([@Danielhiversen])
- Light - Demo: Add available property and typing hints ([@rytilahti])
- Sensor - ARWN: Enhancements to [ARWN][arwn] platform ([@sdague])
- Fan - ISY994: Change medium state for filtering ([@Teagan42])
- Climate - Ecobee: Support away_mode as permanent hold and hold_mode as temporary hold. ([@Duoxilian])
- Tellduslive: Don't throw exception if connection to server is lost ([@molobrakos])
- Zoneminder: Refactoring and JSON decode error handling ([@pschmitt])
- Image processing: Cleanup Base face class add support for microsoft face detect ([@pvizeli])
Bugfix(es): [@balloob], [@fabaff], [@pvizeli], [@mnoorenberghe] [@Danielhiversen], [@armills], [@tchellomello], [@aequitas], [@mathewpeterson], [@molobrakos], [@michaelarnauts], [@jabesq], [@turbokongen], [@JshWright], [@andriej], [@jawilson], [@andrey-git], [@nodinosaur], [@konikvranik], and you if you are missing here.
### {% linkable_title Breaking changes %}
- The support for [LG webOS Smart TVs][webostv] was improved. This requires you to move `$HOME/.pylgtv` to `$HASS_CONFIG_DIR/webostv.conf` or Home Assistant will need to be paired with the TV again.
- Image processing events have been renamed: `identify_face` has become `image_processing.detect_face`, `found_plate` has become `image_processing.found_plate`
- The [FFmpeg binary sensor][ffmpeg-bin] change the platform name from `ffmpeg` to `ffmpeg_noise` and `ffmpeg_motion`. Also all FFmpeg-related services are moved from a platform implementation to a the [FFmpeg components][ffmpeg] and were rename from `binary_sensor.ffmpeg_xy` to `ffmpeg.xy`.
### {% linkable_title If you need help... %}
...don't hesitate to use our [Forum][forum] or join us for a little [chat][gitter]. The release notes have comments enabled but it's preferred if you use the former communication channels. Thanks.
### {% linkable_title Reporting Issues %}
Experiencing issues introduced by this release? Please report them in our [issue tracker][issue]. Make sure to fill in all fields of the issue template.
[@acambitsis]: https://github.com/acambitsis
[@adrianlzt]: https://github.com/adrianlzt
[@aequitas]: https://github.com/aequitas
[@albertoarias]: https://github.com/albertoarias
[@alexmogavero]: https://github.com/alexmogavero
[@andrey-git]: https://github.com/andrey-git
[@andriej]: https://github.com/andriej
[@armills]: https://github.com/armills
[@balloob]: https://github.com/balloob
[@BastianPoe]: https://github.com/BastianPoe
[@benvm]: https://github.com/benvm
[@colinodell]: https://github.com/colinodell
[@Danielhiversen]: https://github.com/Danielhiversen
[@DavidLP]: https://github.com/DavidLP
[@Duoxilian]: https://github.com/Duoxilian
[@eagleamon]: https://github.com/eagleamon
[@fabaff]: https://github.com/fabaff
[@herm]: https://github.com/herm
[@jabesq]: https://github.com/jabesq
[@jawilson]: https://github.com/jawilson
[@Joeboyc2]: https://github.com/Joeboyc2
[@JshWright]: https://github.com/JshWright
[@kellerza]: https://github.com/kellerza
[@konikvranik]: https://github.com/konikvranik
[@kylehendricks]: https://github.com/kylehendricks
[@LinuxChristian]: https://github.com/LinuxChristian
[@MartinHjelmare]: https://github.com/MartinHjelmare
[@mathewpeterson]: https://github.com/mathewpeterson
[@michaelarnauts]: https://github.com/michaelarnauts
[@miniconfig]: https://github.com/miniconfig
[@mnoorenberghe]: https://github.com/mnoorenberghe
[@molobrakos]: https://github.com/molobrakos
[@nodinosaur]: https://github.com/nodinosaur
[@postlund]: https://github.com/postlund
[@pschmitt]: https://github.com/pschmitt
[@pvizeli]: https://github.com/pvizeli
[@ray0711]: https://github.com/ray0711
[@rmkraus]: https://github.com/rmkraus
[@robbiet480]: https://github.com/robbiet480
[@rytilahti]: https://github.com/rytilahti
[@sbidoul]: https://github.com/sbidoul
[@sdague]: https://github.com/sdague
[@stratosmacker]: https://github.com/stratosmacker
[@tboyce1]: https://github.com/tboyce1
[@tchellomello]: https://github.com/tchellomello
[@Teagan42]: https://github.com/Teagan42
[@turbokongen]: https://github.com/turbokongen
[@valentinalexeev]: https://github.com/valentinalexeev
[@w1ll1am23]: https://github.com/w1ll1am23
[@Yannic-HAW]: https://github.com/Yannic-HAW
[alert]: https://home-assistant.io/components/alert/
[apiai]: https://home-assistant.io/components/apiai/
[apple]: https://home-assistant.io/components/media_player.apple_tv/
[arwn]: https://home-assistant.io/components/sensor.arwn/
[custom-ui]: https://home-assistant.io/developers/frontend_creating_custom_ui/
[discovery]: https://home-assistant.io/components/discovery/
[ffmpeg-bin]: https://home-assistant.io/components/binary_sensor.ffmpeg/
[ffmpeg]: https://home-assistant.io/components/ffmpeg/
[filters]: https://home-assistant.io/topics/templating/#home-assistant-template-extensions
[fritz]: https://home-assistant.io/components/switch.fritzdect/
[hue]: https://home-assistant.io/components/light.hue/
[light]: https://home-assistant.io/cookbook/custom_ui_by_andrey-git
[mailgun]: https://home-assistant.io/components/notify.mailgun/
[moon]: https://home-assistant.io/components/sensor.moon/
[mqtt-discovery]: https://home-assistant.io/components/mqtt/#discovery
[nuki]: https://home-assistant.io/components/lock.nuki/
[openevse]: https://home-assistant.io/components/sensor.openevse/
[orange]: https://home-assistant.io/components/media_player.liveboxplaytv/
[owm]: https://home-assistant.io/components/sensor.openweathermap/
[python-yeelight]: https://gitlab.com/stavros/python-yeelight
[qnap]: https://home-assistant.io/components/sensor.qnap/
[rflink]: https://home-assistant.io/components/rflink/
[systemmonitor]: https://home-assistant.io/components/sensor.systemmonitor/
[webostv]: https://home-assistant.io/components/media_player.webostv/
[yeelight]: https://home-assistant.io/components/light.yeelight/
[issue]: https://github.com/home-assistant/home-assistant/issues
[gitter]: https://gitter.im/home-assistant/home-assistant
[forum]: https://community.home-assistant.io/

View File

@ -22,12 +22,14 @@ Templating is a powerful feature in Home Assistant that allows the user control
- Formatting outgoing messages in, for example, the [notify] and [alexa] components.
- Process incoming data from sources that provide raw data, like [MQTT], [REST sensor], or the [command line sensor].
- [Advanced Automation templating]auto-template]
[notify]: /components/notify/
[alexa]: /components/alexa/
[MQTT]: /components/mqtt/
[REST sensor]: /components/sensor.rest/
[command line sensor]: /components/sensor.command_line/
[auto-template]: /getting-started/automation-templating/
## {% linkable_title Building templates %}

View File

@ -41,7 +41,7 @@ and not mention sign-off.
## Signing
To sign this CLA you must first submit a pull request to a repository under the Home Assistant organization.
If you have not signed the CLA and you submit a pull request to a repository under the Home Assistant organization, a link will be automatically generated. Just follow the link and the instructions in the link.
## Adoption

View File

@ -10,13 +10,13 @@ footer: true
---
New controller or hub components often need to add platforms in sub-components (i.e. Lights & Switches) without additional configuration.
This can be achieved using the `homeassistant.components.discovery.load_platform` method:
This can be achieved using the `load_platform` or `async_load_platform` methods from `homeassistant.helpers.discovery`:
```python
def load_platform(hass, component, platform, info=None, hass_config=None)
def load_platform(hass, component, platform, discovered=None, hass_config=None)
```
From more info on how this works, refer to the [load_platform](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/discovery.py#L78) method.
From more info on how this works, refer to the [load_platform](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/discovery.py#L136) method.
### {% linkable_title Example %}
@ -40,7 +40,7 @@ The source for your component can be located in your configuration directory for
In the hub component `myflashyhub.py` you can call your light and switch components. To pass any non-serializable information to the platforms in the sub-component, you can use a global variable.
```python
from homeassistant.components.discovery import load_platform
from homeassistant.helpers.discovery import load_platform
DOMAIN = 'myflashyhub'
MFH_GLOBAL = None
@ -77,7 +77,3 @@ The `load_platform` method allows the platforms to be loaded with the need for a
#switch:
# platform: myflashyhub
```
<p class='note '>
In the past, this was achieved by adding your component to the `DISCOVERY_PLATFORMS` in the target sub-component. Generic discovery through `load_platform()` allows you to load any sub-component, including custom components, without changing the sub-component.
</p>

View File

@ -76,11 +76,14 @@ class AwesomeLight(Light):
def __init__(self, light):
"""Initialize an AwesomeLight."""
self._light = light
self._name = light.name
self._state = None
self._brightness = None
@property
def name(self):
"""Return the display name of this light."""
return self._light.name
return self._name
@property
def brightness(self):
@ -89,12 +92,12 @@ class AwesomeLight(Light):
This method is optional. Removing it indicates to Home Assistant
that brightness is not supported for this light.
"""
return self._light.brightness
return self._brightness
@property
def is_on(self):
"""Return true if light is on."""
return self._light.is_on()
return self._state
def turn_on(self, **kwargs):
"""Instruct the light to turn on.
@ -115,4 +118,6 @@ class AwesomeLight(Light):
This is the only method that should fetch new data for Home Assistant.
"""
self._light.update()
self._state = self._light.is_on()
self._brightness = self._light.brightness
```

View File

@ -38,6 +38,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class ExampleSensor(Entity):
"""Representation of a Sensor."""
def __init__(self):
"""Initialize the sensor."""
self._state = None
@property
def name(self):
"""Return the name of the sensor."""
@ -46,10 +50,17 @@ class ExampleSensor(Entity):
@property
def state(self):
"""Return the state of the sensor."""
return 23
return self._state
@property
def unit_of_measurement(self):
"""Return the unit of measurement."""
return TEMP_CELSIUS
def update(self):
"""Fetch new state data for the sensor.
This is the only method that should fetch new data for Home Assistant.
"""
self._state = 23
```

View File

@ -418,7 +418,7 @@ Sample `curl` command:
```bash
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"entity_id": "switch.christmas_lights", "state": "on"}' \
-d '{"entity_id": "switch.christmas_lights"}' \
http://localhost:8123/api/services/switch/turn_on
```

View File

@ -1,7 +1,7 @@
---
layout: page
title: "Websocket API"
description: "Home Assistant Websocket API documentation"
title: "WebSocket API"
description: "Home Assistant WebSocket API documentation"
date: 2016-11-26 13:27
sidebar: true
comments: false
@ -9,9 +9,11 @@ sharing: true
footer: true
---
Home Assistant contains a websocket API. This API can be used to stream information from a Home Assistant instance to any client that implements websockets. Implementations in different languages:
Home Assistant contains a WebSocket API. This API can be used to stream information from a Home Assistant instance to any client that implements WebSocket. Implementations in different languages:
- [JavaScript](https://github.com/home-assistant/home-assistant-js-websocket) - powers the frontend
- [Python](https://raw.githubusercontent.com/home-assistant/home-assistant-dev-helper/master/ha-websocket-client.py) - CLI client using [`asyncws`](https://async-websockets.readthedocs.io/en/latest/)
- [JavaScript/HTML](https://raw.githubusercontent.com/home-assistant/home-assistant-dev-helper/master/ha-websocket.html) - WebSocket connection in your browser
Connect your websocket implementation to `ws://localhost:8123/api/websocket`.

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
redirect_from: /getting-started/installation-raspberry-pi-image/
---
The easiest way to install Home Assistant on your Raspberry Pi is by using HASSbian: a Raspberry Pi image with Home Assistant built-in. The image will install the latest version of Home Assistant on initial boot (~10 minutes).

View File

@ -16,7 +16,7 @@ Hassbian is our customized operating system for the Raspberry Pi 3. It is the ea
- [Pi specific integrations][integrations]
- [Learn how to perform common tasks][common]
[install]: /getting-started/hassbian-installatino/
[install]: /getting-started/hassbian-installation/
[customize]: /getting-started/hassbian-customization/
[common]: /getting-started/hassbian-common-tasks/
[integrations]: /getting-started/hassbian-integrations/

View File

@ -31,7 +31,7 @@ You will need to install Home Assistant before we can get started. You can insta
For advanced users we have several alternative guides for installing Home Assistant.
- [Docker](/getting-started/installation-docker/)
- [Manual Raspberry Pi installtion](/getting-started/installation-raspberry-pi/) (requires existing Raspbian installation)
- [Manual Raspberry Pi installation](/getting-started/installation-raspberry-pi/) (requires existing Raspbian installation)
- [Raspberry Pi All-In-One Installer Script](/getting-started/installation-raspberry-pi-all-in-one/) (requires existing Raspbian installation)
- [Vagrant](/getting-started/installation-vagrant/)
- [Synology NAS](/getting-started/installation-synology/)

View File

@ -9,20 +9,6 @@ sharing: true
footer: true
---
### {% linkable_title Installation %}
There's currently three documented ways to install Home Assistant on a Raspberry Pi.
- [Manual installation](/getting-started/installation-raspberry-pi/#manual-installation). Following this guide doing each step manually. This is highly recommended as a first installation since you get a good overview of the installation.
- [Hassbian image](/getting-started/installation-raspberry-pi-image). Basic installation with the same settings as following the manual installation guide. Some additional software is preinstalled to make installation quicker and easier. Installation uses `homeassistant` user.
- [All-in-One Installer](/getting-started/installation-raspberry-pi-all-in-one/). Fabric based installation script that installs and compiles many of the things an advanced Home Assistant install is likely to need. Installation uses `homeassistant` user.
<p class='note note'>
Since each installation type uses a different user for Home Assistant, be sure to note and use the correct username for the `adduser` commands listed below for camera and GPIO extensions.
</p>
### {% linkable_title Manual Installation %}
This installation of Home Assistant requires the Raspberry Pi to run [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/).
The installation will be installed in a [Virtual Environment](/getting-started/installation-virtualenv) with minimal overhead. Instructions assume this is a new installation of Raspbian Lite.

View File

@ -20,7 +20,7 @@ Upon first run, the `zwave` component will take time to initialize entities and
| Device | Works on Linux | Works on Windows | Works on OSX |
|-------------------------|----------------|------------------|--------------|
| Aeotec Z-Stick Series 2 | &#10003; | | |
| Aeotec Z-Stick Series 5 | &#10003; | | |
| Aeotec Z-Stick Series 5 | &#10003; | | &#10003; |
| Pine64 Z-Wave Module | &#10003; | | |
| Razberry GPIO Module | &#10003; | | |
| ZWave.me UZB1 | &#10003; | | |

View File

@ -236,7 +236,7 @@ The `zwave` component exposes multiple services to help maintain the network.
| print_config_parameter | Prints Z-wave node's config parameter value to the log.
| remove_node | Put the Z-Wave controller in exclusion mode. Allows one to remove a device from the Z-Wave network.|
| rename_node | Sets a node's name. Requires an `entity_id` and `name` field. |
| set_config_parameter | Let's the user set a config parameter to a node.
| set_config_parameter | Let's the user set a config parameter to a node.|
| soft_reset | Tells the controller to do a "soft reset". This is not supposed to lose any data, but different controllers can behave differently to a "soft reset" command.|
| start_network | Starts the Z-Wave network.|
| stop_network | Stops the Z-Wave network.|

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB