Merge branch 'master' into next

This commit is contained in:
Fabian Affolter 2016-07-13 19:30:14 +02:00
commit 60bb3f4e20
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336
47 changed files with 577 additions and 153 deletions

View File

@ -13,7 +13,8 @@ ha_iot_class: "Local Poll"
ha_release: 0.18 ha_release: 0.18
--- ---
This tracker discovers new devices on boot and tracks bluetooth devices periodically based on interval_seconds value. Devices discovered are stored with 'bt_' as the prefix for device mac in `known_devices.yaml`. This tracker discovers new devices on boot and tracks bluetooth devices periodically based on interval_seconds value. It is not requiered to pair the devices with eachother!
Devices discovered are stored with 'bt_' as the prefix for device mac address in `known_devices.yaml`.
<p class='note'> <p class='note'>
Requires PyBluez. If you are on raspbian, make sure you first install `bluetooth` and `libbluetooth-dev` by running `sudo apt install bluetooth libbluetooth-dev` Requires PyBluez. If you are on raspbian, make sure you first install `bluetooth` and `libbluetooth-dev` by running `sudo apt install bluetooth libbluetooth-dev`

View File

@ -9,7 +9,7 @@ sharing: true
footer: true footer: true
logo: nmap.png logo: nmap.png
ha_category: Presence Detection ha_category: Presence Detection
featured: true featured: false
--- ---

View File

@ -25,6 +25,7 @@ device_tracker:
port: PORT port: PORT
username: YOUR_ADMIN_USERNAME username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD password: YOUR_ADMIN_PASSWORD
site_id: SITE_ID
``` ```
Configuration variables: Configuration variables:
@ -33,5 +34,6 @@ Configuration variables:
- **port** (*Optional*): The port of your controller's web interface. Defaults to 8443. - **port** (*Optional*): The port of your controller's web interface. Defaults to 8443.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*. - **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account. - **password** (*Required*): The password for your given admin account.
- **site_id** (*Optional*): Allows you to specify a site_id for device tracking. Defaults to "default". Found in the URL of the controller (i.e. https://CONTROLLER:PORT/manage/site/SITE_ID/dashboard)
See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked. See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.

View File

@ -20,7 +20,7 @@ Home Assistant can discover and automatically configure zeroconf/mDNS and uPnP d
* Netgear routers * Netgear routers
* Plex Media Server * Plex Media Server
It will be able to add Google Chreomcasts and Belkin WeMo switches automatically, for Philips Hue it will require some configuration from the user. It will be able to add Google Chromecasts and Belkin WeMo switches automatically, for Philips Hue it will require some configuration from the user.
To load this component, add the following lines to your `configuration.yaml`: To load this component, add the following lines to your `configuration.yaml`:

View File

@ -25,9 +25,14 @@ The computer running Home Assistant must support CEC, and of course be connected
[libcec](https://github.com/Pulse-Eight/libcec) must be installed for this component to work. Follow the installation instructions for your environment, provided at the link. `libcec` installs Python 3 bindings, by default as a system Python module. If you are running Home Assistant in a Python virtual environment, make sure it can access the system module, by either symlinking it or using the `--system-site-packages` flag. [libcec](https://github.com/Pulse-Eight/libcec) must be installed for this component to work. Follow the installation instructions for your environment, provided at the link. `libcec` installs Python 3 bindings, by default as a system Python module. If you are running Home Assistant in a Python virtual environment, make sure it can access the system module, by either symlinking it or using the `--system-site-packages` flag.
#### {% linkable_title Symlinking into virtual environment %}
`ln -s /usr/local/lib/python3.4/dist-packages/cec <your venv>/lib/python3.4/site-packages`
## {% linkable_title Configuration Example %} ## {% linkable_title Configuration Example %}
In the following example, a Pi Zero running Home Assistant is on a TV's HDMI port 1. HDMI port 2 is attached to a AV receiver. Three devices are attached to the AV receiver on HDMI ports 1 through 3. In the following example, a Pi Zero running Home Assistant is on a TV's HDMI port 1. HDMI port 2 is attached to a AV receiver. Three devices are attached to the AV receiver on HDMI ports 1 through 3.
```yaml ```yaml
hdmi_cec: hdmi_cec:
devices: devices:

View File

@ -18,7 +18,6 @@ The `http` component serves all files and data required for the Home Assistant f
http: http:
api_password: YOUR_PASSWORD api_password: YOUR_PASSWORD
server_port: 12345 server_port: 12345
development: 1
ssl_certificate: /etc/letsencrypt/live/hass.example.com/fullchain.pem ssl_certificate: /etc/letsencrypt/live/hass.example.com/fullchain.pem
ssl_key: /etc/letsencrypt/live/hass.example.com/privkey.pem ssl_key: /etc/letsencrypt/live/hass.example.com/privkey.pem
cors_allowed_origins: cors_allowed_origins:
@ -29,6 +28,7 @@ http:
Configuration variables: Configuration variables:
- **api_password** (*Optional*): Protect Home Assistant with a password. - **api_password** (*Optional*): Protect Home Assistant with a password.
- **server_host** (*Optional*): Only listen to incoming requests on specific ip/host (default: accept all)
- **server_port** (*Optional*): Let you set a port to use. Defaults to 8123. - **server_port** (*Optional*): Let you set a port to use. Defaults to 8123.
- **development** (*Optional*): Disable caching and load unvulcanized assets. Useful for Frontend development. - **development** (*Optional*): Disable caching and load unvulcanized assets. Useful for Frontend development.
- **ssl_certificate** (*Optional*): Path to your TLS/SSL certificate to serve Home Assistant over a secure connection. - **ssl_certificate** (*Optional*): Path to your TLS/SSL certificate to serve Home Assistant over a secure connection.

View File

@ -33,7 +33,7 @@ Turns one light on or multiple lights on using [groups]({{site_root}}/components
| Service data attribute | Optional | Description | | Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- | | ---------------------- | -------- | ----------- |
| `entity_id` | no | String or list of strings that point at `entity_id`s of lights. Else targets all. | `entity_id` | no | String or list of strings that point at `entity_id`s of lights. Else targets all.
| `transition` | yes | Integer that represents the time the light should take to transition to the new state. *not supported by Wink | `transition` | yes | Integer that represents the time the light should take to transition to the new state in seconds. *not supported by Wink
| `profile` | yes | String with the name of one of the built-in profiles (relax, energize, concentrate, reading) or one of the custom profiles defined in `light_profiles.csv` in the current working directory. Light profiles define a xy color and a brightness. If a profile is given and a brightness or xy color then the profile values will be overwritten. | `profile` | yes | String with the name of one of the built-in profiles (relax, energize, concentrate, reading) or one of the custom profiles defined in `light_profiles.csv` in the current working directory. Light profiles define a xy color and a brightness. If a profile is given and a brightness or xy color then the profile values will be overwritten.
| `xy_color` | yes | A list containing two floats representing the xy color you want the light to be. Two comma seperated floats that represent the color in XY. | `xy_color` | yes | A list containing two floats representing the xy color you want the light to be. Two comma seperated floats that represent the color in XY.
| `rgb_color` | yes | A list containing three integers representing the xy color you want the light to be. Three comma seperated integers that represent the color in RGB | `rgb_color` | yes | A list containing three integers representing the xy color you want the light to be. Three comma seperated integers that represent the color in RGB
@ -41,6 +41,7 @@ Turns one light on or multiple lights on using [groups]({{site_root}}/components
| `color_name` | yes | A human readable string of a color name, such as `blue` or `goldenrod` or [`chucknorris`](http://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color). If your browser can display it, so can Home Assistant. | `color_name` | yes | A human readable string of a color name, such as `blue` or `goldenrod` or [`chucknorris`](http://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color). If your browser can display it, so can Home Assistant.
| `brightness` | yes | Integer between 0 and 255 for how bright the color should be. | `brightness` | yes | Integer between 0 and 255 for how bright the color should be.
| `flash` | yes | Tell light to flash, can be either value `short` or `long`. *not supported by Wink | `flash` | yes | Tell light to flash, can be either value `short` or `long`. *not supported by Wink
| `effect`| yes | Applies an effect such as `colorloop` or `random`.
### {% linkable_title Service `light.turn_off` %} ### {% linkable_title Service `light.turn_off` %}
@ -60,4 +61,4 @@ Toggles the state of one or multiple lights using [groups]({{site_root}}/compone
| Service data attribute | Optional | Description | | Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- | | ---------------------- | -------- | ----------- |
| `entity_id` | no | String or list of strings that point at `entity_id`s of lights. Else targets all. | `entity_id` | no | String or list of strings that point at `entity_id`s of lights. Else targets all.
| `transition` | yes | Integer that represents the time the light should take to transition to the new state. | `transition` | yes | Integer that represents the time the light should take to transition to the new state in seconds.

View File

@ -23,9 +23,39 @@ Sending IR commands is not supported in this component (yet), but can be accompl
To allow Home Assistant to talk to your IR receiver, you need to first make sure you have the correct dependencies installed: To allow Home Assistant to talk to your IR receiver, you need to first make sure you have the correct dependencies installed:
```bash ```bash
$ sudo apt-get install lirc $ sudo apt-get install lirc python3-lirc
``` ```
Check the version of `python3-lirc`:
```bash
$ apt-cache show python3-lirc
Package: python3-lirc
Source: python-lirc
Version: 1.2.1-2
```
If you do not have this version or you are running in a virtual environment, then your system will completely freeze with this component active. You will need to build `python3-lirc` from source. The version of this library in the Python package index is also broken, so the typical dependency system cannot fix this. Build it from source like this:
As regular user:
```bash
sudo apt-get install liblircclient-dev
```
As the user that runs hass:
```bash
(hass) $ git clone https://github.com/tompreston/python-lirc.git
(hass) $ cd python-lirc
(hass) $ make py3
(hass) $ python3 setup.py build
(hass) $ python3 setup.py install
```
If you are not using a virtual environment setup, then you'll need a `sudo` before the install line above.
<p class='note'> <p class='note'>
If you are configuring on a Raspberry Pi, there are excellent instructions with GPIO schematics and driver configurations [here](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/). Consider following these. If you are configuring on a Raspberry Pi, there are excellent instructions with GPIO schematics and driver configurations [here](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/). Consider following these.
</p> </p>
@ -60,10 +90,10 @@ end
Test your LIRC installation before proceeding by running: Test your LIRC installation before proceeding by running:
```bash ```bash
$ irexec -n home-assistant $ ircat home-assistant
``` ```
and pressing some buttons on the remote. and pressing some buttons on the remote. You should see them register on the screen if LIRC is properly configured.
### {% linkable_title Configuration Home Assistant %} ### {% linkable_title Configuration Home Assistant %}
@ -73,10 +103,6 @@ and pressing some buttons on the remote.
lirc: lirc:
``` ```
<p class='note'>
If you are on a Debian based system (like Raspberry Pi) and are having issues loading the component due to it being unable to install python-lirc, install it manually using `apt-get install python3-lirc`.
</p>
#### {% linkable_title Events %} #### {% linkable_title Events %}
The LIRC component fires `ir_command_received` events on the bus. You can capture the events and respond to them in automation scripts like this: The LIRC component fires `ir_command_received` events on the bus. You can capture the events and respond to them in automation scripts like this:

View File

@ -37,4 +37,4 @@ Configuration variables:
- **name** (*Optional*): The name of the device used in the frontend. - **name** (*Optional*): The name of the device used in the frontend.
- **username** (*Optional*): The XBMC/Kodi HTTP username. - **username** (*Optional*): The XBMC/Kodi HTTP username.
- **password** (*Optional*): The XBMC/Kodi HTTP password. - **password** (*Optional*): The XBMC/Kodi HTTP password.
- **turn_off_action** (*Optional*): The desired turn off action. Options are `none`, `quit`, `hibernate`, `suspend`, `reboot`, or `poweroff`. Default `none`. - **turn_off_action** (*Optional*): The desired turn off action. Options are `none`, `quit`, `hibernate`, `suspend`, `reboot`, or `shutdown`. Default `none`.

View File

@ -17,6 +17,8 @@ The `instapush` platform uses [Instapush](https://instapush.im) to delivery noti
The Instapush [Getting Started page](https://instapush.im/home/start/) will guide through the process of creating the required items. The Instapush [Getting Started page](https://instapush.im/home/start/) will guide through the process of creating the required items.
To add Instapush to your installation, add the following to your `configuration.yaml` file:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
notify: notify:
@ -33,10 +35,26 @@ Configuration variables:
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`. - **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
- **api_key** (*Required*): Your API key for Instapush. - **api_key** (*Required*): Your API key for Instapush.
- **app_secret** (*Required*): The secret for your created application. - **app_secret** (*Required*): The secret for your created application.
- **event** (*Required*): TThe event - **event** (*Required*): The event
- **tracker** (*Required*): The name of tracker inside Instapush. - **tracker** (*Required*): The name of tracker inside Instapush.
To retrieve those values for existing settings, log into your account at https://instapush.im and go to your **Dashboard**. Then click **APPS** tab, choose an app, and check the **Basic Info** section. The *Application ID* is the ``api_key`` and ``app_secret`` is the *Application Secret*. To retrieve those values for existing settings, log into your account at [https://instapush.im](https://instapush.im) and go to your **Dashboard**. Then click **APPS** tab, choose an app, and check the **Basic Info** section. The *Application ID* is the ``api_key`` and ``app_secret`` is the *Application Secret*.
Assuming that your setup looks look in the image below...
<p class='img'>
<img src='{{site_root}}/images/screenshots/instapush.png' />
</p>
...then your entry for the `configuration.yaml` file needs to be like this sample.
```yaml
notify:
platform: instapush
[...]
event: msg
tracker: state
```
It's easy to test your Instapush setup outside of Home Assistant. Assuming you have an event *notification* and a tracker *home-assistant*, just fire a request and check the Instapush dashboard for a new entry. It's easy to test your Instapush setup outside of Home Assistant. Assuming you have an event *notification* and a tracker *home-assistant*, just fire a request and check the Instapush dashboard for a new entry.
@ -48,6 +66,7 @@ curl -X POST \
-d '{"event":"notification","trackers":{"home-assistant":"Switch 1"}}' \ -d '{"event":"notification","trackers":{"home-assistant":"Switch 1"}}' \
https://api.instapush.im/v1/post https://api.instapush.im/v1/post
``` ```
For further details, please check the [API](https://instapush.im/developer/rest). For further details, please check the [API](https://instapush.im/developer/rest).
To use notifications, please see the [getting started with automation page](/getting-started/automation/). To use notifications, please see the [getting started with automation page](/getting-started/automation/).

View File

@ -50,7 +50,7 @@ action:
### {% linkable_title Test if it works %} ### {% linkable_title Test if it works %}
A simple way to test if you have set up your notify platform correctly is to use **Call Service** from the **Developer Tools** to call your notify service. Choose your service (*notify/xyz*) from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**. A simple way to test if you have set up your notify platform correctly is to use <img src='/images/screenshots/developer-tool-services-icon.png' alt='service developer tool icon' class="no-shadow" height="38" /> **Services** from the **Developer Tools**. Choose your service (*notify/xyz*) from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**.
```json ```json
{ {

View File

@ -52,3 +52,5 @@ Choose <img src='/images/screenshots/developer-tool-services-icon.png' alt='serv
} }
``` ```
This will create the notification entry shown above. This will create the notification entry shown above.
NOTE: if you have defined a ```default_view:``` in your ```Groups:``` configuration you will need to include ```persistent_notification.<notification_id>``` e.g. ```persistent_notification.1234``` as per the example above, to your Groups configuration, in order to see the notification after creating it.

View File

@ -54,5 +54,5 @@ Configuration variables:
- **zone** (*Optional*): The zone to which this component is measuring the distance to. Default is the home zone. - **zone** (*Optional*): The zone to which this component is measuring the distance to. Default is the home zone.
- **ignored_zones** array (*Optional*): Where proximity is not calculated for a device (either the device being monitored or ones being compared (e.g. work or school). - **ignored_zones** array (*Optional*): Where proximity is not calculated for a device (either the device being monitored or ones being compared (e.g. work or school).
- **devices** array (*Optional*): A list of devices to compare location against to check closeness to the configured zone. - **devices** array (*Optional*): A list of devices to compare location against to check closeness to the configured zone.
- **tollerance** (*Optional*): The tolerance used to calculate the direction of travel in meters (m) to filter out small GPS coordinate changes. - **tolerance** (*Optional*): The tolerance used to calculate the direction of travel in meters (m) to filter out small GPS coordinate changes.

View File

@ -33,9 +33,9 @@ Configuration variables:
- **value_template** (*Required*): The variable to extract a value from the content. - **value_template** (*Required*): The variable to extract a value from the content.
- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any.
## {% linkable_title Interacting with Dweet.io %} ### {% linkable_title Interacting with Dweet.io %}
You can easily send dweets from the commandline to test your sensor. You can easily send dweets from the commandline to test your sensor with `curl`.
```bash ```bash
$ curl -H 'Content-Type: application/json' -d '{"temperature": 40, "humidity": 65}' https://dweet.io/dweet/for/ha-sensor $ curl -H 'Content-Type: application/json' -d '{"temperature": 40, "humidity": 65}' https://dweet.io/dweet/for/ha-sensor

View File

@ -10,6 +10,7 @@ footer: true
logo: glances.png logo: glances.png
ha_category: Sensor ha_category: Sensor
ha_iot_class: "Local Polling" ha_iot_class: "Local Polling"
ha_release: 0.7.3
--- ---
@ -18,7 +19,7 @@ The `glances` sensor platform is consuming the system information provided by th
This sensors needs a running instance of `glances` on the host. The minimal supported version of `glances` is 2.3: This sensors needs a running instance of `glances` on the host. The minimal supported version of `glances` is 2.3:
```bash ```bash
glances -w $ sudo glances -w
Glances web server started on http://0.0.0.0:61208/ Glances web server started on http://0.0.0.0:61208/
``` ```
@ -61,18 +62,18 @@ Configuration variables:
- **port** (*Option*): The network port to connect to. Default is 61208. - **port** (*Option*): The network port to connect to. Default is 61208.
- **name** (*Optional*): Name of the Glances sensor. - **name** (*Optional*): Name of the Glances sensor.
- **resources** (*Required*): Entries to monitor. - **resources** (*Required*): Entries to monitor.
- **'disk_use_percent'**: Used disk space in percent - **disk_use_percent**: Used disk space in percent
- **'disk_use'**: Used disk space - **disk_use**: Used disk space
- **'disk_free'**: Free disk space - **disk_free**: Free disk space
- **'memory_use_percent'**: Used memory in percent - **memory_use_percent**: Used memory in percent
- **'memory_use'**: Used memory - **memory_use**: Used memory
- **'memory_free'**: Free memory - **memory_free**: Free memory
- **'swap_use_percent'**: Used swap space in percent - **swap_use_percent**: Used swap space in percent
- **'swap_use'**: Used swap space - **swap_use**: Used swap space
- **'swap_free'**: Free swap space - **swap_free**: Free swap space
- **'processor_load'**: Load - **processor_load**: Load
- **'process_running'**: Number of running processes - **process_running**: Number of running processes
- **'process_total'**: Total number of processes - **process_total**: Total number of processes
- **'process_thread'**: Number of threads - **process_thread**: Number of threads
- **'process_sleeping'**: Number of sleeping processes - **process_sleeping**: Number of sleeping processes

View File

@ -31,9 +31,11 @@ sensor:
platform: onewire platform: onewire
names: names:
some_id: your name some_id: your name
mount_dir: "/mnt/1wire"
``` ```
Configuration variables: Configuration variables:
- **names** array (*Optional*): ID and friendly name of your sensors. - **names** array (*Optional*): ID and friendly name of your sensors.
- **mount_dir** (*Optional*): Location of device tree if owfs driver used.

View File

@ -15,6 +15,8 @@ ha_release: pre 0.7
The `transmission` platform allows you to monitor your downloads with [Transmission](http://www.transmissionbt.com/) from within Home Assistant and setup automation based on the information. The `transmission` platform allows you to monitor your downloads with [Transmission](http://www.transmissionbt.com/) from within Home Assistant and setup automation based on the information.
To enable this sensor, add the following lines to your `configuration.yaml`:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:

View File

@ -11,23 +11,15 @@ ha_category: Switch
ha_release: 0.21 ha_release: 0.21
--- ---
The Flux switch platform will change the temperature of your lights similar to The `flux` switch platform will change the temperature of your lights similar to the way flux works on your computer, using circadian rhythm. They will be bright during the day, and gradually fade to a red/orange at night.
the way flux works on your computer, using circadian rhythm. They will be bright
during the day, and gradually fade to a red/orange at night.
The component will update your lights based on the the time of day. It will only The component will update your lights based on the the time of day. It will only affect lights that are turned on and listed in the flux configuration.
affect lights that are turned on and listed in the flux configuration.
During the day (in between `start time` and `sunset time`), it will fade the lights from During the day (in between `start time` and `sunset time`), it will fade the lights from the `start_colortemp` to the `sunset_colortemp`. After sunset (between `sunset_time` and `stop_time`), the lights will fade from the the `sunset_colortemp` to the `stop_colortemp`. If the lights are still on after the `stop_time` it will continue to change the light to the `stop_colortemp` until the light is turned off. The fade effect is created by updating the lights every 30 seconds with a 30 second transition time.
the `start_colortemp` to the `sunset_colortemp`. After sunset (between `sunset_time`
and `stop_time`), the lights will fade from the the `sunset_colortemp` to the
`stop_colortemp`. If the lights are still on after the `stop_time` it will continue
to change the light to the `stop_colortemp` until the light is turned off. The fade
effect is created by updating the lights every 30 seconds with a 30 second transition time.
If you don't wish to have flux update on 30 second intervals, you can leave the If you don't wish to have flux update on 30 second intervals, you can leave the switch turned off and use automation rules that call the service `switch.flux_update` whenever you want the lights updated.
switch turned off and use automation rules that call the service `switch.flux_update`
whenever you want the lights updated. To use your TPLink switch in your installation, add the following to your `configuration.yaml` file:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
@ -36,12 +28,23 @@ switch:
lights: lights:
- light.desk - light.desk
- light.lamp - light.lamp
name: Fluxer # optional, default Flux name: Fluxer
start_time: 7:00 # optional, default sunrise start_time: '7:00'
stop_time: 23:00 # optional, default 22:00 stop_time: '23:00'
start_colortemp: 4000 # optional, default 4000 start_colortemp: 4000
sunset_colortemp: 3000 # optional, default 3000 sunset_colortemp: 3000
stop_colortemp: 1900 # optional, default 1900 stop_colortemp: 1900
brightness: 200 # optional, default calculated by RGB_to_xy brightness: 200
``` ```
Configuration variables:
- **lights** (*Required*) array: List of light entities.
- **name** (*Optional*): The name to use when displaying this switch.
- **start_time** (*Optional*): The start time. Default to sunrise.
- **stop_time** (*Optional*): The stop time. Defaults to 22:00.
- **start_colortemp** (*Optional*): The color temperature at the start. Defaults to `4000`.
- **sunset_colortemp** (*Optional*): The sun set color temperature. Defaults to `3000`.
- **stop_colortemp** (*Optional*): The color temperature at the end. Defaults to `1900`.
- **brightness** (*Optional*): The brightness of the lights. Calculated with `RGB_to_xy` by default.

View File

@ -56,6 +56,7 @@ switch:
name: Movment2 name: Movment2
0b1111e003af16aa10000060: 0b1111e003af16aa10000060:
name: Door name: Door
fire_event: True
``` ```
Configuration variables: Configuration variables:

View File

@ -0,0 +1,110 @@
---
layout: page
title: "Tor Onion Service Configuration"
description: "Configure Tor to work with Home Assistant to provide secure remote access without opening your firewall"
date: 2016-07-06 13:05
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Infrastructure
---
This is an example about how you can configure Tor to provide secure remote access to your Home Assistant instance as an Onion site, through Tor's Hidden Service feature. With this enabled, you do not need to open your firewall ports or setup HTTPS to enable secure remote access.
This is useful if you want to have:
* Access your Home Assistant instance remotely without opening a firewall port or setting up a VPN
* Don't want to or know how to get an SSL/TLS certificate and HTTPS configuration setup
* Want to block attackers from even being able to access/scan your port and server at all
* Want to block anyone from knowing your home IP address and seeing your traffic to your Home Assistant
#### {% linkable_title Background and Contact %}
This configuration is part of an effort to apply strong cryptography technologies (like Onion Routing and End-to-End Encryption) to technology we increasingly depend on in our day to day lives. Just like when WhatsApp enabled end-to-end encryption messaging for everyone, every home automation and IoT platform should do the same, because A) the technology is all there, freely licensed and open-source and B) up to this point, all the commercial manufacturers have been doing a horrific job with security.
You can learn more about how Tor can be used to secure home automation and IoT platforms through this short set of slides on the [Internet of Onion Things](https://github.com/n8fr8/talks/blob/master/onion_things/Internet%20of%20Onion%20Things.pdf)
This configuration was provided by @n8fr8 ([github](https://github.com/n8fr8), [twitter](https://twitter.com/n8fr8)) of the [Guardian Project](https://guardianproject.info) and [Tor Project](https://torproject.org). You can send questions, feedback and ideas to [support@guardianproject.info](mailto:support@guardianproject.info).
#### {% linkable_title Hidden Services and Onion Sites %}
Tor allows clients and relays to offer hidden services. That is, you can offer a web server, SSH server, etc., without revealing your IP address to its users. In fact, because you don't use any public address, you can run a hidden service from behind your firewall. Learn more about Hidden Services on the [Tor Project website](https://www.torproject.org/docs/tor-hidden-service.html.en).
Onion sites are websites that run on a Tor Hidden Service node. "dot onion" sites are an [IETF recognized special use domain name](https://datatracker.ietf.org/doc/rfc7686/).
#### {% linkable_title Setting up Tor on your Home Assistant %}
First, install Tor. On a Debain-based system, you can install the package easily:
```bash
$ sudo apt-get install tor
```
You can find more instructions for downloading and installing Tor on other platforms on the [Tor Project Download Page](https://www.torproject.org/download/download.html).
Next, modify Tor's main configuration file `/etc/tor/torrc` to include the following lines:
```bash
############### This section is just for location-hidden services ###
## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
...
HiddenServiceDir /var/lib/tor/homeassistant/
HiddenServicePort 80 127.0.0.1:8123
HiddenServiceAuthorizeClient stealth haremote1
...
```
The "stealth" entry above ensures traffic to and from your Home Assistant instance over Tor, is hidden even from other nodes on the Tor network. The `haremote1` value is a generic client name entry that you can modify as you please.
Then, restart Tor:
```bash
$ sudo /etc/init.d/tor restart
```
Then read the new generated authentication cookie from the Tor-generated hostname file:
```bash
$ sudo more /var/lib/tor/homeassistant/hostname
```
The output of that command should look something like this, but with your own unique "dot onion" domain and authentication cookie:
```bash
abcdef1234567890.onion ABCDEF1122334455667789 # client: haremote1
```
You are now done with the Home Assistant Tor server configuration. Make sure your Home Assistant instance is running, and now you can move to client configuration.
#### {% linkable_title Tor Client Access Setup %}
Using this setup, you can access your Home Assistant instance over Tor from your laptop or mobile device, using Tor Browser and other software.
Add the authentication cookie to your `torrc` client configuration on your laptop or mobile device. Using the sample values from above, it would look like this:
```bash
HidServAuth abcdef1234567890.onion ABCDEF1122334455667789
```
For Tor Browser on Windows, Mac or Linux, you can find the torrc file here: `<tor browser install directory>/Browser/TorBrowser/Data/Tor/torrc-defaults`
Once you have added the entry, restart the browser, and then browse to the "dot onion" site address to connect to your Home Assistant instance.
For [Orbot: Tor on Android](https://guardianproject.info/apps/orbot), add it in **Orbot** -> **Menu** -> **Settings** to the "Torrc Custom Config" entry. Restart Orbot, and then use the [Orfox browser app](https://guardianproject.info/apps/orfox/), and browse to the "dot onion" site name to access your Home Assistant instance. You can also use Orbot's VPN mode, to enable Tor access from any application on your device, such as Tasker or Owntracks.
On iOS, we have not fully tested this yet, but you should be able to add custom torrc entries on [Onion Browser](https://mike.tig.as/onionbrowser/), Red Onion or TOBY browsers, all available in the iTunes App Store.
#### {% linkable_title Some More Advanced Ideas %}
With this configuration, only you can access your Home Assistant instance Onion site through Tor, and no one else. You can share the authentication cookie with multiple devices and users, or you can generate a unique one for each - up to you! If you have multiple, say for an industrial, business or corporate configuration, this would provide an easy way to revoke access to a specific user or device.
If you always access your Home Assistant instance via Tor, you can easily run this on an isolated "IoT" network segment at your install site, keeping your internal home network traffic seperate from any potentially compromised devices (like cheap "smart" lightbulbs with backdoors!).
You could also use Tor as a means to connect your Home Assistant instance to a remote device, sensor or other service that you do not want to or connect provide a direct, open IP connection to. Again, Tor provides authenticated and confidential routing (aka "privacy and encryption") by default, without having to setup TLS/SSL or VPN. It is just important to secure IoT nodes within your network, as it is to secure remote access!
As mentioned, with Orbot on Android, you can enable a "full device" VPN mode, that allows any app you have to tunnel through Tor, even if it is not Tor or proxy aware. This means you should be able to enter your "dot onion" Onion site address into any app you want to access to your Home Assistant instance, and it should work.

View File

@ -9,7 +9,16 @@
<ul> <ul>
<li>{% active_link /developers/architecture/ Architecture %}</li> <li>{% active_link /developers/architecture/ Architecture %}</li>
<li>{% active_link /developers/architecture_components/ Components %}</li> <li>{% active_link /developers/architecture_components/ Components %}</li>
<li>{% active_link /developers/development_environment/ Setup Dev Environment %}</li> </ul>
</li>
<li>
{% active_link /developers/development/ Starting with Development %}
<ul>
<li>{% active_link /developers/development_environment/ Setting up Environment %}</li>
<li>{% active_link /developers/development_submitting/ Submit your Work %}</li>
<li>{% active_link /developers/development_checklist/ Checklist %}</li>
<li>{% active_link /developers/development_testing/ Testing %}</li>
<li>{% active_link /developers/development_catching_up/ Catching up with Reality %}</li>
</ul> </ul>
</li> </li>
<li> <li>
@ -26,6 +35,8 @@
<li>{% active_link /developers/component_deps_and_reqs/ Requirements & Dependencies %}</li> <li>{% active_link /developers/component_deps_and_reqs/ Requirements & Dependencies %}</li>
<li>{% active_link /developers/component_initialization/ Initialization %}</li> <li>{% active_link /developers/component_initialization/ Initialization %}</li>
<li>{% active_link /developers/component_events/ Handling events %}</li> <li>{% active_link /developers/component_events/ Handling events %}</li>
<li>{% active_link /developers/component_states/ States %}</li>
<li>{% active_link /developers/component_visibility/ Visibility %}</li>
<li>{% active_link /developers/component_generic_discovery/ Loading Platforms %}</li> <li>{% active_link /developers/component_generic_discovery/ Loading Platforms %}</li>
<li>{% active_link /developers/component_discovery/ Component Discovery %}</li> <li>{% active_link /developers/component_discovery/ Component Discovery %}</li>
</ul> </ul>

View File

@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "0.23: Envisalink, Homematic, HDMI-CEC and CherryPi" title: "0.23: Envisalink, Homematic, HDMI-CEC and Sony Bravia TV"
description: "This new release of Home Assistant contains support for Envisalink, Homematic and HDMI-CEC. Additionaly was the Wink support improved and CherryPi is the new WSGI server." description: "This new release of Home Assistant contains support for Envisalink, Homematic, Sony Bravia TV and HDMI-CEC. Additionaly was the Wink support improved and CherryPy is the new WSGI server."
date: 2016-07-01 00:31:00 +0000 date: 2016-07-01 00:31:00 +0000
date_formatted: "July 1, 2016" date_formatted: "July 1, 2016"
author: Paulus Schoutsen author: Paulus Schoutsen
@ -18,7 +18,7 @@ This release brings support for two new ecosystems: [Envisalink] and [Homematic]
On the config side, you can now [store your passwords][secrets] in your OS keyring or just in a standalone file. We also got a new service to reload the core config so no reboots needed anymore after changing customize settings! On the config side, you can now [store your passwords][secrets] in your OS keyring or just in a standalone file. We also got a new service to reload the core config so no reboots needed anymore after changing customize settings!
<img src='/images/supported_brands/bravia.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/eyezon.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/homematic.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/fixer-io.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/openexchangerates.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /> <img src='/images/supported_brands/bravia.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/eyezon.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/homematic.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/openexchangerates.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' />
- Support for [Envisalink] added ([alarm control panel][envi-alarm], [binary sensor][envi-binary-sensor], [sensor][envi-sensor]) ([@cinntax]) - Support for [Envisalink] added ([alarm control panel][envi-alarm], [binary sensor][envi-binary-sensor], [sensor][envi-sensor]) ([@cinntax])
- Support for [Homematic] added ([binary sensor][hm-binary-sensor], [light][hm-light], [rollershutter][hm-rollershutter], [sensor][hm-sensor], [switch][hm-switch]) ([@pvizeli], [@danielperna84]) - Support for [Homematic] added ([binary sensor][hm-binary-sensor], [light][hm-light], [rollershutter][hm-rollershutter], [sensor][hm-sensor], [switch][hm-switch]) ([@pvizeli], [@danielperna84])
@ -44,10 +44,20 @@ On the config side, you can now [store your passwords][secrets] in your OS keyri
- Lock: [Vera] now supported ([@rhooper]) - Lock: [Vera] now supported ([@rhooper])
- HTTP: Migrate to CherryPy WSGI server to fix install and runtime problems ([@balloob]) - HTTP: Migrate to CherryPy WSGI server to fix install and runtime problems ([@balloob])
Breaking changes: ### {% linkable_title Breaking changes %}
- Homematic thermostat configuration has changed and now depends on the new [Homematic] component. - Homematic thermostat configuration has changed and now depends on the new [Homematic] component.
### {% linkable_title Hotfix 0.23.1 - July 2 %}
- Bump PyVera to 0.2.13 to fix traceback and pyvera thread dying related to bug ([@rhooper])
- HTTP - SSL: Check for OP_NO_COMPRESSION support before trying to use it ([@AlucardZero])
- Wink: Downgraded pubnub to work around pycryptodome conflicts ([@w1ll1am23])
### {% linkable_title FAQ %}
- `elevation: ` was introduced to the configuration for weather/sunrise data. For existing [configurations][elevation] add the value shown in the warning `[homeassistant.config] Incomplete core config. Auto detected elevation: 665` to your `configuration.yaml` file.
[@AlucardZero]: https://github.com/AlucardZero/ [@AlucardZero]: https://github.com/AlucardZero/
[@aparraga]: https://github.com/aparraga/ [@aparraga]: https://github.com/aparraga/
[@Ardetus]: https://github.com/Ardetus/ [@Ardetus]: https://github.com/Ardetus/
@ -94,3 +104,4 @@ Breaking changes:
[reload core config service]: /getting-started/customizing-devices/#reloading-customize [reload core config service]: /getting-started/customizing-devices/#reloading-customize
[Sony Bravia TV]: /components/media_player.braviatv/ [Sony Bravia TV]: /components/media_player.braviatv/
[Raspberry Pi GPIO pins]: /components/garage_door.rpi_gpio/ [Raspberry Pi GPIO pins]: /components/garage_door.rpi_gpio/
[elevation]: https://home-assistant.io/getting-started/basic/

View File

@ -0,0 +1,64 @@
---
layout: post
title: "PocketCHIP running Home Assistant"
description: "Taking Home Assistant for a spin on a PocketCHIP."
date: 2016-07-06 05:00:00 +0000
date_formatted: "July 06, 2016"
author: Fabian Affolter
author_twitter: fabaff
comments: true
categories: How-To
og_image: /images/blog/2016-07-pocketchip/social.png
---
<img src='/images/blog/2016-07-pocketchip/pocketchip-logo.png' style='clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;' width='200' />
Over a year ago I participated in the [kickstarter campaign](https://www.kickstarter.com/projects/1598272670/chip-the-worlds-first-9-computer/description) for "CHIP - The World's First Nine Dollar Computer" by [Next Thing Co.](https://www.nextthing.co/). I went for the PocketCHIP because of the idea. Display, built-in storage (thus no need for SD cards), battery-powered, and a keyboard are pretty nice features. Last week a package arrives...
<!--more-->
Thanks to [Next Thing Co.](https://www.nextthing.co/) and their CHIP which is actually 9 USD the space requirement for a single board computer has decreased. No Ethernet and HDMI output helped with that. But I guess that the next development cycle will allow us to put those boards in a matchbox including wired networking and a SATA interface.
<p class='img'>
<img src='/images/blog/2016-07-pocketchip/size.png' />
Size comparison of a Cubieboard, OrangePi One, and CHIP.
</p>
If you start using a PocketCHIP you will definitely look like a Blackberry or a GameBoy user. Typing is done with your thumbs :-)
First a couple of tweaks like setting up `sudo`, upgrading the existing installation, change passwords, enabling ssh, and removal of the annoying stuff then installation of Home Assistant. There is not much to tell...it's straight-forward. For the sake of completeness below the notes about what I did.
A Debian installation is available by default. This means that some dependencies for Home Assistant are missing. I haven't checked if a new build for the PocketCHIP would include them. So, after a `$ sudo apt-get update` installing those dependencies take a minute or two.
```bash
$ sudo apt-get install python3-dev python3-pip python3-venv
```
As usual I run Python applications in a [venv](https://docs.python.org/3/library/venv.html).
```bash
$ pvenv ha
```
Let's activate the created environment.
```bash
$ cd ha
$ source bin/activate
```
If you haven't seen the next two commands already then you should visit our [frontsite](https://home-assistant.io/).
```bash
$ pip3 install homeassistant
$ hass --open-ui
```
With `surf` the browsing experience on the low-resolution display is not that great. Most smartphones, even very cheap ones, have touchscreens with higher resolutions. Nevermind, [`midori`](https://twitter.com/fabaff/status/748852317047418880) is not better.
<p class='img'>
<img src='/images/blog/2016-07-pocketchip/pocketchip.png' />
PocketCHIP with Home Assistant frontend
</p>
Well, with PocketCHIP and Home Assistant you could run your home automation on a 49 USD device with a touchscreen, an integrated USP, and a keyboard. With the GPIO available on top of the display you could even connect your PocketCHIP directly to sensors and actuators.

View File

@ -9,11 +9,11 @@ sharing: true
footer: true footer: true
--- ---
The `configuration.yaml` file a plain-text file thus it is readable for everyone who has access to the file. The file contains passwords and API tokens which need to be redacted if you want to share your configuration. This separation can also help you to keep easier track of your passwords and API keys (as they are all stored at one place and no longer spread across the `configuration.yaml` file) if you don't want to [split up your configuration](topics/splitting_configuration/). The `configuration.yaml` file a plain-text file thus it is readable for everyone who has access to the file. The file contains passwords and API tokens which need to be redacted if you want to share your configuration. This separation can also help you to keep easier track of your passwords and API keys (as they are all stored at one place and no longer spread across the `configuration.yaml` file) if you don't want to [split up your configuration](/topics/splitting_configuration/).
### {% linkable_title Using secrets.yaml %} ### {% linkable_title Using secrets.yaml %}
The workflow for the outsourcing in the `secrets.yaml` are very similar to the [splitting of the configuration](topics/splitting_configuration/). Create a `secrets.yaml` file in your Home assistant configuration directory (The location of the folder differs between operating systems: on OS X and Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`). The workflow for the outsourcing in the `secrets.yaml` are very similar to the [splitting of the configuration](/topics/splitting_configuration/). Create a `secrets.yaml` file in your Home assistant configuration directory (The location of the folder differs between operating systems: on OS X and Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`).
The entries for password and API keys in the `configuration.yaml` file usally looks like the example below. The entries for password and API keys in the `configuration.yaml` file usally looks like the example below.
@ -32,7 +32,7 @@ http:
The `secrets.yaml` files stored the corresponding password assigned to the identifier. The `secrets.yaml` files stored the corresponding password assigned to the identifier.
```yaml ```yaml
debug: 0 logger: debug
http_password: YOUR_PASSWORD http_password: YOUR_PASSWORD
``` ```
@ -82,6 +82,6 @@ Please enter password for encrypted keyring:
``` ```
<p class='note warning'> <p class='note warning'>
With this configuration [autostart](/getting-started/autostart/) will no longer work. If your are using the Python Keyring, [autostarting](/getting-started/autostart/) of Home Assistant will no longer work.
</p> </p>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,22 @@
---
layout: page
title: "Handling states"
description: "Instructions how to handle states with your component."
date: 2016-07-01 20:00
sidebar: true
comments: false
sharing: true
footer: true
---
It is the responsibility of the component to maintain the states of the devices in your domain. Each device should be a single state and, if possible, a group should be provided that tracks the combined state of the devices.
A state can have several attributes that will help the frontend in displaying your state:
- `friendly_name`: this name will be used as the name of the device
- `entity_picture`: this picture will be shown instead of the domain icon
- `unit_of_measurement`: this will be appended to the state in the interface
- `hidden`: This is a suggestion to the frontend on if the state should be hidden
These attributes are defined in [homeassistant.helpers.entity](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py#L180).

View File

@ -0,0 +1,21 @@
---
layout: page
title: "Handling visibility"
description: "Instructions how to handle visibility with your component."
date: 2016-07-01 20:00
sidebar: true
comments: false
sharing: true
footer: true
---
Generally, when creating a new entity for Home Assistant you will want it to be a class that inherits the [homeassistant.helpers.entity.Entity](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py) class. If this is done, visibility will be handled for you.
You can set a suggestion for your entity's visibility by setting the `hidden` property by doing something similar to the following.
```python
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).

View File

@ -24,12 +24,14 @@ This page contains a list of people who have contributed in one way or another t
- [Alexander Fortin](https://github.com/shaftoe) - [Alexander Fortin](https://github.com/shaftoe)
- [Alex Harvey](https://github.com/infamy) - [Alex Harvey](https://github.com/infamy)
- [Allan Glen](https://github.com/allanglen) - [Allan Glen](https://github.com/allanglen)
- [AlucardZero](https://github.com/AlucardZero)
- [amorsillo](https://github.com/fignuts) - [amorsillo](https://github.com/fignuts)
- [Andrew](https://github.com/aoakeson) - [Andrew](https://github.com/aoakeson)
- [Andrew LeCody](https://github.com/aceat64) - [Andrew LeCody](https://github.com/aceat64)
- [Andy Loughran](https://github.com/andylockran) - [Andy Loughran](https://github.com/andylockran)
- [andythigpen](https://github.com/andythigpen) - [andythigpen](https://github.com/andythigpen)
- [Antonio Párraga Navarro](https://github.com/aparraga) - [Antonio Párraga Navarro](https://github.com/aparraga)
- [Ardetus](https://github.com/Ardetus)
- [Ardi Mehist](https://github.com/omgapuppy) - [Ardi Mehist](https://github.com/omgapuppy)
- [arsaboo](https://github.com/arsaboo/) - [arsaboo](https://github.com/arsaboo/)
- [Arthur Leonard Andersen](https://github.com/leoc) - [Arthur Leonard Andersen](https://github.com/leoc)
@ -48,7 +50,7 @@ This page contains a list of people who have contributed in one way or another t
- [coteyr](https://github.com/coteyr/) - [coteyr](https://github.com/coteyr/)
- [Dale Higgs](https://github.com/dale3h) - [Dale Higgs](https://github.com/dale3h)
- [Dan Cinnamon](https://github.com/Cinntax) - [Dan Cinnamon](https://github.com/Cinntax)
- [Daniel](https://github.com/danielperna84) - [Daniel Perna](https://github.com/danielperna84)
- [Daniel Iversen](https://github.com/danielhiversen) - [Daniel Iversen](https://github.com/danielhiversen)
- [Daniel J. Kemp](https://github.com/danieljkemp/) - [Daniel J. Kemp](https://github.com/danieljkemp/)
- [Daniel Matuschek](https://github.com/usul27) - [Daniel Matuschek](https://github.com/usul27)
@ -119,10 +121,9 @@ This page contains a list of people who have contributed in one way or another t
- [Martin Hjelmare](https://github.com/MartinHjelmare) - [Martin Hjelmare](https://github.com/MartinHjelmare)
- [Matteo Lampugnani](https://github.com/t30) - [Matteo Lampugnani](https://github.com/t30)
- [Matthew Treinish](https://github.com/mtreinish/) - [Matthew Treinish](https://github.com/mtreinish/)
- [Michael Arnauts](https://github.com/michaelarnauts) - [Michaël Arnauts](https://github.com/michaelarnauts)
- [Michael Auchter](https://github.com/auchter)
- [Michael Gilbert](https://github.com/Zyell) - [Michael Gilbert](https://github.com/Zyell)
- [Michael Kuty](https://github.com/michaelkuty) - [Michael Kutý](https://github.com/michaelkuty)
- [Micha LaQua](https://github.com/milaq) - [Micha LaQua](https://github.com/milaq)
- [miniconfig](https://github.com/miniconfig) - [miniconfig](https://github.com/miniconfig)
- [molobrakos](https://github.com/molobrakos) - [molobrakos](https://github.com/molobrakos)

View File

@ -0,0 +1,19 @@
---
layout: page
title: "Starting with Development"
description: "Everything to get you started developing for Home Assistant."
date: 2014-12-21 13:32
sidebar: true
comments: false
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 open-source and MIT licensed. The source can be found here:
- [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

View File

@ -0,0 +1,35 @@
---
layout: page
title: "Catching up with Reality"
description: "Update your fork with the latest commit."
date: 2016-07-01 20:00
sidebar: true
comments: false
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.
```bash
# Run this from your feature branch
$ 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:
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.
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.
```bash
$ git remote add upstream https://github.com/home-assistant/home-assistant.git
```
and then simply `git pull --rebase upstream dev`.

View File

@ -0,0 +1,19 @@
---
layout: page
title: "Checklist"
description: "Overview of the requirements for an improvment for Home Assistant."
date: 2016-07-01 20:00
sidebar: true
comments: false
sharing: true
footer: true
---
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).

View File

@ -1,7 +1,7 @@
--- ---
layout: page layout: page
title: "Setup Development" title: "Setup Development Environment"
description: "Everything to get you started developing for Home Assistant." description: "Setup your environment to start developing for Home Assistant."
date: 2014-12-21 13:32 date: 2014-12-21 13:32
sidebar: true sidebar: true
comments: false comments: false
@ -9,16 +9,6 @@ sharing: true
footer: 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 open-source and MIT licensed. The source can be found here:
- [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
### {% linkable_title Starting development %}
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. 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. Visit the [the Home Assistant repository](https://github.com/home-assistant/home-assistant) first and click fork in the top right.
@ -34,66 +24,3 @@ On Windows you can use `python setup.py develop` instead of the setup script.
After following these steps, running `hass` will invoke your local installation. After following these steps, running `hass` will invoke your local installation.
### {% linkable_title Testing your work %}
Testing your work requires `tox` to be installed:
```bash
$ pip3 install tox
```
### {% linkable_title Prevent Linter Errors %}
Home Assistant enforces strict [PEP8 style](https://www.python.org/dev/peps/pep-0008/) compliance on all code submitted. 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 repo. It will block the commit if there are any style issues, giving you a chance to fix it.
```bash
$ pip install flake8 flake8-docstrings
$ flake8 --install-hook
```
The flake8-docstrings extension will check docstrings according to [PEP257](https://www.python.org/dev/peps/pep-0257/) when running flake8.
### {% linkable_title Submitting improvements %}
Improvements to Home Assistant should be submitted one feature at a time using GitHub [pull requests](https://help.github.com/articles/using-pull-requests).
1. From your fork, create a new branch to hold your changes
`git checkout -b some-feature`
2. Make the changes you want
3. Test your changes and check for style violations
`tox`
4. Commit the changes
`git add .`
`git commit -m "Added some-feature"`
5. Push your committed changes back to your fork on GitHub
`git push origin HEAD`
6. Follow [these steps](https://help.github.com/articles/creating-a-pull-request/) to create your pull request.
### {% linkable_title Catching up with Reality %}
If you're taking a while developing your feature request 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.
```bash
# Run this from your feature branch
$ 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:
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.
### {% linkable_title Further reading %}
- [Home Assistant Architecture](/developers/architecture/)
- [Frontend development](/developers/frontend/)
- [Creating a custom component](/developers/creating_components/)
- [Adding support for a new platform](/developers/add_new_platform/)
- [Rest API](/developers/api/)
- [Server-sent events](/developers/server_sent_events/)
- [Website](/developers/website/)
- [Home Assitant on Github - CONTRIBUTING.md](https://github.com/home-assistant/home-assistant/blob/dev/CONTRIBUTING.md)

View File

@ -0,0 +1,26 @@
---
layout: page
title: "Submit your work"
description: "Submit your work as Pull Request for Home Assistant."
date: 2016-07-01 20:00
sidebar: true
comments: false
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).
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.
`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
`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/).

View File

@ -0,0 +1,48 @@
---
layout: page
title: "Testing your code"
description: "Make sure that your code passes the checks"
date: 2016-07-01 20:00
sidebar: true
comments: false
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.
### {% linkable_title Local testing %}
It's highly recommanded to run `tox` before you create your Pull Request to avoid annoying fixes. Local testing requires `tox` to be installed.
```bash
$ pip3 install tox
```
Start the test of your code 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.
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.
### {% 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.
```bash
$ pip3 install flake8 flake8-docstrings
$ flake8 --install-hook
```
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.

View File

@ -29,6 +29,8 @@ http:
development: 1 development: 1
``` ```
As everything is compiled into the file `frontend.html` you do not want to work with the compiled version but with the seperate files during development.
Next step is to get the frontend code. When you clone the Home Assistant repository, the frontend repository is not cloned by default. You can setup the frontend development environment by running: Next step is to get the frontend code. When you clone the Home Assistant repository, the frontend repository is not cloned by default. You can setup the frontend development environment by running:
```bash ```bash

View File

@ -0,0 +1,37 @@
---
layout: page
title: "Releasing"
description: "Steps involved to publish a new Home Assistant release."
date: 2016-07-13 17:00
sidebar: true
comments: false
sharing: true
footer: true
---
This page describes the steps for publishing a new Home Assistant release.
### {% linkable_title GitHub %}
1. Create a pull request from `dev` to `master` with the upcoming release number as title.
2. Merge `master` into `dev` to make the PR mergable. PR message contains intro, highlighting major changes, and an overview of all changes tagging each author.
3. Merge pull request.
4. Go to [releases](https://github.com/home-assistant/home-assistant/releases) and tag a new release on the `master` branch. Tag name and title name are version number. Release description is text from PR.
### {% linkable_title Website %}
1. Create a blog post and base it on the PR text. Add images, additional text, links, etc. if it adds value. Tag each platform/component in message to documentation.
2. Create missing documentation as stumbs.
3. Update the link on the frontpage (`source/index.html`) to link to the new release blog post and version number.
4. Merge blog post and updated frontpage to `master` (`git merge next`).
5. Change to `next` and merge with `master` (`git checkout next && git merge master`) to keep in sync.
### {% linkable_title Python Package Index %}
Checkout `master` branch and run `script/release` to publish the new release on [Python Package Index](https://pypi.python.org)
### {% linkable_title Social media %}
1. Create a [tweet](https://twitter.com/home_assistant) announcing blog post linking to release notes.
2. Publish a link to the tweet/release blog post for the [Google+ Community](https://plus.google.com/b/110560654828510104551/communities/106562234893511202708).

View File

@ -57,8 +57,8 @@ The following tables show the available trigger data per platform.
| ---- | ---- | | ---- | ---- |
| `trigger.platform` | Hardcoded: `numeric_state` | `trigger.platform` | Hardcoded: `numeric_state`
| `trigger.entity_id` | Entity ID that we observe. | `trigger.entity_id` | Entity ID that we observe.
| `trigger.below` | The below treshold, if any. | `trigger.below` | The below threshold, if any.
| `trigger.above` | The above treshold, if any. | `trigger.above` | The above threshold, if any.
| `trigger.from_state` | The previous state of the entity. | `trigger.from_state` | The previous state of the entity.
| `trigger.to_state` | The new state that triggered trigger. | `trigger.to_state` | The new state that triggered trigger.

View File

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

View File

@ -19,6 +19,9 @@ homeassistant:
latitude: 32.87336 latitude: 32.87336
longitude: 117.22743 longitude: 117.22743
# Impacts weather/sunrise data (altitude above sea level)
elevation: 430
# C for Celsius, F for Fahrenheit # C for Celsius, F for Fahrenheit
temperature_unit: C temperature_unit: C

View File

@ -46,7 +46,7 @@ We would appreciate if you help to keep this page up-to-date and add feedback.
| [elinks] | | fails | page with manifest and import | | [elinks] | | fails | page with manifest and import |
| [w3m] | 0.5.3 | fails | display the icon shown while loading HA | | [w3m] | 0.5.3 | fails | display the icon shown while loading HA |
| [Epiphany] | 3.18.5 | works | | | [Epiphany] | 3.18.5 | works | |
| [surf] | 0.7 | works | |
## {% linkable_title Android %} ## {% linkable_title Android %}
@ -78,3 +78,4 @@ We would appreciate if you help to keep this page up-to-date and add feedback.
[elinks]: http://elinks.or.cz/ [elinks]: http://elinks.or.cz/
[w3m]: http://w3m.sourceforge.net/ [w3m]: http://w3m.sourceforge.net/
[Epiphany]: https://wiki.gnome.org/Apps/Web [Epiphany]: https://wiki.gnome.org/Apps/Web
[surf]: http://surf.suckless.org/

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB