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

This commit is contained in:
Robbie Trencheny 2016-08-27 20:56:42 -07:00
commit 9e4330bed8
108 changed files with 3083 additions and 105 deletions

View file

@ -45,3 +45,9 @@ If that's not working, check your `dmesg` or `journalctl -f` output. Keep in min
A word of caution: The Arduino boards are not storing states. This means that with every initialization the pins are set to off/low.
</p>
Add the user who is used to run Home Assistant to the groups to allow access to the serial port.
```bash
sudo usermod -a -G dialout,lock $USER
```

View file

@ -19,11 +19,11 @@ To enable this sensor, add the following lines to your `configuration.yaml` file
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: apcupsd
name: UPS Online
- platform: apcupsd
name: UPS Online
```
Configuration variables:
- **resource** (*Required*): The resource or endpoint that contains the value.
- **method** (*Optional*): The method of the request. Default is GET.
- **name** (*Optional*): Name to use in the front end.

View file

@ -23,9 +23,12 @@ To use your EnOcean device, you first have to set up your [EnOcean hub](/compone
binary_sensor:
- platform: enocean
id: [0x01,0x90,0x84,0x3C]
name: Door
sensor_class: opening
```
Configuration variables:
- **id** (*Required*): The ID of the device. This is the 4 bytes long number written on the dimmer.
- **platform** (*Required*): Set to `enocean`.
- **name** (*Optional*): An identifier for the Ligh in the frontend.
- **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.

View file

@ -9,7 +9,7 @@ sharing: true
footer: true
logo: netatmo.png
ha_category: Camera
ha_release: "0.22"
ha_release: 0.22
---
@ -29,8 +29,8 @@ camera:
Configuration variables:
- **home** (*Optionnal*): Will display the cameras of this home only.
- **cameras** array (*Optionnal*): Cameras to use. Multiple enties allowed.
- **home** (*Optional*): Will display the cameras of this home only.
- **cameras** array (*Optional*): Cameras to use. Multiple enties allowed.
- **camera_name**: Name of the camera to display.
If **home** and **cameras** is not provided, all cameras will be displayed.

View file

@ -28,7 +28,7 @@ camera:
Configuration variables:
- **nvr** *Required**: The IP or hostname of the NVR (Network Video Recorder) server.
- **port** *Optional*: The port number to use for accessing the NVR.
- **key** *Required*: The API key available from the NVR web interface.
- **nvr** (*Required*): The IP or hostname of the NVR (Network Video Recorder) server.
- **port** (*Optional*): The port number to use for accessing the NVR.
- **key** (*Required*): The API key available from the NVR web interface.

View file

@ -17,7 +17,7 @@ The Ecobee platform lets you control a thermostats and view sensor data from the
You will need to obtain an API key from ecobee's [developer site](https://www.ecobee.com/developers/) to use this component. To get the key, first you need to register your thermostat. Once you have done that, click on the 'Become a developer' link on the developer site. Login with your ecobee credentials, accept the SDK agreement, fill in the fields, and click save. Now login to the regular consumer portal, and in the hamburger menu there will br a new option 'Developer'. Select that, then select 'Create New'. Give your app a name (it appears to need to be unique across all users, as I tried 'home-assistant' and it said it was already in use) and a summary (neither of these are important as they are not used anywhere). For Authorization method select 'ecobee PIN'. You don't need an Application Icon or Detailed Description. Click Save. Now under the Name and Summary Section you will have an API key. Copy this key and use it in you configuration section below. Click the 'X' to close the Developer section.
The first time you run Home-Assistant with this component it will give you a PIN code that you need to authorize in the [ecobee consumer portal](https://www.ecobee.com/consumerportal/index.html). You can do this by clicking 'Add Application' in the 'My Apps' section in the sidebar. Enter the PIN code from the Home Assistant screeen. To get the PIN code select the item in the Ecobee card. If you do not have an Ecobee card, you may be using groups with default_view that don't show the card. To get around this you can temporarily comment out the default_view section and restart Home Assistant. Once you enter the PIN on the Ecobee site, wait approximately 5 minutes and then click on the 'I have authorized the app' link at the bottom of the Ecobee popup window. If everything worked correctly, you should now be able to restart Home Assistant again to see the full Ecobee card with all of the sensors populated. Now you can re-enable your default_view (if you had to disable it) and add the Ecobee sensors to a group and/or view.
The first time you run Home-Assistant with this component it will give you a PIN code that you need to authorize in the [ecobee consumer portal](https://www.ecobee.com/consumerportal/index.html). You can do this by clicking 'Add Application' in the 'My Apps' section in the sidebar. Enter the PIN code from the Home Assistant screeen. To get the PIN code select the item in the Ecobee card. If you do not have an Ecobee card, you may be using groups with default_view that don't show the card. To get around this you can temporarily comment out the default_view section or add the configurator.ecobee component to your default_view and restart Home Assistant. Once you enter the PIN on the Ecobee site, wait approximately 5 minutes and then click on the 'I have authorized the app' link at the bottom of the Ecobee popup window. If everything worked correctly, you should now be able to restart Home Assistant again to see the full Ecobee card with all of the sensors populated or see the list of sensors in the developer tools. Now you can re-enable your default_view (if you had to disable it) and add the Ecobee sensors to a group and/or view.
To set it up, add the following information to your `configuration.yaml` file:

View file

@ -18,10 +18,10 @@ The `enocean` component adds support for some of these devices. You will need a
There is currently support for the following device types within Home Assistant:
- [Binary Sensor](../binary_sensor.enocean) (wall switches)
- [Sensor](../sensor.enocean) (power meters)
- [Light](../light.enocean) (dimmers)
- [Switch](../switch.enocean)
- [Binary Sensor](/components/binary_sensor.enocean/) (wall switches)
- [Sensor](/components/sensor.enocean/) (power meters)
- [Light](/components/light.enocean/) (dimmers)
- [Switch](/components/switch.enocean/)
However, only a few devices have been confirmed to work. These are:
@ -29,9 +29,9 @@ However, only a few devices have been confirmed to work. These are:
- Eltako FT55 battery-less wall switch
- Permundo PSC234 (switch and power monitor)
Other devices will most likely need some changes in the Home-Assistant code in order to work. Support for teaching of devices is also missing at this time.
Other devices will most likely need some changes in the Home Assistant code in order to work. Support for teaching of devices is also missing at this time.
# Configuration
To integrate an EnOcean controller with Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
@ -39,5 +39,7 @@ enocean:
device: /dev/ttyUSB0
```
If no device is specified, the default will be **/dev/ttyUSB0**
Configuration variables:
- **device** (*Required*): The port where your device is connected to your Home Assistant host.

View file

@ -28,7 +28,7 @@ Configuration variables:
- **access_token** (*Required*): A Foursquare API access token.
- **push_secret** (*Required*): The push secret that Foursquare provides to you in the app dashboard.
#### {% linkable_title Real-Time API %}
### {% linkable_title Real-Time API %}
The component accepts pushes from Foursquare at `/api/foursquare`. The route does not require authentication.
@ -45,7 +45,7 @@ automation:
entity_id: script.my_action
```
#### {% linkable_title Check ins %}
### {% linkable_title Check ins %}
To check a user in, use the `foursquare/checkin` service.

View file

@ -13,7 +13,7 @@ ha_category: Organization
Groups allow the user to combine multiple entities into one. A group can be promoted to a **view** by setting the `view` option to `yes`. This will make the group available as a new tab in the frontend.
Check the **Set State** page from the **Developer Tools** and browse the **Current entities:** listing for all available entities.
Check the **Set State** page from the **Developer Tools** <img src='/images/screenshots/developer-tool-services-icon.png' class='no-shadow' height='38' /> and browse the **Current entities:** listing for all available entities.
By default, every group appears in the HOME tab. If you name a group `default_view` it will REPLACE the contents of the HOME tab so you can customize it as you wish.

View file

@ -15,13 +15,13 @@ ha_release: 0.21
An EnOcean light can take many formes. Currently only one type has been tested: Eltako FUD61 dimmer.
To use your EnOcean device, you first have to set up your [EnOcean hub](../enocean) and then add the following to your `configuration.yaml` file:
To use your EnOcean device, you first have to set up your [EnOcean hub](/components/enocean/) and then add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
light:
- name: Living_room
platform: enocean
- platform: enocean
name: Living_room
id: [0x01,0x90,0x84,0x3C]
sender_id: [0xFF,0xC6,0xEA,0x04]
```
@ -30,5 +30,4 @@ Configuration variables:
- **id** (*Required*): The ID of the device. This is the 4 bytes long number written on the dimmer.
- **sender_id** (*Required*): The Sender ID of the device. This is a 4 bytes long number.
- **platform** (*Required*): Set to `enocean`.
- **name** (*Required*): An identifier for the switch
- **name** (*Optional*): An identifier for the Ligh in the frontend.

View file

@ -51,6 +51,8 @@ light:
name: "Office light"
state_topic: "office/rgb1/light/status"
command_topic: "office/rgb1/light/switch"
brightness_state_topic: 'office/rgb1/light/brightness'
brightness_command_topic: 'office/rgb1/light/brightness/set'
qos: 0
payload_on: "ON"
payload_off: "OFF"

View file

@ -34,9 +34,9 @@ To add MPC-HC to your installation, add the following to your `configuration.yam
# Example configuration.yaml entry
media_player:
platform: mpchc
host: http://192.168.0.123
port: 13579
name: MPC-HC
host: http://192.168.0.123
port: 13579
name: MPC-HC
```
Configuration variables:

View file

@ -48,7 +48,7 @@ Configuration variables:
The MQTT component needs you to run an MQTT broker for Home Assistant to connect to. There are four options, each with various degrees of ease of setup and privacy.
#### {% linkable_title Use the embedded broker %}
### {% linkable_title Embedded broker %}
Home Assistant contains an embedded MQTT broker. If no broker configuration is given, the [HBMQTT broker](https://pypi.python.org/pypi/hbmqtt) is started and Home Asssistant connects to it. Embedded broker default configuration:
@ -75,7 +75,7 @@ mqtt:
# http://hbmqtt.readthedocs.org/en/latest/references/broker.html#broker-configuration
```
#### {% linkable_title Run your own %}
### {% linkable_title Run your own %}
Most private option but requires a bit more work. There are two free and open-source brokers to pick from: [Mosquitto](http://mosquitto.org/) and [Mosca](http://www.mosca.io/).
@ -94,7 +94,7 @@ mqtt:
There is an issue with the Mosquitto package included in Ubuntu 14.04 LTS. Specify `protocol: 3.1` in your MQTT configuration to work around this issue.
</p>
#### {% linkable_title Public MQTT %}
### {% linkable_title Public broker %}
The Mosquitto project runs a [public broker](http://test.mosquitto.org). Easiest to setup but there is 0 privacy as all messages are public. Use this only for testing purposes and not for real tracking of your devices.
@ -110,7 +110,7 @@ mqtt:
certificate: /home/paulus/downloads/mosquitto.org.crt
```
#### {% linkable_title CloudMQTT %}
### {% linkable_title CloudMQTT %}
[CloudMQTT](https://www.cloudmqtt.com) is a hosted private MQTT instance that is free up to 10 connected devices. This is enough to get started with for example [OwnTracks](/components/device_tracker.owntracks/) and give you a taste of what is possible.
@ -174,7 +174,7 @@ The MQTT component will register the service `publish` which allows publishing m
### {% linkable_title Logging %}
The [logger](/components/logger/) component allow the logging of received MQTT messages.
The [logger](/components/logger/) component allow the logging of received MQTT messages.
```yaml
# Example configuration.yaml entry
@ -228,7 +228,7 @@ $ mosquitto_sub -h 127.0.0.1 -v -t "home-assistant/#"
For the embeeded MQTT broker the command looks like the sample below.
```bash
$ mosquitto_sub -v -V mqttv311 -t "#"
$ mosquitto_sub -v -V mqttv311 -t "#"
```
Add the username `homeassistant` and your API password if needed.

View file

@ -13,7 +13,7 @@ ha_release: pre 0.7
---
The `arduino` sensor platform allows allow you to get an numerical values from an analog input pin of an [Arduino](https://www.arduino.cc/) board. Usually the value is between 0 and 1024.
The `arduino` sensor platform allows you to get an numerical values from an analog input pin of an [Arduino](https://www.arduino.cc/) board. Usually the value is between 0 and 1024.
To enable an Arduino sensor with Home Assistant, add the following section to your `configuration.yaml` file:

View file

@ -15,18 +15,17 @@ ha_release: 0.21
An EnOcean switch can take many forms. Currently only one type has been tested: Permundo PSC234
To use your EnOcean device, you first have to set up your [EnOcean hub](../enocean) and then add the following to your `configuration.yaml` file:
To use your EnOcean device, you first have to set up your [EnOcean hub](/components/enocean/) and then add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
switch:
- name: Television
platform: enocean
- platform: enocean
name: Front door
id: [0x01,0x90,0x84,0x3C]
```
Configuration variables:
- **id** (*Required*): The ID of the device. This is a 4 bytes long number.
- **platform** (*Required*): Set to `enocean`.
- **name** (*Required*): An identifier for the switch
- **name** (*Optional*): An identifier for the switch. Default to `EnOcean Switch`.

View file

@ -25,7 +25,7 @@ Your home assistant is correctly working on this web server and available at loc
To be able to access to your home assistant instance by using https://home.example.org, add to following file into `/etc/httpd/conf/extra/hass.conf`
```apacheconf
```text
<VirtualHost *:443>
ProxyPreserveHost On
ProxyRequests Off
@ -37,7 +37,7 @@ To be able to access to your home assistant instance by using https://home.examp
and make sure that this file is read by apache's main configiuration file `/etc/httpd/conf/httpd.conf`
```apacheconf
```text
...
Include conf/extra/hass.conf
...
@ -69,7 +69,7 @@ Start home assistant: Now, you have another instance running on localhost:8124
To access this instance by using https://countryside.example.org add to `/etc/httpd/conf/extra/hass.conf`
```apacheconf
```text
<VirtualHost *:443>
ProxyPreserveHost On
ProxyRequests Off
@ -83,7 +83,7 @@ To access this instance by using https://countryside.example.org add to `/etc/ht
Add to your `/etc/httpd/conf/extra/hass.conf`
```apacheconf
```text
<VirtualHost *:80>
ServerName example.org
ServerSignature Off

View file

@ -0,0 +1,106 @@
---
layout: page
title: "OwnTracks with two MQTT brokers"
description: "Setting up OwnTracks with 2 MQTT brokers bridged for use with the MQTT bridge for SmartThings."
date: 2016-08-27 10:05
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Infrastructure
---
I ([surge919](https://github.com/surge919)) successfully tied in [OwnTracks](http://owntracks.org/) to Home Assistant and [SmartThings](https://www.smartthings.com/) while using authentication for external access. The MQTT bridge doesn't support authentication so I set up 2 MQTT instances.
Here are the steps I performed. Hopefully it saves someone else some time.
It seems to be working pretty well but if anyone sees something incorrect in my configuration, please let me know. This is my first real interaction with MQTT.
Here's a summary of my setup:
Two Docker instances for MQTT
- 1 for internal use (the MQTT bridge for SmartThings - no authentication)
- 1 for external use (for OwnTracks - with authentication)
All Docker configuration files are on my NAS so the Docker containers can be destroyed without affecting my actual configuration files.
#### Docker setup for the mosquitto internal instance. No authentication for use with the MQTT bridge.
```bash
$ docker run -ti -p 1883:1883 \
-v /volume1/data/mosquitto-int/config:/mqtt/config:ro \
-v /volume1/data/mosquitto-int/log:/mqtt/log \
-v /volume1/data/mosquitto-int/data/:/mqtt/data/ \
--name mosquitto-int -d toke/mosquitto
```
#### Docker setup for the mosquitto external instance. With authentication for use with Owntracks.
```bash
$ docker run -ti -p 1884:1883 \
-v /volume1/data/mosquitto-ext/config:/mqtt/config:ro \
-v /volume1/data/mosquitto-ext/log:/mqtt/log \
-v /volume1/data/mosquitto-ext/data/:/mqtt/data/ \
-v /volume1/data/mosquitto-ext/etc:/etc/mosquitto \
--name mosquitto-ext -d toke/mosquitto
```
Here are the config files:
`/volume1/data/mosquitto-int/config/mosquitto.conf`
```bash
connection mosquitto-ext
persistence_file mosquitto.db
try_private true
address 10.0.0.20:1884
start_type automatic
sername test
password test
notifications true
topic owntracks/# in
log_type all
log_dest file /mqtt/log/mqtt.log
log_facility 5
```
`/volume1/data/mosquitto-ext/config/mosquitto.conf`
```bash
connection mosquitto-int
persistence_file mosquitto.db
try_private true
address 10.0.0.20:1883
start_type automatic
username test
password test
notifications true
topic owntracks/# out
log_type all
log_dest file /mqtt/log/mqtt.log
log_facility 5
allow_anonymous false
password_file /etc/mosquitto/pwfile
```
Create a password for `mosquitto-ext`
```bash
$ docker exec -it mosquitto-ext /bin/bash
$ cd /etc/mosquitto/
$ mosquitto_passwd -c /etc/mosquitto/pwfile <userID>
```
### OwnTracks settings for Android
```bash
Preferences / Connection / Mode - Private MQTT
Fill out
Host
Identification
Security: TLS disabled
```
<img src="//community-home-assistant-assets.s3.amazonaws.com/original/2X/5/5ce27145e5b37bac72859e4c36b8269d14f85ce1.png" width="649" height="500">

View file

@ -70,15 +70,10 @@ Quick hot fix after we found a bug in the migrator where it wouldn't work with a
[@turbokongen]: https://github.com/turbokongen/
[@usul27]: https://github.com/usul27
[@w1ll1am23]: https://github.com/w1ll1am23/
<<<<<<< HEAD
=======
[@n8henrie]: https://github.com/n8henrie/
[@AlucardZero]: https://github.com/AlucardZero/
<<<<<<< HEAD
>>>>>>> master
=======
[@Danielhiversen]: https://github.com/danielhiversen
>>>>>>> origin/master
[apcupsd-sensor]: /components/sensor.apcupsd/
[Brightness]: /components/light/

View file

@ -17,7 +17,7 @@ This is a community curated list of different ways to use Home Assistant. Most o
[sec-automation]: /components/#automation
[organization]: /components/#organization
New recipes can be added via the [home-assistant.io repository](https://github.com/home-assistant/home-assistant.io/tree/master/source/_cookbook).
New recipes can be added via the [home-assistant.io repository](https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_cookbook).
{% assign cookbook = site.cookbook | sort: 'title' %}
{% assign categories = cookbook | map: 'ha_category' | uniq | sort %}

View file

@ -15,5 +15,5 @@ After you finish your work:
- 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.io).
- 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).

View file

@ -41,6 +41,12 @@ $ 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:
```bash
home-assistant$ script/lint --changed
```
### {% linkable_title Prevent 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.

View file

@ -25,9 +25,9 @@ This page describes the steps for publishing a new Home Assistant release.
1. Create a blog post in `next` and base it on the text of the PR in the main repository. Add images, additional text, links, etc. if it adds value. Tag each platform/component in message to documentation.
2. Create missing documentation as stumbs in `next`.
3. Update the link on the frontpage (`source/index.html`) to link to the new release blog post and version number.
4. Create a pull request from `next` to `master` with the upcoming release number as title.
5. Merge `master` into `next` (`$ git checkout next && git merge master`) to make the PR mergable.
6. Merge pull request (blog post, updated frontpage, and all new documentation) to `master`.
4. Create a pull request from `next` to `current` with the upcoming release number as title.
5. Merge `current` into `next` (`$ git checkout next && git merge master`) to make the PR mergable.
6. Merge pull request (blog post, updated frontpage, and all new documentation) to `current`.
### {% linkable_title Python Package Index %}

View file

@ -31,7 +31,7 @@ For more comfort put the HTML snippet below in a file `sse.html` in your `www` f
<h1>Getting Home Assistant server events</h1>
<div id="events"></div>
<script type="text/javascript">
var source = new EventSource("/api/stream?password=YOUR_PASSWORD");
var source = new EventSource("/api/stream?api_password=YOUR_PASSWORD");
source.onmessage = function(event) {
document.getElementById("events").innerHTML += event.data + "<br>";
};

View file

@ -9,49 +9,89 @@ sharing: true
footer: true
---
The website you're reading now is the home of Home Assistant: [https://home-assistant.io](https://home-assistant.io). This is the place where we provide documentation and additional details about Home Assistant for end users and developers.
The website you're reading now is the home of Home Assistant: [https://home-assistant.io](https://home-assistant.io). This is the place where we provide documentation and additional details about Home Assistant for end users and developers.
home-assistant.io uses the [Octopress](http://octopress.org/) framework for [Jekyll](http://github.com/mojombo/jekyll). To get more details, please checkout the [Octopress documentation](http://octopress.org/docs/).
That means that creating a new page is simple. The pages are written in [markdown](http://daringfireball.net/projects/markdown/); you don't need to care about HTML or the like.
home-assistant.io is built using [Jekyll](http://github.com/mojombo/jekyll). The pages are written in [markdown](http://daringfireball.net/projects/markdown/); to add a page you don't need to know about HTML or the like.
The process for working on the website is no different from working on Home Assistant itself.
The link "**Edit this page on GitHub**" allows one to edit pages without creating a fork.
For larger changes, we suggest that you clone the website repository. This has the advantage that you can review your changes locally. The process for working on the website is no different from working on Home Assistant itself. You work on your change and propose it via a pull request.
To test your changes locally, you need to install the **Ruby** dependencies (gems):
- [Install Ruby](https://www.ruby-lang.org/en/documentation/installation/) if you don't have it already.
- Install `bundler`, which is a dependency manager for Ruby: `gem install bundler`
- In your home-assistant.io root directory, run `bundle` to install the gems you need.
- In your home-assistant.github.io root directory, run `bundle` to install the gems you need.
Then you can work on the documentation:
- Fork home-assistant.io [git repository](https://github.com/home-assistant/home-assistant.github.io).
- Create/edit/update a page in the directory `source/_components/` for your platform/component.
- Test your changes to home-assistant.io locally: run ``rake preview`` and navigate to [http://127.0.0.1:4000](http://127.0.0.1:4000)
- Create a Pull Request (PR) against the **next** branch of home-assistant.io if your documentation is for a new feature, platform, or component.
- Create a Pull Request (PR) against the **current** branch of home-assistant.io if you fix stuff, create Cookbook entries, or expand existing documentation.
- Create/edit/update a page in the directory `source/_components/` for your platform/component.
- Test your changes to home-assistant.io locally: run `rake preview` and navigate to [http://127.0.0.1:4000](http://127.0.0.1:4000)
- Create a Pull Request (PR) against the **next** branch of home-assistant.github.io if your documentation is for a new feature, platform, or component.
- Create a Pull Request (PR) against the **current** branch of home-assistant.github.io if you fix stuff, create Cookbook entries, or expand existing documentation.
For a platform page, the fastest way is to make a copy of an existing page and edit it. The [component overview](/components/) is generated automatically, so there is no need to add a link to your page.
### {% linkable_title Code %}
To take advantage of the built-in features of Octopress to display code snippets, just use the default markdown syntax. Please use `$` and `#` if it's a command and to differ from output.
### {% linkable_title Create a page %}
```bash
Here goes the code...
For a platform page, the fastest way is to make a copy of an existing page and edit it. The [Component overview](/components/) and the [Examples section](/cookbook/) are generated automatically, so there is no need to add a link to those pages.
If you start from scratch with a page, you need to add a header. Different sections of the doumentation may need different headers.
```text
---
layout: page
title: "Website home-assistant.io"
description: "home-assistant.io web presence"
date: 2015-06-17 08:00
sidebar: true
comments: false
sharing: true
footer: true
---
Content...Written in markdown.
{% raw %}### {% linkable_title Linkable Header %}{% endraw %}
...
```
If you want to display line numbers, add the following snippet somewhere on your page.
There are [pre-definied variables](https://jekyllrb.com/docs/variables/) available but usually it's not necessary to use them when writing documentation.
### {% linkable_title Embedding Code %}
You can use the default markdown syntax to generate syntax highlighted code. For inline code wrap your code in \`. For multi line syntax wrap your code as shown below.
```text
{% raw %} ```yaml
sensor:
platform: template
```{% endraw %}
```
{::options coderay_line_numbers="table" /}
If you are using templates then those parts needs to be [escaped](http://stackoverflow.com/a/24102537). Otherwise they will be rendered and appear blank on the website.
Note that you can replace `yaml` next to \`\`\` with the language that is within the block.
When you're writing code that is to be executed on the terminal, prefix it with `$`.
### {% linkable_title HTML %}
The direct usage of HTML is supported but not recommanded. The note boxes are an exception.
```html
<p class='note warning'>
You need to enable telnet on your router.
</p>
```
### {% linkable_title Images, icons, and logos %}
The images which are displayed on the pages are stored in various directories according to their purpose.
The images which are displayed on the pages are stored in various directories according to their purpose.
| Type | Location |
| :----------- |:----------------------------------------------|
| screen shots | source/images/screenshots |
| screenshots | source/images/screenshots |
| logos | source/images/supported_brands |
Not everything (product, component, etc.) has a logo. To show something for internal parts of Home Assistant we are using the [Material Design Icons](https://materialdesignicons.com/).
Not everything (product, component, etc.) has a logo. To show something for internal parts of Home Assistant we are using the [Material Design Icons](https://materialdesignicons.com/).

View file

@ -54,7 +54,7 @@ camera 2:
### {% linkable_title Grouping devices %}
Once you have a bunch of devices set up, it is time to organize them into groups.
Each group exists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (second icon).
Each group consists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (second icon).
```yaml
# Example configuration.yaml entry showing two styles

View file

@ -90,6 +90,22 @@ $ ls /dev/ttyACM*
Depending on what's plugged into your USB ports, the name found above may change. You can lock in a name, such as `/dev/zwave`, by following [these instructions](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/).
</p>
### {% linkable_title Adding Security Devices %}
Security Z-Wave devices require a network key before being added to the network using the zwave.add_node_secure service. You must edit the options.xml file, located in your python-openzwave config_path to use a network key before adding these devices.
Edit your options.xml file:
```bash
<!-- <Option name="NetworkKey" value="0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F 0x10" /> -->
```
Uncomment the line:
```bash
<Option name="NetworkKey" value="0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10" />
```
You can replace these values with your own 16 byte network key. For more information on this process see the [Open-Zwave](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)
### {% linkable_title Events %}
#### {% linkable_title zwave.network_complete %}