Merge branch 'current' into next

This commit is contained in:
Robbie Trencheny 2016-10-05 15:44:06 -07:00
commit afdd04e844
63 changed files with 290 additions and 226 deletions

View File

@ -258,7 +258,7 @@ Now say `Alexa ask homeassistant to run <some script>` and Alexa will run that s
## {% linkable_title Giving Alexa Some Personality%}
In the examples above, we told Alexa to say `OK` when she succesfully completed the task. This is effective but a little dull! We can again use [templates] to spice things up a little.
In the examples above, we told Alexa to say `OK` when she successfully completed the task. This is effective but a little dull! We can again use [templates] to spice things up a little.
First create a file called `alexa_confirm.yaml` with something like the following in it (go on, be creative!):

View File

@ -80,3 +80,7 @@ $ ffmpeg -i YOUR_INPUT -an -filter:v select=gt(scene\,0.1) -f framemd5 -
```
If you are running into trouble with this sensor, please refer to the [troubleshooting section](/components/ffmpeg/#troubleshooting).
#### {% linkable_title Tipps %}
- Use motion only in a customer area with [crop filter](https://ffmpeg.org/ffmpeg-filters.html#crop): ```extra_arguments: -filter:v "crop=100:100:12:34"```

View File

@ -1,7 +1,7 @@
---
layout: page
title: "FFmpeg Camera"
description: "Instructions how to integrate a Video fees with FFmpeg as cameras within Home Assistant."
description: "Instructions on how to integrate a video feed via FFmpeg as a camera within Home Assistant."
date: 2016-08-13 08:00
sidebar: true
comments: false
@ -13,7 +13,7 @@ ha_release: 0.26
---
The `ffmpeg` platform allows you to use every video feed with [FFmpeg](http://www.ffmpeg.org/) as camera in Home Assistant. The input for ffmpeg need to support that could have multiple connection to source (input) in same time. For every user in UI and all 10 seconds (snapshot image) it make a new connection/reading to source. Normally that should never be a trouble only in strange selfmade constructs can be make mistakes.
The `ffmpeg` platform allows you to use any video feed as a camera in Home Assistant via [FFmpeg](http://www.ffmpeg.org/). This video source must support multiple simultaenous reads, because for every concurrent Home Assistant user, a connection will be made to the source every 10 seconds. Normally this should not be a problem.
To enable your FFmpeg feed in your installation, add the following to your `configuration.yaml` file:
@ -26,13 +26,13 @@ camera:
Configuration variables:
- **input** (*Required*): A ffmpeg compatible input file, stream or feed.
- **name** (*Optional*): This parameter allows you to override the name of your camera.
- **extra_arguments** (*Optional*): Extra option they will pass to `ffmpeg`. i.e. image quality or video filter options.
- **input** (*Required*): An FFmpeg-compatible input file, stream, or feed.
- **name** (*Optional*): Override the name of your camera.
- **extra_arguments** (*Optional*): Extra options to pass to `ffmpeg`, e.g. image quality or video filter options.
### {% linkable_title Image quality %}
You can control the `image quality` with [`extra_arguments`](https://www.ffmpeg.org/ffmpeg-codecs.html#jpeg2000) `-q:v 2-32` or with lossless option `-pred 1`.
If you are running into trouble with this sensor, please refer to this [Troubleshooting section](/components/ffmpeg/#troubleshooting).
If you are running into trouble with this sensor, please refer to the [Troubleshooting section](/components/ffmpeg/#troubleshooting).

View File

@ -35,7 +35,7 @@ Configuration variables:
- **ssh_key** (*Optional*): The path to your SSH private key file associated with your given admin account (instead of password).
<p class='note warning'>
You need to enable telnet on your router if you choose to use `protocol: telnet`.
You need to [enable telnet](https://www.asus.com/support/faq/1005449/) on your router if you choose to use `protocol: telnet`.
</p>
See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.

View File

@ -15,6 +15,11 @@ ha_release: pre 0.7
The `tplink` platform allows you to detect presence by looking at connected devices to a [TP-Link](https://www.tp-link.com) device. This includes the ArcherC9 line.
<p class='note'>
TP-Link devices typically only allow one login at a time to the admin console. This component will count torwards your one allowed login. Depending on how aggressively you configure device_tracker you may not be able to access the admin console of your TP-Link device without first stopping Home Assistant (and waiting a few minutes for the session to timeout) before you'll be able to login.
</p>
```yaml
# Example configuration.yaml entry
device_tracker:

View File

@ -13,7 +13,7 @@ ha_release: 0.14
---
This platform allows you to detect presence by looking at connected devices to a [Ubiquiti](http://ubnt.com/) [Unifi](https://www.ubnt.com/enterprise/#unifi) controller.
This platform allows you to detect presence by looking at devices connected to a [Ubiquiti](http://ubnt.com/) [Unifi](https://www.ubnt.com/enterprise/#unifi) controller.
To use this device tracker in your installation, add the following to your `configuration.yaml` file:

View File

@ -41,7 +41,7 @@ Configuration variables:
- `script`
- `scene`
- **expose_by_default** (*Optional*): Whether or not entities should be exposed via the bridge by default instead of explicitly (see the 'echo' attribute later on). If not specified, this defaults to true.
- **expose_by_default** (*Optional*): Whether or not entities should be exposed via the bridge by default instead of explicitly (see the 'emulated_hue' customization below). If not specified, this defaults to true.
- **exposed_domains** (*Optional*): The domains that are exposed by default if `expose_by_default` is set to true. If not specified, this defaults to the following list:
- `switch`

View File

@ -11,10 +11,10 @@ logo: ffmpeg.png
ha_category: Hub
---
It allow other Home-Assistant components to process video/audio streams. It need a ffmpeg binary in your system path. It support all ffmpeg version since 3.0.0. If you have a older version, please update.
The FFmpeg component allows other Home Assistant components to process video and audio streams. This component supports all FFmpeg versions since 3.0.0; if you have a older version, please update.
<p class='note'>
You need a `ffmpeg` binary in your system path. On Debain 8 or Raspbian (Jessie) you can install it from backports. If you want Hardware support on a Raspberry Pi you need to build from source by yourself. Windows binary are avilable on the [FFmpeg](http://www.ffmpeg.org/) website.
You need the `ffmpeg` binary in your system path. On Debian 8 or Raspbian (Jessie) you can install it from [debian-backports](https://backports.debian.org/Instructions/). If you want hardware acceleration support on a Raspberry Pi, you will need to build from source by yourself. Windows binaries are avilable on the [FFmpeg](http://www.ffmpeg.org/) website.
</p>
To set it up, add the following information to your `configuration.yaml` file:
@ -25,20 +25,20 @@ ffmpeg:
Configuration variables:
- **ffmpeg_bin** (*Optional*): Set the ffmpeg binary (eg. `/usr/bin/ffmpeg`). Default 'ffmpeg'.
- **run_test** (*Optional*): Check if `input` is usable by ffmpeg. Default True.
- **ffmpeg_bin** (*Optional*): Default 'ffmpeg'. The name or path to the `ffmpeg` binary.
- **run_test** (*Optional*): Default True. Check if `input` is usable by ffmpeg.
### {% linkable_title Troubleshooting %}
In most of case, `ffmpeg` autodetect all needed options to read a video/audio stream or file. But it is possible in rare cases that's needed to set a option to help `ffmpeg`. Per default `ffmpeg` use 5 seconds to detect all options or abort.
In most cases, `ffmpeg` automatically detects all needed options to read a video or audio stream or file. But it is possible in rare cases that you will need to set options to help `ffmpeg` out.
First check, if your stream playable by `ffmpeg` with (use option `-an` or `-vn` to disable video or audio stream):
First check that your stream is playable by `ffmpeg` outside of Home Assistant with (use option `-an` or `-vn` to disable video or audio stream):
```
$ ffmpeg -i INPUT -an -f null -
```
Now you can see what going wrong. Following list could be help to solve your trouble:
Now you should be able to see what is going wrong. The following list contains some common problems and solutions:
- `[rtsp @ ...] UDP timeout, retrying with TCP`: You need to set RTSP transport in the configuration with: `input: -rtsp_transport tcp -i INPUT`
- `[rtsp @ ...] Could not find codec parameters for stream 0 (Video: ..., none): unspecified size`: FFmpeg need more data or time for autodetect. You can set the `analyzeduration` and/or `probesize` option, play with this value. If you know the needed value you can set it with: `input: -analyzeduration xy -probesize xy -i INPUT`. More information about that can be found on [FFmpeg](https://www.ffmpeg.org/ffmpeg-formats.html#Description).
- `[rtsp @ ...] UDP timeout, retrying with TCP`: You need to set an RTSP transport in the configuration with: `input: -rtsp_transport tcp -i INPUT`
- `[rtsp @ ...] Could not find codec parameters for stream 0 (Video: ..., none): unspecified size`: FFmpeg needs more data or time for autodetection (the default is 5 seconds). You can set the `analyzeduration` and/or `probesize` options to experiment with giving FFmpeg more leeway. If you find the needed value, you can set it with: `input: -analyzeduration xy -probesize xy -i INPUT`. More information about this can be found [here](https://www.ffmpeg.org/ffmpeg-formats.html#Description).

View File

@ -7,7 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo:
logo: graphite.png
ha_category: History
ha_release: 0.13
---

View File

@ -15,7 +15,7 @@ featured: true
Philips Hue support is integrated into Home Assistant as a light platform. The preferred way to setup the Philips Hue platform is by enabling the [the discovery component](/components/discovery/).
Once discovered, locate "configurator.philips_hue" in the entities list ( < > ) and add it to configuration.yaml. Restart home assistant so that it is visible in the home assistant dashboard. Once home assistant is restarted, locate and click on configurator.philips_hue to bring up the intitiation dialog. This will prompt you to press the Hue button to register the Hue hub in home assistant. Once complete, the configurator entity can be removed from configuration.yaml.
Once discovered, locate "configurator.philips_hue" in the entities list ( < > ) and add it to configuration.yaml. Restart home assistant so that it is visible in the home assistant dashboard. Once home assistant is restarted, locate and click on configurator.philips_hue to bring up the initiation dialog. This will prompt you to press the Hue button to register the Hue hub in home assistant. Once complete, the configurator entity can be removed from configuration.yaml.
Restarting home assistant once more should result in the Hue lights listed as "light" entities. Add these light entities to configuration.yaml and restart home assistant once more to complete the installation.

View File

@ -7,11 +7,14 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: hyperion.png
ha_category: Light
ha_release: 0.7.6
---
This platform allows you to integrate your [Hyperion](https://github.com/tvdzwan/hyperion/wiki) into Home Assistant.
This platform allows you to integrate your [Hyperion](https://hyperion-project.org/wiki) into Home Assistant.
Hyperion is an opensource Ambilight implementation which runs on many platforms.
```yaml
# Example configuration.yaml entry

View File

@ -110,16 +110,15 @@ The LIRC component fires `ir_command_received` events on the bus. You can captur
```yaml
# Example configuration.yaml automation entry
automation:
- alias: Off on Remote
trigger:
platform: event
event_type: ir_command_received
event_data:
button_name: KEY_0
action:
service: homeassistant.turn_off
entity_id: group.a_lights
- alias: Off on Remote
trigger:
platform: event
event_type: ir_command_received
event_data:
button_name: KEY_0
action:
service: homeassistant.turn_off
entity_id: group.a_lights
```
The `button_name` data values (e.g. `KEY_0`) are set by you in the `.lircrc` file.

View File

@ -6,6 +6,7 @@ date: 2016-04-29 16:50
sidebar: true
comments: false
sharing: true
logo: logentries.png
footer: true
ha_category: "History"
---

View File

@ -27,13 +27,28 @@ Steps to configure your Amazon Fire TV stick with Home Assistant:
- Find Amazon Fire TV device IP:
- From the main (Launcher) screen, select Settings.
- Select System > About > Network.
- `pip install firetv[firetv-server]` into a Python 2.x environment
- If installed on Debian Jessie then the libssl-dev and python-dev packages are needed. Install them with `apt-get install libssl-dev python-dev`
- The following commands must be run in a Python 2.x environment. They will allow the component to function in an Ubuntu 16.04/Hassbian enviorment.
- `apt-get install swig libssl-dev python-dev libusb-1.0-0`
- `pip install flask`
- `pip install https://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.24.0.tar.gz`
- `pip install firetv[firetv-server]`
- `firetv-server -d <fire tv device IP>:5555`, background the process
- Navigate to http://localhost:5556/devices/list
- You will get an output similar to below:
```json
{
"devices": {
"default": {
"host": "192.168.1.153:5555",
"state": "play"
}
}
}
```
- The `"default"` above is the device name you will need to use for your `configuration.yaml`
- Configure Home Assistant as follows:
To add FireTV to your installation, add the following to your `configuration.yaml` file:
To add FireTV to your installation, Note your device name, and add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry

View File

@ -24,30 +24,26 @@ To add a device to your installation, add the following to your `configuration.y
```yaml
# Example configuration.yaml entry
media_player:
platform: russound_rnet
host: 192.168.1.10
port: 1337
name: Russound
zones:
1:
name: Main Bedroom
2:
name: Living Room
3:
name: Kitchen
4:
name: Bathroom
5:
name: Dining Room
6:
name: Guest Bedroom
sources:
- name: Sonos
- name: Sky+
- name: iPod
- name: Unused 1
- name: Unused 2
- name: Kodi
- platform: russound_rnet
host: 192.168.1.10
port: 1337
name: Russound
zones:
1:
name: Main Bedroom
2:
name: Living Room
3:
name: Kitchen
4:
name: Bathroom
5:
name: Dining Room
6:
name: Guest Bedroom
sources:
- name: Sonos
- name: Sky+
```
Configuration variables:

View File

@ -21,30 +21,30 @@ A Universal Media Player is created in `configuration.yaml` as follows.
```yaml
# Example configuration.yaml entry
media_player:
platform: universal
name: MEDIA_PLAYER_NAME
children:
- media_player.CHILD_1_ID
- media_player.CHILD_2_ID
commands:
turn_on:
service: SERVICE
data: SERVICE_DATA
turn_off:
service: SERVICE
data: SERVICE_DATA
volume_up:
service: SERVICE
data: SERVICE_DATA
volume_down:
service: SERVICE
data: SERVICE_DATA
volume_mute:
service: SERVICE
data: SERVICE_DATA
attributes:
is_volume_muted: ENTITY_ID|ATTRIBUTE
state: ENTITY_ID|ATTRIBUTE
- platform: universal
name: MEDIA_PLAYER_NAME
children:
- media_player.CHILD_1_ID
- media_player.CHILD_2_ID
commands:
turn_on:
service: SERVICE
data: SERVICE_DATA
turn_off:
service: SERVICE
data: SERVICE_DATA
volume_up:
service: SERVICE
data: SERVICE_DATA
volume_down:
service: SERVICE
data: SERVICE_DATA
volume_mute:
service: SERVICE
data: SERVICE_DATA
attributes:
is_volume_muted: ENTITY_ID|ATTRIBUTE
state: ENTITY_ID|ATTRIBUTE
```
Configuration variables:

View File

@ -161,7 +161,7 @@ Home Assistant will automatically load the correct certificate if you connect to
### {% linkable_title Publish service %}
The MQTT component will register the service `publish` which allows publishing messages to MQTT topics. There are two ways of specifiying your payload. You can either use `payload` to hard-code a payload or use `payload_template` to specify a [template](/topics/templating/) that will be rendered to generate the payload.
The MQTT component will register the service `publish` which allows publishing messages to MQTT topics. There are two ways of specifying your payload. You can either use `payload` to hard-code a payload or use `payload_template` to specify a [template](/topics/templating/) that will be rendered to generate the payload.
```json
{

View File

@ -15,7 +15,7 @@ ha_release: pre 0.7
The `pushetta` notify platform uses [Pushetta](http://www.pushetta.com) to delivery notifications from Home Assistant to your devices.
To retrieve the API token, log into your account at (http://www.pushetta.com)[http://www.pushetta.com] and go to your **Dashboard**. Create a new channel by clicking on **Channels** and then **Add a Channel**.
To retrieve the API token, log into your account at [http://www.pushetta.com](http://www.pushetta.com) and go to your **Dashboard**. Create a new channel by clicking on **Channels** and then **Add a Channel**.
To enable Pushetta notifications in your installation, add the following to your `configuration.yaml` file:

View File

@ -20,7 +20,7 @@ The requirements are:
- You need a [Telegram bot](https://core.telegram.org/bots). Please follow those [instructions](https://core.telegram.org/bots#botfather) to create one and get the token for your bot. Keep in mind that bots are not allowed to contact users. You need to make the first contact with your user. Meaning that you need to send a message to the bot from your user.
- The `chat_id` of an user.
The quickest way to retrieve your `chat_id` is visiting [https://api.telegram.org/botYOUR_API_TOKEN/getUpdates](https://api.telegram.org/botYOUR_API_TOKEN/getUpdates).
The quickest way to retrieve your `chat_id` is visiting [https://api.telegram.org/botYOUR_API_TOKEN/getUpdates](https://api.telegram.org/botYOUR_API_TOKEN/getUpdates) or to use `$ curl -X GET https://api.telegram.org/botYOUR_API_TOKEN/getUpdates`. Replace `YOUR_API_TOKEN` with your actual token.
The result set will include your chat ID as `id` in the `from` section:
@ -29,13 +29,14 @@ The result set will include your chat ID as `id` in the `from` section:
"message":{"message_id":27,"from":{"id":123456789,"first_name":"YOUR_FIRST_NAME YOUR_NICK_NAME","last_name":"YOUR_LAST_NAME","username":"YOUR_NICK_NAME"},"chat":{"id":123456789,"first_name":"YOUR_FIRST_NAME YOUR_NICK_NAME","last_name":"YOUR_LAST_NAME","username":"YOUR_NICK_NAME","type":"private"},"date":1678292650,"text":"test"}}]}
```
Another way to get your chat ID directly is described below:
Another way to get your chat ID directly is described below. Start your Python interpreter from the command-line:
```python
import telegram
bot = telegram.Bot(token='YOUR_API_TOKEN')
chat_id = bot.getUpdates()[-1].message.chat_id
print(chat_id)
$ python3
>>> import telegram
>>> bot = telegram.Bot(token='YOUR_API_TOKEN')
>>> chat_id = bot.getUpdates()[-1].message.chat_id
>>> print(chat_id)
123456789
```

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: coinmarketcap.png
ha_category: Finance
ha_release: 0.28
ha_iot_class: "Cloud Polling"

View File

@ -15,6 +15,10 @@ ha_release: 0.26
The `fastdotcom` sensor component uses the [Fast.com](https://fast.com/) web service to measure network bandwidth performance.
<p class='note'>
Currently fast.com only supports measuring download bandwidth. If you want to measure bandwidth metrics other then download such as ping and upload, utilize the [speedtest](/components/sensor.speedtest) component.
</p>
By default, it will run every hour. The user can change the update frequency in the config by defining the minute, hour, and day for a speedtest to run.
To add a Fast.com sensor to your installation, add the following to your `configuration.yaml` file:

View File

@ -39,6 +39,9 @@ sensor
3 (you can also use larger values) measurements. This filters out single spikes. Median: 5 will also filter double spikes.
If you never have problems with spikes, median=1 will work fine.
- **monitored_conditions** (*Required*): The paramaters that should be monitored.
- **timeout** (*Optional*): Define the timeout value in seconds when polling (defaults to 10 if not defined)
- **retries** (*Optional*): Define the number of retries when polling (defaults to 2 if not defined)
- **cache** (*Optional*): Define cache expiration value in seconds (defaults to 1200 if not defined)
Note that by default the sensor is only polled once every 15 minutes. This means with the median=3 setting, it will take as least 30 minutes before the sensor will report a value after a Home Assistant restart. As the values usually change very slowly, this isn't a big problem.
Reducing polling intervals will have a negative effect on the battery life.

View File

@ -14,7 +14,7 @@ ha_release: 0.22
The `plex` sensor platform will monitor activity on a given [Plex Media Server](https://plex.tv/). It will create a sensor that shows the number of currently watching users as the state. If you click the sensor for more details it will show you who is watching what.
If your Plex server is on the same local network as Home Assistant, all you need to provide in the `configuration.yaml` is the host or IP address. If you want to access a remote Plex server, you must provide the Plex username, password, and optionally the server name of the remote Plex server. If no server name is given it will use the first server listed.
If your Plex server is on the same local network as Home Assistant, all you need to provide in the `configuration.yaml` is the host or IP address. If you want to access a remote Plex server, you must provide the Plex username, password, and optionally the server name of the remote Plex server. If no server name is given it will use the first server listed. If you use the username and password, all servers in that account are monitored.
If you want to enable the plex sensor, add the following lines to your `configuration.yaml`:

View File

@ -6,6 +6,7 @@ date: 2016-01-25 08:00
sidebar: true
comments: false
sharing: true
logo: statsd.png
footer: true
ha_category: "History"
ha_release: 0.12

View File

@ -108,5 +108,5 @@ switch:
value_template: {% raw %}'{{ value == "1" }}'{% endraw %}
```
- Replace admin and password with an "Admin" priviledged Foscam user
- Replace admin and password with an "Admin" privileged Foscam user
- Replace ipaddress with the local IP address of your Foscam

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: upnp.png
ha_category: "Other"
ha_release: 0.18
---

View File

@ -13,7 +13,7 @@ ha_category: Hub
The [Vera](http://getvera.com) hub is a controller mainly connecting to Z-Wave devices.
Switches, Lights (inc Dimmers), Locks, Sensors and Binary sensors are supported - and will be automaticaly added when HA connects to your Vera controller.
Switches, Lights (inc Dimmers), Locks, Sensors and Binary sensors are supported - and will be automatically added when HA connects to your Vera controller.
To use Vera devices in your installation, add the following to your configuration.yaml file using the IP and port number of your Vera controller:

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: avahi.png
ha_category: "Other"
ha_release: 0.18
---

View File

@ -10,7 +10,7 @@ footer: true
ha_category: Automation Examples
---
Assume that you have an enocean wall switch and some Philips Hue lamps. The enocean wall swtich will fire the event button_pressed and pass along several parameters which is used to turn on/off the lamps.
Assume that you have an enocean wall switch and some Philips Hue lamps. The enocean wall switch will fire the event button_pressed and pass along several parameters which is used to turn on/off the lamps.
event_data:

View File

@ -46,7 +46,7 @@ automation:
#### {% linkable_title Send sun rise/sun set notifications %}
Notifications send through [PushBullet](/components/notify.pushbullet/) when the sun state is changed.
Send notifications through [PushBullet](/components/notify.pushbullet/) when the sun state is changed.
```yaml
automation:

View File

@ -18,7 +18,7 @@ The following outlines examples of the switch, services, and scripts required to
The `switch.foscam_motion` will control whether the motion detection is on or off. This switch supports `statecmd`, which checks the current state of motion detection.
```yaml
# Replace admin and password with an "Admin" priviledged Foscam user
# Replace admin and password with an "Admin" privileged Foscam user
# Replace ipaddress with the local IP address of your Foscam
switch:
platform: command_line

View File

@ -10,7 +10,7 @@ footer: true
ha_category: Automation in Python Examples
---
This example component will detect intruders. It does so by checking if lights are being turned on while there is no one at home. When this happens it will turn the lights red, flash them for 30 seconds and send a message via [the notifiy component](/components/notify/). It will also flash a specific light when a known person comes home.
This example component will detect intruders. It does so by checking if lights are being turned on while there is no one at home. When this happens it will turn the lights red, flash them for 30 seconds and send a message via [the notify component](/components/notify/). It will also flash a specific light when a known person comes home.
This component depends on the components [device_tracker](/components/device_tracker/) and [light](/components/light/) being setup.
@ -43,11 +43,11 @@ DOMAIN = "simple_alarm"
DEPENDENCIES = ['group', 'device_tracker', 'light']
# Attribute to tell which light has to flash whem a known person comes home
# Attribute to tell which light has to flash when a known person comes home
# If omitted will flash all.
CONF_KNOWN_LIGHT = "known_light"
# Attribute to tell which light has to flash whem an unknown person comes home
# Attribute to tell which light has to flash when an unknown person comes home
# If omitted will flash all.
CONF_UNKNOWN_LIGHT = "unknown_light"

View File

@ -96,6 +96,10 @@ Since 0.28 [automation rules](/blog/2016/09/10/notify-group-reload-api-pihole/#r
- Fix segmentation fault ([@bbangert], fixes #3453) 🎉
- Fix nested templates in `data_template` would incorrectly get cached ([@balloob])
### {% linkable_title Hotfix 0.29.7 - October 5 %}
- Fix handling SIGTERM and SIGHUP signals (fixes Systemd restart issues) ([@pvizeli])
### {% linkable_title Breaking changes %}
- The template methods `now` and `utcnow` have been changed from variables to methods. To get the current time replace `now` with `now()`.

View File

@ -9,24 +9,24 @@ sharing: true
footer: true
---
Components that interact with devices are called "[Entity Components](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity_component.py)". They are structured in core- and platform logic. This allows the same logic to handle a light to be used by different brands.
Components that interact with devices are called "[Entity Components](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity_component.py)." They are structured in core and platform logic, which means different brands can use the same logic to handle a light.
For example, the built-in `switch` component consists of various platforms in [`homeassistant/components/switch/`](https://github.com/home-assistant/home-assistant/tree/master/homeassistant/components/switch). The file `__init__.py` contains the core logic of all platform and the `vendor_name.py` files only the relevant platform code.
For example, the built-in `switch` component consists of various platforms in [`homeassistant/components/switch/`](https://github.com/home-assistant/home-assistant/tree/master/homeassistant/components/switch). The file `__init__.py` contains the core logic of all platforms and the `vendor_name.py` files contain only the relevant platform code.
If you are planning to add support for a new type of device to an existing component, you can get away with only writing platform logic. Have a look at how the component works with other platforms and create a similar file for the platform that you would like to add:
If you're planning to add support for a new type of device to an existing component, you can get away with only writing platform logic. Have a look at how the component works with other platforms and create a similar file for the platform that you want to add:
- [Example sensor platform](/developers/platform_example_sensor): hello world of platforms.
- [Example light platform](/developers/platform_example_light): showing best practices.
### {% linkable_title Interfacing with devices %}
One of the rules for Home Assistant is that platform logic should never interface directly with devices but use a third-party Python 3 library to do so. This way Home Assistant is able to share code with the Python community and we can keep the project maintainable.
One Home Assistant rule is that platform logic should never interface directly with devices. Instead, use a third-party Python 3 library. This way, Home Assistant can share code with the Python community and keep the project maintainable.
To integrate the third-party library you create an [Entity class](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity.py) for your device. Entities are Home Assistant's representation of lights, switches, sensors, etc. and are derived from the [Entity Abstract Class](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py). This abstract class contains logic for integrating most standard features into your entities, such as visibility, entity IDs, updates, and much more.
To integrate the third-party library, create an [Entity class](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity.py) for your device. Entities are Home Assistant's representations of lights, switches, sensors, etc. and are derived from the [Entity Abstract Class](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py). This abstract class contains logic for integrating most standard features into your entities, such as visibility, entity IDs, updates, and much more.
### {% linkable_title Requirements and dependencies %}
Platforms can specify dependencies and requirements [the same way as a component does](/developers/component_deps_and_reqs):
Platforms can specify dependencies and requirements [the same way as components](/developers/component_deps_and_reqs):
```python
REQUIREMENTS = ['some-package==2.0.0', 'some-other-package==2.5.0']

View File

@ -9,9 +9,11 @@ sharing: true
footer: true
---
Before we dive into the Home Assistant architecture, it is important to get a clear overview of the home automation landscape as a whole. This will allow us to show how the different parts of Home Assistant fit in the picture. For a more lengthy discussion about what each part in this overview is responsible for, <a href='/blog/2014/12/26/home-control-home-automation-and-the-smart-home/'>check out our blog</a>. A tl;dr version of the blog:
Before we dive into the Home Assistant architecture, let's get a clear overview of the home automation landscape as a whole. This way, we can show how the different parts of Home Assistant fit into the picture.
* Home Control is responsible for collecting information on- and controlling devices.
For more information about each part in this overview, <a href='/blog/2014/12/26/home-control-home-automation-and-the-smart-home/'>check out our blog</a>. Here's the tl;dr version of the blog:
* Home Control is responsible for collecting information and controlling devices.
* Home Automation triggers commands based on user configurations.
* Smart Home triggers commands based on previous behavior.
@ -20,15 +22,15 @@ Before we dive into the Home Assistant architecture, it is important to get a cl
<img alt='Home Automation landscape'
src='{{site_root}}/images/architecture/home_automation_landscape.png' />
</a>
Overview of the home automation landscape.
Overview of the home automation landscape
</p>
The Home Assistant core is responsible for Home Control. It has four parts to make this possible:
The Home Assistant core is responsible for Home Control. Home Assistant has four parts to make this possible:
* The **Event Bus** facilitates the firing and listening of events. This is the beating heart of Home Assistant.
* The **State Machine** keeps track of the states of things. Fires a `state_changed` event when a state has been changed.
* The **Service Registry** listens on the event bus for `call_service` events and allows other code to register services.
* The **Timer** will send a `time_changed` event every 1 second on the event bus.
* **Event Bus**: facilitates the firing and listening of events--the beating heart of Home Assistant.
* **State Machine**: keeps track of the states of things and fires a `state_changed` event when a state has been changed.
* **Service Registry**: listens on the event bus for `call_service` events and allows other code to register services.
* **Timer**: sends a `time_changed` event every 1 second on the event bus.
<p class='img'>
<a href='/images/architecture/ha_architecture.png' name='architecture'>

View File

@ -9,30 +9,28 @@ sharing: true
footer: true
---
Home Assistant can be extended by **components**. Each component is responsible for a specific domain within Home Assistant. Components can listen for or trigger events, offer services and maintain states. Components are written in Python and can do all the goodness that Python has to offer. Out of the box, Home Assistant offers a bunch of [built-in components]({{site_root}}/components/).
Home Assistant can be extended with **components**. Each component is responsible for a specific domain within Home Assistant. Components can listen for or trigger events, offer services, and maintain states. Components are written in Python and can do all the goodness that Python has to offer. Out of the box, Home Assistant offers a bunch of [built-in components]({{site_root}}/components/).
<p class='img'>
<img src='/images/architecture/component_interaction.png' alt='Diagram showing interaction between components and the Home Assistant core.'>
Diagram showing interaction between components and the Home Assistant core.
Diagram showing interaction between components and the Home Assistant core
</p>
We can differentiate between two different types of components within Home Assistant.
There are two types of components within Home Assistant: components that interact with an Internet-of-Things domain, and components that respond to events that happen within Home Assistant. Read on to learn about each type!
#### {% linkable_title Components that interact with an Internet of Things domain %}
#### {% linkable_title Components that interact with an Internet-of-Things domain %}
These components will track devices within a specific domain and consist of a core part and platform-specific logic. These components make their information available via the State Machine and the Event Bus. The component will also register services in the Service Registry to expose control of the devices.
These components track devices within a specific domain and consist of a core part and platform-specific logic. These components make their information available via the State Machine and the Event Bus. The components also register services in the Service Registry to expose control of the devices.
For example, one of the built-in components is the [`switch` component](/components/switch/). This component is responsible for interaction with different types of switches.
For example, the built-in [`switch` component](/components/switch/) is responsible for interaction with different types of switches. A platform provides support for a particular kind or brand of device. For example, a switch could use a WeMo or Orvibo platform, and a light component might interact with the Hue or LiFX platform.
A platform provides support for a particular kind/brand of device. For example, a switch could use a WeMo or Orvibo platform, and a light component might interact with the Hue or LiFX platform.
If you are planning to add support for a new platform, please check out the [add new platform section](/developers/add_new_platform/).
If you want to add support for a new platform, check out the [add new platform section](/developers/add_new_platform/).
#### {% linkable_title Components that respond to events that happen within Home Assistant %}
These components provide small pieces of home automation logic or services that do common tasks within your house.
For example the [`device_sun_light_trigger` component](/components/device_sun_light_trigger/) tracks the state of devices and the sun to make sure that the lights are turned on when it gets dark and there are people home. The component uses logic along the following lines:
For example, the [`device_sun_light_trigger` component](/components/device_sun_light_trigger/) tracks the state of devices and the sun to make sure that the lights are turned on when it gets dark and people are home. The component uses logic like this:
```plain
In the event that device 'Paulus Nexus 5' changes to the 'Home' state:
@ -52,17 +50,17 @@ For example the [`device_sun_light_trigger` component](/components/device_sun_li
Turn on the lights
```
An extended example of a home automation component can be found [here](https://github.com/home-assistant/home-assistant/blob/master/config/custom_components/example.py).
Look [here](https://github.com/home-assistant/home-assistant/blob/master/config/custom_components/example.py) for an extended example of a home automation component.
### {% linkable_title The full picture %}
When we put all the different pieces of Home Assistant together we see that we match pretty close to the initial sketched home automation overview. The smart home AI is not implemented yet and therefore omitted from the following picture.
When we put all the different pieces of Home Assistant together, it's a close match for the initial home automation overview sketch. The smart home AI is not implemented yet, so it's not included in this picture.
<p class='img'>
<a href='/images/architecture/ha_full_architecture.png'>
<img src='/images/architecture/ha_full_architecture.png' />
</a>
Overview of the full Home Assistant architecture with a couple of loaded components and platforms.
Overview of the full Home Assistant architecture with a couple of loaded components and platforms
</p>
The platform logic for components uses 3rd party Python libraries to communicate with the devices. This is done so that we can leverage great device libraries that are out there in the Python community.
The platform logic for components uses third-party Python libraries to communicate with the devices so we can leverage the great device libraries in the Python community.

View File

@ -18,4 +18,4 @@ self.hidden = True
This will SUGGEST that the active frontend hides the entity. This requires that the active frontend support hidden cards (the default frontend does) and that the value of hidden be included in your attributes dictionary (see above). The Entity abstract class will take care of this for you.
Remember: The suggestion set by your component's code will always be overwritten by user settings in the configuration.yaml file. This is why you may set hidden to be False, but the property may remain True (or vice-versa).
Remember: The suggestion set by your component's code will always be overwritten by user settings in the 'configuration.yaml' file. This is why you may set hidden to be False, but the property may remain True (or vice-versa).

View File

@ -9,11 +9,11 @@ sharing: true
footer: true
---
Home Assistant is built from the ground up to be easily-extensible by other developers using components. It uses [Python 3](https://www.python.org/) for the backend and [Polymer (Web components)](https://www.polymer-project.org/) for the frontend.
Home Assistant is built from the ground up to be easily extensible using components. Home Assistant uses [Python 3](https://www.python.org/) for the backend and [Polymer (Web components)](https://www.polymer-project.org/) for the frontend.
Home Assistant is open-source and MIT licensed. The source can be found here:
Home Assistant is open-source and MIT-licensed. Here are links to the source::
- [home-assistant](https://github.com/home-assistant/home-assistant) - Python server backend
- [home-assistant-js](https://github.com/home-assistant/home-assistant-js) - JavaScript backend powering the client
- [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer) - Polymer UI
- [home-assistant](https://github.com/home-assistant/home-assistant): Python server backend.
- [home-assistant-js](https://github.com/home-assistant/home-assistant-js): JavaScript backend that powers the client.
- [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer): Polymer UI.

View File

@ -9,7 +9,7 @@ sharing: true
footer: true
---
If you're taking a while developing your feature and would like to catch up with what's in the current Home Assistant `dev` branch, you can use `git rebase` to do so. This will pull the latest Home Assistant changes locally, rewind your commits, bring in the latest changes from Home Assistant and then replay all of your commits on top.
If it's taking a while to develop your feature, and you want to catch up with what's in the current Home Assistant `dev` branch, you can use `git rebase`. This will pull the latest Home Assistant changes locally, rewind your commits, bring in the latest changes from Home Assistant, and replay all of your commits on top.
```bash
# Run this from your feature branch
@ -17,19 +17,18 @@ $ git fetch upstream dev # to pull the latest changes into a local dev branch
$ git rebase upstream/dev # to put those changes into your feature branch before your changes
```
If rebase detects conflicts, you can repeat the following process until all changes have been resolved:
If rebase detects conflicts, repeat this process until all changes have been resolved:
1. `git status` will show you the file with the conflict.
2. Edit the file and resolving the lines between `<<<< | >>>>`
3. Add the modified file `git add <file>` or `git add .`
4. Continue rebase `git rebase --continue`
5. Repeat until you've resolved all conflicts.
1. `git status` shows you the file with the conflict; edit the file and resolve the lines between `<<<< | >>>>`
3. Add the modified file: `git add <file>` or `git add .`
4. Continue rebase: `git rebase --continue`
5. Repeat until you've resolved all conflicts
There is other workflows that is covered in detail in the [Github documentation](https://help.github.com/articles/fork-a-repo/). Add an additional `remote` after you clone your fork.
Other workflows are covered in detail in the [Github documentation](https://help.github.com/articles/fork-a-repo/). Add an additional `remote` after you clone your fork.
```bash
$ git remote add upstream https://github.com/home-assistant/home-assistant.git
```
and then simply `git pull --rebase upstream dev`.
Then, `git pull --rebase upstream dev`.

View File

@ -1,7 +1,7 @@
---
layout: page
title: "Checklist"
description: "Overview of the requirements for an improvment for Home Assistant."
title: "Development Checklist"
description: "Overview of the requirements for an improvement for Home Assistant."
date: 2016-07-01 20:00
sidebar: true
comments: false
@ -10,10 +10,11 @@ footer: true
---
After you finish your work:
Before you commit any changes, check your work against these requirements:
- Check that all dependencies are included via the `REQUIREMENTS` variable in your platform/component and only imported inside functions that use them.
- Add any new dependencies to `requirements_all.txt` if needed. Use `script/gen_requirements_all.py`.
- Update the `.coveragerc` file to exclude your platform if there are no tests available or your new code uses a 3rd party library for communication with the device/service/sensor.
- Provide some documentation for [home-assistant.io](https://home-assistant.io/). It's OK to just add a docstring with configuration details (sample entry for `configuration.yaml` file and alike) to the file header as a start. Visit the [website documentation](/developers/website/) for further information on contributing to [home-assistant.io](https://github.com/home-assistant/home-assistant.github.io).
- All dependencies are included via the `REQUIREMENTS` variable in your platform or component and only imported inside functions that use them
- New dependencies are added to `requirements_all.txt` (if applicable), using `script/gen_requirements_all.py`
- The `.coveragerc` file is updated to exclude your platform if there are no tests available or your new code uses a third-party library for communication with the device, service, or sensor
- Documentation is developed for [home-assistant.io](https://home-assistant.io/)
* It's OK to start with adding a docstring with configuration details (for example, sample entry for `configuration.yaml` file) to the file header. Visit the [website documentation](/developers/website/) for more information about contributing to [home-assistant.io](https://github.com/home-assistant/home-assistant.github.io).

View File

@ -1,7 +1,7 @@
---
layout: page
title: "Setup Development Environment"
description: "Setup your environment to start developing for Home Assistant."
title: "Set up Development Environment"
description: "Set up your environment to start developing for Home Assistant."
date: 2014-12-21 13:32
sidebar: true
comments: false
@ -9,26 +9,27 @@ sharing: true
footer: true
---
You will need to set up a development environment if you want to start developing a new feature or component for Home Assistant. Please follow these steps to get setup.
Visit the [the Home Assistant repository](https://github.com/home-assistant/home-assistant) first and click fork in the top right.
You'll need to set up a development environment if you want to develop a new feature or component for Home Assistant. Read on to learn how to set up.
We suggest that you setup a virtual environment using [`venv`](https://docs.python.org/3.4/library/venv.html) before running the setup script.
1. Visit the [the Home Assistant repository](https://github.com/home-assistant/home-assistant) and click "fork."
```bash
$ git clone https://github.com/YOUR_GIT_USERNAME/home-assistant.git
$ cd home-assistant
$ git remote add upstream https://github.com/home-assistant/home-assistant.git
$ script/setup
```
On Windows you can use `python setup.py develop` instead of the setup script.
* Consider setting up a virtual environment using [`venv`](https://docs.python.org/3.4/library/venv.html) before running the setup script.
After following these steps, running `hass` will invoke your local installation.
```bash
$ git clone https://github.com/YOUR_GIT_USERNAME/home-assistant.git
$ cd home-assistant
$ git remote add upstream https://github.com/home-assistant/home-assistant.git
$ script/setup
```
* On Windows, you can use `python setup.py develop` instead of the setup script.
2. Run `hass` to invoke your local installation.
### Developing on Windows
If you are using Windows as a development platform ensure you have the correct Microsoft Visual C++ build tools installed. Please check [the Windows Compilers](https://wiki.python.org/moin/WindowsCompilers) section on the [Python website](https://www.python.org/) for details. Validation using `tox` will fail if this is not done correctly.
If you are using Windows as a development platform, make sure that you have the correct Microsoft Visual C++ build tools installed. Check the [Windows Compilers](https://wiki.python.org/moin/WindowsCompilers) section on the [Python website](https://www.python.org/) for details. Validation using `tox` will fail if this is not done correctly.
Ensure you install or upgrade the Setuptools Python package. It contains compatibility improvements and adds automatic use of compilers:
```bash
pip install --upgrade setuptools
```
Also, make sure to install or upgrade the `Setuptools` Python package -- it contains compatibility improvements and adds automatic use of compilers:
```bash
pip install --upgrade setuptools
```

View File

@ -9,18 +9,29 @@ sharing: true
footer: true
---
Improvements, fixes, and new features to Home Assistant should be submitted one feature at a time using GitHub [Pull Requests](https://help.github.com/articles/using-pull-requests).
Submit your improvements, fixes, and new features to Home Assistant one at a time, using GitHub [Pull Requests](https://help.github.com/articles/using-pull-requests). Here are the steps:
1. From your fork, create a new branch to hold your changes
`git checkout -b some-feature`
2. Make the changes you want, create a [new platform](/developers/add_new_platform/), develop a [new component](/developers/creating_components/), or fix [issues](https://github.com/home-assistant/home-assistant/issues).
3. [Test your changes](/developers/development_testing/) and check for style violations
4. Commit the changes if all [musts](/developers/development_checklist/) are covered.
1. From your fork, create a new branch to hold your changes:
`git checkout -b some-feature`
2. Make your changes, create a [new platform](/developers/add_new_platform/), develop a [new component](/developers/creating_components/), or fix [issues](https://github.com/home-assistant/home-assistant/issues).
3. [Test your changes](/developers/development_testing/) and check for style violations.
4. If everything looks good according to these [musts](/developers/development_checklist/), commit your changes:
`git add .`
`git commit -m "Added some-feature"`
5. Consider to add tests to ensure that the code works.
6. Push your committed changes back to your fork on GitHub
* Consider adding tests to ensure that your code works.
5. Push your committed changes back to your fork on GitHub:
`git push origin HEAD`
7. Follow [these steps](https://help.github.com/articles/creating-a-pull-request/) to create your pull request.
8. Check for comments and suggestions on your Pull Request and keep an eye on the [CI output](https://travis-ci.org/home-assistant/home-assistant/).
6. Follow [these steps](https://help.github.com/articles/creating-a-pull-request/) to create your pull request.
7. Check for comments and suggestions on your pull request and keep an eye on the [CI output](https://travis-ci.org/home-assistant/home-assistant/).

View File

@ -9,31 +9,31 @@ sharing: true
footer: true
---
Home Assistant enforces strict [PEP8 style](https://www.python.org/dev/peps/pep-0008/) compliance on all code submitted. Every Pull Request is automatically tested with [Coveralls](https://coveralls.io/github/home-assistant/home-assistant) and [Travis CI](https://travis-ci.org/home-assistant/home-assistant) after it is created.
Home Assistant enforces strict [PEP8 style](https://www.python.org/dev/peps/pep-0008/) compliance on all code submitted. We automatically test every pull request with [Coveralls](https://coveralls.io/github/home-assistant/home-assistant) and [Travis CI](https://travis-ci.org/home-assistant/home-assistant).
### {% linkable_title Local testing %}
It's highly recommended to run `tox` before you create your Pull Request to avoid annoying fixes. Local testing requires `tox` to be installed.
**Important:** Run tox before you create your pull request to avoid annoying fixes. Local testing requires installing tox.
```bash
$ pip3 install tox
```
Start the test of your code with `tox`.
Start your code test with `tox`.
```bash
$ tox
```
This will run unit tests against python 3.4 and 3.5 (if both are available locally), as well as run a set of tests which validate `pep8` and `pylint` style of the code.
This will run unit tests against Python 3.4 and 3.5 (if both are available locally), as well as tests that validate `pep8` and `pylint` style.
#### {% linkable_title Testing Tips %}
You can optionally run tests on only one tox target using the `-e` option to select an environment. For instance `tox -e lint` will run the linters only, `tox -e py34` will run unit tests only on python 3.4.
You can run tests on only one tox target -- just use `-e` to select an environment. For example, `tox -e lint` runs the linters only, and `tox -e py34` runs unit tests only on Python 3.4.
Tox uses virtual environments under the hood to create isolated testing environments. The Tox virtual environments will get out date when requirements change causing test errors. Run `tox -r` to create new Tox virtual environments.
tox uses virtual environments under the hood to create isolated testing environments. The tox virtual environments will get out-of-date when requirements change, causing test errors. Run `tox -r` to create new tox virtual environments.
During development on a specific file, it can speed up your workflow to just run tests and linting related to the file that you're working on. To run individual files:
During development on a specific file, speed up your workflow by running tests and linting only for the file that you're working on. To run individual files:
```bash
$ flake8 homeassistant/core.py
@ -41,24 +41,23 @@ $ pylint homeassistant/core.py
$ py.test tests/test_core.py
```
You also run linting tests against all changed files, as reported by `git diff upstream/dev --name-only` using the `lint` script:
You can also run linting tests against all changed files, as reported by `git diff upstream/dev --name-only`, using the `lint` script:
```bash
home-assistant$ script/lint --changed
```
### {% linkable_title Prevent Linter Errors %}
### {% linkable_title Preventing Linter Errors %}
You can save yourself the hassle of extra commits just to fix style errors by enabling the flake8 git commit hook. It will check your code when you attempt to commit to the repository. It will block the commit if there are any style issues, giving you a chance to fix it.
Save yourself the hassle of extra commits just to fix style errors by enabling the Flake8 git commit hook. Flake8 will check your code when you try to commit to the repository and block the commit if there are any style errors, which gives you a chance to fix them!
```bash
$ pip3 install flake8 flake8-docstrings
$ flake8 --install-hook=git
```
The flake8-docstrings extension will check docstrings according to [PEP257](https://www.python.org/dev/peps/pep-0257/) when running flake8.
The `flake8-docstrings` extension will check docstrings according to [PEP257](https://www.python.org/dev/peps/pep-0257/) when running Flake8.
### {% linkable_title Notes on PyLint and PEP8 validation %}
In case a PyLint warning cannot be avoided, add a comment to disable the PyLint check for that line. This can be done using the format `# pylint: disable=YOUR-ERROR-NAME`. Example of an unavoidable PyLint warning is if you do not use the passed in datetime if you're listening for time change.
If you can't avoid a PyLint warning, add a comment to disable the PyLint check for that line with `# pylint: disable=YOUR-ERROR-NAME`. An example of an unavoidable PyLint warning is not using the passed-in datetime if you're listening for a time change.

View File

@ -9,11 +9,11 @@ sharing: true
footer: true
---
The `configuration.yaml` file contains the configuration options for components and platforms. To ensure that the given configuration provided by the user is valid we use [voluptuous](https://pypi.python.org/pypi/voluptuous) to check it. Certain entries are optional or could be required for the setup of a platform or a component. Others must be of a definied type or out of an already defined list.
The `configuration.yaml` file contains the configuration options for components and platforms. We use [voluptuous](https://pypi.python.org/pypi/voluptuous) to make sure that the configuration provided by the user is valid. Some entries are optional or could be required to set up a platform or a component. Others must be a defined type or from an already-defined list.
The goal of testing the configuration is to assure that users have a great experience due to notifications if something is wrong with a platform or component setup before Home Assistant is running.
We test the configuration to ensure that users have a great experience and minimize notifications if something is wrong with a platform or component setup before Home Assistant runs.
Beside the [voluptuous](https://pypi.python.org/pypi/voluptuous) default types are a bunch of custom types available. To get a full overview take a look at the [config_validation.py](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/config_validation.py) helper.
Besides [voluptuous](https://pypi.python.org/pypi/voluptuous) default types, many custom types are available. For an overview, take a look at the [config_validation.py](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/config_validation.py) helper.
- Types: `string`, `byte`, and `boolean`
- Entity ID: `entity_id` and `entity_ids`
@ -21,21 +21,21 @@ Beside the [voluptuous](https://pypi.python.org/pypi/voluptuous) default types a
- Time: `time`, `time_zone`
- Misc: `template`, `slug`, `temperature_unit`, `latitude`, `longitude`, `isfile`, `sun_event`, `ensure_list`, `port`, `url`, and `icon`
To validate plaforms using [MQTT](/components/mqtt/) there are `valid_subscribe_topic` and `valid_publish_topic` present.
To validate plaforms using [MQTT](/components/mqtt/), `valid_subscribe_topic` and `valid_publish_topic` are available.
Some things to keep in mind:
- Use the constants which are definded in `const.py`.
- Import `PLATFORM_SCHEMA` from parent component and extend it.
- Preferred order is `required` first, then `optional`.
- Use the constants defined in `const.py`
- Import `PLATFORM_SCHEMA` from the parent component and extend it
- Preferred order is `required` first and `optional` second
### {% linkable_title Snippets %}
This section contains a couple of snippets for the validation we use.
This section contains snippets for the validation we use.
### {% linkable_title Default name %}
#### {% linkable_title Default name %}
It's common to set a default for a sensor if the user is not providing a name to use.
It's common to set a default for a sensor if the user doesn't provide a name to use.
```python
DEFAULT_NAME = 'Sensor name'
@ -45,9 +45,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
```
### {% linkable_title Limit the values %}
#### {% linkable_title Limit the values %}
In certain cases you want to limit the user's input to a couple of options.
You might want to limit the user's input to a couple of options.
```python
DEFAULT_METHOD = 'GET'
@ -57,9 +57,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_METHOD, default=DEFAULT_METHOD): vol.In(['POST', 'GET']),
```
### {% linkable_title Port %}
#### {% linkable_title Port %}
As all port numbers are coming out of the range 1 till 65535.
All port numbers are from a range of 1 to 65535.
```python
DEFAULT_PORT = 993
@ -69,9 +69,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
```
### {% linkable_title Lists %}
#### {% linkable_title Lists %}
If a sensor has a pre-defined list of available options it should be tested if the configuration entry matches it.
If a sensor has a pre-defined list of available options, test to make sure the configuration entry matches the list.
```python
SENSOR_TYPES = {
@ -84,5 +84,3 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_MONITORED_VARIABLES, default=[]):
vol.All(ensure_list, [vol.In(SENSOR_TYPES)]),
```

View File

@ -62,10 +62,12 @@ automation:
platform: state
entity_id: device_tracker.paulus, device_tracker.anne_therese
# Optional
state: 'xy'
# or (don't use that with condition: use_trigger_values)
from: 'not_home'
to: 'home'
# Alias for 'to'
state: 'home'
# If given, will trigger when state has been the to state for X time.
for:
hours: 1

View File

@ -34,7 +34,7 @@ The second line is the condition part of the automation rule. Conditions are opt
The third part is the action which will be performed when a rule is triggered and all conditions are met.For example, it can turn a light on, set the temperature on your thermostat or activate a scene.
<p class='note'>
The difference between a condition and a trigger can be confusing as they are very similar. Triggers are looking at the actions while conditions look at the result: turning a light on vs a light being on.
The difference between a condition and a trigger can be confusing as they are very similar. Triggers look at the actions, while conditions look at the results: turning a light on vs a light being on.
</p>
### {% linkable_title Exploring the internal state %}

View File

@ -11,7 +11,7 @@ footer: true
To get Home Assistant to automatically start when you boot your Synology NAS:
SSH onto your synology & login as admin or root
SSH into your synology & login as admin or root
```bash
$ cd /volume1/homeassistant

View File

@ -43,7 +43,7 @@ http:
```
<p class='note warning'>
If you are planing to expose your Home Assistant instance to the internet and don't set a password then your installation could be accessed by everybody.
If you are planning to expose your Home Assistant instance to the internet and don't set a password then your installation could be accessed by everybody.
</p>
See the [HTTP component documentation](/components/http/) for more options like HTTPS encryption.
@ -56,11 +56,11 @@ Home Assistant runs as a self-hosted web application and contains support to be
To make Home Assistant accessible while away from home, you will have to make it accessible.
The common approach is to setup port forwarding from your router to port 8123 on the computer that is hosting Home Assistant. Instructions on how to do this can be found by searching `<Router model> port forwarding instructions`.
The most common approach is to set up port forwarding from your router to port 8123 on the computer that is hosting Home Assistant. Instructions on how to do this can be found by searching `<Router model> port forwarding instructions`.
The problem with making a port accessible is that some Internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while away. You can solve this by using a free Dynamic DNS service like [DuckDNS](https://www.duckdns.org/).
Just putting a port up is not secure. You should definitely consider to encrypt your traffic if you are accessing your Home Assistant installation from abroad. For details please check the [Set up encryption using Let's Encrypt](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) blog post.
Just putting a port up is not secure. You should definitely consider encrypting your traffic if you are accessing your Home Assistant installation remotely. For details please check the [Set up encryption using Let's Encrypt](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) blog post.
If you want the very best security, check out [the instructions how to use Tor to access your home](/cookbook/tor_configuration/).

View File

@ -15,7 +15,7 @@ By default, all of your devices will be visible and have a default icon determin
# Example configuration.yaml entry
homeassistant:
name: Home
unit_system: celsius
unit_system: metric
# etc
customize:

View File

@ -9,7 +9,7 @@ sharing: true
footer: true
---
Below you can find the standard instructions. See the sidebar for installation instructions for specific platforms. If you're running a Linux based platform, we suggest to follow the [VirtualEnv Linux instructions] to avoid having to use root.
Below you can find the standard instructions. See the sidebar for installation instructions for specific platforms. If you're running a Linux-based platform, we suggest to follow the [VirtualEnv Linux instructions] to avoid having to use root.
[Virtualenv Linux instructions]: /getting-started/installation-virtualenv/

View File

@ -21,7 +21,7 @@ The easiest way to install Home Assistant on your Raspberry Pi is by using Hassb
These instructions are also available as a [video](https://www.youtube.com/watch?v=iIz6XqDwHEk).
Home Assistant will now be available by navigating with a browser to `http://ip-address-of-pi:8123`. The default username is `pi` and password is `raspberry` (please change this by running `passwd`)
Home Assistant will now be available by navigating with a browser to `http://ip-address-of-pi:8123`. The default username is `pi` and password is `raspberry` (please change this by running `passwd`). The Home Assistant configuration is located at `/home/homeassistant/.homeassistant/`.
The following extras are included on the image:

View File

@ -13,8 +13,12 @@ footer: true
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.
- [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.
- [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 `hass` 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 %}

View File

@ -18,7 +18,7 @@ Running these commands will:
Using the Synology webadmin:
- Install python3 using the Synology package centre
- Install python3 using the Synology Package Center
- Create homeassistant user and add to the "users" group
SSH onto your synology & login as admin or root

View File

@ -11,7 +11,7 @@ footer: true
Home Assistant uses the [YAML](http://yaml.org/) syntax for configuration. YAML might take a while to get used to but is really powerful in allowing you to express complex configurations.
For each component that you want to use in Home Assistant, you add code in your `configuraton.yaml` file to specify its settings.
For each component that you want to use in Home Assistant, you add code in your `configuration.yaml` file to specify its settings.
The following example entry specifies that you want to use the [notify component](/components/notify) with the [pushbullet platform](/components/notify.pushbullet).

View File

@ -54,6 +54,11 @@ With this installation, your `config_path` needed below will resemble:
/usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config
```
If you followed along with setting up a virtual environment, your path will be:
```bash
/srv/hass/python-openzwave/openzwave/config
```
### {% linkable_title Configuration %}
@ -116,6 +121,11 @@ Uncomment the line:
You can replace these values with your own 16 byte network key. For more information on this process see the [OpenZwave](https://github.com/OpenZWave/open-zwave) wiki article [Adding Security Devices to OZW](https://github.com/OpenZWave/open-zwave/wiki/Adding-Security-Devices-to-OZW)
An easy script to generate a random key:
```bash
cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g'
```
### {% linkable_title Events %}
#### {% linkable_title zwave.network_complete %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -15,8 +15,8 @@ hide_github_edit: true
<div class="grid">
<div class="grid__item one-third lap-one-third palm-one-whole">
<div class='current-version material-card text'>
<h1>Current Version: 0.29.6</h1>
Released: <span class='release-date'>October 1, 2016</span>
<h1>Current Version: 0.29.7</h1>
Released: <span class='release-date'>October 5, 2016</span>
<div class='links'>
<a href='/blog/2016/09/29/async-sleepiq-emoncms-stocks'>Release notes</a>