diff --git a/Rakefile b/Rakefile index d98244db570..a2555af077d 100644 --- a/Rakefile +++ b/Rakefile @@ -77,13 +77,14 @@ task :watch do end desc "preview the site in a web browser" -task :preview do +task :preview, :listen do |t, args| + listen_addr = args[:listen] || '127.0.0.1' raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}" system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build --watch --incremental") compassPid = Process.spawn("compass watch") - rackupPid = Process.spawn("rackup --port #{server_port}") + rackupPid = Process.spawn("rackup --port #{server_port} --host #{listen_addr}") trap("INT") { [jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH } diff --git a/_config.yml b/_config.yml index 594037c04d4..6275152702f 100644 --- a/_config.yml +++ b/_config.yml @@ -79,6 +79,8 @@ collections: output: true cookbook: output: true + topics: + output: true # ----------------------- # # 3rd Party Settings # diff --git a/plugins/linkable_title.rb b/plugins/linkable_title.rb index da677b296be..784ca99bcd1 100644 --- a/plugins/linkable_title.rb +++ b/plugins/linkable_title.rb @@ -6,9 +6,9 @@ module Jekyll end def render(context) - slug = @title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') - - " #{@title}" + title = Liquid::Template.parse(@markup).render context + slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') + " #{title}" end end end diff --git a/sass/custom/_paulus.scss b/sass/custom/_paulus.scss index bad54a1da87..56e200dd4cb 100644 --- a/sass/custom/_paulus.scss +++ b/sass/custom/_paulus.scss @@ -13,6 +13,7 @@ text-transform: uppercase; white-space: nowrap; display: inline-block; + font-weight: bold; } .front-install { @@ -119,7 +120,7 @@ article.post, article.page, article.listing { box-shadow: none; } - & > table { + & > table, & > .entry-content > table { background-color: #F3FCF5; } @@ -160,7 +161,7 @@ p.note { box-shadow: rgba(0,0,0,0.06) 0 0 10px; &::before { - font-family: "FontAwesome"; + font-family: "FontAwesome", sans-serif; content: "\f05a" " Note " attr(data-title); background-color: #6ab0de; color: white; @@ -204,7 +205,7 @@ p.note { } .install-instructions-container { - #normal-install, #raspberry-install, #docker-install, .install-instructions { + #normal-install, #raspberry-install, #docker-install, #synology-install, .install-instructions { display: none; } @@ -223,14 +224,16 @@ p.note { #normal-install:checked ~ .menu-selector.normal, #raspberry-install:checked ~ .menu-selector.raspberry, - #docker-install:checked ~ .menu-selector.docker + #docker-install:checked ~ .menu-selector.docker, + #synology-install:checked ~ .menu-selector.synology { border-bottom-color: $blue; } #normal-install:checked ~ .install-instructions.normal, #raspberry-install:checked ~ .install-instructions.raspberry, - #docker-install:checked ~ .install-instructions.docker + #docker-install:checked ~ .install-instructions.docker, + #synology-install:checked ~ .install-instructions.synology { display: block; } @@ -242,7 +245,7 @@ p.note { .advanced-installs-container { - #upstart-install, #systemd-install, #osx-install, .advanced-installs { + #upstart-install, #systemd-install, #osx-install, #synology-install, .advanced-installs { display: none; } @@ -261,14 +264,16 @@ p.note { #upstart-install:checked ~ .menu-selector.upstart, #systemd-install:checked ~ .menu-selector.systemd, - #osx-install:checked ~ .menu-selector.osx + #osx-install:checked ~ .menu-selector.osx, + #synology-install:checked ~ .menu-selector.synology { border-bottom-color: $blue; } #upstart-install:checked ~ .advanced-installs.upstart, #systemd-install:checked ~ .advanced-installs.systemd, - #osx-install:checked ~ .advanced-installs.osx + #osx-install:checked ~ .advanced-installs.osx, + #synology-install:checked ~ .advanced-installs.synology { display: block; } @@ -403,4 +408,6 @@ p.note { .edit-github { text-align: right; + margin-bottom: 8px; + font-size: .8em; } diff --git a/sass/oscailte/base/_navigation.scss b/sass/oscailte/base/_navigation.scss index ea581a0b4e9..6478e6aec4f 100644 --- a/sass/oscailte/base/_navigation.scss +++ b/sass/oscailte/base/_navigation.scss @@ -14,13 +14,14 @@ body{ -webkit-animation: bugfix infinite 1s; } #toggle, .toggle { display: none; } .menu li { list-style: none; float:left; } -$menu-collapse: 955px; +$menu-collapse: 944px; // @media only screen and (max-width: $lap-end){ @media only screen and (max-width: $menu-collapse){ .menu { display: none; opacity: 0; width: 100%; position: absolute; right: 0; } .menu li { display: block; width: 100%; margin: 0; } .menu li a { display: block; width: 100%; text-decoration: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } + .menu li a .icon { display: none; } .toggle { display: block; position: relative; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } #toggle:checked ~ .menu { display: block; opacity: 1; z-index: 999; } } @@ -75,10 +76,10 @@ header .grid { @include box-sizing(border-box); @include transition(all 0.25s linear); display: block; - padding: 32px 20px; + padding: 32px 12px; text-decoration: none; font-weight: normal; - font-size: 16px; + font-size: 14px; line-height: 1; } @@ -86,7 +87,7 @@ header .grid { background: $site-background; box-shadow: inset 0px 5px $navigation-color; color: $navigation-color; - padding: 40px 20px 24px; + padding: 40px 12px 24px; } .toggle{ diff --git a/sass/oscailte/homepage/_hero_unit.scss b/sass/oscailte/homepage/_hero_unit.scss index 80b406f1325..ca41c37a588 100644 --- a/sass/oscailte/homepage/_hero_unit.scss +++ b/sass/oscailte/homepage/_hero_unit.scss @@ -7,7 +7,6 @@ background-size: cover; border-bottom: 1px solid $white; color: $white; - font-weight: bold; margin-top: -2em; margin-bottom: 1.5em; padding: 50px 0; diff --git a/source/_components/alarm_control_panel.alarmdotcom.markdown b/source/_components/alarm_control_panel.alarmdotcom.markdown index aa976170231..2d81393f770 100644 --- a/source/_components/alarm_control_panel.alarmdotcom.markdown +++ b/source/_components/alarm_control_panel.alarmdotcom.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Alarm.com Alarm Control Panel" description: "Instructions how to integrate Alarm.com into Home Assistant." date: 2016-01-14 22:00 diff --git a/source/_components/alarm_control_panel.manual.markdown b/source/_components/alarm_control_panel.manual.markdown index 36b49399a78..c5ce1ff8353 100644 --- a/source/_components/alarm_control_panel.manual.markdown +++ b/source/_components/alarm_control_panel.manual.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Manual Alarm Control Panel" description: "Instructions how to integrate manual alarms into Home Assistant." date: 2015-10-13 19:10 diff --git a/source/_components/alarm_control_panel.markdown b/source/_components/alarm_control_panel.markdown index ec617fa3e9a..ba5f469915b 100644 --- a/source/_components/alarm_control_panel.markdown +++ b/source/_components/alarm_control_panel.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Alarm Control Panels" description: "Instructions how to integrate Alarm Control Panels into Home Assistant." date: 2015-10-13 19:10 @@ -12,6 +12,7 @@ footer: true Home Assistant can give you an interface with is similar to a classic alarm system. There are several panels supported: +- [Alarm.com](/components/alarm_control_panel.alarmdotcom/) - [Manual](/components/alarm_control_panel.manual/) - [MQTT](/components/alarm_control_panel.mqtt/) - [Verisure](/components/verisure/) diff --git a/source/_components/alarm_control_panel.mqtt.markdown b/source/_components/alarm_control_panel.mqtt.markdown index 440d8209e4e..36c9230b87e 100644 --- a/source/_components/alarm_control_panel.mqtt.markdown +++ b/source/_components/alarm_control_panel.mqtt.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "MQTT Alarm Control Panel" description: "Instructions how to integrate MQTT capable Alarm Panels into Home Assistant." date: 2015-09-14 19:10 @@ -15,7 +15,7 @@ The `mqtt` alarm panel platform enables the possibility to control MQTT capable The component will accept the following states from your Alarm Panel (in lower case): -- 'armed' +- 'disarmed' - 'armed_home' - 'armed_away' - 'pending' @@ -45,7 +45,7 @@ Configuration variables: - **command_topic** (*Required*): The MQTT topic to publish commands to change the alarm state. - **name** (*Optional*): The name of the alarm. Default is 'MQTT Alarm'. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. This QoS will also be used to publishing messages. -- **payload_disarm** (*Optional*): The payload do disarm your Alarm Panel. Default is "DISARM". +- **payload_disarm** (*Optional*): The payload to disarm your Alarm Panel. Default is "DISARM". - **payload_arm_home** (*Optional*): The payload to set armed-home mode on your Alarm Panel. Default is "ARM_HOME". - **payload_arm_away** (*Optional*): The payload to set armed-away mode on your Alarm Panel. Default is "ARM_AWAY". - **code** (*Optional*): If defined, specifies a code to enable or disable the alarm in the frontend. diff --git a/source/_components/alarm_control_panel.nx584.markdown b/source/_components/alarm_control_panel.nx584.markdown new file mode 100644 index 00000000000..12a07029947 --- /dev/null +++ b/source/_components/alarm_control_panel.nx584.markdown @@ -0,0 +1,29 @@ +--- +layout: page +title: "NX584 Alarm Control Panel" +description: "Instructions how to integrate NX584 into Home Assistant." +date: 2016-02-07 10:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: networx.png +ha_category: Alarm +--- + +The `nx584` platform provides integration with GE, Caddx, Interlogix (and other brands) alarm panels that support the NX584 interface module (or have it built in). Supported panels include NX4/6/8/8E. Actual integration is done through [pynx584](http://github.com/kk7ds/pynx584) which is required for this to work. + + +To enable this, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +alarm_control_panel: + platform: nx584 + host: ADDRESS +``` + +Configuration variables: + +- **host** (*Optional*): This is the host connection string (host:port) for the nx584 server process. If unset, it is assumed to be `localhost:5007`, which will work if the server process is running on the same system as home-assistant. + diff --git a/source/_components/alarm_control_panel.verisure.markdown b/source/_components/alarm_control_panel.verisure.markdown new file mode 100644 index 00000000000..edf0248b5d2 --- /dev/null +++ b/source/_components/alarm_control_panel.verisure.markdown @@ -0,0 +1,18 @@ +--- +layout: page +title: "Verisure Alarm" +description: "Instructions how to setup the Verisure Alarm control panel within Home Assistant." +date: 2016-02-15 22:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: verisure.png +ha_category: Alarm +--- + + +The Verisure alarm control panel platform allows you to control your [Verisure](https://www.verisure.com/) Alarms. + +The requirement is that you have setup your [Verisure hub](/components/verisure/). + diff --git a/source/_components/alexa.markdown b/source/_components/alexa.markdown index d66913e751d..0cfeb9a1153 100644 --- a/source/_components/alexa.markdown +++ b/source/_components/alexa.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Alexa / Amazon Echo" description: "Instructions how to connect Alexa/Amazon Echo to Home Assistant." date: 2015-12-13 13:02 @@ -80,7 +80,7 @@ Out of the box, the component will do nothing. You have to teach it about all in You can use [templates] for the values of `speech/text`, `card/title` and `card/content`. -[templates]: /getting-started/templating/ +[templates]: /topics/templating/ Configuring the Alexa component for the above intents would look like this: diff --git a/source/_components/apcupsd.markdown b/source/_components/apcupsd.markdown new file mode 100644 index 00000000000..9ecd802fa24 --- /dev/null +++ b/source/_components/apcupsd.markdown @@ -0,0 +1,29 @@ +--- +layout: page +title: "APCUPSd" +description: "Instructions on how to integrate APCUPSd status with Home Assistant." +date: 2016-02-10 17:11 +sidebar: true +comments: false +sharing: true +footer: true +logo: apcupsd.png +ha_category: Hub +--- + +[APCUPSd](http://www.apcupsd.org/) status information can be integrated into Home Assistant when the Network Information Server (NIS) [is configured](http://www.apcupsd.org/manual/manual.html#nis-server-client-configuration-using-the-net-driver) is enabled on the APC device. + +To enable this sensor, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +apcupsd: + host: IP_ADDRESS + port: PORT +``` + +Configuration variables: + +- **host** (*Optional*): The hostname/IP address on which the APCUPSd NIS is being served. Defaults to `localhost`. +- **port** (*Optional*): The port on which the APCUPSd NIS is listening. Defaults to `3551`. + diff --git a/source/_components/arduino.markdown b/source/_components/arduino.markdown index 08f3a7073f4..e961ab15149 100644 --- a/source/_components/arduino.markdown +++ b/source/_components/arduino.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Arduino" description: "Instructions how to setup an Arduino boards within Home Assistant." date: 2015-06-27 10:28 @@ -16,7 +16,7 @@ The [Arduino](https://www.arduino.cc/) device family are microcontroller boards There are a lot of extensions (so called [shields](https://www.arduino.cc/en/Main/ArduinoShields)) available. Those shields can be plugged-in into the existing connectors and stacked on top of each other. This makes it possible to expand the capabilities of the Arduino boards. -The arduino component is designed to let you use a directly attached board to your Home Assistant host over USB. +The `arduino` component is designed to let you use a directly attached board to your Home Assistant host over USB. You need to have the [Firmata firmware](https://github.com/firmata/) on your board. Please upload the `StandardFirmata` sketch to your board, please refer to the [Arduino documentation](https://www.arduino.cc/en/Main/Howto) for further information. diff --git a/source/_components/automation.markdown b/source/_components/automation.markdown index 78e4154b6ae..77ce27a220f 100644 --- a/source/_components/automation.markdown +++ b/source/_components/automation.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Automation" description: "Instructions how to setup automation within Home Assistant." date: 2015-01-20 22:36 @@ -129,6 +129,11 @@ automation: # Optional from: 'not_home' to: 'home' + # If given, will trigger when state has been the to state for X time. + for: + hours: 1 + minutes: 10 + seconds: 5 ```

@@ -161,26 +166,34 @@ automation: #### {% linkable_title Time trigger %} -Time can be triggered in many ways. The most common is to specify `after` and trigger at a specific point in time each day. Alternatively, you can also match if the hour, minute or second of the current time has a specific value. For example, by only setting minutes in the config to 5 it will trigger every hour when it is 5 minutes past whole. You cannot use `after` together with hour, minute or second. +Time can be triggered in many ways. The most common is to specify `after` and trigger at a specific point in time each day. Alternatively, you can also match if the hour, minute or second of the current time has a specific value. You can prefix the value with a `/` to match whenever the value is divisible by that number. You cannot use `after` together with hour, minute or second. ```yaml automation: trigger: platform: time - # All following are optional. + # Matches every hour at 5 minutes past whole + minutes: 5 + seconds: 0 + +automation 2: + trigger: + platform: time # When 'after' is used, you cannot also match on hour, minute, seconds. # Military time format. - # after: '15:32:00' - hours: 0 - minutes: 5 + after: '15:32:00' + +automation 3: + trigger: + platform: time + # You can also match on interval. This will match every 5 minutes + minutes: '/5' seconds: 0 ``` -The above example will trigger every hour on the 5 (2:05, 3:05, 4:05, etc). - #### {% linkable_title Zone trigger %} -Zone triggers can trigger when an entity is entering or leaving the zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the [OwnTracks platform](/components/device_tracker.owntracks/). +Zone triggers can trigger when an entity is entering or leaving the zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the [OwnTracks platform](/components/device_tracker.owntracks/) as well as the [iCloud platform](/components/device_tracker.icloud/). ```yaml automation: @@ -241,6 +254,12 @@ automation: platform: state entity_id: device_tracker.paulus state: not_home + # optional: trigger only if state was this for last X time. + for: + hours: 1 + minutes: 10 + seconds: 5 + ``` #### {% linkable_title Sun condition %} @@ -291,7 +310,7 @@ Valid values for `weekday` are (`sun`, `mon`, `tue`, `wed`, `thu`, `fri` & `sat` #### {% linkable_title Zone condition %} -Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the [OwnTracks platform](/components/device_tracker.owntracks/). +Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the [OwnTracks platform](/components/device_tracker.owntracks/) as well as the [iCloud platform](/components/device_tracker.icloud/). ```yaml automation: @@ -344,4 +363,4 @@ The Logbook component will show a line entry when an automation is triggered. Y ![Logbook example](/images/components/automation/logbook.png) -[template]: /getting-started/templating/ \ No newline at end of file +[template]: /topics/templating/ diff --git a/source/_components/binary_sensor.apcupsd.markdown b/source/_components/binary_sensor.apcupsd.markdown new file mode 100644 index 00000000000..4d8be1efbd1 --- /dev/null +++ b/source/_components/binary_sensor.apcupsd.markdown @@ -0,0 +1,28 @@ +--- +layout: page +title: APCUPSd Binary Sensor +description: "Instructions on how to set up an APCUPSd binary sensor within Home Assistant." +date: 2016-02-10 18:47 +sidebar: true +comments: false +sharing: true +footer: true +logo: apcupsd.png +ha_category: Binary Sensor +--- + +In addition to the [APCUPSd Sensor](/components/sensor.apcupsd/) devices, you may also create a device which is simply "on" when the UPS status is online and "off" at all other times. + +To enable this sensor, add the following lines to your `configuration.yaml` file for a GET request: + +```yaml +# Example configuration.yaml entry +binary_sensor: + - 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. diff --git a/source/_components/binary_sensor.arest.markdown b/source/_components/binary_sensor.arest.markdown index dc383882e93..0ded7c3f247 100644 --- a/source/_components/binary_sensor.arest.markdown +++ b/source/_components/binary_sensor.arest.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "aREST binary sensor" +layout: page +title: "aREST Binary Sensor" description: "Instructions how to integrate aREST binary sensors within Home Assistant." date: 2015-11-20 18:15 sidebar: true @@ -9,10 +9,11 @@ sharing: true footer: true logo: arest.png ha_category: Binary Sensor +ha_iot_class: "Local Polling" --- -The arest binary sensor platform allows you to get all data from your devices (like Arduinos with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework. +The `arest` binary sensor platform allows you to get all data from your devices (like Arduinos with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework. To use your aREST binary sensor in your installation, add the following to your `configuration.yaml` file: @@ -36,7 +37,6 @@ Accessing the URL http://IP_ADDRESS/digital/PIN_NUMBER should give you the state ```bash $ curl -X GET http://10.100.0.157/digital/9 {"return_value": 0, "id": "office1", "name": "Office", "connected": true} - ```

diff --git a/source/_components/binary_sensor.bloomsky.markdown b/source/_components/binary_sensor.bloomsky.markdown new file mode 100644 index 00000000000..305dbe86c9b --- /dev/null +++ b/source/_components/binary_sensor.bloomsky.markdown @@ -0,0 +1,25 @@ +--- +layout: page +title: "BloomSky Binary Sensor" +description: "Instructions on how to set up BloomSky binary sensors within Home Assistant." +date: 2016-02-22 07:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: bloomsky.png +ha_category: Binary Sensor +--- + +The `bloomsky` binary sensor platform allows you to get data from your BloomSky device. + +To get your BloomSky binary sensors working with Home Assistant, follow the instructions for the [BloomSky component](/components/bloomsky/) first. + +To use your BloomSky binary sensor in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +binary_sensor: + - platform: bloomsky +``` + diff --git a/source/_components/binary_sensor.command.markdown b/source/_components/binary_sensor.command_line.markdown similarity index 74% rename from source/_components/binary_sensor.command.markdown rename to source/_components/binary_sensor.command_line.markdown index dbd7ce4e3cb..f00c788d28b 100644 --- a/source/_components/binary_sensor.command.markdown +++ b/source/_components/binary_sensor.command_line.markdown @@ -1,12 +1,13 @@ --- -layout: component -title: "Command binary sensor" +layout: page +title: "Command line Binary Sensor" description: "Instructions how to integrate Command binary sensors within Home Assistant." date: 2016-01-13 12:15 sidebar: true comments: false sharing: true footer: true +logo: command_line.png ha_category: Binary Sensor --- @@ -18,11 +19,11 @@ To use your Command binary sensor in your installation, add the following to you ```yaml # Example configuration.yaml entry binary_sensor: - platform: command_sensor + platform: command_line command: cat /proc/sys/net/ipv4/ip_forward name: 'IP4 forwarding' payload_on: "1" - payload_of: "0" + payload_off: "0" value_template: '{% raw %}{{ value.x }}{% endraw %}' ``` @@ -32,7 +33,7 @@ Configuration variables: - **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used. - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". - **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF". -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} @@ -45,7 +46,7 @@ Check the state of an [SickRage](https://github.com/sickragetv/sickrage) instanc ```yaml # Example configuration.yaml entry binary_sensor: - platform: command_sensor + platform: command_line command: netstat -na | find "33322" | find /c "LISTENING" > nul && (echo "Running") || (echo "Not running") name: 'sickragerunning' payload_on: "Running" @@ -58,10 +59,20 @@ Check if [RasPlex](http://www.rasplex.com/) is `online`. ```yaml binary_sensor: - platform: command_sensor - command: 'ping rasplex.local -c 1 | grep "1 received" | wc -l' + platform: command_line + command: 'ping -c 1 rasplex.local | grep "1 received" | wc -l' name: 'is_rasplex_online' payload_on: 1 payload_off: 0 ``` +An alternative solution could look like this: + +```yaml +binary_sensor: + platform: command_line + name: Printer + command: ping -c 1 192.168.1.10 &> /dev/null && echo success || echo fail + payload_on: "success" + payload_off: "fail" +``` diff --git a/source/_components/binary_sensor.http.markdown b/source/_components/binary_sensor.http.markdown new file mode 100644 index 00000000000..7e7dfe1e9a8 --- /dev/null +++ b/source/_components/binary_sensor.http.markdown @@ -0,0 +1,78 @@ +--- +layout: page +title: "HTTP Binary Sensor" +description: "Instructions how to integrate HTTP binary sensors within Home Assistant." +date: 2016-02-05 12:15 +sidebar: true +comments: false +sharing: true +footer: true +logo: http.png +ha_category: Binary Sensor +--- + +The URL for a binary sensor looks like the example below: + +```bash +http://IP_ADDRESS:8123/api/states/binary_sensor.DEVICE_NAME +``` + +

+You should choose a unique device name (DEVICE_NAME) to avoid clashes with other devices. +

+ +The JSON payload must contain the new state and can have a friendly name. The friendly name is used in the frontend to name the sensor. + +```json +{"state": "on", "attributes": {"friendly_name": "Radio"}} +``` + +For a quick test `curl` can be useful to "simulate" a device. + +```bash +$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \ + -d '{"state": "off", "attributes": {"friendly_name": "Radio"}}' \ + http://localhost:8123/api/states/binary_sensor.radio +``` + +To check if the sensor is working, use again `curl` to retrieve the [current state](/developers/rest_api/#get-apistatesltentity_id). + +```bash +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ + http://localhost:8123/api/states/binary_sensor.radio +{ + "attributes": { + "friendly_name": "Radio" + }, + "entity_id": "binary_sensor.radio", + "last_changed": "16:45:51 05-02-2016", + "last_updated": "16:45:51 05-02-2016", + "state": "off" +} +``` + +## {% linkable_title Examples %} + +In this section you find some real life examples of how to use this sensor. Beside `curl`. + +### {% linkable_title Using Python request module %} + +As already shown on the [API](/developers/rest_api/) page, it's very simple to use Python and the [Requests](http://docs.python-requests.org/en/latest/) module for the interaction with Home Assistant. + +```python +response = requests.post( + 'http://localhost:8123/api/states/binary_sensor.radio', + headers={'x-ha-access': 'YOUR_PASSWORD', 'content-type': 'application/json'}, + data=json.dumps({'state': 'on', 'attributes': {'friendly_name': 'Radio'}})) +print(response.text) +``` + +### {% linkable_title Using `httpie` %} + +[`httpie`](https://github.com/jkbrzt/httpie) is a user-friendly CLI HTTP client. + +```bash +$ http -v POST http://localhost:8123/api/states/binary_sensor.radio \ + x-ha-access:YOUR_PASSWORD state=off \ + attributes:='{"friendly_name": "Radio"}' +``` diff --git a/source/_components/binary_sensor.markdown b/source/_components/binary_sensor.markdown index 477642ec958..48c8dd29afd 100644 --- a/source/_components/binary_sensor.markdown +++ b/source/_components/binary_sensor.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Binary Sensor" description: "Instructions how to setup your binary sensors with Home Assistant." date: 2015-11-20 14:00 @@ -13,4 +13,21 @@ Binary sensors are gathering information about state of switches, contacts, pins Knowing that there are only two states allows Home Assistant to represent the sensor better in the frontend. +Most binary sensors support the `SENSOR_CLASSES` which let you specify the type of your sensor. The following types are supported: + +- **None**: Generic on/off +- **opening**: Door, window, etc +- **motion**: Motion sensor +- **gas'**: CO, CO2, etc +- **smoke'**: Smoke detector +- **moisture**: Specifically a wetness sensor +- **light**: Lightness threshold +- **power**: Power, over-current, etc +- **safety**: Generic on=unsafe, off=safe +- **heat**: On means hot (or too hot) +- **cold**: On means cold (or too cold) +- **moving**: On means moving, Off means stopped +- **sound**: On means sound detected, Off means no sound +- **vibration**: On means vibration detected, Off means no vibration + For analog sensors please check the [component overview](https://home-assistant.io/components/#sensor). diff --git a/source/_components/binary_sensor.mqtt.markdown b/source/_components/binary_sensor.mqtt.markdown index b80fda168ad..49b82140a5b 100644 --- a/source/_components/binary_sensor.mqtt.markdown +++ b/source/_components/binary_sensor.mqtt.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "MQTT binary sensor" +layout: page +title: "MQTT Binary Sensor" description: "Instructions how to integrate MQTT binary sensors within Home Assistant." date: 2015-05-30 23:21 sidebar: true @@ -24,7 +24,7 @@ binary_sensor: name: "MQTT Sensor" qos: 0 payload_on: "ON" - payload_of: "OFF" + payload_off: "OFF" value_template: '{% raw %}{{ value.x }}{% endraw %}' ``` @@ -35,7 +35,7 @@ Configuration variables: - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. - **payload_on** (*Optional*): The payload that represents on state. Default is "ON". - **payload_off** (*Optional*): The payload that represents state. Default is "OFF". -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually: diff --git a/source/_components/binary_sensor.mysensors.markdown b/source/_components/binary_sensor.mysensors.markdown new file mode 100644 index 00000000000..291392fe477 --- /dev/null +++ b/source/_components/binary_sensor.mysensors.markdown @@ -0,0 +1,40 @@ +--- +layout: page +title: "MySensors Binary Sensor" +description: "Instructions how to integrate MySensors binary sensors into Home Assistant." +date: 2016-02-28 01:20 +0100 +sidebar: true +comments: false +sharing: true +footer: true +logo: mysensors.png +ha_category: Binary Sensor +featured: false +--- + +Integrates MySensors binary sensors into Home Assistant. See the [main component] for configuration instructions. + +The following sensor types are supported: + +##### MySensors version 1.4 and higher + +S_TYPE | V_TYPE +-------------------|--------------------------------------- +S_DOOR | V_TRIPPED +S_MOTION | V_TRIPPED +S_SMOKE | V_TRIPPED + +##### MySensors version 1.5 and higher + +S_TYPE | V_TYPE +---------------|---------------------------------- +S_SPRINKLER | V_TRIPPED +S_WATER_LEAK | V_TRIPPED +S_SOUND | V_TRIPPED +S_VIBRATION | V_TRIPPED +S_MOISTURE | V_TRIPPED + +For more information, visit the [serial api] of MySensors. + +[main component]: /components/mysensors/ +[serial api]: https://www.mysensors.org/download/serial_api_15 diff --git a/source/_components/binary_sensor.nest.markdown b/source/_components/binary_sensor.nest.markdown new file mode 100644 index 00000000000..014b0c3f727 --- /dev/null +++ b/source/_components/binary_sensor.nest.markdown @@ -0,0 +1,47 @@ +--- +layout: page +title: "Nest Binary Sensor" +description: "Instructions how to integrate Nest binary sensors within Home Assistant." +date: 2016-01-26 08:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: nest_thermostat.png +ha_category: Binary Sensor +--- + + +The `nest` binary sensor platform let you monitor various states of a thermostat from [Nest](https://nest.com). + +To set it up, add the following information to your `configuration.yaml` file: + +```yaml +binary_sensor: + platform: nest + monitored_conditions: + - 'fan' + - 'hvac_ac_state' + - 'hvac_aux_heater_state' + - 'hvac_heat_x2_state' + - 'hvac_heat_x3_state' + - 'hvac_alt_heat_state' + - 'hvac_alt_heat_x2_state' + - 'hvac_emer_heat_state' + - 'online' +``` + +Configuration variables: + +- **monitored_conditions** array (*Required*): States to monitor. + - 'fan' + - 'hvac_ac_state' + - 'hvac_aux_heater_state' + - 'hvac_heat_x2_state' + - 'hvac_heat_x3_state' + - 'hvac_alt_heat_state' + - 'hvac_alt_heat_x2_state' + - 'hvac_emer_heat_state' + - 'online' + +

You must have the [Nest component](/components/nest/) configured to use this sensor.

diff --git a/source/_components/binary_sensor.nx584.markdown b/source/_components/binary_sensor.nx584.markdown new file mode 100644 index 00000000000..65f8ace47b7 --- /dev/null +++ b/source/_components/binary_sensor.nx584.markdown @@ -0,0 +1,51 @@ +--- +layout: page +title: NX584 zones +description: "Instructions on how to set up nx584 zones as sensors" +date: 2016-02-18 20:47 +sidebar: true +comments: false +sharing: true +footer: true +logo: networx.png +ha_category: Binary Sensor +ha_iot_class: "Local Push" +--- + +The `nx584` platform provides integration with GE, Caddx, Interlogix (and other brands) alarm panels that support the NX584 interface module (or have it built in). Supported panels include NX4/6/8/8E. Actual integration is done through [pynx584](http://github.com/kk7ds/pynx584) which is required for this to work. + +Enabling this sensor platform exposes all of your zones as binary sensors, which provides visibility through the UI as well as the ability to trigger automation actions instantly when something happens like a door opening, or a motion sensor trigger. + +To enable this, add the following lines to your `configuration.yaml`: + +```yaml +binary_sensor: + platform: nx584 + host: ADDRESS + exclude_zones: + - ZONE ... + zone_types: + ZONE: TYPE +``` + +Configuration variables: + +- **host** (*Optional*): This is the host connection string (host:port) for the nx584 server process. If unset, it is assumed to be `localhost:5007`, which will work if the server process is running on the same system as home-assistant. +- **exclude_zones** (*Optional*): This is a list of zone numbers that should be excluded. Use this to avoid exposing a zone that is of no interest, unconnected, etc. +- **zone_types** (*Optional*): This is a list of zone numbers mapped to zone types. Use this to designate zones as doors, motion sensors, smoke detectors, etc. The list of available zone types relevant to alarm zones are: `opening`, `motion`, `gas`, `smoke`, `moisture`, `safety`. + +Example configuration: + +```yaml +binary_sensor: + platform: nx584 + host: 192.168.1.10:5007 + exclude_zones: + - 3 + - 5 + zone_types: + 1: opening + 2: opening + 4: motion + 6: moisture +``` \ No newline at end of file diff --git a/source/_components/binary_sensor.rest.markdown b/source/_components/binary_sensor.rest.markdown index 6cb56043db0..e1fac78ddce 100644 --- a/source/_components/binary_sensor.rest.markdown +++ b/source/_components/binary_sensor.rest.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "RESTful binary sensor" +layout: page +title: "RESTful Binary Sensor" description: "Instructions how to integrate REST binary sensors into Home Assistant." date: 2015-12-17 19:10 sidebar: true @@ -17,7 +17,7 @@ To enable this sensor, add the following lines to your `configuration.yaml` file ```yaml # Example configuration.yaml entry -sensor: +binary_sensor: platform: rest resource: http://IP_ADDRESS/ENDPOINT method: GET @@ -29,7 +29,7 @@ or for a POST request: ```yaml # Example configuration.yaml entry -sensor: +binary_sensor: platform: rest resource: http://IP_ADDRESS/ENDPOINT method: POST @@ -42,7 +42,7 @@ Configuration variables: - **resource** (*Required*): The resource or endpoint that contains the value. - **method** (*Optional*): The method of the request. Default is GET. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. - **payload** (*Optional*): The payload to send with a POST request. Usualy formed as a dictionary. - **name** (*Optional*): Name of the REST binary sensor. diff --git a/source/_components/binary_sensor.rpi_gpio.markdown b/source/_components/binary_sensor.rpi_gpio.markdown index 4bc2f7581c4..dc2c0b8888a 100644 --- a/source/_components/binary_sensor.rpi_gpio.markdown +++ b/source/_components/binary_sensor.rpi_gpio.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Raspberry PI GPIO sensor" +layout: page +title: "Raspberry PI GPIO Binary Sensor" description: "Instructions how to integrate the GPIO sensor capability of a Raspberry PI into Home Assistant." date: 2015-08-30 19:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Sensor --- -The rpi_gpio binary sensor platform allows you to read sensor values of the GPIOs of your [Raspberry Pi](https://www.raspberrypi.org/). +The `rpi_gpio` binary sensor platform allows you to read sensor values of the GPIOs of your [Raspberry Pi](https://www.raspberrypi.org/). To use your Raspberry Pi's GPIO in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/binary_sensor.tcp.markdown b/source/_components/binary_sensor.tcp.markdown new file mode 100644 index 00000000000..e328ffb034f --- /dev/null +++ b/source/_components/binary_sensor.tcp.markdown @@ -0,0 +1,43 @@ +--- +layout: page +title: TCP Binary Sensor +description: "Instructions on how to set up TCP binary sensors within Home Assistant." +date: 2016-02-22 11:05 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Binary Sensor +--- + + +The TCP Binary Sensor is a type of [TCP Sensor](/components/sensor.tcp/) which is either "off" or "on". In order to use this sensor type, in addition to the configuration for the TCP Sensor, you must supply a `value_on` value to represent what is returned when the device is turned on. + +To enable this sensor, add the following lines to your `configuration.yaml`: + +```yaml +sensor: +# Example configuration.yaml entry + - platform: tcp + name: TCP Binary Sensor + host: IP_ADDRESS + port: PORT + payload: "r State\n" + value_on: 1 + timeout: 5 + value_template: "{% raw %}{{ value.split(';')[0] }}{% endraw %}" + unit: UNIT_OF_MEASUREMENT +``` + +Configuration options for the a TCP Sensor: + +- **name** (*Required*): The name you'd like to give the sensor in Home Assistant. +- **host** (*Required*): The hostname/IP address to connect to. +- **port** (*Required*): The port to connect to the host on. +- **payload** (*Required*): What to send to the host in order to get the response we're interested in. +- **value_on** (*Required*): The value returned when the device is "on". +- **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to 10. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. By default it's assumed that the entire response is the value. +- **unit** (*Optional*): The unit of measurement to use for the value. +- **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to 1024. + diff --git a/source/_components/binary_sensor.template.markdown b/source/_components/binary_sensor.template.markdown new file mode 100644 index 00000000000..f325ba4de4d --- /dev/null +++ b/source/_components/binary_sensor.template.markdown @@ -0,0 +1,51 @@ +--- +layout: page +title: "Template Binary Sensor" +description: "Instructions how to integrate Template binary sensors into Home Assistant." +date: 2016-02-25 15:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Binary Sensor +--- + +The `template` platform supports sensors which breaks out the state and `state_attributes` from other entities. + +To enable Template sensors in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +binary_sensor: + platform: template + sensors: + sun_up: + value_template: {% raw %}'{{ states.sun.sun.attributes.elevation > 0}}'{% endraw %} + friendly_name: 'Sun is up' +``` + +Configuration variables: + +- **sensors** array (*Required*): List of your sensors. + - **friendly_name** (*Optional*): Name to use in the Frontend. + - **sensor_class** (*Optional*): Defines the class of the sensor (motion, heat, moisture, etc) + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. + + +## {% linkable_title Examples %} + +In this section you find some real life examples of how to use this sensor. + +### {% linkable_title Sensor threshold %} + +This example indicates true if a sensor is above a given threshold. Assuming a sensor of `furnace` that provides a current reading for the fan motor, we can determine if the furnace is running by checking that it is over some threshold: + +```yaml +sensor: + platform: template + sensors: + furnace_on: + value_template: {{ states.sensor.furnace.state > 2.5 }} + friendly_name: 'Furnace Running + sensor_class: heat +``` diff --git a/source/_components/binary_sensor.wink.markdown b/source/_components/binary_sensor.wink.markdown new file mode 100644 index 00000000000..4f5cebe235b --- /dev/null +++ b/source/_components/binary_sensor.wink.markdown @@ -0,0 +1,18 @@ +--- +layout: page +title: "Wink Binary Sensor" +description: "Instructions how to setup the Wink binary sensors within Home Assistant." +date: 2015-01-20 22:36 +sidebar: true +comments: false +sharing: true +footer: true +logo: wink.png +ha_category: Binary Sensor +--- + + +The Wink binary sensor platform allows you to get data from your [Wink](http://www.wink.com/) binary sensors. + +The requirement is that you have setup your [Wink hub](/components/wink/). + diff --git a/source/_components/binary_sensor.zigbee.markdown b/source/_components/binary_sensor.zigbee.markdown new file mode 100644 index 00000000000..e6fb6a1ddb2 --- /dev/null +++ b/source/_components/binary_sensor.zigbee.markdown @@ -0,0 +1,35 @@ +--- +layout: page +title: "ZigBee Binary Sensor" +description: "Instructions on how to set up ZigBee binary sensors within Home Assistant." +date: 2016-01-28 12:38 +sidebar: true +comments: false +sharing: true +footer: true +logo: zigbee.png +ha_category: Binary Sensor +--- + +A `zigbee` binary sensor in this context is a device connected to one of the digital input pins on a [ZigBee](http://www.zigbee.org/) module. The states reported by such a device are limited to 'on' or 'off'. By default, a binary sensor is considered 'on' when the ZigBee device's digital input pin is held 'high' and considered 'off' when it is held 'low'. This behaviour can be inverted by setting the `on_state` configuration variable to `low`. + +To enable the ZigBee binary sensors in your installation, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +binary_sensor: + - platform: zigbee + name: Hallway PIR Sensor + pin: 0 + address: 0013A20040892FA2 + on_state: low +``` + +Configuration variables: + +- **name** (*Required*): The name you'd like to give the binary sensor in Home Assistant. +- **platform** (*Required*): Set to `zigbee`. +- **pin** (*Required*): The number identifying which pin to use. +- **address**: The long 64bit address of the remote ZigBee device whose digital input pin you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's pins. +- **on_state**: Either `high` (default) or `low`, depicting whether the binary sensor is considered 'on' when the pin is 'high' or 'low'. + diff --git a/source/_components/binary_sensor.zwave.markdown b/source/_components/binary_sensor.zwave.markdown new file mode 100644 index 00000000000..d2934cf5c67 --- /dev/null +++ b/source/_components/binary_sensor.zwave.markdown @@ -0,0 +1,14 @@ +--- +layout: page +title: "Z-Wave Binary Sensor" +description: "Instructions how to setup the Z-Wave binary sensors within Home Assistant." +date: 2016-02-22 07:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: z-wave.png +ha_category: Binary Sensor +--- + +To get your Z-Wave binary sensors working with Home Assistant, follow the instructions for the general [Z-Wave component](/components/zwave/). diff --git a/source/_components/bloomsky.markdown b/source/_components/bloomsky.markdown new file mode 100644 index 00000000000..7b326baf8a4 --- /dev/null +++ b/source/_components/bloomsky.markdown @@ -0,0 +1,27 @@ +--- +layout: page +title: "BloomSky" +description: "Instructions how to integrate the BloomSky within Home Assistant." +date: 2016-02-03 20:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: bloomsky.png +ha_category: Hub +--- + + +The `bloomsky` component allows you to access your [BloomSky](http://www.insteon.com/) weather station's [sensors](/components/sensor.bloomsky) and [camera](/components/camera.bloomsky) from Home Assistant. + +To integrate your BloomSky hub with Home Assistant, add the following section to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +bloomsky: + api_key: YOUR_API_KEY +``` + +Configuration variables: + +- **api_key** *Required*: Your BloomSky API key, obtained from your [BloomSky dashboard](https://dashboard.bloomsky.com) (click `developers` in the bottom left of the screen) diff --git a/source/_components/browser.markdown b/source/_components/browser.markdown index 273c3ae7e40..36bb6176789 100644 --- a/source/_components/browser.markdown +++ b/source/_components/browser.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Browser" description: "Instructions how to setup the browser component with Home Assistant." date: 2015-01-24 14:39 @@ -7,12 +7,12 @@ sidebar: true comments: false sharing: true footer: true -logo: browser.png +logo: home-assistant.png ha_category: Other --- -The browser component provides a service to open urls in the default browser on the host machine. +The `browser` component provides a service to open URLs in the default browser on the host machine. To load this component, add the following lines to your `configuration.yaml`: @@ -21,8 +21,19 @@ To load this component, add the following lines to your `configuration.yaml`: browser: ``` -#### Service `browser/browse_url` +#### {% linkable_title Service `browser/browse_url` %} | Service data attribute | Optional | Description | | ---------------------- | -------- | ----------- | | `url` | no | The url to open + + +### {% linkable_title Usage %} + +To use this service, choose **Call Service** from the **Developer Tools**. Choose the service *browser/browse_url* from the list of **Available services:** and enter the URL into the **Service Data** field and hit **CALL SERVICE**. + +```json +{"url": "http://www.google.com"} +``` + +This will open the given URL on the host machine. diff --git a/source/_components/camera.bloomsky.markdown b/source/_components/camera.bloomsky.markdown new file mode 100644 index 00000000000..4a7e9f4b8bb --- /dev/null +++ b/source/_components/camera.bloomsky.markdown @@ -0,0 +1,23 @@ +--- +layout: page +title: "BloomSky Camera" +description: "Instructions how to integrate the BloomSky camera within Home Assistant." +date: 2016-02-03 20:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: bloomsky.png +ha_category: Camera +--- + + +The `bloomsky` camera component allows you to view the current photo created by the camera in the [BloomSky](https://www.bloomsky.com) weather station. This can work in concert with [BloomSky sensors](/components/sensor.bloomsky). + +To enable this camera in your installation, set up the [BloomSky component](/components/bloomsky) with your API key and add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +camera: + platform: bloomsky +``` diff --git a/source/_components/camera.foscam.markdown b/source/_components/camera.foscam.markdown index 9fd47c6a9fc..906fb622a1b 100644 --- a/source/_components/camera.foscam.markdown +++ b/source/_components/camera.foscam.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Foscam IP camera" +layout: page +title: "Foscam IP Camera" description: "Instructions how to integrate Foscam IP cameras within Home Assistant." date: 2015-09-17 08:01 sidebar: true @@ -12,7 +12,7 @@ ha_category: Camera --- -The foscam platform allows you to watch the live stream of your [Foscam](http://www.foscam.com/) IP camera in Home Assistant. +The `foscam` platform allows you to watch the live stream of your [Foscam](http://www.foscam.com/) IP camera in Home Assistant. To enable your Foscam IP camera in your installation, add the following to your `configuration.yaml` file: @@ -34,4 +34,7 @@ Configuration variables: - **name** *Optional*: This parameter allows you to override the name of your camera. - **username** *Required*: The username for accessing your camera. - **password** *Required*: The password for accessing your camera. - + - **Note**: There seems to be some issues within Foscam with lengthy passwords and passwords containing certain symbols. Be sure to check your camera's documentation. + +### {% linkable_title Control Foscam PTZ (Pan/Tilt/Zoom) - Home/Away %} + Foscam Webcams which support CGI Commands can be controlled by Home Assistant ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). For an example of how this can be done, see the [Foscam IP Camera Pan, Tilt, Zoom Control](/cookbook/foscam_away_mode_PTZ/) Cookbook entry. diff --git a/source/_components/camera.generic.markdown b/source/_components/camera.generic.markdown index 065207f37b8..3d88569b683 100644 --- a/source/_components/camera.generic.markdown +++ b/source/_components/camera.generic.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Generic IP Camera" description: "Instructions how to integrate IP cameras within Home Assistant." date: 2015-07-11 0:36 diff --git a/source/_components/camera.markdown b/source/_components/camera.markdown index cfcc0393b24..e56503400c1 100644 --- a/source/_components/camera.markdown +++ b/source/_components/camera.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Camera" description: "Instructions how to integrate cameras within Home Assistant." date: 2015-11-09 08:36 diff --git a/source/_components/camera.mjpeg.markdown b/source/_components/camera.mjpeg.markdown index 8fd297d0e41..4f166f044c4 100644 --- a/source/_components/camera.mjpeg.markdown +++ b/source/_components/camera.mjpeg.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Generic MJPEG IP Camera" description: "Instructions how to integrate IP cameras within Home Assistant." date: 2015-11-09 08:36 @@ -11,7 +11,7 @@ ha_category: Camera --- -The mjpeg component allows you to integrate IP cameras which are capable to stream their video with MJPEG into Home Assistant. +The `mjpeg` component allows you to integrate IP cameras which are capable to stream their video with MJPEG into Home Assistant. To enable this sensor in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/camera.uvc.markdown b/source/_components/camera.uvc.markdown new file mode 100644 index 00000000000..0bd523537d7 --- /dev/null +++ b/source/_components/camera.uvc.markdown @@ -0,0 +1,33 @@ +--- +layout: page +title: "UniFi Video Camera" +description: "Instructions how to integrate UVC cameras within Home Assistant." +date: 2016-02-07 10:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: ubiquiti.png +ha_category: Camera +--- + + +The `uvc` component allows you to integrate [UniFi Video Camera (UVC)](https://www.ubnt.com/unifi-video/unifi-video-camera/) into Home Assistant. + +To enable a UVC camera in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +camera: + platform: uvc + nvr: IP_ADDRESS + port: PORT + key: APIKEY +``` + +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. + diff --git a/source/_components/configurator.markdown b/source/_components/configurator.markdown index d564089bc2c..44c594c9edb 100644 --- a/source/_components/configurator.markdown +++ b/source/_components/configurator.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Configurator" description: "Instructions how to integrate the configurator in your components." date: 2015-03-15 00:51 diff --git a/source/_components/conversation.markdown b/source/_components/conversation.markdown index 7851621520d..720b6f46be9 100644 --- a/source/_components/conversation.markdown +++ b/source/_components/conversation.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Conversation" description: "Instructions how to have conversations with your Home Assistant." date: 2015-03-15 00:39 @@ -7,8 +7,8 @@ sidebar: true comments: false sharing: true footer: true -logo: conversation.png -ha_category: "Other" +logo: home-assistant.png +ha_category: "Voice" --- @@ -21,7 +21,7 @@ To enable the conversion option in your installation, add the following to your conversation: ``` -When this component is active and you are using a supported browser voice commands will be activated in the frontend. Browse to [the demo](/demo/) in Chrome to see it in action. +When this component is active and you are using a supported browser voice commands will be activated in the frontend. Browse to [the demo](/demo/) using Chrome to see it in action.

diff --git a/source/_components/demo.markdown b/source/_components/demo.markdown new file mode 100644 index 00000000000..2893170a23b --- /dev/null +++ b/source/_components/demo.markdown @@ -0,0 +1,41 @@ +--- +layout: page +title: "Demo platforms" +description: "Instructions how to use the Platform demos with Home Assistant." +date: 2016-02-24 07:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: home-assistant.png +ha_category: Other +--- + + +The `demo` platform allows you to use components which are providing a demo of their implementation. The demo entities are dummies but show you how the acutal platform looks like. This way you can run own demonstration instance like the online [Home Assistant demo](https://home-assistant.io/demo/) or `hass --demo-mode` but combined with your own real/functional platforms. + +Available demo platforms: + +- [Alarm control panel](/components/alarm_control_panel/) (`alarm_control_panel`) +- [Binary sensor](/components/binary_sensor/) (`binary_sensor`) +- [Camera](/components/camera/) (`camera`) +- [Garage door](/components/garage_door/) (`garage_door`) +- [Light](/components/light/) (`light`) +- [Lock](/components/lock/) (`lock`) +- [Notification](/components/notify/) (`notify`) +- [Roller shutter](/components/rollershutter/) (`rollershutter`) +- [Sensor](/components/sensor/) (`sensor`) +- [Switch](/components/switch/) (`switch`) +- [Thermostat](/components/thermostat/) (`thermostat`) + +To integrate a demo platform in Home Assistant, add the following section to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +[component]: + - platform: demo +``` + +Configuration variables: + +- **[component]** (*Required*): The name of the component as stated in the listing above the configuration example. diff --git a/source/_components/device_sun_light_trigger.markdown b/source/_components/device_sun_light_trigger.markdown index 1b8cbc18655..dd2b298b2e1 100644 --- a/source/_components/device_sun_light_trigger.markdown +++ b/source/_components/device_sun_light_trigger.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Presence based lights" description: "Instructions how to automate your lights with Home Assistant." date: 2015-01-20 22:36 diff --git a/source/_components/device_tracker.actiontec.markdown b/source/_components/device_tracker.actiontec.markdown index d3d5f198740..774b7ec2823 100644 --- a/source/_components/device_tracker.actiontec.markdown +++ b/source/_components/device_tracker.actiontec.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Actiontec" description: "Instructions how to integrate Actiontec routers into Home Assistant." date: 2015-08-30 19:00 diff --git a/source/_components/device_tracker.aruba.markdown b/source/_components/device_tracker.aruba.markdown index 8a65953e5fe..4d76b30dd50 100644 --- a/source/_components/device_tracker.aruba.markdown +++ b/source/_components/device_tracker.aruba.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Aruba" description: "Instructions how to integrate Aruba routers into Home Assistant." date: 2015-08-31 08:45 diff --git a/source/_components/device_tracker.asuswrt.markdown b/source/_components/device_tracker.asuswrt.markdown index 9b518a28719..e1590a59c93 100644 --- a/source/_components/device_tracker.asuswrt.markdown +++ b/source/_components/device_tracker.asuswrt.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "ASUSWRT" description: "Instructions how to integrate ASUSWRT based routers into Home Assistant." date: 2015-08-06 19:00 @@ -12,7 +12,7 @@ ha_category: Presence Detection --- -This platform offers presence detection by looking at connected devices to a [ASUSWRT](http://event.asus.com/2013/nw/ASUSWRT/) based router. +The `asuswrt` platform offers presence detection by looking at connected devices to a [ASUSWRT](http://event.asus.com/2013/nw/ASUSWRT/) based router.

This device tracker needs telnet to be enabled on the router. diff --git a/source/_components/device_tracker.ddwrt.markdown b/source/_components/device_tracker.ddwrt.markdown index 741959d19e1..5eee59d85f2 100644 --- a/source/_components/device_tracker.ddwrt.markdown +++ b/source/_components/device_tracker.ddwrt.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "DD-WRT" description: "Instructions how to integrate DD-WRT based routers into Home Assistant." date: 2015-05-11 09:00 diff --git a/source/_components/device_tracker.fritz.markdown b/source/_components/device_tracker.fritz.markdown index 32658f793bc..2d1a0d11ce3 100644 --- a/source/_components/device_tracker.fritz.markdown +++ b/source/_components/device_tracker.fritz.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "FRITZ!Box" description: "Instructions how to integrate AVM FRITZ!Box based routers into Home Assistant." date: 2015-12-13 19:00 @@ -15,7 +15,7 @@ ha_category: Presence Detection The `fritz` platform offers presence detection by looking at connected devices to a [AVM Fritz!Box](http://avm.de/produkte/fritzbox/) based router.

-It might be necessary to install additional packages: $ sudo apt-get install libxslt-dev libxml2-dev +It might be necessary to install additional packages: $ sudo apt-get install libxslt-dev libxml2-dev python3-lxml

To use an Fritz!Box router in your installation, add the following to your `configuration.yaml` file: @@ -23,7 +23,7 @@ To use an Fritz!Box router in your installation, add the following to your `conf ```yaml # Example configuration.yaml entry device_tracker: - platform: asuswrt + platform: fritz host: YOUR_ROUTER_IP username: YOUR_ADMIN_USERNAME password: YOUR_ADMIN_PASSWORD diff --git a/source/_components/device_tracker.icloud.markdown b/source/_components/device_tracker.icloud.markdown index 39299c46308..ecb6c928875 100644 --- a/source/_components/device_tracker.icloud.markdown +++ b/source/_components/device_tracker.icloud.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "iCloud" description: "Instructions how to use iCloud to track devices in Home Assistant." date: 2015-12-15 1000 @@ -14,7 +14,7 @@ ha_category: Presence Detection The `icloud` platform allows you to detect presence using the [iCloud](https://www.icloud.com/) service. iCloud allows users to track their location on iOS devices. -It does require that your device has beend registered with "Find My iPhone". +It does require that your device is registered with "Find My iPhone". To integrate iCloud in Home Assistant, add the following section to your `configuration.yaml` file: diff --git a/source/_components/device_tracker.locative.markdown b/source/_components/device_tracker.locative.markdown index 17df285ccfa..dd1d40fc169 100644 --- a/source/_components/device_tracker.locative.markdown +++ b/source/_components/device_tracker.locative.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Locative" description: "Instructions how to use Locative to track devices in Home Assistant." date: 2015-10-13 19:00 diff --git a/source/_components/device_tracker.luci.markdown b/source/_components/device_tracker.luci.markdown index 3db44706c83..81e60df206c 100644 --- a/source/_components/device_tracker.luci.markdown +++ b/source/_components/device_tracker.luci.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "OpenWRT (luci)" description: "Instructions how to integrate OpenWRT routers into Home Assistant." date: 2015-03-23 19:59 diff --git a/source/_components/device_tracker.markdown b/source/_components/device_tracker.markdown index bb36d19013d..f65447717db 100644 --- a/source/_components/device_tracker.markdown +++ b/source/_components/device_tracker.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Device Tracker" description: "Instructions how to setup device tracking within Home Assistant." date: 2015-01-20 22:36 diff --git a/source/_components/device_tracker.mqtt.markdown b/source/_components/device_tracker.mqtt.markdown index 70c71cdebe6..7c0eed7d1d4 100644 --- a/source/_components/device_tracker.mqtt.markdown +++ b/source/_components/device_tracker.mqtt.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "MQTT device tracker" +layout: page +title: "MQTT Device Tracker" description: "Instructions how to use MQTT to track devices in Home Assistant." date: 2015-09-19 20:41 sidebar: true diff --git a/source/_components/device_tracker.netgear.markdown b/source/_components/device_tracker.netgear.markdown index a5a508ba4d4..8c4febce592 100644 --- a/source/_components/device_tracker.netgear.markdown +++ b/source/_components/device_tracker.netgear.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Netgear" description: "Instructions how to integrate Netgear routers into Home Assistant." date: 2015-03-23 19:59 @@ -9,6 +9,7 @@ sharing: true footer: true logo: netgear.png ha_category: Presence Detection +ha_iot_class: "Local Polling" --- diff --git a/source/_components/device_tracker.nmap_scanner.markdown b/source/_components/device_tracker.nmap_scanner.markdown index f5fb0f42685..e2fad493eaa 100644 --- a/source/_components/device_tracker.nmap_scanner.markdown +++ b/source/_components/device_tracker.nmap_scanner.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Nmap" description: "Instructions how to integrate Nmap into Home Assistant." date: 2015-03-23 19:59 diff --git a/source/_components/device_tracker.owntracks.markdown b/source/_components/device_tracker.owntracks.markdown index 4661b0f11a3..6fceeda3805 100644 --- a/source/_components/device_tracker.owntracks.markdown +++ b/source/_components/device_tracker.owntracks.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Owntracks" description: "Instructions how to use Owntracks to track devices in Home Assistant." date: 2015-09-22 07:00 @@ -23,8 +23,43 @@ To integrate Owntracks in Home Assistant, add the following section to your `con # Example configuration.yaml entry device_tracker: platform: owntracks + max_gps_accuracy: 200 ``` -There is no further configuration needed for tracking Owntracks devices. +Configuration variables: +- **max_gps_accuracy** (*Optional*): Sometimes Owntracks can report GPS location with a very low accuracy (few kilometers). That can trigger false zoning in your Home Assistant installation. With the parameter, you can filter these GPS reports. The number has to be in meter. For example, if you put 200 only GPS report with an accuracy under 200 will be take in account. + +### {% linkable_title Using Owntracks with other device trackers %} Owntracks can also be used with other device trackers, such as [Nmap](/components/device_tracker.nmap_scanner/) or [Netgear](/components/device_tracker.netgear/). To do this, fill in the `mac` field to the Owntracks entry in `known_devices.yaml` with the MAC address of the device you want to track. This way the state of the device will be determined by the source that reported last. + +### {% linkable_title Using Owntracks regions %} +Owntracks can track regions, and send region entry and exit information to Home Assistant(HA). You set up a region in the Owntracks app which you should name the same as your HA Zone, and then make sure to turn on the `share` option for the region in the owntracks app. Please see the [owntracks documentation](http://owntracks.org/booklet/guide/waypoints/) + +Home Assistant will use the enter and leave messages to set your zone location. Your location will be set to the center of zone when you enter. Location updates from OwnTracks will be ignored while you are inside a zone. + +When you exit a zone, Home Assistant will start using location updates to track you again. To make sure that Home Assistant correctly exits a zone (which it calculates based on your GPS co-ordinates), you may want to set your Zone radius in HA to be slightly smaller that the Owntracks region radius. + +### {% linkable_title Using Owntracks regions - forcing Owntracks to update using %}iBeacons +When run in the usual `significant changes mode` (which is kind to your phone battery), Owntracks sometimes doesn't update your location as quickly as you'd like when you arrive at a zone. This can be annoying if you want to trigger an automation when you get home. You can improve the situation using iBeacons. + +iBeacons are simple bluetooth devices that send out an "I'm here" message. They are supported by IOS and some Android devices. Owntracks explain more [here](http://owntracks.org/booklet/guide/beacons/) + +When you enter an iBeacon region, Owntracks will send a `region enter` message to HA as described above. So if you want to have an event triggered when you arrive home, you can put an iBeacon outside your front door. If you set up an OwnTracks iBeacon region called `home` then getting close to the beacon will trigger an update to HA that will set your zone to be `home`. + +When you exit an iBeacon region HA will switch back to using GPS to determine your location. Depending on the size of your zone, and the accuracy of your GPS location this may change your HA zone. + +Sometimes Owntracks will lose connection with an iBeacon for a few seconds. If you name your beacon starting with `-` Owntracks will wait longer before deciding it has exited the beacon zone. HA will ignore the `-` when it matches the Owntracks region with Zones. So if you call your Owntracks region `-home` then HA will recognise it as `home`, but you will have a more stable iBeacon connection. + +### {% linkable_title Using Owntracks iBeacons to track devices %} +iBeacons don't need to be stationary. You could put one on your key ring, or in your car. + +When your phone sees a mobile iBeacon that it knows about, it will tell HA the location of that iBeacon. If your phone moves while you are connected to the iBeacon, HA will update the location of the iBeacon. But when your phone loses the connection, HA will stop updating the iBeacon location. + +To use mobile iBeacons with HA, you just set up a region that doesn't match your Zone names. If HA sees an entry event for a iBeacon region that doesn't match a Zone name (say `keys`) - it will start tracking it, calling the device `device_tracker.beacon_keys`). + +This allows you to write zone automations for devices that can't track themselves (for example `alert me if I leave the house and my keys are still at home`). Another example would be `open the gates if my car arrives home`. + +### {% linkable_title Using mobile and fixed iBeacons together %} +You can use iBeacons of both types together, so if you have a Zone `drive` with an iBeacon region called `-drive` and you arrive home with a mobile iBeacon called `-car`, then `device_tracker.beacon_car` will be set to a state of `drive`. + diff --git a/source/_components/device_tracker.snmp.markdown b/source/_components/device_tracker.snmp.markdown index d5ef35f20fc..2157f706c20 100644 --- a/source/_components/device_tracker.snmp.markdown +++ b/source/_components/device_tracker.snmp.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "SNMP" description: "Instructions how to integrate SNMP into Home Assistant." date: 2015-10-08 12:00 @@ -19,9 +19,11 @@ This device tracker needs SNMP to be enabled on the router.

OID examples: -- Microtik: 1.3.6.1.4.1.14988.1.1.1.2.1.1 (confirmed) +- Mikrotik: 1.3.6.1.4.1.14988.1.1.1.2.1.1 (confirmed, unknown RouterOS version/model) +- Mikrotik: 1.3.6.1.2.1.4.22.1.2 (confirmed, RouterOS 6.x on RB2011) - Aruba: 1.3.6.1.4.1.14823.2.3.3.1.2.4.1.2 (untested) - BiPAC 7800DXL: 1.3.6.1.2.1.17.7.1.2.2.1.1 (confirmed on firmware 2.32e) +- OpenWrt: 1.3.6.1.2.1.4.22.1.2 (tested on Chaos Calmer 15.05 firmware, need to install snmpd package) To use the snmp platform in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/device_tracker.thomson.markdown b/source/_components/device_tracker.thomson.markdown index bb85bd340d0..8a81c40ad9e 100644 --- a/source/_components/device_tracker.thomson.markdown +++ b/source/_components/device_tracker.thomson.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Thomson" description: "Instructions how to integrate Thomson routers into Home Assistant." date: 2015-08-30 19:00 diff --git a/source/_components/device_tracker.tomato.markdown b/source/_components/device_tracker.tomato.markdown index ad55ca2938d..e9bb3582dcf 100644 --- a/source/_components/device_tracker.tomato.markdown +++ b/source/_components/device_tracker.tomato.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Tomato" description: "Instructions how to integrate Tomato routers into Home Assistant." date: 2015-03-23 19:59 @@ -33,3 +33,6 @@ Configuration variables: - **http_id** (*Required*): The value can be obtained by logging in to the Tomato admin interface and search for `http_id` in the page source code. See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked. + +A description of the API s available in this [Tomato API](http://paulusschoutsen.nl/blog/2013/10/tomato-api-documentation/) blog post. + diff --git a/source/_components/device_tracker.tplink.markdown b/source/_components/device_tracker.tplink.markdown index a95022d65a2..50dbf15802f 100644 --- a/source/_components/device_tracker.tplink.markdown +++ b/source/_components/device_tracker.tplink.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "TP-Link" description: "Instructions how to integrate TP-Link routers into Home Assistant." date: 2015-06-22 10:30 diff --git a/source/_components/device_tracker.ubus.markdown b/source/_components/device_tracker.ubus.markdown index 9ad16682b54..71a8c26db34 100644 --- a/source/_components/device_tracker.ubus.markdown +++ b/source/_components/device_tracker.ubus.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "OpenWRT (ubus)" description: "Instructions how to integrate OpenWRT routers into Home Assistant." date: 2015-03-23 19:59 diff --git a/source/_components/device_tracker.unifi.markdown b/source/_components/device_tracker.unifi.markdown new file mode 100644 index 00000000000..bd9bfa05409 --- /dev/null +++ b/source/_components/device_tracker.unifi.markdown @@ -0,0 +1,36 @@ +--- +layout: page +title: "Ubiquiti Unifi WAP" +description: "Instructions how to use a Unifi WAP controller as a device tracker module." +date: 2016-02-19 20:59 +sidebar: true +comments: false +sharing: true +footer: true +logo: ubiquiti.png +ha_category: Presence Detection +--- + + +This platform allows you to detect presence by looking at connected devices to a [Ubiquiti](http://ubnt.com/) [Unifi](https://www.ubnt.com/enterprise/#unifi) controller. + +To use this device tracker in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +device_tracker: + platform: unifi + host: CONTROLLER + port: PORT + username: YOUR_ADMIN_USERNAME + password: YOUR_ADMIN_PASSWORD +``` + +Configuration variables: + +- **host** (*Optional*): The hostname or IP address of your controller. Defaults to localhost. +- **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*. +- **password** (*Required*): The password for your given admin account. + +See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked. diff --git a/source/_components/discoverable.markdown b/source/_components/discoverable.markdown new file mode 100644 index 00000000000..19c16ce0ac3 --- /dev/null +++ b/source/_components/discoverable.markdown @@ -0,0 +1,35 @@ +--- +layout: page +title: "Discoverable" +description: "Instructions how to setup the discoverable component with Home Assistant." +date: 2016-03-01 07:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +The Home Assistant discovery protocol is a lightweight feature that introduces support for Home Assistant servers to be discoverable. This will allow [Home Assistant instances](https://github.com/balloob/micropython-home-assistant) running with [MicroPython](https://micropython.org/) to get started without any required configuration (Example from the [MicroPython Home Assistant](https://github.com/balloob/micropython-home-assistant) documentation): + +```python +from homeassistant.discovery import get_instance() + +hass = get_instance() + +for state in hass.states(): + print(state) +``` + +To enable `discovery` in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yml entry +discoverable: + expose_password: yes +``` + + +Configuration variables: + +- **expose_password** (*Optional*): It is up to the user to expose the password in the discovery response (Default: off). If password not exposed, uHA instances will have to provide it (`get_instance('my password')`). + diff --git a/source/_components/discovery.markdown b/source/_components/discovery.markdown index 9f316298063..b64a6f00d66 100644 --- a/source/_components/discovery.markdown +++ b/source/_components/discovery.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Discovery" description: "Instructions how to setup Home Assistant to discover new devices." date: 2015-01-24 14:39 @@ -39,3 +39,7 @@ If you are developing a new platform, please read [how to make your platform dis

There is currently a known issue with running this playform on a 64-bit version of Python.

+ +

+If you are on Windows and you're using Python 3.5, download the Netifaces dependency here. +

diff --git a/source/_components/downloader.markdown b/source/_components/downloader.markdown index 928d1b0da98..5b97207786a 100644 --- a/source/_components/downloader.markdown +++ b/source/_components/downloader.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Downloader" description: "Instructions how to setup the downloader component with Home Assistant." date: 2015-01-24 14:39 @@ -7,7 +7,7 @@ sidebar: true comments: false sharing: true footer: true -logo: downloader.png +logo: home-assistant.png ha_category: Other --- diff --git a/source/_components/ecobee.markdown b/source/_components/ecobee.markdown index fc21f7042ec..69879ddab9a 100644 --- a/source/_components/ecobee.markdown +++ b/source/_components/ecobee.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Ecobee" description: "Instructions for how to integrate Ecobee thermostats and sensors within Home Assistant." date: 2015-11-30 17:54 diff --git a/source/_components/garage_door.markdown b/source/_components/garage_door.markdown new file mode 100644 index 00000000000..a52f22244a3 --- /dev/null +++ b/source/_components/garage_door.markdown @@ -0,0 +1,12 @@ +--- +layout: page +title: "Garage door" +description: "Instructions how to integrate Garage doors into Home Assistant." +date: 2016-02-12 07:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Home Assistant can give you an interface to control any garage door. diff --git a/source/_components/garage_door.wink.markdown b/source/_components/garage_door.wink.markdown new file mode 100644 index 00000000000..091f0584557 --- /dev/null +++ b/source/_components/garage_door.wink.markdown @@ -0,0 +1,18 @@ +--- +layout: page +title: "Wink Garage door" +description: "Instructions how to setup the Wink garage doors within Home Assistant." +date: 2016-02-12 07:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: wink.png +ha_category: Garage Door +--- + + +The Wink garage door platform allows you to control your [Wink](http://www.wink.com/) enabled garage door. + +The requirement is that you have setup your [Wink hub](/components/wink/). + diff --git a/source/_components/graphite.markdown b/source/_components/graphite.markdown new file mode 100644 index 00000000000..8346d0b1410 --- /dev/null +++ b/source/_components/graphite.markdown @@ -0,0 +1,31 @@ +--- +layout: page +title: "Graphite" +description: "Instructions on how to record Home Assistant history in Graphite." +date: 2016-02-10 17:11 +sidebar: true +comments: false +sharing: true +footer: true +logo: +ha_category: History +--- + +The `graphite` component records all events and state changes and feeds the data to a [graphite](http://graphite.wikidot.com/) instance. + +To enable this component, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +graphite: + host: IP_ADDRESS + port: 2003 + prefix: ha +``` + +Configuration variables: + +- **host** (*Option*): IP address of your graphite host, eg. http://192.168.1.10. Defaults to `localhost` +- **port** (*Optional*): Port to use. Defaults to 2003. +- **prefix** (*Optional*): Prefix is the metric prefix in graphite. Defaults to `ha`. + diff --git a/source/_components/group.markdown b/source/_components/group.markdown index 57105769f34..902596f3471 100644 --- a/source/_components/group.markdown +++ b/source/_components/group.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Group" description: "Instructions how to setup groups within Home Assistant." date: 2015-03-23 19:59 @@ -11,24 +11,47 @@ logo: home-assistant.png ha_category: Organization --- -Groups allow the user to combine multiple entities into one. +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. - ```yaml # Example configuration.yaml entry group: - information: - - sensor.time - living_room: - - binary_sensor.tv - - sensor.living_room_temperature + # If you name an entry default_view it will REPLACE the contents of the "Home" tab + default_view: + view: yes + entities: + - group.awesome_people + - group.climate + kitchen: - - switch.kitchen_pin_3 - - sensor.oven_temperature + name: Kitchen + entities: + - switch.kitchen_pin_3 + upstairs: + name: Kids + icon: mdi:account-multiple + view: yes + entities: + - input_boolean.notify_home + - camera.demo_camera + - device_tracker.demo_paulus + - group.garden ``` +Configuration variables: + +- **name** (*Optional*): Name of the group. +- **icon** (*Optional*): An optional icon to show in the Frontend. +- **view** (*Optional*): If yes then the entry will be shown as a view. +- **entities** array or comma delimited string (*Required*): List of entites to group. + +

+ +Example of groups shown as views in the frontend. +

+ If all entities are switches or lights they can be controlled as one with a switch at the top of the card. Grouped states should share the same type of states (ON/OFF or HOME/NOT_HOME). ```yaml @@ -38,8 +61,5 @@ group: - light.bowl - light.ceiling - light.tv_back_light - children: - - device_tracker.child_1 - - device_tracker.child_2 + children: device_tracker.child_1, device_tracker.child_2 ``` - diff --git a/source/_components/history.markdown b/source/_components/history.markdown index d2cd12b6f1b..90e5df451aa 100644 --- a/source/_components/history.markdown +++ b/source/_components/history.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "History" description: "Instructions how to enable history support for Home Assistant." date: 2015-03-23 19:59 @@ -28,22 +28,22 @@ history:

-Events are saved in a local database. Google Graphs is used to draw the graph. Drawing is happening 100% in your browser - no data is transferred to anyone at any time. +Events are saved in a local database. Google Graphs is used to draw the graph. Drawing is happening 100% in your browser. No data is transferred to anyone at any time.

#### {% linkable_title Implementation details %} -The history is stored in a SQLite databse `home-assistant.db` within your config directory. +The history is stored in a SQLite database `home-assistant.db` within your config directory. - - events table is all events except time_changed that happened while recorder component was running. - - states table contains all the new_state values of state_changed events. + - events table is all events except `time_changed` that happened while recorder component was running. + - states table contains all the `new_state` values of `state_changed` events. - Inside the states table you have: - - entity_id: the entity_id of the entity - - state: the state of the entity - - attributes: JSON of the state attributes - - last_changed: timestamp last time the state has changed. A state_changed event can happen when just attributes change. - - last_updated: timestamp anything has changed (state, attributes) - - created: timestamp this entry was inserted into the database + - `entity_id`: the entity_id of the entity + - `state`: the state of the entity + - `attributes`: JSON of the state attributes + - `last_changed`: timestamp last time the state has changed. A state_changed event can happen when just attributes change. + - `last_updated`: timestamp anything has changed (state, attributes) + - `created`: timestamp this entry was inserted into the database When the history component queries the states table it only selects states where the state has changed: `WHERE last_changed=last_updated` @@ -55,3 +55,7 @@ SQLite databases do not support native dates. That's why all the dates are saved from datetime import datetime datetime.fromtimestamp(1422830502) ``` + +#### {% linkable_title API %} + +The history information are also available through the [RESTful API](/developers/rest_api/#get-apihistory). diff --git a/source/_components/http.markdown b/source/_components/http.markdown index f0876ff711d..a05b058d1f7 100644 --- a/source/_components/http.markdown +++ b/source/_components/http.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "HTTP" description: "Offers a web framework to serve files." date: 2015-12-06 21:35 @@ -25,9 +25,16 @@ http: Configuration variables: -- **api_password** (*Optional*): Protect Home Assistant with a password +- **api_password** (*Optional*): Protect Home Assistant with a password. - **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. - **ssl_certificate** (*Optional*): Path to your TLS/SSL certificate to serve Home Assistant over a secure connection. - **ssl_key** (*Optional*): Path to your TLS/SSL key to serve Home Assistant over a secure connection. +On top of the `http` component is a [REST API](/developers/rest_api/) and a [Python API](/developers/python_api/) available. + +The `http` platforms are not a real platform within the meaning of the terminology used around Home Assistant. Home Assistant's [REST API](/developers/rest_api/) is consuming and proceeding messages received over HTTP. + +To use those kind of sensors in your installation no configuration in Home Assistant is needed. All configuration is done on the devices themselves. This means that you must be able to edit the target URL or endpoint and the payload. The entity will be created after the first message has arrived. + +All [requests](/developers/rest_api/#post-apistatesltentity_id) needs to be sent to the endpoint of the device and must be **POST**. diff --git a/source/_components/ifttt.manything.markdown b/source/_components/ifttt.manything.markdown index dd9b53751fa..c5535ef28c0 100644 --- a/source/_components/ifttt.manything.markdown +++ b/source/_components/ifttt.manything.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "ManyThing" description: "Instructions how to setup ManyThing support with IFTTT." date: 2015-09-07 18:00 diff --git a/source/_components/ifttt.markdown b/source/_components/ifttt.markdown index 67d3dcb42e2..c5adde1b462 100644 --- a/source/_components/ifttt.markdown +++ b/source/_components/ifttt.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "IFTTT" description: "Instructions how to setup IFTTT within Home Assistant." date: 2015-09-07 18:00 diff --git a/source/_components/influxdb.markdown b/source/_components/influxdb.markdown index 7f1973087ec..32ed6d6ac39 100644 --- a/source/_components/influxdb.markdown +++ b/source/_components/influxdb.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "InfluxDB" description: "Record events in InfluxDB." date: 2015-12-06 13:08 @@ -23,6 +23,8 @@ influxdb: database: DB_TO_STORE_EVENTS username: MY_USERNAME password: MY_PASSWORD + ssl: true + verify_ssl: true ``` Configuration variables: @@ -32,4 +34,5 @@ Configuration variables: - **database** (*Optional*): Name of the database to use. Defaults to `home_assistant`. The database must already exist. - **username** (*Optional*): The username of the database user. - **password** (*Optional*): The password for the database user account. - +- **ssl** (*Optional*): Use https instead of http to connect. Defaults to false. +- **verify_ssl** (*Optional*): Verify SSL certificate for https request. Defaults to false. diff --git a/source/_components/input_boolean.markdown b/source/_components/input_boolean.markdown index 2e66c928787..2fcdedc64b4 100644 --- a/source/_components/input_boolean.markdown +++ b/source/_components/input_boolean.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Input Boolean" description: "Instructions how to integrate the Input Boolean component into Home Assistant." date: 2016-01-17 16:58 @@ -11,16 +11,23 @@ logo: home-assistant.png ha_category: Automation --- -The input boolean component allows the user to define boolean values that can be controlled via the frontend and can be used within conditions of automation. This can for example be used to disable or enable certain automations. +The `input_boolean` component allows the user to define boolean values that can be controlled via the frontend and can be used within conditions of automation. This can for example be used to disable or enable certain automations. ```yaml # Example configuration.yaml entry input_boolean: notify_home: - # Optional, friendly name of entry name: Notify when someome arrives home - # Optional, value when Home Assistant starts initial: off - # Optional, icon for entry icon: mdi:car ``` + +Configuration variables: + +- **[alias]** (*Required*): Alias for the input. +- **name** (*Optional*): Friendly name of the input. +- **initial** (*Optional*): Initial value when Home Assistant starts. +- **icon** (*Optional*): Icon for entry. + +Pick an icon that you can find on [materialdesignicons.com](https://materialdesignicons.com/) to use for your input and prefix the name with `mdi:`. For example `mdi:car`, `mdi:ambulance`, or `mdi:motorbike`. + diff --git a/source/_components/input_select.markdown b/source/_components/input_select.markdown new file mode 100644 index 00000000000..b8e574b91f8 --- /dev/null +++ b/source/_components/input_select.markdown @@ -0,0 +1,44 @@ +--- +layout: page +title: "Input Select" +description: "Instructions how to integrate the Input Select component into Home Assistant." +date: 2016-02-02 17:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: home-assistant.png +ha_category: Automation +--- + +The `input_select` component allows the user to define a list of values that can be selected via the frontend and can be used within conditions of automation. + +To enable this platform, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +input_select: + who_cooks: + name: Who cooks today + options: + - Paulus + - Anne Therese + initial: Anne Therese + icon: mdi:panda + living_room_preset: + options: + - Visitors + - Visitors with kids + - Home Alone +``` + +Configuration variables: + +- **[alias]** (*Required*): Alias for the input. +- **name** (*Optional*): Friendly name of the input. +- **options** array (*Optional*): List of options to choose from +- **initial** (*Optional*): Initial value when Home Assistant starts. +- **icon** (*Optional*): Icon for entry. + +Pick an icon that you can find on [materialdesignicons.com](https://materialdesignicons.com/) to use for your input and prefix the name with `mdi:`. For example `mdi:car`, `mdi:ambulance`, or `mdi:motorbike`. + diff --git a/source/_components/insteon_hub.markdown b/source/_components/insteon_hub.markdown new file mode 100644 index 00000000000..7e6aa5f098b --- /dev/null +++ b/source/_components/insteon_hub.markdown @@ -0,0 +1,32 @@ +--- +layout: page +title: "Insteon Hub" +description: "Instructions how to setup the Insteon Hub within Home Assistant." +date: 2016-01-27 08:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: insteon.png +ha_category: Hub +--- + +The `insteon` component lets you use your [Insteon Hub](http://www.insteon.com/insteon-hub/) with Home Assistant. + +You will need to obtain an Insteon REST API key from the [Insteon Developer program](http://www.insteon.com/become-an-insteon-developer) to use this component. + +To integrate your Insteon Hub with Home Assistant, add the following section to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +insteon_hub: + username: YOUR_USERNAME + password: YOUR_PASSWORD + api_key: YOUR_API_KEY +``` + +Configuration variables: + +- **username** (*Required*): The username used to access the Insteon interface (e.g. the [connect.insteon.com](connect.insteon.com) site). +- **password** (*Required*): The password used to access the Insteon interface. +- **api_key** (*Required*): The Insteon REST API key emailed to you once you are approved in the Insteon Developer program. diff --git a/source/_components/introduction.markdown b/source/_components/introduction.markdown index dabfd1b4557..243e3b2c25a 100644 --- a/source/_components/introduction.markdown +++ b/source/_components/introduction.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Introduction" description: "Details about the introduction within Home Assistant." date: 2015-10-25 15:15 diff --git a/source/_components/isy994.markdown b/source/_components/isy994.markdown index 0bb77c922a0..eac00a8cc4c 100644 --- a/source/_components/isy994.markdown +++ b/source/_components/isy994.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "ISY994 Controller" description: "Instructions how to setup the ISY994 controller within Home Assistant." date: 2015-01-20 22:36 diff --git a/source/_components/keyboard.markdown b/source/_components/keyboard.markdown index 4bf2672e14b..40f15421e00 100644 --- a/source/_components/keyboard.markdown +++ b/source/_components/keyboard.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Keyboard" description: "Instructions how to simulate key presses with Home Assistant." date: 2015-01-24 14:39 diff --git a/source/_components/light.blinksticklight.markdown b/source/_components/light.blinksticklight.markdown index e1e1c186c7c..0d80ee2086e 100644 --- a/source/_components/light.blinksticklight.markdown +++ b/source/_components/light.blinksticklight.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Blinkstick" description: "Instructions how to setup Blinkstick lights within Home Assistant." date: 2015-10-08 10:00 @@ -12,7 +12,7 @@ ha_category: Light --- -The blinkstick platform let you can control your [Blinkstick](https://www.blinkstick.com/) lights from within Home Assistant. +The `blinkstick` platform let you can control your [Blinkstick](https://www.blinkstick.com/) lights from within Home Assistant. To add blinkstick to your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/light.hue.markdown b/source/_components/light.hue.markdown index 8789a5d3322..c9414c59ce1 100644 --- a/source/_components/light.hue.markdown +++ b/source/_components/light.hue.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Philips Hue" description: "Instructions how to setup Philips Hue within Home Assistant." date: 2015-03-23 20:09 @@ -9,11 +9,10 @@ sharing: true footer: true logo: philips_hue.png ha_category: Light +ha_iot_class: "Local Polling" featured: true --- - - Philips Hue support is integrated into Home Assistant as a light platform. The preferred way to setup the Philips Hue platform is by enabling the [the discovery component](/components/discovery/). If you want to enable the light component directly, add the following lines to your `configuration.yaml`: @@ -23,6 +22,8 @@ If you want to enable the light component directly, add the following lines to y light: platform: hue host: DEVICE_IP_ADDRESS + # Optional, this will allow unreachable bulbs to report their state correctly + allow_unreachable: true # Optional, make this unique if specifying multiple Hue hubs filename: my_hue_hub_token.conf ``` diff --git a/source/_components/light.hyperion.markdown b/source/_components/light.hyperion.markdown index db95cad7a4b..48889a36e83 100644 --- a/source/_components/light.hyperion.markdown +++ b/source/_components/light.hyperion.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: Hyperion +layout: page +title: "Hyperion" description: "Instructions how to integrate Hyperion into Home Assistant." date: 2015-10-25 22:43 sidebar: true diff --git a/source/_components/light.lifx.markdown b/source/_components/light.lifx.markdown new file mode 100644 index 00000000000..79ec38d8bd4 --- /dev/null +++ b/source/_components/light.lifx.markdown @@ -0,0 +1,28 @@ +--- +layout: page +title: "LIFX" +description: "Instructions how to integrate LIFX into Home Assistant." +date: 2016-01-27 08:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: lifx.png +ha_category: Light +ha_iot_class: "Local Push" +--- + +The `lifx` platform allows you to integrate your [LIFX](http://www.lifx.com) into Home Assistant. + +```yaml +# Example configuration.yaml entry +light: + platform: lifx + server: 192.168.1.98 + broadcast: 192.168.1.255 +``` +Configuration variables: + +- **server** (*Optional*): Your server address. Only needed if using more than one network interface. Omit if you are unsure. +- **broadcast** (*Optional*): The broadcast address, set to reach all LIFX bulbs. + diff --git a/source/_components/light.limitlessled.markdown b/source/_components/light.limitlessled.markdown index 57b088c9ad2..62b5c66f4d5 100644 --- a/source/_components/light.limitlessled.markdown +++ b/source/_components/light.limitlessled.markdown @@ -1,35 +1,27 @@ --- -layout: component +layout: page title: "LimitlessLED" description: "Instructions on how to setup LimitlessLED within Home Assistant." date: 2015-12-03 13:00 sidebar: true layout: page -title: "LimitlessLED support" -sidebar: false comments: false sharing: true footer: true ha_category: Light +ha_iot_class: "Assumed State" --- `limitlessled` can control your [LimitlessLED](http://www.limitlessled.com/) lights from within Home Assistant. The lights are also known as EasyBulb, AppLight, AppLamp, MiLight, LEDme, dekolight or iLight. -### Setup +### {% linkable_title Setup %} -Before configuring Home Assistant, make sure you can control your bulbs with the Milight mobile application. Discover your bridge(s) IP. You can do this via your router, or a mobile application like Fing ([android](https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en), [itunes](https://itunes.apple.com/us/app/fing-network-scanner/id430921107?mt=8)). Keep in mind that LimitlessLED bulbs are controlled via groups. You cannot control an individual bulb via the bridge, unless it is in a group by itself. Note that you can assign an `rgbw` and `white` group to the same group number, effectively allowing 8 groups (4 `rgbw` and 4 `white`) per bridge. +Before configuring Home Assistant, make sure you can control your bulbs or LEDs with the MiLight mobile application. Discover your bridge(s) IP address. You can do this via your router or a mobile application like Fing ([android](https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en) or [itunes](https://itunes.apple.com/us/app/fing-network-scanner/id430921107?mt=8)). Keep in mind that LimitlessLED bulbs are controlled via groups. You can not control an individual bulb via the bridge, unless it is in a group by itself. Note that you can assign an `rgbw` and `white` group to the same group number, effectively allowing 8 groups (4 `rgbw` and 4 `white`) per bridge. To add `limitlessled` to your installation, add the following to your `configuration.yaml` file: ```yaml -light: - platform: limitlessled - bridges: -``` - -Next, list your bridges and groups. Here's an example. See the next section for a full explanaton of each configuration variable. - -```yaml +# Example configuration.yaml entry light: platform: limitlessled bridges: @@ -53,30 +45,31 @@ light: name: Living Room & Hall ``` -### Configuration variables +Configuration variables: -- **bridges** (*Required*): (list) +- **bridges** array (*Required*): - **host** (*Required*): IP address of the device, eg. `192.168.1.32` - - **version**: Bridge version (default is `5`). Don't use if you aren't sure. - - **port**: Bridge port (default is `8899`). Normally not necessary to specify. - - **groups** (*Required*): (list) + - **version** (*Optional*): Bridge version (default is `5`). Don't use if you aren't sure. + - **port** (*Optional*): Bridge port. Defaults to 8899. + - **groups** array (*Required*): The list of available groups. - **number** (*Required*): Group number (`1`-`4`). Corresponds to the group number on the remote. - **name** (*Required*): Any name you'd like. Must be unique among all configured groups. - - **type**: Type of group. Choose either `rgbw` or `white`. `rgbw` is the default if you don't specify. + - **type** (*Optional*): Type of group. Choose either `rgbw` or `white`. `rgbw` is the default if you don't specify this entry. -### Properties -Refer to the [light]({{site_root}}/components/light) documentation for general property usage, but keep in mind the following notes specific to LimitlessLED. +### {% linkable_title Properties %} + +Refer to the [light]({{site_root}}/components/light/) documentation for general property usage, but keep in mind the following notes specific to LimitlessLED. - **RGBW** - - *Color*: There are 256 color possibilities along the LimitlessLED color spectrum. Color properties like saturation and lightness can't be used - only hue. The only exception is white (which may be warm or cold depending on the type of RGBW bulb). If you select a color with saturation or lightness, Home Assistant will calculate the nearest valid LimitlessLED color. + - *Color*: There are 256 color possibilities along the LimitlessLED color spectrum. Color properties like saturation and lightness can not be used - only Hue can. The only exception is white (which may be warm or cold depending on the type of RGBW bulb). If you select a color with saturation or lightness, Home Assistant will calculate the nearest valid LimitlessLED color. - *Brightness*: There are 25 brightness steps. - **White** - - As you can observe on the Milight mobile application, you cannot select a specific brightness or temperature - you can only step each property up or down. There is no indication of which step you are on. This restriction, combined with the unreliable nature of LimitlessLED transmissions, means that setting white bulb properties is done on a best-effort basis. The only very reliable settings are the minimum and maximum of each property. + - As you can observe on the MiLight mobile application, you can not select a specific brightness or temperature - you can only step each property up or down. There is no indication of which step you are on. This restriction, combined with the unreliable nature of LimitlessLED transmissions, means that setting white bulb properties is done on a best-effort basis. The only very reliable settings are the minimum and maximum of each property. - *Temperature*: There are 10 temperature steps. - *Brightness*: There are 10 brightness steps. - **Transitions** - - If a transition time is set, the group will transition between the current settings and the target settings for the duration specified. Transitions from or to white are not possible - the color will change immediately. + - If a transition time is set, the group will transition between the current settings and the target settings for the duration specified. Transitions from or to white are not possible - the color will change immediately. -### Initialization & Synchronization +### {% linkable_title Initialization & Synchronization %} -When starting Home Assistant, your LimitlessLED bulbs will be set to known default values. This ensures a consistent user interface and uninterrupted turning on/off. If you control your LimitlessLED lights via the Milight mobile application or other means while Home Assistant is running, Home Assistant can not track those changes and you may observe unexpected behavior. This is due to a LimitlessLED limitation. +When starting Home Assistant, your LimitlessLED bulbs will be set to known default values. This ensures a consistent user interface and uninterrupted turning on/off. If you control your LimitlessLED lights via the MiLight mobile application or other means while Home Assistant is running, Home Assistant can not track those changes and you may observe unexpected behavior. This is due to a LimitlessLED limitation. diff --git a/source/_components/light.markdown b/source/_components/light.markdown index 51bf8111115..56f078f65e3 100644 --- a/source/_components/light.markdown +++ b/source/_components/light.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Lights" description: "Instructions how to setup your lights with Home Assistant." date: 2015-01-24 14:39 @@ -50,3 +50,13 @@ Turns one or multiple lights off. | `entity_id` | no | String or list of strings that point at `entity_id`s of lights. Else targets all. | `transition` | no | Integer that represents the time the light should take to transition to the new state. +### {% linkable_title Service `light.toggle` %} + +Toggles the state of one or multiple lights using [groups]({{site_root}}/components/group/). + +*Note*: If `light.toggle` is used for a group of lights, it will toggle the individual state of each light. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ----------- | +| `entity_id` | no | String or list of strings that point at `entity_id`s of lights. Else targets all. +| `transition` | no | Integer that represents the time the light should take to transition to the new state. diff --git a/source/_components/light.mqtt.markdown b/source/_components/light.mqtt.markdown index 07c24d8eaa7..bf933f726cf 100644 --- a/source/_components/light.mqtt.markdown +++ b/source/_components/light.mqtt.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "MQTT light" +layout: page +title: "MQTT Light" description: "Instructions how to setup MQTT lights within Home Assistant." date: 2015-11-13 08:30 sidebar: true @@ -33,9 +33,9 @@ light: brightness_command_topic: "office/rgb1/brightness/set" rgb_state_topic: "office/rgb1/rgb/status" rgb_command_topic: "office/rgb1/rgb/set" - state_value_format: "{% raw %}{{ value_json.state }}{% endraw %}" - brightness_value_format: "{% raw %}{{ value_json.brightness }}{% endraw %}" - rgb_value_format: "{% raw %}{{ value_json.rgb | join(',') }}{% endraw %}" + state_value_template: "{% raw %}{{ value_json.state }}{% endraw %}" + brightness_value_template: "{% raw %}{{ value_json.brightness }}{% endraw %}" + rgb_value_template: "{% raw %}{{ value_json.rgb | join(',') }}{% endraw %}" qos: 0 payload_on: "ON" payload_off: "OFF" @@ -66,9 +66,10 @@ Configuration variables: - **brightness_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's brightness. - **rgb_state_topic** (*Optional*): The MQTT topic subscribed to receive RGB state updates. - **rgb_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's RGB state. -- **state_value_format** (*Optional*): Defines a [template](/getting-started/templating/) to extract the state value. -- **brightness_value_format** (*Optional*): Defines a [template](/getting-started/templating/) to extract the brightness value. -- **rgb_value_format** (*Optional*): Defines a [template](/getting-started/templating/) to extract the RGB value. +- **state_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the state value. +- **brightness_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the brightness value. +- **rgb_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the RGB value. +- **brightness_scale** (*Optional*): Defines the maximum brightness value (i.e. 100%) of the MQTT device (defaults to 255). - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". - **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF". diff --git a/source/_components/light.mysensors.markdown b/source/_components/light.mysensors.markdown new file mode 100644 index 00000000000..f6a74f40f8b --- /dev/null +++ b/source/_components/light.mysensors.markdown @@ -0,0 +1,37 @@ +--- +layout: page +title: "MySensors Light" +description: "Instructions how to integrate MySensors lights into Home Assistant." +date: 2016-03-02 18:20 +0100 +sidebar: true +comments: false +sharing: true +footer: true +logo: mysensors.png +ha_category: Light +featured: false +--- + +Integrates MySensors lights into Home Assistant. See the [main component] for configuration instructions. + +The following actuator types are supported: + +##### MySensors version 1.4 + +S_TYPE | V_TYPE +---------|-------------- +S_DIMMER | V_DIMMER\*, V_LIGHT\* + +##### MySensors version 1.5 and higher + +S_TYPE | V_TYPE +------------|------------- +S_DIMMER | [V_DIMMER\* or V_PERCENTAGE\*], [V_LIGHT\* or V_STATUS\*] +S_RGB_LIGHT | V_RGB*, [V_LIGHT\* or V_STATUS\*], [V_DIMMER or V_PERCENTAGE] + +V_TYPES with a star (\*) denotes required V_TYPES. Use either V_LIGHT or V_STATUS and either V_DIMMER or V_PERCENTAGE for an applicable actuator. + +For more information, visit the [serial api] of MySensors. + +[main component]: /components/mysensors/ +[serial api]: https://www.mysensors.org/download/serial_api_15 diff --git a/source/_components/light.rfxtrx.markdown b/source/_components/light.rfxtrx.markdown index a793421e6a5..076f8efb495 100644 --- a/source/_components/light.rfxtrx.markdown +++ b/source/_components/light.rfxtrx.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "RFXtrx light" +layout: page +title: "RFXtrx Light" description: "Instructions how to integrate RFXtrx lights into Home Assistant." date: 2015-10-08 10:15 sidebar: true @@ -9,7 +9,8 @@ sharing: true footer: true ha_category: Light --- -The rfxtrx platform support lights that communicate in the frequency range of 433.92 MHz. + +The `rfxtrx` platform support lights that communicate in the frequency range of 433.92 MHz. To enable RFXtrx lights in your installation, add the following to your `configuration.yaml` file: @@ -17,6 +18,7 @@ To enable RFXtrx lights in your installation, add the following to your `configu # Example configuration.yaml entry light: platform: rfxtrx + signal_repetitions: 3 devices: living_room: name: Living Room @@ -28,3 +30,4 @@ Configuration variables: - **devices** (*Required*): A list of devices with their name to use in the frontend. - **automatic_add** (*Optional*): To enable the automatic addition of new lights. +- **signal_repetitions** *Optional*: Because the rxftrx device sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly. diff --git a/source/_components/light.scsgate.markdown b/source/_components/light.scsgate.markdown new file mode 100644 index 00000000000..baec226359f --- /dev/null +++ b/source/_components/light.scsgate.markdown @@ -0,0 +1,30 @@ +--- +layout: page +title: "SCSGate Light" +description: "Instructions how to integrate SCSGate lights into Home Assistant." +date: 2016-01-31 19:30 +sidebar: true +comments: false +sharing: true +footer: true +logo: bus_scs.png +ha_category: Light +--- + +The SCSGate device can control lights of the BTicino MyHome system. + +To enable SCSGate lights in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +light: + platform: scsgate + devices: + living_room: + name: Living Room + scs_id: XXXXX +``` + +Configuration variables: + +- **devices** (*Required*): A list of devices with their name to use in the frontend. diff --git a/source/_components/light.tellstick.markdown b/source/_components/light.tellstick.markdown index 733ca3ce7be..8daa1e4918b 100644 --- a/source/_components/light.tellstick.markdown +++ b/source/_components/light.tellstick.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "TellStick light" +layout: page +title: "TellStick Light" description: "Instructions how to integrate TellStick lights into Home Assistant." date: 2015-08-06 19:00 sidebar: true @@ -9,10 +9,11 @@ sharing: true footer: true logo: telldus_tellstick.png ha_category: Light +ha_iot_class: "Assumed State" --- -This tellstick light platform allows you to control your [TellStick](http://www.telldus.se/products/tellstick) dimmers. +This `tellstick` light platform allows you to control your [TellStick](http://www.telldus.se/products/tellstick) dimmers. To use your TellStick device in your installation, add the following to your `configuration.yaml` file: @@ -20,5 +21,10 @@ To use your TellStick device in your installation, add the following to your `co # Example configuration.yaml entry light: platform: tellstick + signal_repetitions: 3 ``` +Configuration variables: + +- **signal_repetitions** *Optional*: Because the tellstick sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly. + diff --git a/source/_components/light.vera.markdown b/source/_components/light.vera.markdown index 5ab3de9e3c9..3ed552548a4 100644 --- a/source/_components/light.vera.markdown +++ b/source/_components/light.vera.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Vera light" +layout: page +title: "Vera Light" description: "Instructions how to integrate Vera lights into Home Assistant." date: 2015-10-20 21:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Light --- -This vera light platform allows you to control your [Vera](http://getvera.com/) lights. +This `vera` light platform allows you to control your [Vera](http://getvera.com/) lights. This platform is useful if you wish for switches connected to your Vera controller to appear as lights in Home Assistant. All switches will be added as a light unless you exclude them in the configuration file. diff --git a/source/_components/light.wemo.markdown b/source/_components/light.wemo.markdown new file mode 100644 index 00000000000..21e61accd4d --- /dev/null +++ b/source/_components/light.wemo.markdown @@ -0,0 +1,21 @@ +--- +layout: page +title: "Belkin WeMo Lights" +description: "Instructions how to integrate Belkin WeMo LED lights into Home Assistant." +date: 2016-02-20 00:45 +sidebar: true +comments: false +sharing: true +footer: true +logo: belkin_wemo.png +ha_category: Light +ha_iot_class: "Local Polling" +--- + + +The `wemo` platform allows you to control your [Belkin WeMo](http://www.belkin.com/us/p/P-F5Z0489/) LED lights from within Home Assistant. + +They will be automatically discovered if the discovery component is enabled. + +For more configuration information see the [WeMo component](/components/wemo/) documentation. + diff --git a/source/_components/light.wink.markdown b/source/_components/light.wink.markdown index d4d86298a7e..16cbc2346a9 100644 --- a/source/_components/light.wink.markdown +++ b/source/_components/light.wink.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Wink light" +layout: page +title: "Wink Light" description: "Instructions how to setup the Wink lights within Home Assistant." date: 2015-01-20 22:36 sidebar: true @@ -12,6 +12,6 @@ ha_category: Light --- -The wink sensor platform allows you to use your [Wink](http://www.wink.com/) lights. +The wink light platform allows you to use your [Wink](http://www.wink.com/) lights. -The requirement is that you have setup your [Wink hub](/components/light.wink/). +The requirement is that you have setup your [Wink hub](/components/wink/). diff --git a/source/_components/light.zigbee.markdown b/source/_components/light.zigbee.markdown new file mode 100644 index 00000000000..25832fedbd1 --- /dev/null +++ b/source/_components/light.zigbee.markdown @@ -0,0 +1,33 @@ +--- +layout: page +title: ZigBee Light +description: "Instructions on how to set up ZigBee lights within Home Assistant." +date: 2016-01-28 12:38 +sidebar: true +comments: false +sharing: true +footer: true +logo: zigbee.png +ha_category: Light +--- + +A ZigBee light in this context is a light connected to one of the digital output pins on a ZigBee module. It can simply be switched on and off. By default, a light is considered 'on' when the ZigBee device's digital output is held 'high' and considered 'off' when it is held 'low'. This behaviour can be inverted by setting the `on_state` configuration variable to `low`. + +To configure a digital output pin as a light, use the following variables: + +- **name** (*Required*): The name you'd like to give the light in Home Assistant. +- **platform** (*Required*): Set to `zigbee`. +- **pin** (*Required*): The number identifying which pin to use. +- **address**: The long 64bit address of the remote ZigBee device whose digital output pin you'd like to switch. Do not include this variable if you want to switch the local ZigBee device's pins. +- **on_state**: Either `high` (default) or `low`, depicting whether the digital output pin is pulled high or low when the light is turned on. + +#### Example + +```yaml +light: + - name: Desk Lamp + platform: zigbee + pin: 0 + address: 0013A20040791FA2 + on_state: low +``` diff --git a/source/_components/light.zwave.markdown b/source/_components/light.zwave.markdown index 4b547ee58d4..00b3c7b64d3 100644 --- a/source/_components/light.zwave.markdown +++ b/source/_components/light.zwave.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Z-Wave light" +layout: page +title: "Z-Wave Light" description: "Instructions how to setup the Z-Wave lights within Home Assistant." date: 2015-11-11 13:00 sidebar: true diff --git a/source/_components/lock.markdown b/source/_components/lock.markdown index a905a990b9a..dcad2d30566 100644 --- a/source/_components/lock.markdown +++ b/source/_components/lock.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Locks" description: "Instructions how to setup your locks with Home Assistant." date: 2015-11-21 08:10 diff --git a/source/_components/lock.mqtt.markdown b/source/_components/lock.mqtt.markdown new file mode 100644 index 00000000000..b49309475ce --- /dev/null +++ b/source/_components/lock.mqtt.markdown @@ -0,0 +1,53 @@ +--- +layout: page +title: "MQTT Lock" +description: "Instructions how to integrate MQTT locks into Home Assistant." +date: 2016-02-28 15:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: mqtt.png +ha_category: Lock +--- + +The `mqtt` lock platform let you control your MQTT enabled locks. + +In an ideal scenario, the MQTT device will have a `state_topic` to publish state changes. If these messages are published with RETAIN flag, the MQTT lock will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state of the switch will be false/unlocked. + +When a `state_topic` is not available, the lock will work in optimistic mode. In this mode, the lock will immediately change state after every command. Otherwise, the lock will wait for state confirmation from device (message from `state_topic`). + +Optimistic mode can be forced, even if state topic is available. Try to enable it, if experiencing incorrect lock operation. + +To enable MQTT locks in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yml entry +lock: + platform: mqtt + name: Frontdoor + state_topic: "home/frontdoor/" + command_topic: "home/frontdoor/set" + payload_lock: "LOCK" + payload_unlock: "UNLOCK" + optimistic: false + qos: 0 + retain: true + value_template: '{% raw %}{{ value.x }}{% endraw %}' +``` + +Configuration variables: + +- **name** (*Optional*): The name of the lock. Default is 'MQTT Lock'. +- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates. +- **command_topic** (*Required*): The MQTT topic to publish commands to change the lock state. +- **payload_lock** (*Optional*): The payload that represents enabled/locked state. Default is "LOCK". +- **payload_unlock** (*Optional*): The payload that represents disabled/unlocked state. Default is "UNLOCK". +- **optimistic** (*Optional*): Flag that defines if lock works in optimistic mode. Default is true if no state topic defined, else false. +- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. +- **retain** (*Optional*): If the published message should have the retain flag on or not. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. + +

+Make sure that your topic match exact. `some-topic/` and `some-topic` are different topics. +

diff --git a/source/_components/lock.verisure.markdown b/source/_components/lock.verisure.markdown new file mode 100644 index 00000000000..ab4b04de8de --- /dev/null +++ b/source/_components/lock.verisure.markdown @@ -0,0 +1,18 @@ +--- +layout: page +title: "Verisure Lock" +description: "Instructions how to setup the Verisure locks within Home Assistant." +date: 2016-02-12 06:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: verisure.png +ha_category: Lock +--- + + +The Verisure lock platform allows you to control your [Verisure](https://www.verisure.com/) locks. + +The requirement is that you have setup your [Verisure hub](/components/verisure/). + diff --git a/source/_components/lock.wink.markdown b/source/_components/lock.wink.markdown index 656c149151c..d9abf003f8a 100644 --- a/source/_components/lock.wink.markdown +++ b/source/_components/lock.wink.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Wink lock" +layout: page +title: "Wink Lock" description: "Instructions how to setup the Wink locks within Home Assistant." date: 2015-11-20 12:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Lock --- -The wink lock platform allows you to control your [Wink](http://www.wink.com/) locks. +The Wink lock platform allows you to control your [Wink](http://www.wink.com/) locks. The requirement is that you have setup your [Wink hub](/components/wink/). diff --git a/source/_components/logbook.markdown b/source/_components/logbook.markdown index 7e3581788c3..f7b3c42be79 100644 --- a/source/_components/logbook.markdown +++ b/source/_components/logbook.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Logbook" description: "Instructions how to enable the logbook component for Home Assistant." date: 2015-04-25 9:23 diff --git a/source/_components/logger.markdown b/source/_components/logger.markdown index e7a9935c9bd..66c521e09ea 100644 --- a/source/_components/logger.markdown +++ b/source/_components/logger.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Logger" description: "Instructions how to enable the logger component for Home Assistant." date: 2015-11-12 17:00 diff --git a/source/_components/media_player.cast.markdown b/source/_components/media_player.cast.markdown index ad8048f4878..0ce3920e4ec 100644 --- a/source/_components/media_player.cast.markdown +++ b/source/_components/media_player.cast.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Google Cast" description: "Instructions how to integrate Google Cast into Home Assistant." date: 2015-03-23 19:59 diff --git a/source/_components/media_player.denon.markdown b/source/_components/media_player.denon.markdown index 1b7890b98c0..6d53b6c7617 100644 --- a/source/_components/media_player.denon.markdown +++ b/source/_components/media_player.denon.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Denon Network Receivers" description: "Instructions how to integrate Denon Network Receivers into Home Assistant." date: 2015-09-08 09:00 @@ -12,7 +12,7 @@ ha_category: Media Player --- -The denon platform allows you to control a [Denon Network Receivers](http://www.denon.co.uk/chg/product/compactsystems/networkmusicsystems/ceolpiccolo) from Home Assistant. +The `denon` platform allows you to control a [Denon Network Receivers](http://www.denon.co.uk/chg/product/compactsystems/networkmusicsystems/ceolpiccolo) from Home Assistant. Supported devices: diff --git a/source/_components/media_player.firetv.markdown b/source/_components/media_player.firetv.markdown index 8f52a5582da..98f6afe2021 100644 --- a/source/_components/media_player.firetv.markdown +++ b/source/_components/media_player.firetv.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "FireTV" description: "Instructions how to integrate Music Player Daemon into Home Assistant." date: 2015-10-23 18:00 @@ -12,7 +12,7 @@ ha_category: Media Player --- -The firetv platform allows you to control a [Amazon Fire TV/stick](http://www.amazon.com/Amazon-DV83YW-Fire-TV/dp/B00U3FPN4U). +The `firetv` platform allows you to control a [Amazon Fire TV/stick](http://www.amazon.com/Amazon-DV83YW-Fire-TV/dp/B00U3FPN4U). The python-firetv Python 2.x module with its helper script that exposes a HTTP server to fetch state and perform actions is used. @@ -26,6 +26,7 @@ Steps to configure your Amazon Fire TV stick with Home Assistant: - From the main (Launcher) screen, select Settings. - Select System > About > Network. - `pip install firetv[firetv-server]` into a Python 2.x environment + - If installed on Debian Jessie then the libssl-dev package is needed. Install it with `apt-get install libssl-dev` - `firetv-server -d :5555`, background the process - Configure Home Assistant as follows: diff --git a/source/_components/media_player.itunes.markdown b/source/_components/media_player.itunes.markdown index 5e5c890353a..3e77b6f862f 100644 --- a/source/_components/media_player.itunes.markdown +++ b/source/_components/media_player.itunes.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "iTunes" description: "Instructions how to integrate iTunes into Home Assistant." date: 2015-06-22 11:00 diff --git a/source/_components/media_player.kodi.markdown b/source/_components/media_player.kodi.markdown index effa67c954f..e18d1e7a823 100644 --- a/source/_components/media_player.kodi.markdown +++ b/source/_components/media_player.kodi.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Kodi" description: "Instructions how to integrate Kodi into Home Assistant." date: 2015-06-22 11:00 @@ -13,7 +13,7 @@ featured: true --- -The kodi platform allows you to control a [Kodi](http://kodi.tv/) multimedia system from Home Assistant. +The `kodi` platform allows you to control a [Kodi](http://kodi.tv/) multimedia system from Home Assistant. To add Kodi to your installation, add the following to your `configuration.yaml` file: @@ -21,7 +21,8 @@ To add Kodi to your installation, add the following to your `configuration.yaml` # Example configuration.yaml entry media_player: platform: kodi - url: http://192.168.0.123/jsonrpc + host: http://192.168.0.123 + port: 8080 name: Kodi user: USERNAME password: PASSWORD @@ -29,7 +30,8 @@ media_player: Configuration variables: -- **url** *Required*: The URL of the XBMC/Kodi JSON-RPC API, eg. http://192.168.0.123/jsonrpc +- **host** *Required*: The host name or address of the device that is running XBMC/Kodi +- **port** *Required*: The port number, default 8080 - **name** *Optional*: The name of the device used in the frontend. - **username** *Optional*: The XBMC/Kodi HTTP username. - **password** *Optional*: The XBMC/Kodi HTTP password. diff --git a/source/_components/media_player.markdown b/source/_components/media_player.markdown index 5a227781835..24d81c3b2e9 100644 --- a/source/_components/media_player.markdown +++ b/source/_components/media_player.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Media Player" description: "Instructions how to setup your media players with Home Assistant." date: 2015-01-24 14:39 diff --git a/source/_components/media_player.mpd.markdown b/source/_components/media_player.mpd.markdown index 49d5b265325..b600a2e4159 100644 --- a/source/_components/media_player.mpd.markdown +++ b/source/_components/media_player.mpd.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Music Player Daemon (MPD)" description: "Instructions how to integrate Music Player Daemon into Home Assistant." date: 2015-06-02 08:00 @@ -12,7 +12,7 @@ ha_category: Media Player --- -The mpd platform allows you to control a [Music Player Daemon](http://www.musicpd.org/) from Home Assistant. Unfortunatly you will not be able to manipulate the playlist (add or delete songs) or add transitions between the songs. +The `mpd` platform allows you to control a [Music Player Daemon](http://www.musicpd.org/) from Home Assistant. Unfortunatly you will not be able to manipulate the playlist (add or delete songs) or add transitions between the songs. To add MPD to your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/media_player.plex.markdown b/source/_components/media_player.plex.markdown index 4488e68fb87..72b4787d810 100644 --- a/source/_components/media_player.plex.markdown +++ b/source/_components/media_player.plex.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Plex" description: "Instructions how to integrate Plex into Home Assistant." date: 2015-10-05 21:21 diff --git a/source/_components/media_player.samsungtv.markdown b/source/_components/media_player.samsungtv.markdown new file mode 100644 index 00000000000..0b39452b466 --- /dev/null +++ b/source/_components/media_player.samsungtv.markdown @@ -0,0 +1,43 @@ +--- +layout: page +title: "Samsung Smart TV" +description: "Instructions on how to integrate a Samsung Smart TV into Home Assistant." +date: 2016-02-13 12:02 +sidebar: true +comments: false +sharing: true +footer: true +logo: samsung.png +ha_category: Media Player +featured: false +--- + +The `samsungtv` platform allows you to control a [Samsung Smart TV](http://www.samsung.com/uk/consumer/tv-audio-video/televisions/). + +When the TV is first connected, you will need to accept Home Assistant on the TV to allow communication. + +To add a TV to your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +media_player: + platform: samsungtv + host: 192.168.0.10 + name: Living Room TV +``` + +Configuration variables: + +- **host** *Required*: The IP of the Samsung Smart TV, e.g. 192.168.0.10 +- **name** *Optional*: The name you would like to give to the Samsung Smart TV. + + +Currently known supported models: + +- C7700 +- D8000 +- ES5500 +- ES6800 + +If your model is not on the list then give it a test, if everything works correctly then add it to the list on [GitHub](https://github.com/balloob/home-assistant.io). +The two letters at the beginning of the model number represent the region, UE is Europe, UN is North America and UA is Asia & Australia. The two numbers following that represent the screen size. If you add your model remember to remove these before adding them to the list. diff --git a/source/_components/media_player.snapcast.markdown b/source/_components/media_player.snapcast.markdown new file mode 100644 index 00000000000..7dee79e7a07 --- /dev/null +++ b/source/_components/media_player.snapcast.markdown @@ -0,0 +1,23 @@ +--- +layout: page +title: "SnapCast" +description: "Instructions on how to integrate SnapCast into Home Assistant." +date: 2016-02-01 19:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: +ha_category: Media Player +featured: false +--- + +The `snapcast` platform allows you to control [SnapCast](https://github.com/badaix/snapcast) from Home Assistant. + +To add SnapCast to your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +media_player: + platform: snapcast +``` diff --git a/source/_components/media_player.sonos.markdown b/source/_components/media_player.sonos.markdown index 22354e8d55a..8b7dcc4e698 100644 --- a/source/_components/media_player.sonos.markdown +++ b/source/_components/media_player.sonos.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Sonos" description: "Instructions how to integrateSonos devices into Home Assistant." date: 2015-09-12 13:00 @@ -13,7 +13,7 @@ featured: true --- -The sonos platform allows you to control your [Sonos](http://www.sonos.com) HiFi wireless speakers and audio components from Home Assistant. +The `sonos` platform allows you to control your [Sonos](http://www.sonos.com) HiFi wireless speakers and audio components from Home Assistant. To add your Sonos components to your installation, add the following to your `configuration.yaml` file. It will perform auto-discovery of your connected speakers. diff --git a/source/_components/media_player.squeezebox.markdown b/source/_components/media_player.squeezebox.markdown index 5d1a11ce52a..ba31bd25503 100644 --- a/source/_components/media_player.squeezebox.markdown +++ b/source/_components/media_player.squeezebox.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Logitech Squeezebox" description: "Instructions on how to integrate a Logitech Squeezebox player into Home Assistant." date: 2015-08-09 11:00 diff --git a/source/_components/media_player.universal.markdown b/source/_components/media_player.universal.markdown index f634f7bdb88..fd0267ffb52 100644 --- a/source/_components/media_player.universal.markdown +++ b/source/_components/media_player.universal.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Universal" description: "Instructions how to create a universal media player in Home Assistant." date: 2016-01-12 22:00 diff --git a/source/_components/modbus.markdown b/source/_components/modbus.markdown index f33ca58ca30..d8e4a36daaa 100644 --- a/source/_components/modbus.markdown +++ b/source/_components/modbus.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Modbus" description: "Instructions how to integrate Modbus within Home Assistant." date: 2015-04-25 9:16 diff --git a/source/_components/mqtt.markdown b/source/_components/mqtt.markdown index 2c0684ac9f1..2f37a9abf1c 100644 --- a/source/_components/mqtt.markdown +++ b/source/_components/mqtt.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "MQTT" description: "Instructions how to setup MQTT within Home Assistant." date: 2015-08-07 18:00 @@ -111,13 +111,35 @@ Home Assistant will automatically load the correct certificate if you connect to ## {% linkable_title Building on top of MQTT %} + - [MQTT Alarm control panel](/components/alarm_control_panel.mqtt/) + - [MQTT Binary sensor](/components/binary_sensor.mqtt/) - [MQTT Sensor](/components/sensor.mqtt/) - [MQTT Switch](/components/switch.mqtt/) + - [MQTT Light](/components/light.mqtt/) + - [MQTT Lock](/components/lock.mqtt/) - [MQTT Device Tracker](/components/device_tracker.mqtt/) - [OwnTracks Device Tracker](/components/device_tracker.owntracks/) - [MQTT automation rule](/components/automation/#mqtt-based-automation) - - [MQTT alarm](/components/alarm_control_panel.mqtt/) - - Integrating it into own component. See the [MQTT example component](https://github.com/balloob/home-assistant/blob/dev/config/custom_components/mqtt_example.py) how to do this. + + - Integrating it into own component. See the [MQTT example component](/cookbook/python_component_mqtt_basic/) how to do this. + +### {% linkable_title Publish service %} + +The MQTT component will register the service `publish` which allows publishing messages to MQTT topics. There are two ways of specifiying your payload. You can either use `payload` to hard-code a payload or use `payload_template` to specify a [template](/topics/templating/) that will be rendered to generate the payload. + +```json +{ + "topic": "home-assistant/light/1/command", + "payload": "on" +} +``` + +```json +{ + "topic": "home-assistant/light/1/state", + "payload_template": "{% raw %}{{ states('device_tracker.paulus') }}{% endraw %}" +} +``` ## {% linkable_title Testing your setup %} @@ -168,4 +190,4 @@ switch: More information about the full JSONPath syntax can be found [here][JSONPath syntax]. -[JSONPath syntax]: https://github.com/kennknowles/python-jsonpath-rw#jsonpath-syntax \ No newline at end of file +[JSONPath syntax]: https://github.com/kennknowles/python-jsonpath-rw#jsonpath-syntax diff --git a/source/_components/mqtt_eventstream.markdown b/source/_components/mqtt_eventstream.markdown index 59a49a64505..b31c1c71f08 100644 --- a/source/_components/mqtt_eventstream.markdown +++ b/source/_components/mqtt_eventstream.markdown @@ -1,17 +1,17 @@ --- -layout: component +layout: page title: "MQTT Eventstream" -description: "Instructions how to setup MQTT within Home Assistant." +description: "Instructions how to setup MQTT eventstream within Home Assistant." date: 2016-01-13 08:00 sidebar: true comments: false sharing: true footer: true logo: mqtt.png -ha_category: Others +ha_category: Other --- -The `mqtt_eventstream` components two Home Assistant instances via MQTT. +The `mqtt_eventstream` components connects two Home Assistant instances via MQTT. To integrate MQTT Eventstream into Home Assistant, add the following section to your `configuration.yaml` file: diff --git a/source/_components/mysensors.markdown b/source/_components/mysensors.markdown index 83482b97904..247cffe102a 100644 --- a/source/_components/mysensors.markdown +++ b/source/_components/mysensors.markdown @@ -1,8 +1,8 @@ --- -layout: component +layout: page title: "MySensors" description: "Instructions how to integrate MySensors sensors into Home Assistant." -date: 2015-05-14 21:57 +date: 2016-02-18 20:13 +0100 sidebar: true comments: false sharing: true @@ -12,7 +12,9 @@ ha_category: Hub featured: true --- -The [MySensors](https://www.mysensors.org) project combines Arduino boards with NRF24L01 radio boards to build sensor networks. The component will automatically add all available switches and sensors to Home Assistant. +The [MySensors](https://www.mysensors.org) project combines Arduino boards with NRF24L01 radio boards to build sensor networks. The component will automatically add all available devices to Home Assistant, after [presentation](#presentation) is done. + +### {% linkable_title Configuration %} Integrate your Serial MySensors Gateway by adding the following to your `configuration.yaml` file: @@ -22,23 +24,47 @@ mysensors: gateways: - port: '/dev/ttyUSB0' persistence_file: 'path/mysensors.json' + baud_rate: 38400 - port: '/dev/ttyACM1' persistence_file: 'path/mysensors2.json' + baud_rate: 115200 debug: true persistence: true version: '1.5' + optimistic: 'true' ``` Configuration variables: - **port** (*Required*): The port where your board is connected to your Home Assistant host. -- **debug** (*Optional*): Enable or disable verbose debug logging. -- **persistence** (*Optional*): Enable or disable local persistence of sensor information. If this is disabled, then each sensor will need to send presentation messages after Home Assistant starts. +- **debug** (*Optional*): Enable or disable verbose debug logging. Default is false. +- **persistence** (*Optional*): Enable or disable local persistence of sensor information. If this is disabled, then each sensor will need to send presentation messages after Home Assistant starts. Default is true. - **persistence_file** (*Optional*): Path to a file to save sensor information. The file extension determines the file type. Currently supported file types are 'pickle' and 'json'. -- **version** (*Optional*): Specifies the MySensors protocol version to use (ex. 1.4, 1.5). +- **version** (*Optional*): Specifies the MySensors protocol version to use. Supports 1.4 and 1.5. Default is 1.4. +- **baud_rate** (*Optional*): Specifies baud rate of the connected gateway. Default is 115200. +- **optimistic** (*Optional*): Enable or disable optimistic mode for actuators (switch/light). Default is false. Set this to true if no state feedback from actuators is possible. Home Assistant will assume that the command succeeded and change state. If you are using an original Arduino the port will be named `ttyACM*`. The exact number can be determined with the command shown below. ```bash $ ls /dev/ttyACM* ``` + +### {% linkable_title Presentation %} + +Present a MySensors sensor or actuator, by following these steps: + +1. Connect your gateway to your computer. +2. Configure the MySensors component in configuration.yaml. +3. Start hass. +4. Wait for "gateway started" in the log output. +5. Write and upload your MySensors sketch to the sensor. Make sure you: + - Either use a manual node id, or AUTO for requesting a node id from the controller, in gw.begin(). + - Send sketch name. + - Present the sensor's S_TYPE. + - Send at least one initial value per V_TYPE. +6. Start the sensor. + +Visit the [library api] of MySensors for more information. + +[library api]: https://www.mysensors.org/download/sensor_api_15 diff --git a/source/_components/nest.markdown b/source/_components/nest.markdown new file mode 100644 index 00000000000..f8a4723fe8a --- /dev/null +++ b/source/_components/nest.markdown @@ -0,0 +1,30 @@ +--- +layout: page +title: "Nest" +description: "Instructions how to integrate Nest into Home Assistant." +date: 2016-01-29 21:57 +sidebar: true +comments: false +sharing: true +footer: true +logo: nest_thermostat.png +ha_category: Hub +featured: true +--- + +The Nest component is the main component to integrate all Nest related platforms. Besides this component you will have to setup your thermostat and any connected sensors separately. + +```yaml +# Example configurayion.yaml entry +nest: + username: USERNAME + password: PASSWORD + +thermostat: + platform: nest +``` + +Configuration variables: + +- **username** (*Required*): Your Nest username. +- **password** (*Required*): Your Nest password. diff --git a/source/_components/notify.command_line.markdown b/source/_components/notify.command_line.markdown new file mode 100644 index 00000000000..a0da1befd31 --- /dev/null +++ b/source/_components/notify.command_line.markdown @@ -0,0 +1,31 @@ +--- +layout: page +title: "Command line Notify" +description: "Instructions how to add command line notifications to Home Assistant." +date: 2016-02-22 20:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: command_line.png +ha_category: Notifications +--- + +The `command_line` platform allows you to use external tools for notifications from Home Assistant. The message will be passed in as STDIN. + +To enable those notifications in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +notify: + name: NOTIFIER_NAME + platform: command_line + command: "espeak -vmb/mb-us1" +``` + +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`. +- **command** (*Required*): The action to take. + +To use notifications, please see the [getting started with automation page]({{site_root}}/components/automation/). diff --git a/source/_components/notify.file.markdown b/source/_components/notify.file.markdown index da02630853f..afb14df7b83 100644 --- a/source/_components/notify.file.markdown +++ b/source/_components/notify.file.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "File" description: "Instructions how to add file notifications to Home Assistant." date: 2015-06-22 10:00 @@ -11,7 +11,7 @@ ha_category: Notifications --- -The file platform allows you to store notifications from Home Assistant as a file. +The `file` platform allows you to store notifications from Home Assistant as a file. To enable file notifications in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/notify.free_mobile.markdown b/source/_components/notify.free_mobile.markdown index a3d6c53f574..43ae84c090a 100644 --- a/source/_components/notify.free_mobile.markdown +++ b/source/_components/notify.free_mobile.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Free Mobile" description: "Instructions how to add user notifications to Home Assistant." date: 2016-01-12 08:36 diff --git a/source/_components/notify.google_voice.markdown b/source/_components/notify.google_voice.markdown new file mode 100644 index 00000000000..83676fd3923 --- /dev/null +++ b/source/_components/notify.google_voice.markdown @@ -0,0 +1,52 @@ +--- +layout: page +title: "Google Voice SMS" +description: "Instructions how to add user notifications to Home Assistant." +date: 2016-01-29 +sidebar: true +comments: false +sharing: true +footer: true +logo: google_voice.png +ha_category: Notifications +--- + +[Google Voice](https://www.google.com/voice) is a free service, that allows sending of SMS messages to mobile phones. + +### Configuration + +```yaml +# Example configuration.yaml entry +notify: + platform: googlevoice + username: YOUR_GOOGLE_EMAIL + password: YOUR_GOOGLE_PASSWORD + # Optional + name: NOTIFIER_NAME +``` + +Configuration variables: + +- **username** (*Required*): Enter your the Google email address you have signed up for Google Voice with. Go to https://www.google.com/voice to setup your Google Voice account. +- **password** (*Required*): Enter the password associated with the above email. Go to https://www.pushbullet.com/ to retrieve your API key. +- **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`. + +### Usage + +Google Voice is a notify platform and thus can be controlled by calling the notify service [as described here](/components/notify/). It will send a notification to all devices listed in the notification **target**. + +```yaml +# Example automation notification entry +automation: + - alias: The sun has set + trigger: + platform: sun + event: sunset + action: + service: notify.googlevoice + data: + message: 'The sun has set' + target: + - 5555555555 + - 5555555556 +``` diff --git a/source/_components/notify.instapush.markdown b/source/_components/notify.instapush.markdown index 9160a0ea649..5fc49341bfd 100644 --- a/source/_components/notify.instapush.markdown +++ b/source/_components/notify.instapush.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Instapush" description: "Instructions how to add Instapush notifications to Home Assistant." date: 2015-05-01 18:00 @@ -12,7 +12,7 @@ ha_category: Notifications --- -The instapush platform uses [Instapush](https://instapush.im) to delivery notifications from Home Assistant to your Android or iOS device. +The `instapush` platform uses [Instapush](https://instapush.im) to delivery notifications from Home Assistant to your Android or iOS device. The Instapush [Getting Started page](https://instapush.im/home/start/) will guide through the process of creating the required items. diff --git a/source/_components/notify.markdown b/source/_components/notify.markdown index ed8f64c4d7d..d475db0cb2c 100644 --- a/source/_components/notify.markdown +++ b/source/_components/notify.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Notifications" description: "Instructions how to add user notifications to Home Assistant." date: 2015-01-20 22:36 @@ -37,7 +37,7 @@ Once loaded, the `notify` platform will expose a service that can be called to s The notification component supports specifying [templates] for both the `message` and the `title`. This will allow you to use the current state of Home Assistant in your notifications. -[templates]: /getting-started/templating/ +[templates]: /topics/templating/ ### {% linkable_title Test if it works %} diff --git a/source/_components/notify.mqtt.markdown b/source/_components/notify.mqtt.markdown new file mode 100644 index 00000000000..1f42e72e43d --- /dev/null +++ b/source/_components/notify.mqtt.markdown @@ -0,0 +1,33 @@ +--- +layout: page +title: "MQTT Notifications" +description: "Instructions how to add MQTT notifications to Home Assistant." +date: 2016-02-01 08:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: mqtt.png +ha_category: Notifications +--- + +The MQTT notification support is different than the other [notification](/components/notify/) platforms. It is a service. This means that you don't have to create a configuration entry but you need to provide more details while calling the service. + +**Call Service** section from the **Developer Tools** allows you to send MQTT messages. Choose *mqtt/publish* from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**. + +```json +{"payload": "Test message from HA", "topic": "home/notification", "qos": 0, "retain": 0} +``` + +

+ +

+ +Using the [REST API](/developers/rest_api/#post-apiservicesltdomainltservice) to send a message to a given topic. + +```bash +$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \ + -d '{"payload": "Test message from HA", "topic": "home/notification"}' \ + http://IP_ADDRESS:8123/api/services/mqtt/publish +``` + diff --git a/source/_components/notify.nma.markdown b/source/_components/notify.nma.markdown index ccd634f28c7..4545d619e59 100644 --- a/source/_components/notify.nma.markdown +++ b/source/_components/notify.nma.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Notify My Android" description: "Instructions how to add user notifications to Home Assistant." date: 2015-05-01 18:00 diff --git a/source/_components/notify.pushbullet.markdown b/source/_components/notify.pushbullet.markdown index e5d40058ffb..5860998a158 100644 --- a/source/_components/notify.pushbullet.markdown +++ b/source/_components/notify.pushbullet.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "PushBullet" description: "Instructions how to add user notifications to Home Assistant." date: 2015-01-20 22:36 @@ -12,16 +12,15 @@ ha_category: Notifications featured: true --- -[PushBullet](https://www.pushbullet.com/) is a free service to send information between your phones, browsers and friends. +The `pushbullet` notification platform sends messages to [PushBullet](https://www.pushbullet.com/), a free service to send information between your phones, browsers, and friends. -### Configuration +To enable PushBullet notifications in your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry notify: platform: pushbullet api_key: YOUR_API_KEY - # Optional name: NOTIFIER_NAME ``` @@ -30,9 +29,9 @@ Configuration variables: - **api_key** (*Required*): Enter the API key for PushBullet. Go to https://www.pushbullet.com/ to retrieve your API key. - **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`. -### Usage +### {% linkable_title Usage %} -PushBullet is a notify platform and thus can be controlled by calling the notify service [as described here](/components/notify/). It will send a notification to all devices registered in the PushBullet account. An optional **target** parameter can be given to PushBullet to specify specific account's devices, contacts or channels. +PushBullet is a notify platform and thus can be controlled by calling the notify service [as described here](/components/notify/). It will send a notification to all devices registered in the PushBullet account. An optional **target** parameter can be given to PushBullet to specify specific account's devices, contacts or channels. Type | Prefix | Suffix | Example ---- | ------ | ------ | ------- @@ -42,14 +41,14 @@ Email | `email/` | Contact's email address | `email/email@example.com` If using targets, your own account's email address functions as 'send to all devices'. All targets are verified (if exists) before sending, except email. -#### Example service payload +#### {% linkable_title Example service payload %} ```json { "message": "A message for many people", "target": [ "device/telephone", - "contact/hello@example.com", + "email/hello@example.com", "channel/my_home" ] } diff --git a/source/_components/notify.pushetta.markdown b/source/_components/notify.pushetta.markdown index 2690df81331..e3a6f049d9b 100644 --- a/source/_components/notify.pushetta.markdown +++ b/source/_components/notify.pushetta.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Pushetta" description: "Instructions how to add Pushetta notifications to Home Assistant." date: 2015-11-10 18:00 diff --git a/source/_components/notify.pushover.markdown b/source/_components/notify.pushover.markdown index 02aa891990a..9e7161e3619 100644 --- a/source/_components/notify.pushover.markdown +++ b/source/_components/notify.pushover.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "PushOver" description: "Instructions how to add user notifications to Home Assistant." date: 2015-01-20 22:36 diff --git a/source/_components/notify.rest.markdown b/source/_components/notify.rest.markdown new file mode 100644 index 00000000000..27752b6bbe6 --- /dev/null +++ b/source/_components/notify.rest.markdown @@ -0,0 +1,40 @@ +--- +layout: page +title: "REST" +description: "Instructions how to add RESTful notifications to Home Assistant." +date: 2016-02-12 07:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Notifications +--- + + +The `rest` notification platform allows you to deliver [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) notifications from Home Assistant to another party. + +To enable the REST notification in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +notify: + name: NOTIFIER_NAME + platform: rest + resource: http://IP_ADDRESS/ENDPOINT + method: GET + message_param_name: MESSAGE_PARAMETER_NAME + title_param_name: TITLE_PARAMETER_NAME + target_param_name: TARGET_PARAMETER_NAME +``` + +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`. +- **resource** (*Required*): The resource or endpoint that will recieve the value. +- **method** (*Optional*): The method of the request. Default is GET. +- **message_param_name** (*Optional*): Parameter name for the message. Defaults to `message`. +- **title_param_name** (*Optional*): Parameter name for the title. Defaults to none. +- **target_param_name** (*Optional*): Parameter name for the target. Defaults to none. + +To use notifications, please see the [getting started with automation page]({{site_root}}/components/automation/). + diff --git a/source/_components/notify.sendgrid.markdown b/source/_components/notify.sendgrid.markdown new file mode 100644 index 00000000000..966943d9b1b --- /dev/null +++ b/source/_components/notify.sendgrid.markdown @@ -0,0 +1,35 @@ +--- +layout: page +title: "SendGrid" +description: "Instructions how to add email notifications via SendGrid to Home Assistant." +date: 2016-02-27 18:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: sendgrid.png +ha_category: Notifications +--- + +The `sendgrid` notification platform sends email notifications via [SendGrid](https://sendgrid.com/), a proven cloud-based email platform. + +To enable notification emails via SendGrid in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +notify: + name: NOTIFIER_NAME + platform: sendgrid + api_key: API_KEY + sender: SENDER_EMAIL_ADDRESS + recipient: YOUR_RECIPIENT +``` + +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`. +- **api_key** (*Required*): SendGrid API key - https://app.sendgrid.com/settings/api_keys +- **sender** (*Required*): E-mail address of the sender. +- **recipient** (*Required*): Recipient of the notification. + +To use notifications, please see the [getting started with automation page]({{site_root}}/components/automation/). diff --git a/source/_components/notify.slack.markdown b/source/_components/notify.slack.markdown index df0d51888e0..5f3c21735e6 100644 --- a/source/_components/notify.slack.markdown +++ b/source/_components/notify.slack.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Slack" description: "Instructions how to add Slack notifications to Home Assistant." date: 2015-08-06 18:00 @@ -12,7 +12,7 @@ ha_category: Notifications --- -The slack platform allows you to deliver notifications from Home Assistant to [Slack](https://slack.com/). +The `slack` platform allows you to deliver notifications from Home Assistant to [Slack](https://slack.com/). You need to obtain the [Slack API token](https://api.slack.com/web?sudo=1) to be able to send notifications. diff --git a/source/_components/notify.smtp.markdown b/source/_components/notify.smtp.markdown index f90671994fc..92cddbb6e12 100644 --- a/source/_components/notify.smtp.markdown +++ b/source/_components/notify.smtp.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "SMTP" description: "Instructions how to add e-mail notifications to Home Assistant." date: 2015-06-03 18:00 @@ -12,7 +12,7 @@ ha_category: Notifications --- -The smtp platform allows you to deliver notifications from Home Assistant to an e-mail recipient. +The `smtp` platform allows you to deliver notifications from Home Assistant to an e-mail recipient. To enable notification by e-mail in your installation, add the following to your `configuration.yaml` file: @@ -33,18 +33,17 @@ notify: 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`. -- **server** (*Required*): SMTP server which is used to end the notifications. For Google Mail, eg. smtp.gmail.com. Keep in mind that Google has some extra layers of protection which need special attention (Hint: 'Less secure apps'). -- **port** (*Required*): The port that the SMTP server is using, eg. 587 for Google Mail and STARTTLS or 465/993 depending on your SMTP servers. -- **sender** (*Required*): E-Mail address of the sender. -- **username** (*Required*): Username for the SMTP account. -- **password** (*Required*):Password for the SMTP server that belongs to the given username. If the password contains a colon it need to be wrapped in apostrophes. +- **server** (*Optional*): SMTP server which is used to end the notifications. For Google Mail, eg. smtp.gmail.com. Keep in mind that Google has some extra layers of protection which need special attention (Hint: 'Less secure apps'). Defaults to `localhost`. +- **port** (*Optional*): The port that the SMTP server is using, eg. 587 for Google Mail and STARTTLS or 465/993 depending on your SMTP servers. Defaults to 25. +- **sender** (*Optional*): E-mail address of the sender. +- **username** (*Optional*): Username for the SMTP account. +- **password** (*Optional*):Password for the SMTP server that belongs to the given username. If the password contains a colon it need to be wrapped in apostrophes. - **recipient** (*Required*): Recipient of the notification. -- **starttls** (*Optional*): Enables STARTTLS, eg. 1 or 0. - +- **starttls** (*Optional*): Enables STARTTLS, eg. 1 or 0. Defaults to 0. This platform is fragile and not able to catch all exceptions in a smart way because of the large number of possible configuration combinations. -A combination that will work properly is port 587 and STARTTLS. It's recommanded to enable STARTTLS, if possible. +A combination that will work properly is port 587 and STARTTLS. It's recommended to enable STARTTLS, if possible. Keep in mind that if the password contains a colon, it needs to be wrapped in apostrophes in the `configuration.yaml` file. diff --git a/source/_components/notify.syslog.markdown b/source/_components/notify.syslog.markdown index 9ff602d809c..e556f6d108c 100644 --- a/source/_components/notify.syslog.markdown +++ b/source/_components/notify.syslog.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Syslog" description: "Instructions how to add syslog notifications to Home Assistant." date: 2015-06-09 16:00 @@ -11,7 +11,7 @@ ha_category: Notifications --- -The syslog platform allows you to deliver notifications from Home Assistant to the local syslog. +The `syslog` platform allows you to deliver notifications from Home Assistant to the local syslog. To enable syslog notifications in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/notify.telegram.markdown b/source/_components/notify.telegram.markdown index 83b8bfd6b27..b1d27f759fb 100644 --- a/source/_components/notify.telegram.markdown +++ b/source/_components/notify.telegram.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Telegram" description: "Instructions how to add Telegram notifications to Home Assistant." date: 2015-10-09 18:00 @@ -12,9 +12,9 @@ ha_category: Notifications --- -The telegram platform uses [Telegram](https://web.telegram.org) to delivery notifications from Home Assistant to your Android device, your Windows phone, or your iOS device. +The `telegram` platform uses [Telegram](https://web.telegram.org) to delivery notifications from Home Assistant to your Android device, your Windows phone, or your iOS device. -The requirement are: +The requirements are: - You need a [Telegram bot](https://core.telegram.org/bots). Please follow those [instructions](https://core.telegram.org/bots#botfather) to create one and get the token for your bot. Keep in mind that bots are not allowed to contact users. You need to make the first contact with your user. Meaning that you need to send a message to the bot from your user. - The `chat_id` of an user. diff --git a/source/_components/notify.twitter.markdown b/source/_components/notify.twitter.markdown new file mode 100644 index 00000000000..49247e4cc51 --- /dev/null +++ b/source/_components/notify.twitter.markdown @@ -0,0 +1,38 @@ +--- +layout: page +title: "Twitter" +description: "Instructions how to add Twitter notifications to Home Assistant." +date: 2016-01-27 07:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: twitter.png +ha_category: Notifications +--- + + +The `twitter` platform uses [Twitter](https://twitter.com) to delivery notifications from Home Assistant. + +Go to [Twitter Apps](https://apps.twitter.com/app/new) and create an application. Visit "Keys and Access Tokens" of the application to get the details ("Consumer Key", "Consumer Secret", and "Access Token Secret" which needs to be generated). + +To add Twitter to your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +notify: + name: NOTIFIER_NAME + platform: twitter + consumer_key: ABCDEFGHJKLMNOPQRSTUVXYZ + consumer_secret: ABCDEFGHJKLMNOPQRSTUVXYZ + access_token_secret: ABCDEFGHJKLMNOPQRSTUVXYZ +``` + +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`. +- **consumer_key** (*Required*): Your "Consumer Key" (API Key) for the application. +- **consumer_secret** (*Required*): Your "Consumer Secret" (API Secret) for the application. +- **access_token_secret** (*Required*): Your "Access Token Secret" for the application. + +To use notifications, please see the [getting started with automation page]({{site_root}}/components/automation/). diff --git a/source/_components/notify.xmpp.markdown b/source/_components/notify.xmpp.markdown index d381fd0fca1..f410411d006 100644 --- a/source/_components/notify.xmpp.markdown +++ b/source/_components/notify.xmpp.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Jabber (XMPP)" description: "Instructions how to add Jabber (XMPP) notifications to Home Assistant." date: 2015-05-08 18:00 @@ -12,7 +12,7 @@ ha_category: Notifications --- -The xmpp platform allows you to deliver notifications from Home Assistant to a [Jabber (XMPP)](http://xmpp.org) account. +The `xmpp` platform allows you to deliver notifications from Home Assistant to a [Jabber (XMPP)](http://xmpp.org) account. ```yaml # Example configuration.yaml entry diff --git a/source/_components/proximity.markdown b/source/_components/proximity.markdown new file mode 100644 index 00000000000..b42a218d441 --- /dev/null +++ b/source/_components/proximity.markdown @@ -0,0 +1,57 @@ +--- +layout: page +title: "Proximity" +description: "Instructions how to setup Proximity monitoring within Home Assistant." +date: 2016-02-07 10:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: home-assistant.png +ha_category: Organization +--- + +The `proximity` component allows you to monitor the proximity of devices to a particular [zone](/components/zone/) and the direction of travel. The result is an entity created in Home Assistant which maintains the proximity data. + +This component is useful to reduce the number of automation rules required when wanting to perform automations based on locations outside a particular zone. The [zone](/components/automation/#zone-trigger) and [state](/components/automation/#state-trigger) based triggers allow similar control but the number of rules grows exponentially when factors such as direction of travel need to be taken into account. + +Some examples of its use include: + +- Increase thermostat temperature as you near home +- Decrease temperature the further away from home you travel + +The Proximity entity which is created has the following values: + +- `state`: Distance from the monitored zone (in km) +- `dir_of_travel`: Direction of the closest device to the monitoed zone. Values are: + - 'not set' + - 'arrived' + - 'towards' + - 'away_from' + - 'unknown' + - 'stationary' +- `dist_to_zone`: Distance from the monitored zone (in km) + +To enable this component in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +proximity: + zone: home + ignored_zones: + - twork + - elschool + devices: + - device_tracker.nwaring_nickmobile + - device_tracker.eleanorsiphone + - device_tracker.tsiphone + tolerance: 50 +``` + +Configuration variables: + +- **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). +- **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. + diff --git a/source/_components/rfxtrx.markdown b/source/_components/rfxtrx.markdown index 8dccdf26c99..18e44c582a9 100644 --- a/source/_components/rfxtrx.markdown +++ b/source/_components/rfxtrx.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "RFXtrx" description: "Instructions how to integrate RFXtrx into Home Assistant." date: 2015-10-08 10:15 diff --git a/source/_components/rollershutter.command_line.markdown b/source/_components/rollershutter.command_line.markdown new file mode 100644 index 00000000000..789dc642075 --- /dev/null +++ b/source/_components/rollershutter.command_line.markdown @@ -0,0 +1,38 @@ +--- +layout: page +title: "Command line Rollershutter" +description: "Instructions how to have rollershutters call command line commands." +date: 2016-02-22 13:45 +sidebar: true +comments: false +sharing: true +footer: true +logo: command_line.png +ha_category: Rollershutter +--- +A rollershutter platform that issues specific commands when it is moved up, down and stopped. This might very well become our most powerful platform as it allows anyone to integrate any type of rollershutter into Home Assistant that can be controlled from the command line, including calling other scripts! + +To enable command_rollershutter in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +rollershutter: +- platform: command_line + rollershutters: + Kitchen Rollershutter: + upcmd: move_command up kitchen + downcmd: move_command down kitchen + stopcmd: move_command stop kitchen + statecmd: state_command kitchen + value_template: '{% raw %}{{ value }}{% endraw %}' +``` + +Configuration variables: + +- **rollershutters** (*Required*): The array that contains all command rollershutters. + - **entry** (*Required*): Name of the command rollershutter. Multiple entries are possible. + - **upcmd** (*Required*): The action to take for move up. + - **downcmd** (*Required*): The action to take for move down. + - **stopcmd** (*Required*): The action to take for stop. + - **statecmd** (*Optional*): If given, this command will be run. Returning a result code `0` will indicate that the rollershutter is fully closed, returning a result code `100` will indicate that the rollershutter is fully open. + - **value_template** (*Optional - default: '{% raw %}{{ value }}{% endraw %}'*): If specified, statecmd will ignore the result code of the command but the template evaluating will indicate the position of the rollershutter. diff --git a/source/_components/rollershutter.markdown b/source/_components/rollershutter.markdown index 34f479fae51..1fe740d433c 100644 --- a/source/_components/rollershutter.markdown +++ b/source/_components/rollershutter.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Rollershutters" description: "Instructions how to integrate rollershutters into Home Assistant." date: 2015-12-01 12:00 diff --git a/source/_components/rollershutter.mqtt.markdown b/source/_components/rollershutter.mqtt.markdown index a9b92398d6e..51a840c3a91 100644 --- a/source/_components/rollershutter.mqtt.markdown +++ b/source/_components/rollershutter.mqtt.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "MQTT Rollershutter" description: "Instructions how to integrate MQTT motorized devices into Home Assistant." date: 2015-12-01 12:00 @@ -12,20 +12,22 @@ ha_category: Rollershutter --- -This platform enables the possibility to control an MQTT rollershutter. The device state will be updated only after receiving the a new state from `state_topic`. If these messages are published with RETAIN flag, the MQTT device will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state will be `unknown`. +The `mqtt` rollershutter platform enables the possibility to control an MQTT rollershutter. The device state will be updated only after receiving the a new state from `state_topic`. If these messages are published with RETAIN flag, the MQTT device will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state will be `unknown`. There is a state attribute that stores the relative position of the device, where 0% means the device is `closed` and all other intermediate positions means the device is `open`. +To enable this platform, add the following lines to your `configuration.yaml`: + ```yaml # Example configuration.yaml entry -motor: +rollershutter: platform: mqtt name: "Bedroom Rollershutter" state_topic: "home/bedroom/rollershutter" command_topic: "home/bedroom/rollershutter/set" qos: 0 - payload_open: "OPEN" - payload_close: "CLOSE" + payload_up: "OPEN" + payload_down: "CLOSE" payload_stop: "STOP" value_template: '{% raw %}{{ value.x }}{% endraw %}' ``` @@ -37,7 +39,7 @@ Configuration variables: - **name** (*Optional*): The name of the rollershutter. Default is 'MQTT Rollershutter'. - **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates. If not defined, the rollershutter will be stateless, that is, no information about current position or open/closed. If defined, the received payload must be a integer between 0 and 100, that represents the percentage for fully closed and fully open, respectively. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. This QoS will also be used to publishing messages. -- **payload_open** (*Optional*): The payload to open the rollershutter. Default is "OPEN". -- **payload_close** (*Optional*): The payload to close the rollershutter. Default is "CLOSE". +- **payload_up** (*Optional*): The payload to open the rollershutter. Default is "OPEN". +- **payload_down** (*Optional*): The payload to close the rollershutter. Default is "CLOSE". - **payload_stop** (*Optional*): The payload to stop the rollershutter. Default is "STOP". -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. diff --git a/source/_components/rollershutter.scsgate.markdown b/source/_components/rollershutter.scsgate.markdown new file mode 100644 index 00000000000..a1843b77a80 --- /dev/null +++ b/source/_components/rollershutter.scsgate.markdown @@ -0,0 +1,31 @@ +--- +layout: page +title: "SCSGate Rollershutter" +description: "Instructions how to integrate SCSGate motorized devices into Home Assistant." +date: 2016-01-31 22:16 +sidebar: true +comments: false +sharing: true +footer: true +logo: bus_scs.png +ha_category: Rollershutter +--- +The SCSGate device can control motirized roller shutters connected to the BTicino MyHome system. + +To enable SCSGate roller shutters in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +rollershutter: + platform: scsgate + devices: + living_room: + name: Living Room + scs_id: XXXXX +``` + +Configuration variables: + +- **devices** (*Required*): A list of devices with their name to use in the frontend. + +**Known limitation:** it is not possible to know the current state of the roller shutter. diff --git a/source/_components/scene.hunterdouglas_powerview.markdown b/source/_components/scene.hunterdouglas_powerview.markdown new file mode 100644 index 00000000000..d35c4e49ec0 --- /dev/null +++ b/source/_components/scene.hunterdouglas_powerview.markdown @@ -0,0 +1,27 @@ +--- +layout: page +title: "PowerView Scenes" +description: "Instructions how to setup Hunter Douglas PowerView scenes within Home Assistant." +date: 2016-03-11 16:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: hunter-douglas-powerview.png +ha_category: Rollershutter +--- + +Implements the [Hunter Douglas PowerView](http://www.hunterdouglas.com/operating-systems/powerview-motorization/support) platform scene control. It queries the PowerView Hub and Home Assistant displays them as scenes. + +Scenes can be activated using the service `scene.turn_on`. + +```yaml +# Example configuration.yaml entry +scene: + platform: hunterdouglas_powerview + address: IP_ADDRESS +``` + +Configuration variables: + +- **address** (*Required*): IP address of the PowerView Hub, eg. 192.168.1.10. diff --git a/source/_components/scene.markdown b/source/_components/scene.markdown index 083bd0c0a34..3ba280133dc 100644 --- a/source/_components/scene.markdown +++ b/source/_components/scene.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Scenes" description: "Instructions how to setup scenes within Home Assistant." date: 2015-03-23 19:59 diff --git a/source/_components/script.markdown b/source/_components/script.markdown index 033c51e70de..119ec629330 100644 --- a/source/_components/script.markdown +++ b/source/_components/script.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Scripts" description: "Instructions how to setup scripts within Home Assistant." date: 2015-03-23 19:59 @@ -29,13 +29,14 @@ script: domain: light - alias: Bedroom lights on service: light.turn_on - service_data: + data: entity_id: group.bedroom + brightness: 100 - delay: # supports seconds, milliseconds, minutes, hours, etc. minutes: 1 - alias: Living room lights on service: light.turn_on - service_data: + data: entity_id: group.living_room ``` diff --git a/source/_components/scsgate.markdown b/source/_components/scsgate.markdown new file mode 100644 index 00000000000..62930c52f4b --- /dev/null +++ b/source/_components/scsgate.markdown @@ -0,0 +1,34 @@ +--- +layout: page +title: "SCSGate" +description: "Instructions how to integrate SCSGate into Home Assistant." +date: 2016-01-31 19:20 +sidebar: true +comments: false +sharing: true +footer: true +logo: bus_scs.png +ha_category: Hub +--- + +The SCSGate component support the [SCSGate](https://translate.google.com/translate?hl=en&sl=it&tl=en&u=http%3A%2F%2Fguidopic.altervista.org%2Feibscsgt%2Finterface.html) device. This a homebrew device allows to interact with the MyHome system from BTicino/Legrande. + +To enable SCSGate in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +scsgate: + device: PATH_TO_DEVICE +``` + +Configuration variables: + +- **device** (*Required*): The path to your device, e.g. `/dev/ttyACM0` + +### How to find the scs_id for your devices + +The SCSGate component relies on the [scsgate](https://github.com/flavio/scsgate) python module. + +This module provides also a command line tool called `scs-monitor`. This program can be used to find the IDs of your lights, switches and roller shutters and produce the YAML snippet to insert into your `configuration.yaml` file. + +For more information checkout [this](http://scsgate.readthedocs.org/en/latest/?badge=latest#creation-of-a-home-assistant-configuration-file) section of `scsgate`'s documentation. diff --git a/source/_components/sensor.apcupsd.markdown b/source/_components/sensor.apcupsd.markdown new file mode 100644 index 00000000000..2a1d18741d3 --- /dev/null +++ b/source/_components/sensor.apcupsd.markdown @@ -0,0 +1,94 @@ +--- +layout: page +title: APCUPSd Sensor +description: "Instructions on how to set up APCUPSd sensors within Home Assistant." +date: 2016-02-10 18:28 +sidebar: true +comments: false +sharing: true +footer: true +logo: apcupsd.png +ha_category: Sensor +--- + +Any of the lines of output from the [apcaccess](http://linux.die.net/man/8/apcaccess) command can be used as a sensor device in Home Assistant. In order to create a sensor for a value, create an entity within a `sensor` section of your configuration. The following parameters may be used: + +- **name** (*Required*): The name you'd like to give the sensor in Home Assistant. +- **platform** (*Required*): Set to `apcupsd`. +- **type** (*Required*): The label for the value you'd like to track based on the output of `apcaccess`. Refer to the examples for ideas. + +#### Example + +Given the following output from `apcaccess`: + +```yaml +APC : 001,051,1149 +DATE : 2016-02-09 17:13:31 +0000 +HOSTNAME : localhost +VERSION : 3.14.12 (29 March 2014) redhat +UPSNAME : netrack +CABLE : Custom Cable Smart +DRIVER : APC Smart UPS (any) +UPSMODE : Stand Alone +STARTTIME: 2016-02-09 16:06:47 +0000 +MODEL : SMART-UPS 1400 +STATUS : TRIM ONLINE +LINEV : 247.0 Volts +LOADPCT : 13.0 Percent +BCHARGE : 100.0 Percent +TIMELEFT : 104.0 Minutes +MBATTCHG : 5 Percent +MINTIMEL : 3 Minutes +MAXTIME : 0 Seconds +MAXLINEV : 249.6 Volts +MINLINEV : 244.4 Volts +OUTPUTV : 218.4 Volts +SENSE : High +DWAKE : 0 Seconds +DSHUTD : 180 Seconds +DLOWBATT : 2 Minutes +LOTRANS : 196.0 Volts +HITRANS : 253.0 Volts +RETPCT : 15.0 Percent +ITEMP : 30.6 C +ALARMDEL : Low Battery +BATTV : 27.6 Volts +LINEFREQ : 50.0 Hz +LASTXFER : High line voltage +NUMXFERS : 0 +TONBATT : 0 Seconds +CUMONBATT: 0 Seconds +XOFFBATT : N/A +SELFTEST : NO +STESTI : 336 +STATFLAG : 0x0500000A +DIPSW : 0x00 +REG1 : 0x00 +REG2 : 0x00 +REG3 : 0x00 +MANDATE : 07/13/99 +SERIALNO : GS9888761008 +BATTDATE : 13/11/15 +NOMOUTV : 230 Volts +NOMBATTV : 24.0 Volts +EXTBATTS : 0 +FIRMWARE : 70.11.I +END APC : 2016-02-09 17:13:46 +0000 +``` + +Use the (case insensitive) values from the left hand column as your `type`: + +```yaml +sensor: + - name: Mains Voltage + platform: apcupsd + type: linev + + - name: UPS Load + platform: apcupsd + type: loadpct + + - name: UPS Temperature + platform: apcupsd + type: itemp +``` diff --git a/source/_components/sensor.arduino.markdown b/source/_components/sensor.arduino.markdown index fa013a9f0df..f893a4ada08 100644 --- a/source/_components/sensor.arduino.markdown +++ b/source/_components/sensor.arduino.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Arduino sensor" +layout: page +title: "Arduino Sensor" description: "Instructions how to integrate Arduino boards pins as sensors within Home Assistant." date: 2015-09-14 18:28 sidebar: true @@ -12,7 +12,7 @@ ha_category: DIY --- -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 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. To enable an Arduino sensor with Home Assistant, add the following section to your `configuration.yaml` file: diff --git a/source/_components/sensor.arest.markdown b/source/_components/sensor.arest.markdown index 89326f3db32..40926089f5f 100644 --- a/source/_components/sensor.arest.markdown +++ b/source/_components/sensor.arest.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "aREST sensor" +layout: page +title: "aREST Sensor" description: "Instructions how to integrate aREST sensors within Home Assistant." date: 2015-09-07 18:15 sidebar: true @@ -9,10 +9,11 @@ sharing: true footer: true logo: arest.png ha_category: Sensor +ha_iot_class: "Local Polling" --- -The arest sensor platform allows you to get all data from your devices (like Arduinos with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework. +The `arest` sensor platform allows you to get all data from your devices (like Arduinos with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework. To use your aREST enabled device in your installation, add the following to your `configuration.yaml` file: @@ -44,11 +45,11 @@ Configuration variables: - **monitored_variables** array (*Optional*): List of exposed variables. - **name** (*Required*): The name of the variable you wish to monitor. - **unit** (*Optional*): Defines the units of measurement of the sensor, if any. - - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. - **pins** array (*Optional*): List of pins to monitor. Analog pins need a leading **A** for the pin number. - **name** (*Optional*): The name of the variable you wish to monitor. - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. - - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. The variables in the `monitored_variables` array must be available in the response of the device. As a starting point you could use the one of the example sketches (eg. [Ethernet](https://raw.githubusercontent.com/marcoschwartz/aREST/master/examples/Ethernet/Ethernet.ino) for an Arduino with Ethernet shield). In those sketches are two variables (`temperature` and `humidity`) available which will act as endpoints. diff --git a/source/_components/sensor.bitcoin.markdown b/source/_components/sensor.bitcoin.markdown index efb232c67fe..56145a9d814 100644 --- a/source/_components/sensor.bitcoin.markdown +++ b/source/_components/sensor.bitcoin.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Bitcoin" description: "Instructions how to integrate Bitcoin data within Home Assistant." date: 2015-05-08 17:15 @@ -12,7 +12,7 @@ ha_category: Sensor --- -The bitcoin platform displays various details about the [Bitcoin](https://bitcoin.org) network. +The `bitcoin` platform displays various details about the [Bitcoin](https://bitcoin.org) network. If you have an online wallet from [Blockchain.info](https://blockchain.info/) the sensor is capable to show your current balance. diff --git a/source/_components/sensor.bloomsky.markdown b/source/_components/sensor.bloomsky.markdown new file mode 100644 index 00000000000..08a9852e086 --- /dev/null +++ b/source/_components/sensor.bloomsky.markdown @@ -0,0 +1,42 @@ +--- +layout: page +title: "BloomSky Sensor" +description: "Instructions how to integrate the BloomSky sensors within Home Assistant." +date: 2016-02-03 20:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: bloomsky.png +ha_category: Sensor +--- + + +The `bloomsky` sensor component allows you to view the measurements made by sensors in the [BloomSky](https://www.bloomsky.com) weather station. This can work in concert with the [BloomSky camera](/components/camera.bloomsky). + +To enable these sensors in your installation, set up the [BloomSky component](/components/bloomsky) with your API key add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: bloomsky + monitored_conditions: + - Temperature + - Humidity + - Rain + - Pressure + - UVIndex + - Luminance + - Night +``` + +Configuration variables: + +- **monitored_conditions** array *Required*: The sensors that you wish to monitor on all of your devices. Select from these options: + - Humidity + - Luminance + - Night + - Pressure + - Rain + - Temperature + - UVIndex diff --git a/source/_components/sensor.command_sensor.markdown b/source/_components/sensor.command_line.markdown similarity index 92% rename from source/_components/sensor.command_sensor.markdown rename to source/_components/sensor.command_line.markdown index 914ce66f8ff..0e26cae696f 100644 --- a/source/_components/sensor.command_sensor.markdown +++ b/source/_components/sensor.command_line.markdown @@ -1,12 +1,13 @@ --- -layout: component -title: "Command line sensor" +layout: page +title: "Command line Sensor" description: "Instructions how to integrate command line sensors into Home Assistant." date: 2015-09-13 10:10 sidebar: true comments: false sharing: true footer: true +logo: command_line.png ha_category: Sensor --- @@ -18,7 +19,7 @@ To enable it, add the following lines to your `configuration.yaml`: ```yaml # Example configuration.yaml entry sensor: - platform: command_sensor + platform: command_line command: SENSOR_COMMAND name: Command sensor unit_of_measurement: "°C" @@ -30,7 +31,7 @@ Configuration variables: - **command** (*Required*): The action to take to get the value. - **name** (*Optional*): Name of the command sensor. - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} @@ -49,7 +50,7 @@ To use those information, the entry for a sensor in the `configuration.yaml` fil ```yaml # Example configuration.yaml entry sensor: - platform: command_sensor + platform: command_line name: HD Temperature command: "hddtemp -n /dev/sda" unit_of_measurement: "°C" @@ -61,7 +62,7 @@ Thanks to the [`proc`](https://en.wikipedia.org/wiki/Procfs) file system, variou ```yaml # Example configuration.yaml entry - - platform: command_sensor + - platform: command_line name: CPU Temperature command: "cat /sys/class/thermal/thermal_zone0/temp" unit_of_measurement: "°C" @@ -76,7 +77,7 @@ The `correction_factor` will make sure that the value is shown in a useful forma You can see directly in the frontend (**Developer tools** -> **About**) what release of Home Assistant you are running. The Home Assistant releases are available on the [Python Package Index](https://pypi.python.org/pypi). This makes it possible to get the current release. ```yaml - - platform: command_sensor + - platform: command_line command: python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])" name: HA release ``` @@ -105,7 +106,7 @@ To use the script you need to add something like the following to your `configur ```yaml # Example configuration.yaml entry sensor: - platform: command_sensor + platform: command_line name: Brightness command: "python3 /path/to/script/arest-value.py" unit_of_measurement: "°C" diff --git a/source/_components/sensor.cpuspeed.markdown b/source/_components/sensor.cpuspeed.markdown index 96e04b4c57b..ba02555414a 100644 --- a/source/_components/sensor.cpuspeed.markdown +++ b/source/_components/sensor.cpuspeed.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "CPU speed" description: "Instructions how to integrate CPU speed within Home Assistant." date: 2015-10-15 11:00 @@ -8,10 +8,11 @@ comments: false sharing: true footer: true ha_category: Sensor +ha_iot_class: "Local Push" --- -The cpuspeed sensor platform to allow you to monitor the current CPU speed. +The `cpuspeed` sensor platform to allow you to monitor the current CPU speed. To add this platform to your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.deutsche_bahn.markdown b/source/_components/sensor.deutsche_bahn.markdown new file mode 100644 index 00000000000..3dd20003274 --- /dev/null +++ b/source/_components/sensor.deutsche_bahn.markdown @@ -0,0 +1,32 @@ +--- +layout: page +title: "Deutsche Bahn" +description: "Instructions how to integrate timetable data for travelling in Germany within Home Assistant." +date: 2015-06-02 21:45 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Sensor +ha_iot_class: "Local Polling" +--- + + +The `deutsche_bahn` sensor will give you the departure time of the next train for the given connection. In case of a delay, the delay is also shown. Additional `ATTRIBUTES` are used to inform about eg. the type of the train, price and if it is ontime. The data are coming from the [bahn.de](http://www.bahn.de/p/view/index.shtml) website. + + +To enable this sensor, add the following lines to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: deutsche_bahn + from: NAME_OF_START_STATION + to: NAME_OF_FINAL_STATION +``` + +Configuration variables: + +- **from** (*Required*): The name of the start station. +- **to** (*Required*): The name of the end station. + diff --git a/source/_components/sensor.dht.markdown b/source/_components/sensor.dht.markdown index 3f00c01b4d3..271be938f13 100644 --- a/source/_components/sensor.dht.markdown +++ b/source/_components/sensor.dht.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "DHT sensor" +layout: page +title: "DHT Sensor" description: "Instructions how to integrate DHTxx sensors within Home Assistant." date: 2015-08-30 19:15 sidebar: true @@ -11,7 +11,7 @@ ha_category: DIY --- -The dht sensor platform allows you to get the current temperature and humidity from a DHT11, DHT22, or AM2302 device. +The `dht` sensor platform allows you to get the current temperature and humidity from a DHT11, DHT22, or AM2302 device. To use your DHTxx sensor in your installation, add the following to your `configuration.yaml` file: @@ -21,6 +21,7 @@ sensor: platform: dht sensor: DHT22 pin: 23 + name: Living Room monitored_conditions: - temperature - humidity @@ -30,6 +31,7 @@ Configuration variables: - **sensor** (*Required*): The sensor type, supported devices are DHT11, DHT22, and AM2302 - **pin** (*Required*): The pin the sensor is connected to. +- **name** (*Optional*): The name of the sensor - **monitored_conditions** array: Conditions to monitor. - **temperature**: - **humidity**: diff --git a/source/_components/sensor.dweet.markdown b/source/_components/sensor.dweet.markdown index eec0d5d6f84..304fcffa282 100644 --- a/source/_components/sensor.dweet.markdown +++ b/source/_components/sensor.dweet.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Dweet.io" description: "Instructions how to integrate Dweet.io sensors within Home Assistant." date: 2015-12-10 10:15 diff --git a/source/_components/sensor.ecobee.markdown b/source/_components/sensor.ecobee.markdown index ec9fcf8338c..ebd63bb6acc 100644 --- a/source/_components/sensor.ecobee.markdown +++ b/source/_components/sensor.ecobee.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Ecobee sensor" +layout: page +title: "Ecobee Sensor" description: "Instructions how to setup the Ecobee sensors within Home Assistant." date: 2015-11-30 18:00 sidebar: true diff --git a/source/_components/sensor.efergy.markdown b/source/_components/sensor.efergy.markdown index 8a61b44a3f2..15dc7f7fb7d 100644 --- a/source/_components/sensor.efergy.markdown +++ b/source/_components/sensor.efergy.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Efergy" description: "Instructions how to integrate Efergy devices within Home Assistant." date: 2015-07-11 0:15 diff --git a/source/_components/sensor.eliqonline.markdown b/source/_components/sensor.eliqonline.markdown index e8e767b3b17..44f3214b2d6 100644 --- a/source/_components/sensor.eliqonline.markdown +++ b/source/_components/sensor.eliqonline.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Eliqonline" description: "Instructions how to integrate Eliqonline devices within Home Assistant." date: 2015-07-11 0:15 diff --git a/source/_components/sensor.forecast.markdown b/source/_components/sensor.forecast.markdown index e8707d91ec2..5aff293f785 100644 --- a/source/_components/sensor.forecast.markdown +++ b/source/_components/sensor.forecast.markdown @@ -1,7 +1,7 @@ --- -layout: component +layout: page title: "Forecast.io" -description: "Instructions how to integrate Forecast.io within Home Assistant." +description: "How to integrate Forecast.io within Home Assistant." date: 2015-04-25 9:06 sidebar: true comments: false @@ -12,10 +12,9 @@ ha_category: Weather featured: true --- +The `forecast` platform uses the [Forecast.io](https://forecast.io/) web service as a source of meteorological data for your location. The location is based on the `longitude` and `latitude` coordinates configured in `configuration.yaml`. The coordinates are auto-detected but to take advantage of the hyper-local weather reported by forecast.io, you can refine them down to your exact home address. GPS coordinates can be found by using Google Maps and clicking on your home. -The forecast platform uses the [Forecast.io](https://forecast.io/) web service as a source for meteorological data for your location. The location is based on the Longitude and Latitude cooridinates configured in `configuration.yaml`. The cooridinates are auto detected but to take advantage of the hyper-local weather reported by forecast.io, you can refine them down to your exact home address. GPS cooridinates can be found by using Google Maps and clicking on your home. - -You need an API key which is free but requires a [registration](https://developer.forecast.io/register). You can make 1000 requests per day. This means that you could create one approximately every 1.4 minutes. +You need an API key which is free but requires [registration](https://developer.forecast.io/register). You can make up to 1000 requests per day which means that you could make one approximately every 86 seconds. To add Forecast.io to your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.glances.markdown b/source/_components/sensor.glances.markdown index 632427d052b..ff7554804fd 100644 --- a/source/_components/sensor.glances.markdown +++ b/source/_components/sensor.glances.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Glances" description: "Instructions how to integrate Glances sensors into Home Assistant." date: 2015-09-14 19:10 @@ -9,10 +9,11 @@ sharing: true footer: true logo: glances.png ha_category: Sensor +ha_iot_class: "Local Polling" --- -The glances sensor platform is consuming the system information provided by the [Glances](https://github.com/nicolargo/glances) API. This enables one to track remote host and display their stats in Home Assistant. +The `glances` sensor platform is consuming the system information provided by the [Glances](https://github.com/nicolargo/glances) API. This enables one to track remote host and display their stats in Home Assistant. This sensors needs a running instance of `glances` on the host. The minimal supported version of `glances` is 2.3: diff --git a/source/_components/sensor.http.markdown b/source/_components/sensor.http.markdown new file mode 100644 index 00000000000..7d7bcb63eb5 --- /dev/null +++ b/source/_components/sensor.http.markdown @@ -0,0 +1,55 @@ +--- +layout: page +title: "HTTP Sensor" +description: "Instructions how to integrate HTTP sensors within Home Assistant." +date: 2016-02-05 12:15 +sidebar: true +comments: false +sharing: true +footer: true +logo: http.png +ha_category: Sensor +--- + +The URL for a sensor looks like the example below: + +```bash +http://IP_ADDRESS:8123/api/states/sensor.DEVICE_NAME +``` + +

+You should choose a unique device name (DEVICE_NAME) to avoid clashes with other devices. +

+ + The JSON payload must contain the new state and should include the unit of measurement and a friendly name. The friendly name is used in the frontend to name the sensor. + +```json +{"state": "20", "attributes": {"unit_of_measurement": "°C", "friendly_name": "Bathroom Temperature"}} +``` + +For a quick test `curl` can be useful to "simulate" a device. + +```bash +$ curl -XPOST -H "x-ha-access: YOUR_PASSWORD" \ + -d '{"state": "20", "attributes": {"unit_of_measurement": "°C", "friendly_name": "Bathroom Temp"}}' \ + http://localhost:8123/api/states/sensor.bathroom_temperature +``` + +Use again `curl` to retrieve the [current state](/developers/rest_api/#get-apistatesltentity_id) to check if the sensor is working. + +```bash +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ + http://localhost:8123/api/states/sensor.bathroom_temperature +{ + "attributes": { + "friendly_name": "Bathroom Temp", + "unit_of_measurement": "\u00b0C" + }, + "entity_id": "sensor.bathroom_temperature", + "last_changed": "09:46:17 06-02-2016", + "last_updated": "09:48:46 06-02-2016", + "state": "20" +} +``` + +For more examples please visit the [HTTP Binary Sensor](/components/binary_sensor.http/#examples) page. diff --git a/source/_components/sensor.markdown b/source/_components/sensor.markdown index 215246234ef..fc8a35d9269 100644 --- a/source/_components/sensor.markdown +++ b/source/_components/sensor.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Sensor" description: "Instructions how to setup your sensors with Home Assistant." date: 2015-01-24 14:39 diff --git a/source/_components/sensor.mfi.markdown b/source/_components/sensor.mfi.markdown new file mode 100644 index 00000000000..58b25e26ea6 --- /dev/null +++ b/source/_components/sensor.mfi.markdown @@ -0,0 +1,39 @@ +--- +layout: page +title: "mFi Sensor" +description: "Instructions how to integrate mFi sensors within Home Assistant." +date: 2016-02-07 10:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: ubiquiti.png +ha_category: Sensor +--- + + +The `mfi` sensor platform to allow you to monitor [mFi mPort interface and sensors](https://www.ubnt.com/mfi/mport/). + +To add this platform to your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: mfi + host: IP_ADDRESS + port: PORT + username: USERNAME + password: PASSWORD + use_tls: true + verify_tls: true +``` + +Configuration variables: + +- **host** (*Required*): The IP address or hostname of your mFi controller. +- **port** (*Optional*): The port of your mFi controller. Defaults to 6443 for TLS, otherwise 6080. +- **username** (*Required*): The mFi admin username. +- **password** (*Required*): The mFi admin user's password. +- **use_tls** (*Optional*): If true, use TLS to contact the mFi controller. Defaults to true. +- **verify_tls** (*Optional*): Set this to false if your mFi controller has a self-signed certificate. Defaults to true. + diff --git a/source/_components/sensor.modbus.markdown b/source/_components/sensor.modbus.markdown index 404868f4fe6..99f85d03cc3 100644 --- a/source/_components/sensor.modbus.markdown +++ b/source/_components/sensor.modbus.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Modbus sensor" +layout: page +title: "Modbus Sensor" description: "Instructions how to integrate Modbus sensors into Home Assistant." date: 2015-08-30 23:38 sidebar: true @@ -12,7 +12,7 @@ ha_category: Sensor --- -The modbus sensor platform allows you to gather data from your [Modbus](http://www.modbus.org/) sensors. +The `modbus` sensor platform allows you to gather data from your [Modbus](http://www.modbus.org/) sensors. To use your Modbus sensors in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.mqtt.markdown b/source/_components/sensor.mqtt.markdown index 71b6355428d..7d55875f3f3 100644 --- a/source/_components/sensor.mqtt.markdown +++ b/source/_components/sensor.mqtt.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "MQTT sensor" +layout: page +title: "MQTT Sensor" description: "Instructions how to integrate MQTT sensors within Home Assistant." date: 2015-05-30 23:21 sidebar: true @@ -33,7 +33,7 @@ Configuration variables: - **name** (*Optional*): The name of the sensor. Default is 'MQTT Sensor'. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. - **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} diff --git a/source/_components/sensor.mysensors.markdown b/source/_components/sensor.mysensors.markdown index 26538464526..2b1c709c59f 100644 --- a/source/_components/sensor.mysensors.markdown +++ b/source/_components/sensor.mysensors.markdown @@ -1,8 +1,8 @@ --- -layout: component -title: "MySensors sensors" +layout: page +title: "MySensors Sensor" description: "Instructions how to integrate MySensors sensors into Home Assistant." -date: 2016-01-17 15:49 +date: 2016-02-28 01:20 +0100 sidebar: true comments: false sharing: true @@ -14,4 +14,49 @@ featured: false Integrates MySensors sensors into Home Assistant. See the [main component] for configuration instructions. +The following sensor types are supported: + +##### MySensors version 1.4 and higher + +S_TYPE | V_TYPE +-------------------|--------------------------------------- +S_TEMP | V_TEMP +S_HUM | V_HUM +S_BARO | V_PRESSURE, V_FORECAST +S_WIND | V_WIND, V_GUST +S_RAIN | V_RAIN, V_RAINRATE +S_UV | V_UV +S_WEIGHT | V_WEIGHT, V_IMPEDANCE +S_POWER | V_WATT, V_KWH +S_DISTANCE | V_DISTANCE +S_LIGHT_LEVEL | V_LIGHT_LEVEL +S_IR | V_IR_SEND, V_IR_RECEIVE +S_WATER | V_FLOW, V_VOLUME +S_AIR_QUALITY | V_DUST_LEVEL +S_CUSTOM | V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 +S_DUST | V_DUST_LEVEL +S_SCENE_CONTROLLER | V_SCENE_ON, V_SCENE_OFF + +##### MySensors version 1.5 and higher + +S_TYPE | V_TYPE +---------------|---------------------------------- +S_COLOR_SENSOR | V_RGB +S_MULTIMETER | V_VOLTAGE, V_CURRENT, V_IMPEDANCE +S_SOUND | V_LEVEL +S_VIBRATION | V_LEVEL +S_MOISTURE | V_LEVEL +S_LIGHT_LEVEL | V_LEVEL +S_AIR_QUALITY | V_LEVEL (replaces V_DUST_LEVEL) +S_DUST | V_LEVEL (replaces V_DUST_LEVEL) + +### {% linkable_title Custom unit of measurement %} + +Some sensor value types are not specific for a certain sensor type. These do not have a default unit of measurement in Home Assistant. For example, the V_LEVEL type can be used for different sensor types, dust, sound, vibration etc. + +By using V_UNIT_PREFIX, it's possible to set a custom unit for any sensor. The string value that is sent for V_UNIT_PREFIX will be used in preference to any other unit of measurement, for the defined sensors. V_UNIT_PREFIX can't be used as a standalone sensor value type. Sending a supported value type and value from the tables above is also required. V_UNIT_PREFIX is available with MySensors version 1.5 and later. + +For more information, visit the [serial api] of MySensors. + [main component]: /components/mysensors/ +[serial api]: https://www.mysensors.org/download/serial_api_15 diff --git a/source/_components/sensor.nest.markdown b/source/_components/sensor.nest.markdown index ef22e305d07..5cbf2782abe 100644 --- a/source/_components/sensor.nest.markdown +++ b/source/_components/sensor.nest.markdown @@ -1,9 +1,8 @@ --- -layout: component -title: "Nest thermostat" -description: "Instructions how to integrate Nest thermostats sensors within Home Assistant." -# Year set to 2017 to unpublish till 0.12 release -date: 2017-01-13 19:59 +layout: page +title: "Nest Sensor" +description: "Instructions how to integrate Nest sensors within Home Assistant." +date: 2016-01-13 19:59 sidebar: true comments: false sharing: true @@ -13,37 +12,48 @@ ha_category: Sensor --- -The `nest` thermostat platform let you control a thermostat from [Nest](https://nest.com). It also includes the ability to monitor things like the state of our HVAC system and the current humidity and temperature. +The `nest` sensor platform let you monitor sensors connected to your [Nest](https://nest.com) thermostat. To set it up, add the following information to your `configuration.yaml` file: ```yaml -sensor 3: +sensor: platform: nest monitored_conditions: - - 'fan' - - 'hvac_ac_state', - - 'hvac_aux_heater_state', - - 'hvac_heat_x2_state', - - 'hvac_heat_x3_state', - - 'hvac_alt_heat_state', - - 'hvac_alt_heat_x2_state', - - 'hvac_emer_heat_state', - - 'online' - - 'temperature', - - 'target', - - 'away_temperature[0]', + - 'temperature' + - 'target' + - 'away_temperature[0]' - 'away_temperature[1]' - - 'humidity', - - 'mode', - - 'last_ip', - - 'local_ip', - - 'last_connection', + - 'humidity' + - 'mode' + - 'last_ip' + - 'local_ip' + - 'last_connection' - 'battery_level' + - 'weather_condition' + - 'weather_temperature' + - 'weather_humidity' + - 'wind_speed' + - 'wind_direction' ``` -You must have the [Nest Thermostat](https://home-assistant.io/components/thermostat.nest/) entity configured to use this sensor. +Configuration variables: -

- -

+- **monitored_conditions** array (*Required*): States to monitor. + - 'temperature' + - 'target' + - 'away_temperature[0]' + - 'away_temperature[1]' + - 'humidity' + - 'mode' + - 'last_ip' + - 'local_ip' + - 'last_connection' + - 'battery_level' + - 'weather_condition' + - 'weather_temperature' + - 'weather_humidity' + - 'wind_speed' + - 'wind_direction' + +

You must have the [Nest component](/components/nest/) configured to use this sensor.

diff --git a/source/_components/sensor.nest_weather.markdown b/source/_components/sensor.nest_weather.markdown new file mode 100644 index 00000000000..35617f8f0d4 --- /dev/null +++ b/source/_components/sensor.nest_weather.markdown @@ -0,0 +1,40 @@ +--- +layout: page +title: "Nest Weather Sensor" +description: "Instructions how to integrate Nest sensors within Home Assistant." +date: 2016-01-13 19:59 +sidebar: true +comments: false +sharing: true +footer: true +logo: nest_thermostat.png +ha_category: Weather +ha_iot_class: "Cloud Poll" +--- + + +The `nest` weather sensor platform let you monitor current weather conditions based on the location of your [Nest](https://nest.com) thermostat. + +To set it up, add the following information to your `configuration.yaml` file: + +```yaml +sensor: + platform: nest + monitored_conditions: + - 'weather_temperature' + - 'weather_humidity' + - 'weather_condition' + - 'wind_speed' + - 'wind_direction' +``` + +Configuration variables: + +- **monitored_conditions** array (*Required*): States to monitor. + - 'weather_temperature' + - 'weather_humidity' + - 'weather_condition' + - 'wind_speed' + - 'wind_direction' + +

You must have the [Nest component](/components/nest/) configured to use this sensor.

diff --git a/source/_components/sensor.netatmo.markdown b/source/_components/sensor.netatmo.markdown index 2e7b4d01d2b..0ed0740d4fc 100644 --- a/source/_components/sensor.netatmo.markdown +++ b/source/_components/sensor.netatmo.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Netatmo" +layout: page +title: "Netatmo Sensor" description: "Instructions how to integrate Netatmo sensors into Home Assistant." date: 2016-01-14 08:10 sidebar: true @@ -31,8 +31,15 @@ sensor: - noise - pressure - co2 + - rain + - sum_rain_1 + - sum_rain_24 module_name2: - temperature + rainmeter_name3: + - rain + - sum_rain_1 + - sum_rain_24 ``` Configuration variables: @@ -41,9 +48,16 @@ Configuration variables: - **secret_key** (*Required*): Your netatmo secret key - **username** (*Required*): Username for the netatmo account. - **password** (*Required*): Password for the netatmo account. -- **modules** (*Required*): Modules to use. Multiple entries allowd. +- **modules** (*Required*): Modules to use. Multiple entries allowed. - **module_name** array (*Required*): Name of the module. - - ** [conditions] **: Condition to monitor. + - **temperature**: Current temperature. + - **co2**: CO2 concentration in ppm. + - **pressure**: Pressure in mbar. + - **noise**: Noise level in dB. + - **humidity**: Humidity in %. + - **rain**: Estimated rainfall for today in mm. + - **sum_rain_1**: Rainfall in the last hour in mm. + - **sum_rain_24**: Rainfall in mm from 00:00am - 23:59pm. ### {% linkable_title Get API and Secret Key %} @@ -75,5 +89,5 @@ You have to provide these name in your Home Assistant configuration file.

-The Home Assistant NetAtmo platform has only be tested with the classic indoor and outdoor module. There is no support for the rainmeter and windmeter module at this time because developers does not own these modules. -

\ No newline at end of file +The Home Assistant NetAtmo platform has only be tested with the classic indoor, outdoor module and rainmeter. There is no support for the windmeter module at this time because developers does not own these modules. +

diff --git a/source/_components/sensor.neurio_energy.markdown b/source/_components/sensor.neurio_energy.markdown new file mode 100644 index 00000000000..502b2b0835a --- /dev/null +++ b/source/_components/sensor.neurio_energy.markdown @@ -0,0 +1,34 @@ +--- +layout: page +title: "Neurio" +description: "Instructions how to integrate Neurio within Home Assistant." +date: 2016-02-15 21:50 +sidebar: true +comments: false +sharing: true +footer: true +logo: neurio.png +ha_category: Sensor +ha_iot_class: "Cloud Polling" +--- + + +Integrate your [Neurio](http://neur.io/) meter information into Home Assistant. To get an API key and secret, login to your [Neurio account](https://my.neur.io/#settings/applications/register) and register an application. Note the Homepage URL and Callback URL are optional. + +To enable this sensor in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: neurio_energy + api_key: API_KEY + api_secret: API_SECRET + sensor_id: "SENSOR_ID" +``` + +Configuration variables: + +- **api_key** (*Required*): The API key for your account/application. +- **api_secret** (*Required*): The API secret for your account/application. +- **sensor_id** (*Optional*): The sensor ID will be auto-detected but can be set if you have more then one sensor. + diff --git a/source/_components/sensor.onewire.markdown b/source/_components/sensor.onewire.markdown new file mode 100644 index 00000000000..15fb06ec854 --- /dev/null +++ b/source/_components/sensor.onewire.markdown @@ -0,0 +1,32 @@ +--- +layout: page +title: "One wire Sensor" +description: "Instructions how to integrate One wire (1-wire) sensors into Home Assistant." +date: 2016-01-17 07:15 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Sensor +--- + +The `onewire` platform supports sensors which are using the One wire (1-wire) bus for communication. + +Supported devices: + +- [DS18B20](https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf) + +To enable One wire sensors in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: onewire + names: + some_id: your name +``` + +Configuration variables: + +- **names** array (*Optional*): ID and friendly name of your sensors. + diff --git a/source/_components/sensor.openweathermap.markdown b/source/_components/sensor.openweathermap.markdown index 11b0dd5b541..66e5e4f3d89 100644 --- a/source/_components/sensor.openweathermap.markdown +++ b/source/_components/sensor.openweathermap.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "OpenWeatherMap" description: "Instructions how to integrate OpenWeatherMap within Home Assistant." date: 2015-04-25 9:06 @@ -12,7 +12,7 @@ ha_category: Weather --- -The openweathermap platform uses [OpenWeatherMap](http://openweathermap.org/) as an source for current meteorological data for your location. The `forecast` will show you the condition in 3 h. +The `openweathermap` platform uses [OpenWeatherMap](http://openweathermap.org/) as an source for current meteorological data for your location. The `forecast` will show you the condition in 3 h. You need an API key which is free but requires a [registration](http://home.openweathermap.org/users/sign_up). diff --git a/source/_components/sensor.rest.markdown b/source/_components/sensor.rest.markdown index 59bfb47f70a..5e55cdda28d 100644 --- a/source/_components/sensor.rest.markdown +++ b/source/_components/sensor.rest.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "RESTful sensor" +layout: page +title: "RESTful Sensor" description: "Instructions how to integrate REST sensors into Home Assistant." date: 2015-09-14 19:10 sidebar: true @@ -44,7 +44,7 @@ Configuration variables: - **resource** (*Required*): The resource or endpoint that contains the value. - **method** (*Optional*): The method of the request. Default is GET. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. - **payload** (*Optional*): The payload to send with a POST request. Usualy formed as a dictionary. - **name** (*Optional*): Name of the REST sensor. - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. @@ -71,7 +71,6 @@ Always want to know your external IP address. [JSON Test](http://www.jsontest.co To display the IP address, the entry for a sensor in the `configuration.yaml` file will look like this. ```yaml -# Example configuration.yaml entry - platform: rest resource: http://ip.jsontest.com name: External IP @@ -85,7 +84,6 @@ The [glances](/components/sensor.glances/) sensor is doing the exact same thing Add something similar to the entry below to your `configuration.yaml` file: ```yaml -# Example configuration.yaml entry - platform: rest resource: http://IP_ADRRESS:61208/api/2/mem/used name: Used mem @@ -93,3 +91,16 @@ Add something similar to the entry below to your `configuration.yaml` file: unit_of_measurement: MB ``` +### {% linkable_title Value for other Home Assistant instance %} + +The Home Assistant [API](/developers/rest_api/) is exposing the data from your attached sensors. If you are running multiple Home Assistant instances which are not [connected](/developers/architecture/#multiple-connected-instances) you can still get information from them. + + +```yaml + - platform: rest + resource: http://IP_ADDRESS:8123/api/states/sensor.weather_temperature + name: Temperature + value_template: {% raw %}'{{ value_json.state }}'{% endraw %} + unit_of_measurement: "°C" +``` + diff --git a/source/_components/sensor.rfxtrx.markdown b/source/_components/sensor.rfxtrx.markdown index 9b8efa6c138..3efb14a9919 100644 --- a/source/_components/sensor.rfxtrx.markdown +++ b/source/_components/sensor.rfxtrx.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "RFXtrx sensor" +layout: page +title: "RFXtrx Sensor" description: "Instructions how to integrate RFXtrx sensors into Home Assistant." date: 2015-08-06 17:15 sidebar: true @@ -10,12 +10,31 @@ footer: true ha_category: Sensor --- -The rfxtrx platform support sensors that communicate in the frequency range of 433.92 MHz. +The `rfxtrx` platform support sensors that communicate in the frequency range of 433.92 MHz. To enable RFXtrx sensors in your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry -sensor: - platform: rfxtrx +sensor: + platform: rfxtrx + automatic_add: True + devices: + sensor_0502: + name: Lving + packetid: 0a52080705020095220269 + data_type: Temperature + sensor_0601: + name: Bath_Humidity + packetid: 0a520802060100ff0e0269 + data_type: Humidity + sensor_0601 2: + name: Bath + packetid: 0a520802060100ff0e0269 ``` + +Configuration variables: + +- **devices** (*Optional*): A list of devices with their name to use in the frontend. +- **automatic_add** (*Optional*): To enable the automatic addition of new lights. +- **data_type** (*Optional*): Which data type the sensor should show diff --git a/source/_components/sensor.sabnzbd.markdown b/source/_components/sensor.sabnzbd.markdown index fa2718ff746..984143da7fc 100644 --- a/source/_components/sensor.sabnzbd.markdown +++ b/source/_components/sensor.sabnzbd.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "SABnzbd" description: "Instructions how to integrate SABnzbd within Home Assistant." date: 2015-03-23 19:59 @@ -12,7 +12,7 @@ ha_category: Sensor --- -The sabnzbd platform will allow you to monitor your downloads with [SABnzbd](http://sabnzbd.org) from within Home Assistant and setup automation based on the information. +The `sabnzbd` platform will allow you to monitor your downloads with [SABnzbd](http://sabnzbd.org) from within Home Assistant and setup automation based on the information. To use sabnzbd with your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.speedtest.markdown b/source/_components/sensor.speedtest.markdown new file mode 100644 index 00000000000..db0fc4ddd87 --- /dev/null +++ b/source/_components/sensor.speedtest.markdown @@ -0,0 +1,75 @@ +--- +layout: page +title: "Speedtest.net" +description: "How to integrate Speedtest.net within Home Assistant." +date: 2016-02-12 9:06 +sidebar: true +comments: false +sharing: true +footer: true +logo: speedtest.png +ha_category: Sensor +featured: false +--- + +The `speedtest` sensor component uses the [Speedtest.net](https://speedtest.net/) web service to measure network bandwidth performance. + +By default, it will run every hour. The user can change the update frequency in the config by defining the minute, hour, and day for a speedtest to run. + +To add a Speedtest.net sensor to your installation, add the following to your `configuration.yaml` file: + +Once per hour, on the hour (default): + +```yaml +sensor: + platform: speedtest + monitored_conditions: + - ping + - download + - upload +``` + +More examples: + +Every half hour of every day: + +```yaml +sensor: + platform: speedtest + minute: + - 0 + - 30 + monitored_conditions: + - ping + - download + - upload +``` + +Everyday at 12:30AM, 6:30AM, 12:30PM, 6:30PM: + +```yaml +sensor: + platform: speedtest + minute: 30 + hour: + - 0 + - 6 + - 12 + - 18 + monitored_conditions: + - ping + - download + - upload +``` + +Configuration variables: + +- **monitored_conditions** array (*Required*): Sensors to display in the frontend. + - **ping**: Reaction time in ms of your connection, (how fast you get a response after you've sent out a request). + - **download**: Download speed in Mbps. + - **upload**: Upload speed in Mbps. +- **minute** (*Optional*): Specify the minute(s) of the hour to schedule the speedtest. Use a list for multiple entries. Default is 0. +- **hour** (*Optional*): Specify the hour(s) of the day to schedule the speedtest. Use a list for multiple entries. Default is None. +- **day** (*Optional*): Specify the day(s) of the month to schedule the speedtest. Use a list for multiple entries. Default is None. + +This component uses [speetest-cli](https://github.com/sivel/speedtest-cli) to gather network performance data from Speedtest.net. Please be aware of the potential [inconsistencies](https://github.com/sivel/speedtest-cli#inconsistency) that this component may display. diff --git a/source/_components/sensor.steam_online.markdown b/source/_components/sensor.steam_online.markdown new file mode 100644 index 00000000000..c3a7a9d71d6 --- /dev/null +++ b/source/_components/sensor.steam_online.markdown @@ -0,0 +1,50 @@ +--- +layout: page +title: "Steam" +description: "Instructions on how to set up Steam sensors in Home Assistant." +date: 2015-12-19 09:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: steam.png +ha_category: Sensor +--- + + +The Steam component will allow you to track the online status of public [Steam](https://steamcommunity.com) accounts. + +You need an API key which is [free](https://steamcommunity.com/dev/apikey) to use the component + +To find an account's 64-bit SteamID you can check the URL of the profile page, if it ends with a long string on numbers then that's the 64-bit SteamID. However, if the profile has a custom URL you will have to copy the it and enter it into [STEAMID I/O](https://steamid.io/) to find the 64-bit SteamID. + +To use Steam in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: steam_online + api_key: YOUR_API_KEY + accounts: + - account1 + - account2 +``` + +Configuration variables: + +- **api_key** (*Required*): Your API key from [https://steamcommunity.com/dev/apikey](https://steamcommunity.com/dev/apikey). +- **accounts** array (*Required*): Array of accounts. + - **account_id** (*Required*): 64-bit SteamID. + + +If you want to add the accounts to a group for example you will have to use: + +```yaml +# Example configuration.yaml entry +group: + steam: + name: Steam + entities: + - sensor.steam_account1 + - sensor.steam_account2 +``` \ No newline at end of file diff --git a/source/_components/sensor.swiss_public_transport.markdown b/source/_components/sensor.swiss_public_transport.markdown index f2ab2840d96..3128c527582 100644 --- a/source/_components/sensor.swiss_public_transport.markdown +++ b/source/_components/sensor.swiss_public_transport.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Swiss Public Transport" description: "Instructions how to integrate timetable data for travelling in Switzerland within Home Assistant." date: 2015-06-02 21:45 @@ -8,10 +8,11 @@ comments: false sharing: true footer: true ha_category: Sensor +ha_iot_class: "Local Polling" --- -The swiss public transport sensor will give you the next two departure times from a given location to another one in Switzerland. +The `swiss_public_transport` sensor will give you the next two departure times from a given location to another one in Switzerland. The [Stationboard](http://transport.opendata.ch/examples/stationboard.html) website can help to determine the exact name of the start and the end station. With the station names it's necessary to search for the ID of those stations: diff --git a/source/_components/sensor.systemmonitor.markdown b/source/_components/sensor.systemmonitor.markdown index fd44db9b33b..e1fb58cd46a 100644 --- a/source/_components/sensor.systemmonitor.markdown +++ b/source/_components/sensor.systemmonitor.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "System Monitor" description: "Instructions how to monitor the Home Assistant host." date: 2015-03-23 19:59 @@ -10,7 +10,7 @@ footer: true ha_category: Sensor --- -The system monitoring sensor platform to allow you to monitor disk usage, memory usage, CPU usage, and running processes. This platform has superseded the process component which is now considered deprecated. +The `systemmonitor` sensor platform to allow you to monitor disk usage, memory usage, CPU usage, and running processes. This platform has superseded the process component which is now considered deprecated. To add this platform to your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.tcp.markdown b/source/_components/sensor.tcp.markdown new file mode 100644 index 00000000000..a6227a641bf --- /dev/null +++ b/source/_components/sensor.tcp.markdown @@ -0,0 +1,101 @@ +--- +layout: page +title: TCP Sensor +description: "Instructions on how to set up TCP sensors within Home Assistant." +date: 2016-02-22 10:03 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Sensor +--- + +The TCP component allows the integration of some services for which a specific Home Assistant component does not exist. If the service communicates over a TCP socket with a simple request/reply mechanism then the chances are that this component will allow integration with it. + +To enable this sensor, add the following lines to your `configuration.yaml`: + +```yaml +sensor: +# Example configuration.yaml entry + - platform: tcp + name: Central Heating Pressure + host: IP_ADDRESS + port: PORT + timeout: 5 + payload: PAYLOAD + value_template: "{% raw %}{{ value.split(';')[0] }}{% endraw %}" + unit: UNIT_OF_MEASUREMENT +``` + +Configuration options for the a TCP Sensor: + +- **name** (*Required*): The name you'd like to give the sensor in Home Assistant. +- **host** (*Required*): The hostname/IP address to connect to. +- **port** (*Required*): The port to connect to the host on. +- **payload** (*Required*): What to send to the host in order to get the response we're interested in. +- **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to `10` +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. By default it's assumed that the entire response is the value. +- **unit** (*Optional*): The unit of measurement to use for the value. +- **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to `1024`. + +## {% linkable_title Examples %} + +In this section you find some real life examples of how to use this sensor. + +### {% linkable_title EBUSd %} + +The [EBUSd](https://github.com/john30/ebusd/wiki) service enables connection to an EBUS serial bus on some home heating/cooling systems. Using this service it is possible to extract various metrics which may be useful to have within Home Assistant. In order to use EBUSd, you connect to it using a TCP socket and send it a command. The service will respond with the value it has received from EBUS. On the command line, this would look something like: + +```bash +$ echo "r WaterPressure" | nc 10.0.0.127 8888 +0.903;ok +``` + +You will notice that the output from the service is not just a single value (it contains ";ok" as well). To grab the value we're interested in, we can use a Jinja2 template. The response received is injected into the template as the `value` variable. To use this value within Home Assistant, use the following configuration: + +```yaml +sensor: +# Example configuration.yaml entry + - platform: tcp + name: Central Heating Pressure + host: 10.0.0.127 + port: 8888 + timeout: 5 + payload: "r WaterPressure\n" + value_template: "{% raw %}{{ value.split(';')[0] }}{% endraw %}" + unit: Bar +``` + +### {% linkable_title hddtemp %} + +The tool `hddtemp` collects the temperatur of your harddisks. + +```bash +$ hddtemp +/dev/sda: SAMSUNG MZMTE256HMHP-000L1: 39°C +``` + +With `hddtemp -d` you can run the tool in TCP/IP daemon mode on port 7634 which enables you to get the data across the network. + +```bash +$ telnet localhost 7634 +Trying 127.0.0.1... +Connected to localhost. +Escape character is '^]'. +|/dev/sda|SAMSUNG MZMTE256HMHP-000L1|38|C|Connection closed by foreign host. +``` + +The entry for the `configuration.yaml` file for a `hddtemp` sensor could look like the example below. + +```yaml +sensor: +# Example configuration.yaml entry + - platform: tcp + name: HDD temperature + host: 127.0.0.1 + port: 7634 + timeout: 5 + payload: "\n" + value_template: "{% raw %}{{ value.split('|')[3] }}{% endraw %}" + unit: "°C" +``` diff --git a/source/_components/sensor.tellduslive.markdown b/source/_components/sensor.tellduslive.markdown index 9874f868a25..43fffd40249 100644 --- a/source/_components/sensor.tellduslive.markdown +++ b/source/_components/sensor.tellduslive.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Telldus Live sensors" +layout: page +title: "Telldus Live sensor" description: "Instructions how to integrate Telldus Live sensors into Home Assistant." date: 2016-01-17 15:49 sidebar: true diff --git a/source/_components/sensor.tellstick.markdown b/source/_components/sensor.tellstick.markdown index cc8b995135c..8c7a244ebe6 100644 --- a/source/_components/sensor.tellstick.markdown +++ b/source/_components/sensor.tellstick.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "TellStick sensor" +layout: page +title: "TellStick Sensor" description: "Instructions how to integrate TellStick sensors into Home Assistant." date: 2015-08-06 19:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Sensor --- -This tellstick sensor platform allows you to get current meteorological data from a [TellStick](http://www.telldus.se/products/tellstick) device. +The `tellstick` sensor platform allows you to get current meteorological data from a [TellStick](http://www.telldus.se/products/tellstick) device. To use your TellStick device in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.temper.markdown b/source/_components/sensor.temper.markdown index 386f8108e99..d204cf7fd4a 100644 --- a/source/_components/sensor.temper.markdown +++ b/source/_components/sensor.temper.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "TEMPer sensor" +layout: page +title: "TEMPer Sensor" description: "Instructions how to integrate TEMPer sensors into Home Assistant." date: 2015-08-06 19:00 sidebar: true @@ -10,7 +10,7 @@ footer: true ha_category: Sensor --- -This temper sensor platform allows you to get the current temperature from a TEMPer device. +This `temper` sensor platform allows you to get the current temperature from a TEMPer device. To use your TEMPer sensor in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.template.markdown b/source/_components/sensor.template.markdown new file mode 100644 index 00000000000..a792cb1cdae --- /dev/null +++ b/source/_components/sensor.template.markdown @@ -0,0 +1,80 @@ +--- +layout: page +title: "Template Sensor" +description: "Instructions how to integrate Template sensors into Home Assistant." +date: 2016-01-27 07:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Sensor +--- + +The `template` platform supports sensors which breaks out `state_attributes` from other entities. + +To enable Template sensors in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: template + sensors: + solar_angle: + value_template: {% raw %}'{{ states.sun.sun.attributes.elevation }}'{% endraw %} + friendly_name: 'Sun angle' + unit_of_measurement: 'degrees' + sunrise: + value_template: {% raw %}'{{ states.sun.sun.attributes.next_rising }}'{% endraw %} +``` + +Configuration variables: + +- **sensors** array (*Required*): List of your sensors. + - **friendly_name** (*Optional*): Name to use in the Frontend. + - **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any. + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. + + +## {% linkable_title Examples %} + +In this section you find some real life examples of how to use this sensor. + +### {% linkable_title Sun angle %} + +This example shows the sun angle in the frontend. + +```yaml +sensor: + platform: template + sensors: + solar_angle: + value_template: {% raw %}'{{ "%+.1f"|format(states.sun.sun.attributes.elevation) }}'{% endraw %} + friendly_name: 'Sun Angle' + unit_of_measurement: '°' +``` + +### {% linkable_title Multi line example with an if test %} + +This example shows a multiple line template with and is test. It looks at a sensing switch and shows on/off in the frontend. + +```yaml +sensor: + platform: template + sensors: + kettle: + friendly_name: 'Kettle' + {% raw %}value_template: >- + {%- if is_state("switch.kettle", "off") %} + off + {% elif states.switch.kettle.attributes.kwh < 1000 %} + standby + {% elif is_state("switch.kettle", "on") %} + on + {% else %} + failed + {%- endif %}{% endraw %} + +``` +(please note the blank line to close the multi-line template) + + diff --git a/source/_components/sensor.time_date.markdown b/source/_components/sensor.time_date.markdown index 612bce17a13..614a6346c87 100644 --- a/source/_components/sensor.time_date.markdown +++ b/source/_components/sensor.time_date.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Time & Date" description: "Instructions how to integrate the time and the date within Home Assistant." date: 2015-05-08 17:15 @@ -7,11 +7,13 @@ sidebar: true comments: false sharing: true footer: true +logo: home-assistant.png ha_category: Sensor +ha_iot_class: "Local Push" --- -The time and date platform simple displays the time in various formats, the date, or both. +The time and date (`time_date`) platform simple displays the time in various formats, the date, or both. To enable this sensor in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.torque.markdown b/source/_components/sensor.torque.markdown index f7287899d91..f8911e5fada 100644 --- a/source/_components/sensor.torque.markdown +++ b/source/_components/sensor.torque.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Torque (OBD2)" description: "Instructions how to integrate Torque sensors into Home Assistant." date: 2015-12-20 18:00 diff --git a/source/_components/sensor.transmission.markdown b/source/_components/sensor.transmission.markdown index 7714f867188..e484da70f1e 100644 --- a/source/_components/sensor.transmission.markdown +++ b/source/_components/sensor.transmission.markdown @@ -1,7 +1,7 @@ --- -layout: component -title: "Transmission sensor" -description: "Instructions how to integrate Transmission within Home Assistant." +layout: page +title: "Transmission Sensor" +description: "Instructions how to integrate Transmission sensors within Home Assistant." date: 2015-04-25 9:06 sidebar: true comments: false @@ -12,7 +12,7 @@ ha_category: Sensor --- -The [Transmission](http://www.transmissionbt.com/) platform allows you to monitor your downloads from within Home Assistant and setup automation based on the information. +The `trnasmission` platform allows you to monitor your downloads with [Transmission](http://www.transmissionbt.com/) from within Home Assistant and setup automation based on the information. ```yaml # Example configuration.yaml entry diff --git a/source/_components/sensor.twitch.markdown b/source/_components/sensor.twitch.markdown index 56c5dff9331..b1b81299ca6 100644 --- a/source/_components/sensor.twitch.markdown +++ b/source/_components/sensor.twitch.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Twitch" description: "Instructions how to integrate Twitch sensors into Home Assistant." date: 2015-12-19 09:00 diff --git a/source/_components/sensor.vera.markdown b/source/_components/sensor.vera.markdown index 6386b2efaa7..eb634bf280a 100644 --- a/source/_components/sensor.vera.markdown +++ b/source/_components/sensor.vera.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Vera sensor" +layout: page +title: "Vera Sensor" description: "Instructions how to integrate Vera sensors into Home Assistant." date: 2015-10-20 21:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Sensor --- -This vera sensor platform allows you to get data from your [Vera](http://getvera.com/) sensors. +This `vera` sensor platform allows you to get data from your [Vera](http://getvera.com/) sensors. To use your Vera sensor in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.verisure.markdown b/source/_components/sensor.verisure.markdown new file mode 100644 index 00000000000..7087133f0be --- /dev/null +++ b/source/_components/sensor.verisure.markdown @@ -0,0 +1,24 @@ +--- +layout: page +title: "Verisure Sensor" +description: "Instructions how to integrate Verisure sensors into Home Assistant." +date: 2016-02-23 21:31 +0100 +sidebar: true +comments: false +sharing: true +footer: true +logo: verisure.png +ha_category: Sensor +featured: false +--- + +Integrates Verisure sensors into Home Assistant. See the [main component] for configuration instructions. + +The following sensor types are supported: + + * Thermometers + * Hygrometers + * Mouse detectors + + +[main component]: /components/verisure/ diff --git a/source/_components/sensor.wink.markdown b/source/_components/sensor.wink.markdown index 5238e0d8cdc..1ff2c385c5f 100644 --- a/source/_components/sensor.wink.markdown +++ b/source/_components/sensor.wink.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Wink sensor" +layout: page +title: "Wink Sensor" description: "Instructions how to setup the Wink sensors within Home Assistant." date: 2015-01-20 22:36 sidebar: true @@ -12,7 +12,7 @@ ha_category: Sensor --- -The wink sensor platform allows you to get data from your [Wink](http://www.wink.com/) sensors. +The Wink sensor platform allows you to get data from your [Wink](http://www.wink.com/) sensors. -The requirement is that you have setup your [Wink hub](/components/light.wink/). +The requirement is that you have setup your [Wink hub](/components/wink/). diff --git a/source/_components/sensor.worldclock.markdown b/source/_components/sensor.worldclock.markdown index ef6c0f7a4ee..38e2aca0e3f 100644 --- a/source/_components/sensor.worldclock.markdown +++ b/source/_components/sensor.worldclock.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Worldclock" description: "Instructions how to integrate a Worldclock within Home Assistant." date: 2015-10-02 11:15 @@ -7,11 +7,13 @@ sidebar: true comments: false sharing: true footer: true +logo: home-assistant.png ha_category: Sensor +ha_iot_class: "Local Push" --- -The worldclock platform simple displays the current time in a different time zone +The `worldclock` sensor platform simple displays the current time in a different time zone To enable this sensor in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/sensor.yr.markdown b/source/_components/sensor.yr.markdown index b64d2005941..3c0072da258 100644 --- a/source/_components/sensor.yr.markdown +++ b/source/_components/sensor.yr.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "YR" description: "Instructions how to integrate Yr.no within Home Assistant." date: 2016-01-04 14:00 diff --git a/source/_components/sensor.zigbee.markdown b/source/_components/sensor.zigbee.markdown new file mode 100644 index 00000000000..45a58641aca --- /dev/null +++ b/source/_components/sensor.zigbee.markdown @@ -0,0 +1,62 @@ +--- +layout: page +title: ZigBee Sensor +description: "Instructions on how to set up ZigBee sensors within Home Assistant." +date: 2016-01-28 10:08 +sidebar: true +comments: false +sharing: true +footer: true +logo: zigbee.png +ha_category: Sensor +--- + +There are two types of ZigBee sensor available to Home Assistant: + +- [Analog input pin](#analog-input-pin) +- [Temperature sensor](#temperature-sensor) (XBee Pro) + +## {% linkable_title Analog Input Pin %} + +The analog input pins on an XBee (non-Pro) will read 0V to 1.2V. This is translated by the [xbee-helper](https://github.com/flyte/xbee-helper) library into a percentage. The maximum voltage your ZigBee device will read is configurable using the `max_volts` configuration variable. + +To configure an analog input pin sensor, use the following variables: + +- **name** (*Required*): The name you'd like to give the sensor in Home Assistant. +- **platform** (*Required*): Set to `zigbee`. +- **type** (*Required*): Set to `analog`. +- **pin** (*Required*): The number identifying which pin to sample. +- **address**: The long 64bit address of the remote ZigBee device whose analog input pin you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's pins. +- **max_volts**: The maximum voltage which the analog input pin is able to read. Default: `1.2` + +#### Example + +```yaml +sensor: + - name: My Analog Input + platform: zigbee + type: analog + pin: 0 + address: 0013A2004233D138 +``` + +See the [Digi knowledge base](http://knowledge.digi.com/articles/Knowledge_Base_Article/Digital-and-analog-sampling-using-XBee-radios) for more XBee sampling details. + +## {% linkable_title Temperature Sensor %} + +The XBee Pro (and perhaps other third party modules) contains a thermometer device which can be read by using the `TP` AT command. To set this up as a temperature sensor device in Home Assistant use the following config variables: + +- **name** (*Required*): The name you'd like to give the temperature sensor in Home Assistant +- **platform** (*Required*): Set to `zigbee` +- **type** (*Required*): Set to `temperature` +- **address**: The long 64bit address of the remote ZigBee device whose temperature sensor you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's temperature. + +#### Example + +```yaml +sensor: + - name: Living Room Temperature + platform: zigbee + type: temperature + address: 0013A20050E752C5 +``` \ No newline at end of file diff --git a/source/_components/sensor.zwave.markdown b/source/_components/sensor.zwave.markdown index 0de9c07750c..0b4641935a9 100644 --- a/source/_components/sensor.zwave.markdown +++ b/source/_components/sensor.zwave.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Z-Wave sensor" +layout: page +title: "Z-Wave Sensor" description: "Instructions how to setup the Z-Wave sensors within Home Assistant." date: 2015-11-15 13:00 sidebar: true diff --git a/source/_components/shell_command.markdown b/source/_components/shell_command.markdown index 5e99dc73854..00551f9b65c 100644 --- a/source/_components/shell_command.markdown +++ b/source/_components/shell_command.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Shell command" description: "Instructions how to integrate Shell commands into Home Assistant." date: 2015-10-13 19:10 diff --git a/source/_components/simple_alarm.markdown b/source/_components/simple_alarm.markdown index f158203cec4..8a7667ba745 100644 --- a/source/_components/simple_alarm.markdown +++ b/source/_components/simple_alarm.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Intruder Alerts" description: "Instructions how to receive intruder alerts from Home Assistant." date: 2015-01-20 22:36 @@ -27,6 +27,6 @@ simple_alarm: Configuration variables: -- **known_light** (*Required*): Which light/light group has to flash when a known device comes home. -- **unknown_light** (*Required*): Which light/light group has to flash red when light turns on while no one home. +- **known_light** (*Optional*): Which light/light group has to flash when a known device comes home. +- **unknown_light** (*Optional*): Which light/light group has to flash red when light turns on while no one home. diff --git a/source/_components/splunk.markdown b/source/_components/splunk.markdown new file mode 100644 index 00000000000..12c81cc4ab9 --- /dev/null +++ b/source/_components/splunk.markdown @@ -0,0 +1,32 @@ +--- +layout: page +title: "Splunk" +description: "Record events in Splunk." +date: 2016-02-05 15:31 +sidebar: true +comments: false +sharing: true +footer: true +logo: splunk.png +ha_category: "History" +--- + +The `splunk` component makes it possible to log all state changes to an external [Splunk](http://splunk.com/) database using Splunk's HTTP Event Collector feature. You can either use this alone, or with the HomeAssistant for Splunk [app](https://github.com/miniconfig/splunk-homeassistant). Since the HEC feature is new to Splunk, you will need to use at least version 6.3. + +To use the `splunk` component in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +splunk: + host: SPLUNK_HOST_IP_ADDRESS_OR_HOST_NAME + port: 8088 + token: B4415DFF-683C-5C6C-3994-4F6D4A5DB03A + SSL: True +``` + +Configuration variables: + +- **host** (*Optional*): IP address or host name of your Splunk host, eg. http://192.168.1.10. Will default to `localhost` if not supplied. +- **port** (*Optional*): Port to use. Defaults to 8088. +- **token** (*Required*): The HTTP Event Collector Token already created in your Splunk instance. +- **SSL** (*Optional*): Use https instead of http to connect. Defaults to False. diff --git a/source/_components/statsd.markdown b/source/_components/statsd.markdown new file mode 100644 index 00000000000..80a473c4456 --- /dev/null +++ b/source/_components/statsd.markdown @@ -0,0 +1,34 @@ +--- +layout: page +title: "StatsD" +description: "Record events in StatsD." +date: 2016-01-25 08:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: "History" +--- + +The `statsd` component makes it possible to transfer all state changes to an external [StatsD](https://github.com/etsy/statsd) instance. + +To use the `statsd` component in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +statsd: + host: DB_HOST_IP_ADDRESS + port: 20000 + prefix: DB_TO_STORE_EVENTS + rate: 1 +``` + +Configuration variables: + +- **host** (*Optional*): IP address of your StatsD host, eg. 192.168.1.10. Defaults to `localhost`. +- **port** (*Optional*): Port to use. Defaults to 8125. +- **prefix** (*Optional*): Prefix to use. Defaults to `hass`. +- **rate** (*Optional*): The sample rate. Defaults to 1. + +StatsD supports various [backends](https://github.com/etsy/statsd/blob/master/docs/backend.md). + diff --git a/source/_components/sun.markdown b/source/_components/sun.markdown index 3d5c3268b97..18058bc1421 100644 --- a/source/_components/sun.markdown +++ b/source/_components/sun.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Sun" description: "Instructions how to track the sun within Home Assistant." date: 2015-01-24 14:39 @@ -7,7 +7,7 @@ sidebar: true comments: false sharing: true footer: true -logo: sun.png +logo: home-assistant.png ha_category: Weather --- diff --git a/source/_components/switch.arduino.markdown b/source/_components/switch.arduino.markdown index 7bdd9363e40..b2a1b7ef5cd 100644 --- a/source/_components/switch.arduino.markdown +++ b/source/_components/switch.arduino.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Arduino switch" +layout: page +title: "Arduino Switch" description: "Instructions how to integrate Arduino boards pins as switches within Home Assistant." date: 2015-09-14 18:28 sidebar: true @@ -12,7 +12,7 @@ ha_category: DIY --- -The arduino switch platform allows you to control the digital pins of your [Arduino](https://www.arduino.cc/) board. Support for switching pins is limited to high/on and low/off of the digital pins. PWM (pin 3,5,6,9,10, and 11 on an Arduino Uno) is not supported yet. +The `arduino` switch platform allows you to control the digital pins of your [Arduino](https://www.arduino.cc/) board. Support for switching pins is limited to high/on and low/off of the digital pins. PWM (pin 3,5,6,9,10, and 11 on an Arduino Uno) is not supported yet. To enable the Arduino pins with Home Assistant, add the following section to your `configuration.yaml` file: diff --git a/source/_components/switch.arest.markdown b/source/_components/switch.arest.markdown index 8874ec4fd4e..f3e3223176a 100644 --- a/source/_components/switch.arest.markdown +++ b/source/_components/switch.arest.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "aREST switch" +layout: page +title: "aREST Switch" description: "Instructions how to integrate aREST switches within Home Assistant." date: 2015-09-11 23:15 sidebar: true @@ -9,9 +9,10 @@ sharing: true footer: true logo: arest.png ha_category: Switch +ha_iot_class: "Local Polling" --- -The arest switch platform allows you to toggle pins of your devices (like Arduino boards with a ethernet/wifi connection, ESP8266 based devices, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework. +The `arest` switch platform allows you to toggle pins of your devices (like Arduino boards with a ethernet/wifi connection, ESP8266 based devices, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework. To use your aREST enabled device with pins in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.command_switch.markdown b/source/_components/switch.command_line.markdown similarity index 68% rename from source/_components/switch.command_switch.markdown rename to source/_components/switch.command_line.markdown index 333f2ba277c..6bba25ea65f 100644 --- a/source/_components/switch.command_switch.markdown +++ b/source/_components/switch.command_line.markdown @@ -1,12 +1,13 @@ --- -layout: component -title: "Command line switch" +layout: page +title: "Command line Switch" description: "Instructions how to have switches call command line commands." date: 2015-06-10 22:41 sidebar: true comments: false sharing: true footer: true +logo: command_line.png ha_category: Switch --- @@ -18,7 +19,7 @@ To enable it, add the following lines to your `configuration.yaml`: ```yaml # Example configuration.yaml entry switch: - platform: command_switch + platform: command_line switches: kitchen_light: oncmd: switch_command on kitchen @@ -47,7 +48,7 @@ The example below is doing the same as the [aREST switch](/components/switch.are ```yaml # Example configuration.yaml entry switch: - platform: command_switch + platform: command_line switches: arest_pin4: oncmd: "/usr/bin/curl -X GET http://192.168.1.10/digital/4/1" @@ -66,7 +67,7 @@ This switch will shutdown your host immediately, there will be no confirmation. ```yaml # Example configuration.yaml entry switch: - platform: command_switch + platform: command_line switches: Home Assistant system shutdown: offcmd: "/usr/sbin/poweroff" @@ -80,9 +81,25 @@ This switch will control a local VLC media player ([Source](https://automic.us/f ```yaml # Example configuration.yaml entry switch: - platform: command_switch + platform: command_line switches: VLC: oncmd: "cvlc 1.mp3 vlc://quit &" offcmd: "pkill vlc" ``` + +### {% linkable_title Control Foscam Motion Sensor %} + +This switch will control the motion sensor of Foscam Webcams which Support CGI Commands ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). This switch supports statecmd, which checks the current state of motion detection. +```yaml +# Example configuration.yaml entry +# Replace admin and password with an "Admin" priviledged Foscam user +# Replace ipaddress with the local IP address of your Foscam +switch: + platform: command_line + switches: + foscam_motion: + oncmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"' + offcmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"' + statecmd: 'curl -k --silent "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep -oP "(?<=isEnable>).*?(?=)"' + value_template: '{{ value == "1" }}' diff --git a/source/_components/switch.dlink.markdown b/source/_components/switch.dlink.markdown new file mode 100644 index 00000000000..7be07433dd0 --- /dev/null +++ b/source/_components/switch.dlink.markdown @@ -0,0 +1,40 @@ +--- +layout: page +title: "D-Link Switch" +description: "Instructions how to integrate D-Link switches into Home Assistant." +date: 2016-02-21 09:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: dlink.png +ha_category: Switch +ha_iot_class: "Local Polling" +--- + + +The `dlink` switch platform allows you to control the state of your [D-Link Wi-Fi Smart Plugs](http://us.dlink.com/product-category/home-solutions/connected-home/smart-plugs/). + +Supported devices (tested): + +- DSP-W215 + +To use your D-Link smart plugs in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +switch: + platform: dlink + host: IP_ADRRESS + name: D-Link plug + username: YOUR_USERNAME + password: YOUR_PASSWORD +``` + +Configuration variables: + +- **host** (*Required*): The IP address of your D-Link plug, eg. http://192.168.1.32 +- **name** (*Optional*): The name to use when displaying this switch. +- **username** (*Required*): The username for your plug. Defaults to `admin`. +- **password** (*Required*): The password for your plug. + diff --git a/source/_components/switch.edimax.markdown b/source/_components/switch.edimax.markdown index 479d6fba0cd..b0078775a0c 100644 --- a/source/_components/switch.edimax.markdown +++ b/source/_components/switch.edimax.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Edimax switch" +layout: page +title: "Edimax Switch" description: "Instructions how to integrate Edimax switches into Home Assistant." date: 2015-06-10 22:54 sidebar: true @@ -12,7 +12,7 @@ ha_category: Switch --- -This edimax switch platform allows you to control the state of your [Edimax](http://www.edimax.com/edimax/merchandise/merchandise_list/data/edimax/global/home_automation_smart_plug/) switches. +This `edimax` switch platform allows you to control the state of your [Edimax](http://www.edimax.com/edimax/merchandise/merchandise_list/data/edimax/global/home_automation_smart_plug/) switches. To use your Edimax switch in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.hikvision.markdown b/source/_components/switch.hikvision.markdown index 05f3d47d00f..4665c48ef31 100644 --- a/source/_components/switch.hikvision.markdown +++ b/source/_components/switch.hikvision.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Hikvision camera" +layout: page +title: "Hikvision Camera Switch" description: "Instructions how to integrate Hikvision camera's into Home Assistant." date: 2015-06-10 22:54 sidebar: true @@ -8,11 +8,11 @@ comments: false sharing: true footer: true logo: hikvision.png -ha_category: Camera +ha_category: Switch --- -This hikvisioncam switch platform allows you to control your motion detection setting on your [Hikvision](http://www.hikvision.com/) camera. +This `hikvisioncam` switch platform allows you to control your motion detection setting on your [Hikvision](http://www.hikvision.com/) camera.

Currently works using default https port only. diff --git a/source/_components/switch.markdown b/source/_components/switch.markdown index c42f4760403..8f181dc59b5 100644 --- a/source/_components/switch.markdown +++ b/source/_components/switch.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Switches" description: "Instructions how to setup your switches with Home Assistant." date: 2015-01-24 14:39 @@ -12,7 +12,7 @@ footer: true Keeps track which switches are in your environment, their state and allows you to control them. * Maintains a state per switch and a combined state `all_switches`. - * Registers services `switch/turn_on` and `switch/turn_off` to control switches. + * Registers services `switch/turn_on`, `switch/turn_off`, and `switch/toggle` to control switches. ### {% linkable_title Use the services %} diff --git a/source/_components/switch.mfi.markdown b/source/_components/switch.mfi.markdown new file mode 100644 index 00000000000..7c0bd1c582b --- /dev/null +++ b/source/_components/switch.mfi.markdown @@ -0,0 +1,38 @@ +--- +layout: page +title: "mFi Switch" +description: "Instructions how to integrate mFi switches within Home Assistant." +date: 2016-02-07 10:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: ubiquiti.png +ha_category: Switch +--- + + +The `mfi` switch platform to allow you to control [mFi Controllable Power Outlets](https://www.ubnt.com/mfi/mpower/). + +To add this platform to your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: mfi + host: IP_ADDRESS + port: PORT + username: USERNAME + password: PASSWORD + use_tls: true + verify_tls: true +``` + +Configuration variables: + +- **host** (*Required*): The IP address or hostname of your mFi controller. +- **port** (*Optional*): The port of your mFi controller. Defaults to 6443. +- **username** (*Required*): The mFi admin username. +- **password** (*Required*): The mFi admin user's password. +- **use_tls** (*Optional*): If true, use TLS to contact the mFi controller. Defaults to true. +- **verify_tls** (*Optional*): Set this to false if your mFi controller has a self-signed certificate. Defaults to true. diff --git a/source/_components/switch.modbus.markdown b/source/_components/switch.modbus.markdown index ff8c2d269c6..667b5a3dc78 100644 --- a/source/_components/switch.modbus.markdown +++ b/source/_components/switch.modbus.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Modbus switch" +layout: page +title: "Modbus Switch" description: "Instructions how to integrate Modbus switches into Home Assistant." date: 2015-08-30 23:38 sidebar: true @@ -12,7 +12,7 @@ ha_category: Switch --- -The modbus switch platform allows you to control [Modbus](http://www.modbus.org/) switches. +The `modbus` switch platform allows you to control [Modbus](http://www.modbus.org/) switches. To use your Modbus switches in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 88f42a36e66..746b0b26da1 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "MQTT switch" +layout: page +title: "MQTT Switch" description: "Instructions how to integrate MQTT switches into Home Assistant." date: 2015-08-30 23:38 sidebar: true @@ -19,7 +19,7 @@ When a state topic is not available, the switch will work in optimistic mode. In Optimistic mode can be forced, even if state topic is available. Try to enable it, if experiencing incorrect switch operation. -To enable this s in your installation, add the following to your `configuration.yaml` file: +To enable this switch in your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yml entry @@ -28,10 +28,11 @@ switch: name: "Bedroom Switch" state_topic: "home/bedroom/switch1" command_topic: "home/bedroom/switch1/set" - qos: 0 payload_on: "ON" payload_off: "OFF" optimistic: false + qos: 0 + retain: true value_template: '{% raw %}{{ value.x }}{% endraw %}' ``` @@ -40,12 +41,13 @@ Configuration variables: - **name** (*Optional*): The name of the switch. Default is 'MQTT Switch'. - **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates. - **command_topic** (*Required*): The MQTT topic to publish commands to change the switch state. -- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". - **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF". - **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. +- **retain** (*Optional*): If the published message should have the retain flag on or not. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.

- Make sure that your topics match exact. `some-topic/` and `some-topic` are different topics. +Make sure that your topic match exact. `some-topic/` and `some-topic` are different topics.

diff --git a/source/_components/switch.mysensors.markdown b/source/_components/switch.mysensors.markdown index 00b90022d5b..f79cd8b8f29 100644 --- a/source/_components/switch.mysensors.markdown +++ b/source/_components/switch.mysensors.markdown @@ -1,8 +1,8 @@ --- -layout: component -title: "MySensors switches" +layout: page +title: "MySensors Switch" description: "Instructions how to integrate MySensors switches into Home Assistant." -date: 2016-01-17 15:49 +date: 2016-03-02 18:20 +0100 sidebar: true comments: false sharing: true @@ -14,4 +14,31 @@ featured: false Integrates MySensors switches into Home Assistant. See the [main component] for configuration instructions. +The following actuator types are supported: + +##### MySensors version 1.4 and higher + +S_TYPE | V_TYPE +---------|-------------- +S_DOOR | V_ARMED +S_MOTION | V_ARMED +S_SMOKE | V_ARMED +S_LIGHT | V_LIGHT +S_LOCK | V_LOCK_STATUS + +##### MySensors version 1.5 and higher + +S_TYPE | V_TYPE +-------------|------------------ +S_LIGHT | V_STATUS +S_BINARY | [V_STATUS or V_LIGHT] +S_SPRINKLER | V_STATUS +S_WATER_LEAK | V_ARMED +S_SOUND | V_ARMED +S_VIBRATION | V_ARMED +S_MOISTURE | V_ARMED + +For more information, visit the [serial api] of MySensors. + [main component]: /components/mysensors/ +[serial api]: https://www.mysensors.org/download/serial_api_15 diff --git a/source/_components/switch.mystrom.markdown b/source/_components/switch.mystrom.markdown index eb6f281452e..e5bdac5b17d 100644 --- a/source/_components/switch.mystrom.markdown +++ b/source/_components/switch.mystrom.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "myStrom switch" +layout: page +title: "myStrom Switch" description: "Instructions how to integrate myStrom switches into Home Assistant." date: 2015-11-25 22:00 sidebar: true diff --git a/source/_components/switch.orvibo.markdown b/source/_components/switch.orvibo.markdown index 19c464e2438..b365802102a 100644 --- a/source/_components/switch.orvibo.markdown +++ b/source/_components/switch.orvibo.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Orvibo switch" +layout: page +title: "Orvibo Switch" description: "Instructions how to integrate Orvibo switches within Home Assistant." date: 2015-11-15 18:15 sidebar: true @@ -11,7 +11,7 @@ logo: orvibo.png ha_category: Switch --- -The orvibo switch platform allows you to toggle your Orvibo S20 Wifi Smart Switch. +The `orvibo` switch platform allows you to toggle your Orvibo S20 Wifi Smart Switch. To use your Orvibo switch in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.rest.markdown b/source/_components/switch.rest.markdown index ed7dfdc110c..3d56ca231b3 100644 --- a/source/_components/switch.rest.markdown +++ b/source/_components/switch.rest.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "RESTful switch" +layout: page +title: "RESTful Switch" description: "Instructions how to integrate REST switches into Home Assistant." date: 2015-09-14 19:10 sidebar: true diff --git a/source/_components/switch.rfxtrx.markdown b/source/_components/switch.rfxtrx.markdown index 24eea9da287..a0f7fbdd52d 100644 --- a/source/_components/switch.rfxtrx.markdown +++ b/source/_components/switch.rfxtrx.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "RFXtrx switch" +layout: page +title: "RFXtrx Switch" description: "Instructions how to integrate RFXtrx switches into Home Assistant." date: 2015-10-08 10:15 sidebar: true @@ -9,7 +9,8 @@ sharing: true footer: true ha_category: Switch --- -The rfxtrx platform support switches that communicate in the frequency range of 433.92 MHz. + +The `rfxtrx` platform support switches that communicate in the frequency range of 433.92 MHz. To enable RFXtrx switches in your installation, add the following to your `configuration.yaml` file: @@ -17,6 +18,7 @@ To enable RFXtrx switches in your installation, add the following to your `confi # Example configuration.yaml entry switch: platform: rfxtrx + signal_repetitions: 3 devices: living_room: name: Living Room @@ -28,4 +30,4 @@ Configuration variables: - **devices** (*Required*): A list of devices with their name to use in the frontend. - **automatic_add** (*Optional*): To enable the automatic addition of new switches. - +- **signal_repetitions** *Optional*: Because the rxftrx device sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly. diff --git a/source/_components/switch.rpi_gpio.markdown b/source/_components/switch.rpi_gpio.markdown index 284352994b1..608ca7aa1ab 100644 --- a/source/_components/switch.rpi_gpio.markdown +++ b/source/_components/switch.rpi_gpio.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Raspberry PI GPIO switch" +layout: page +title: "Raspberry PI GPIO Switch" description: "Instructions how to integrate the GPIO of a Raspberry PI into Home Assistant as a switch." date: 2015-08-07 14:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Switch --- -The rpi_gpio switch platform allows you to control the GPIOs of your [Raspberry Pi](https://www.raspberrypi.org/). +The `rpi_gpio` switch platform allows you to control the GPIOs of your [Raspberry Pi](https://www.raspberrypi.org/). To use your Raspberry Pi's GPIO in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.scsgate.markdown b/source/_components/switch.scsgate.markdown new file mode 100644 index 00000000000..2c257b7ce4d --- /dev/null +++ b/source/_components/switch.scsgate.markdown @@ -0,0 +1,30 @@ +--- +layout: page +title: "SCSGate Switch" +description: "Instructions how to integrate SCSGate switches into Home Assistant." +date: 2016-01-31 22:15 +sidebar: true +comments: false +sharing: true +footer: true +logo: bus_scs.png +ha_category: Switch +--- + +The SCSGate device can control switches of the BTicino MyHome system. + +To enable SCSGate switches in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +switch: + platform: scsgate + devices: + living_room: + name: Living Room + scs_id: XXXXX +``` + +Configuration variables: + +- **devices** (*Required*): A list of devices with their name to use in the frontend. diff --git a/source/_components/switch.tellduslive.markdown b/source/_components/switch.tellduslive.markdown index ac38ab5f01f..eb2002814ab 100644 --- a/source/_components/switch.tellduslive.markdown +++ b/source/_components/switch.tellduslive.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Telldus Live switches" +layout: page +title: "Telldus Live Switch" description: "Instructions how to integrate Telldus Live switches into Home Assistant." date: 2016-01-17 15:49 sidebar: true diff --git a/source/_components/switch.tellstick.markdown b/source/_components/switch.tellstick.markdown index 21f22f825a3..055d445f07b 100644 --- a/source/_components/switch.tellstick.markdown +++ b/source/_components/switch.tellstick.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "TellStick switch" +layout: page +title: "TellStick Switch" description: "Instructions how to integrate TellStick switches into Home Assistant." date: 2015-08-06 19:00 sidebar: true @@ -9,10 +9,11 @@ sharing: true footer: true logo: telldus_tellstick.png ha_category: Switch +ha_iot_class: "Assumed State" --- -This tellstick switch platform allows you to control [TellStick](http://www.telldus.se/products/tellstick) devices. +This `tellstick` switch platform allows you to control [TellStick](http://www.telldus.se/products/tellstick) devices. To use your TellStick device in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.template.markdown b/source/_components/switch.template.markdown new file mode 100644 index 00000000000..2f5f627ec29 --- /dev/null +++ b/source/_components/switch.template.markdown @@ -0,0 +1,103 @@ +--- +layout: page +title: "Template switch" +description: "Instructions how to integrate Template switches into Home Assistant." +date: 2016-02-07 07:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Switch +--- + +The `template` platform creates switches that combine components. + +For example, if you have a garage door with a toggle switch that operates the motor and a sensor that allows you know whether the door is open or closed, you can combine these into a switch that knows whether the garage door is open or closed. + +This can simplify the gui, and make it easier to write automations. You can mark the components you have combined as `hidden` so they don't appear themselves. + +To enable Template switches in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +switch: + platform: template + switches: + skylight: + friendly_name: 'Skylight' + value_template: {% raw %}'{{ states.sensor.skylight.state }}'{% endraw %} + turn_on: + service: switch.turn_on + entity_id: switch.skylight_open + turn_off: + service: switch.turn_on + entity_id: switch.skylight_close +``` + +Configuration variables: + +- **switches** array (*Required*): List of your switches. + - **friendly_name** (*Optional*): Name to use in the Frontend. + - **value_template** (*Required*): Defines a [template](/topics/templating/) to set the state of the switch. + - **turn_on** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned on. + - **turn_off** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned off. + +## {% linkable_title Examples %} + +In this section you find some real life examples of how to use this switch. + +### {% linkable_title Copy switch %} + +This example shows a switch that copies another switch. + +```yaml +switch: + platform: template + switches: + copy: + value_template: {% raw %}'{{ states.switch.source.state }}'{% endraw %} + turn_on: + service: switch.turn_on + entity_id: switch.source + turn_off: + service: switch.turn_off + entity_id: switch.source +```` + +### {% linkable_title Toggle switch %} + +This example shows a switch that takes its state from a sensor, and toggles a switch. + +```yaml +switch: + platform: template + switches: + blind: + friendly_name: 'Blind' + value_template: {% raw %}'{{ state }}'{% endraw %} + turn_on: + service: switch.toggle + entity_id: switch.blind_toggle + turn_off: + service: switch.toggle + entity_id: switch.blind_toggle +``` + +### {% linkable_title Sensor and two switches %} + +This example shows a switch that takes its state from a sensor, and uses two momentary switches to control a device. + +```yaml +switch: + platform: template + switches: + skylight: + friendly_name: 'Skylight' + value_template: {% raw %}'{{ states.sensor.skylight.state }}'{% endraw %} + turn_on: + service: switch.turn_on + entity_id: switch.skylight_open + turn_off: + service: switch.turn_on + entity_id: switch.skylight_close +``` diff --git a/source/_components/switch.transmission.markdown b/source/_components/switch.transmission.markdown index c6aa8e84cdf..e5a1e435127 100644 --- a/source/_components/switch.transmission.markdown +++ b/source/_components/switch.transmission.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Transmission switch" +layout: page +title: "Transmission Switch" description: "Instructions how to integrate Transmission within Home Assistant." date: 2015-06-02 09:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Switch --- -The transmission platform allows you to control your [Transmission](http://www.transmissionbt.com/) client from within Home Assistant. The platform enables you switch to your 'Alternative Speed Limits' (aka 'Turtle mode') setting. +The `transmission` switch platform allows you to control your [Transmission](http://www.transmissionbt.com/) client from within Home Assistant. The platform enables you switch to your 'Alternative Speed Limits' (aka 'Turtle mode') setting. To add Transmission to your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.vera.markdown b/source/_components/switch.vera.markdown index 868d6301587..07bad9bea28 100644 --- a/source/_components/switch.vera.markdown +++ b/source/_components/switch.vera.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Vera switch" +layout: page +title: "Vera Switch" description: "Instructions how to integrate Vera switches into Home Assistant." date: 2015-10-20 21:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Switch --- -This vera switch platform allows you to control your [Vera](http://getvera.com/) switches. +This `vera` switch platform allows you to control your [Vera](http://getvera.com/) switches. To use your Vera switches in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/switch.verisure.markdown b/source/_components/switch.verisure.markdown new file mode 100644 index 00000000000..9367b292cff --- /dev/null +++ b/source/_components/switch.verisure.markdown @@ -0,0 +1,18 @@ +--- +layout: page +title: "Verisure SmartPlug" +description: "Instructions how to setup the Verisure SmartPlug within Home Assistant." +date: 2016-02-15 22:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: verisure.png +ha_category: Switch +--- + + +The Verisure switch platform allows you to control your [Verisure](https://www.verisure.com/) SmartPlugs. + +The requirement is that you have setup your [Verisure hub](/components/verisure/). + diff --git a/source/_components/switch.wemo.markdown b/source/_components/switch.wemo.markdown index 7692befbb08..a650562ca1b 100644 --- a/source/_components/switch.wemo.markdown +++ b/source/_components/switch.wemo.markdown @@ -1,23 +1,20 @@ --- -layout: component -title: "Belkin WeMo switch" +layout: page +title: "Belkin WeMo Switch" description: "Instructions how to integrate Belkin WeMo switches into Home Assistant." -date: 2015-03-23 19:59 +date: 2016-02-20 00:47 sidebar: true comments: false sharing: true footer: true logo: belkin_wemo.png ha_category: Switch +ha_iot_class: "Local Push" --- -The wemo platform allows you to control your [Belkin WeMo](http://www.belkin.com/us/p/P-F7C027/) switches from within Home Assistant. +The `wemo` platform allows you to control your [Belkin WeMo](http://www.belkin.com/us/p/P-F7C027/) switches from within Home Assistant. They will be automatically discovered if the discovery component is enabled. -```yaml -# Example configuration.yaml entry -switch: - platform: wemo -``` +For more configuration information see the [WeMo component](/components/wemo/) documentation. diff --git a/source/_components/switch.wink.markdown b/source/_components/switch.wink.markdown index 29ca5b82106..7dcb6c37990 100644 --- a/source/_components/switch.wink.markdown +++ b/source/_components/switch.wink.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Wink switch" +layout: page +title: "Wink Switch" description: "Instructions how to setup the Wink switches within Home Assistant." date: 2015-01-20 22:36 sidebar: true @@ -12,7 +12,7 @@ ha_category: Switch --- -The wink switch platform allows you to control your [Wink](http://www.wink.com/) switches. +The Wink switch platform allows you to control your [Wink](http://www.wink.com/) switches. -The requirement is that you have setup your [Wink hub](/components/light.wink/). +The requirement is that you have setup your [Wink hub](/components/wink/). diff --git a/source/_components/switch.zigbee.markdown b/source/_components/switch.zigbee.markdown new file mode 100644 index 00000000000..41097f32e68 --- /dev/null +++ b/source/_components/switch.zigbee.markdown @@ -0,0 +1,33 @@ +--- +layout: page +title: "ZigBee Switch" +description: "Instructions on how to set up ZigBee switches within Home Assistant." +date: 2016-01-28 11:52 +sidebar: true +comments: false +sharing: true +footer: true +logo: zigbee.png +ha_category: Switch +--- + +A ZigBee switch in this context is a device connected to one of the digital output pins on a ZigBee module. It can simply be switched on and off. By default, a switch is considered 'on' when the ZigBee device's digital output is held 'high' and considered 'off' when it is held 'low'. This behaviour can be inverted by setting the `on_state` configuration variable to `low`. + +To configure a digital output pin as a switch, use the following variables: + +- **name** (*Required*): The name you'd like to give the switch in Home Assistant. +- **platform** (*Required*): Set to `zigbee`. +- **pin** (*Required*): The number identifying which pin to use. +- **address**: The long 64bit address of the remote ZigBee device whose digital output pin you'd like to switch. Do not include this variable if you want to switch the local ZigBee device's pins. +- **on_state**: Either `high` (default) or `low`, depicting whether the digital output pin is pulled high or low when the switch is turned on. + +#### Example + +```yaml +switch: + - name: Pond Fountain + platform: zigbee + pin: 0 + address: 0013A20040791FA2 + on_state: low +``` diff --git a/source/_components/switch.zwave.markdown b/source/_components/switch.zwave.markdown index 7ae6919567e..3b9f072fa12 100644 --- a/source/_components/switch.zwave.markdown +++ b/source/_components/switch.zwave.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Z-Wave switch" +layout: page +title: "Z-Wave Switch" description: "Instructions how to setup the Z-Wave switches within Home Assistant." date: 2015-11-15 13:00 sidebar: true diff --git a/source/_components/tellduslive.markdown b/source/_components/tellduslive.markdown index 9effddbb502..3898d4d89bb 100644 --- a/source/_components/tellduslive.markdown +++ b/source/_components/tellduslive.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Telldus Live" description: "Instructions how to integrate Telldus Live into Home Assistant." date: 2016-01-17 16:00 @@ -12,19 +12,33 @@ ha_category: Hub featured: false --- -[Telldus Live] is a cloud platform that connects to your Tellstick connected gear at home. +The `tellduslive` component let you connect to [Telldus Live](https://live.telldus.com). It's cloud platform that connects to your Tellstick connected gear at home. -[Telldus Live]: https://live.telldus.com +To get started using Telldus Live, you will have to obtain developer keys from the [developer page](https://api.telldus.com/keys/index). -To get started using Telldus Live, you will have to obtain developer keys from [here][developer-keys]. - -[developer-keys]: https://api.telldus.com/keys/index +To integrate your Telldus Live with Home Assistant, add the following section to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry tellduslive: - public_key: XX - private_key: XX - token: XX - token_secret: XX + public_key: ABCDEFGHJKLMNOPQRSTUVXYZ + private_key: ABCDEFGHJKLMNOPQRSTUVXYZ + token: ABCDEFGHJKLMNOPQRSTUVXYZ + token_secret: ABCDEFGHJKLMNOPQRSTUVXYZ ``` + +Configuration variables: + +- **public_key** (*Required*): The public key for the Telldus Live service. +- **private_key** (*Required*): The private key for the Telldus Live service. +- **token** (*Required*): The token for the Telldus Live service. +- **token_secret** (*Required*): The token secret for the Telldus Live service. + +Tellstick Net devices can be auto discovered using [this method](https://developer.telldus.com/doxygen/html/TellStickNet.html). + +It might be possible to communicate with the Tellstick Net device directly, bypassing the Tellstick Live service. This however is [poorly documented](http://developer.telldus.se/ticket/114) and yet not [fully supported](https://developer.telldus.com/doxygen/html/TellStickNet.html). + +

+API requests to certain methods are limited to one request every 10 minutes. +

+ diff --git a/source/_components/tellstick.markdown b/source/_components/tellstick.markdown index 913415ece60..edca85a85b2 100644 --- a/source/_components/tellstick.markdown +++ b/source/_components/tellstick.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "TellStick" description: "Instructions how to integrate your TellStick into Home Assistant." date: 2015-03-28 13:06 @@ -12,7 +12,7 @@ ha_category: Hub --- -The tellstick component integrates [TellStick](http://www.telldus.se/products/tellstick) devices into Home Assistant. This integration allows users to add switches, lights, and sensors which are communicating with 433 Mhz. There are couple of vendors (Capidi Elro, Intertechno, Nexa, Proove, Sartano, and Viking) how are selling products which works with TellStick. For more details, please check the TellStick [compatibility list](http://telldus.se/products/compability). +The `tellstick` component integrates [TellStick](http://www.telldus.se/products/tellstick) devices into Home Assistant. This integration allows users to add switches, lights, and sensors which are communicating with 433 Mhz. There are a number of vendors (Capidi Elro, Intertechno, Nexa, Proove, Sartano, and Viking) who are selling products that work with TellStick. For more details, please check the TellStick [compatibility list](http://telldus.se/products/compability). To get started, add the devices to your `configuration.yaml` file. diff --git a/source/_components/thermostat.ecobee.markdown b/source/_components/thermostat.ecobee.markdown index eb25c3f2f29..d209c458a0f 100644 --- a/source/_components/thermostat.ecobee.markdown +++ b/source/_components/thermostat.ecobee.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Ecobee thermostat" +layout: page +title: "Ecobee Thermostat" description: "Instructions how to setup the Ecobee thermostats within Home Assistant." date: 2015-11-30 18:00 sidebar: true diff --git a/source/_components/thermostat.heat_control.markdown b/source/_components/thermostat.heat_control.markdown index d27bb3993bb..90fb0b6960c 100644 --- a/source/_components/thermostat.heat_control.markdown +++ b/source/_components/thermostat.heat_control.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Heat control" description: "Turn Home Assistant into a thermostat" date: 2015-03-23 19:59 @@ -20,6 +20,9 @@ thermostat: name: Study heater: switch.study_heater target_sensor: sensor.study_temperature + min_temp: 15 + max_temp: 21 + target_temp: 15 ``` Configuration variables: @@ -27,3 +30,6 @@ Configuration variables: - **name** (*Required*): Name of thermostat - **heater** (*Required*: `entity_id` for heater switch, must be a toggle device. - **target_sensor** (*Required*): `entity_id` for a temperature sensor, target_sensor.state must be temperature. +- **min_temp** (*Optional*): Set minimum set point available (default: 7) +- **max_temp** (*Optional*): Set maximum set point available (default: 35) +- **target_temp** (*Required*): Set default target temperature. Failure to set this variable will result in target temperature being set to null on startup. diff --git a/source/_components/thermostat.heatmiser.markdown b/source/_components/thermostat.heatmiser.markdown index a3bff2cf420..f528f579b0e 100644 --- a/source/_components/thermostat.heatmiser.markdown +++ b/source/_components/thermostat.heatmiser.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Heatmiser thermostat" +layout: page +title: "Heatmiser Thermostat" description: "Instructions how to integrate Heatmiser thermostats within Home Assistant." date: 2015-12-11 12:35 sidebar: true @@ -12,7 +12,9 @@ ha_category: Thermostat --- -The heatmiser thermostat platform let you control [Heatmiser DT/DT-E/PRT/PRT-E](http://www.heatmisershop.co.uk/heatmiser-slimline-programmable-room-thermostat/) thermostats from Heatmiser. The module itself is currently setup to work over a RS232 -> RS485 converter, therefore it connects over IP. +The `heatmiser` thermostat platform let you control [Heatmiser DT/DT-E/PRT/PRT-E](http://www.heatmisershop.co.uk/heatmiser-slimline-programmable-room-thermostat/) thermostats from Heatmiser. The module itself is currently setup to work over a RS232 -> RS485 converter, therefore it connects over IP. + +Further work would be required to get this setup to connect over Wifi, but the HeatmiserV3 python module being used is a full implementation of the V3 protocol. If you would like to contribute to making this work over wifi, please contact @andylockran on github. To set it up, add the following information to your `configuration.yaml` file: @@ -35,4 +37,4 @@ Configuration variables: - **port** (*Required*): The port that the interface is listening on. - **tstats** (*Required*): A list of thermostats activated on the gateway. - **id** (*Required*): The id of the thermostat as configured on the device itself -- **name** (*Required*): A friendly name for the themostat \ No newline at end of file +- **name** (*Required*): A friendly name for the themostat diff --git a/source/_components/thermostat.homematic.markdown b/source/_components/thermostat.homematic.markdown index b281ec41841..dc206f5a7ab 100644 --- a/source/_components/thermostat.homematic.markdown +++ b/source/_components/thermostat.homematic.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Homematic thermostat" +layout: page +title: "Homematic Thermostat" description: "Instructions how to integrate Homematic thermostats within Home Assistant." date: 2015-11-25 08:00 sidebar: true @@ -12,7 +12,7 @@ ha_category: Thermostat --- -The homematic thermostat platform let you control [Homematic](http://www.homematic.com/) thermostat from Home Assistant. Currently there is support for Homematic (HM-TC-IT-WM-W-EU, HM-CC-RT-DN) thermostats using Homegear or Homematic central (CCU1/CCU2). +The `homematic` thermostat platform let you control [Homematic](http://www.homematic.com/) thermostat from Home Assistant. Currently there is support for Homematic (HM-TC-IT-WM-W-EU, HM-CC-RT-DN) thermostats using Homegear or Homematic central (CCU1/CCU2). To set it up, add the following information to your `configuration.yaml` file: diff --git a/source/_components/thermostat.honeywell.markdown b/source/_components/thermostat.honeywell.markdown index baaaf7fd14a..03fa233019a 100644 --- a/source/_components/thermostat.honeywell.markdown +++ b/source/_components/thermostat.honeywell.markdown @@ -1,8 +1,8 @@ --- -layout: component -title: "Honeywell thermostat" +layout: page +title: "Honeywell Thermostat" description: "Instructions how to integrate Honeywell thermostats within Home Assistant." -date: 2015-11-09 17:15 +date: 2016-02-07 22:01 sidebar: true comments: false sharing: true @@ -12,7 +12,7 @@ ha_category: Thermostat --- -The honeywell thermostat platform let you control [Honeywell Connected](http://getconnected.honeywell.com/en/) thermostats from Home Assistant. +The `honeywell` thermostat platform let you control [Honeywell Connected](http://getconnected.honeywell.com/en/) thermostats from Home Assistant. To set it up, add the following information to your `configuration.yaml` file: @@ -21,6 +21,7 @@ thermostat: platform: honeywell username: YOUR_USERNAME password: YOUR_PASSWORD + region: REGION ``` Configuration variables: @@ -28,3 +29,4 @@ Configuration variables: - **username** (*Required*: The username of an user with access. - **password** (*Required*): The password for your given admin account. - **away_temperature** (*optional*): Heating setpoint when away mode is on. If omitted it defaults to 16.0 deg C. +- **region** (*optional*): Region identifier (either 'eu' or 'us'). Defaults to 'eu' if not provided. diff --git a/source/_components/thermostat.markdown b/source/_components/thermostat.markdown index d47b2728c4a..d003e41cfa5 100644 --- a/source/_components/thermostat.markdown +++ b/source/_components/thermostat.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Thermostats" description: "Instructions how to setup thermostats tracking within Home Assistant." date: 2015-01-20 22:36 diff --git a/source/_components/thermostat.nest.markdown b/source/_components/thermostat.nest.markdown index fc44ac1e08b..30c1b8c9005 100644 --- a/source/_components/thermostat.nest.markdown +++ b/source/_components/thermostat.nest.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Nest thermostat" +layout: page +title: "Nest Thermostat" description: "Instructions how to integrate Nest thermostats within Home Assistant." date: 2015-03-23 19:59 sidebar: true @@ -9,26 +9,20 @@ sharing: true footer: true logo: nest_thermostat.png ha_category: Thermostat -featured: true --- -The nest thermostat platform let you control a thermostat from [Nest](https://nest.com). +The `nest` thermostat platform let you control a thermostat from [Nest](https://nest.com). To set it up, add the following information to your `configuration.yaml` file: ```yaml thermostat: platform: nest - username: USERNAME - password: PASSWORD ``` -Configuration variables: - -- **username** (*Required*): Your Nest username. -- **password** (*Required*): Your Nest password. -

+ +

You must have the [Nest component](https://home-assistant.io/components/nest/) configured to use this sensor.

diff --git a/source/_components/thermostat.proliphix.markdown b/source/_components/thermostat.proliphix.markdown index 6f8a4ce9b2c..c9c13f91d13 100644 --- a/source/_components/thermostat.proliphix.markdown +++ b/source/_components/thermostat.proliphix.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Proliphix thermostat" +layout: page +title: "Proliphix Thermostat" description: "Instructions how to integrate Proliphix thermostats within Home Assistant." date: 2016-01-15 08:00 sidebar: true diff --git a/source/_components/thermostat.radiotherm.markdown b/source/_components/thermostat.radiotherm.markdown index 37e9ae1999d..fc409933030 100644 --- a/source/_components/thermostat.radiotherm.markdown +++ b/source/_components/thermostat.radiotherm.markdown @@ -1,6 +1,6 @@ --- -layout: component -title: "Radiotherm thermostat" +layout: page +title: "Radiotherm Thermostat" description: "Instructions how to integrate Radiotherm thermostats within Home Assistant." date: 2015-10-18 17:15 sidebar: true @@ -12,7 +12,7 @@ ha_category: Thermostat --- -The nest thermostat platform let you control a thermostat from [Radio Thermostat](http://www.radiothermostat.com/). +The `radiotherm` thermostat platform let you control a thermostat from [Radio Thermostat](http://www.radiothermostat.com/). The underlaying library supports: - CT50 V1.09 diff --git a/source/_components/updater.markdown b/source/_components/updater.markdown index 44d270b7b1e..980653e0cd9 100644 --- a/source/_components/updater.markdown +++ b/source/_components/updater.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Updater" description: "Detecting when Home Assistant updates are available." date: 2015-11-15 20:40 @@ -7,7 +7,7 @@ sidebar: true comments: false sharing: true footer: true -logo: updater.png +logo: home-assistant.png ha_category: Other --- diff --git a/source/_components/vera.markdown b/source/_components/vera.markdown index 4ceee75d400..782ca02cb7d 100644 --- a/source/_components/vera.markdown +++ b/source/_components/vera.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Vera" description: "Instructions how to setup Vera hubs within Home Assistant." date: 2015-03-23 20:04 diff --git a/source/_components/verisure.markdown b/source/_components/verisure.markdown index 06c635ecb31..29199cef7ee 100644 --- a/source/_components/verisure.markdown +++ b/source/_components/verisure.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Verisure" description: "Instructions how to setup Verisure devices within Home Assistant." date: 2015-08-17 20:28 @@ -17,9 +17,11 @@ Home Assistant has support to integrate your [Verisure](https://www.verisure.com We support: - * Smartplugs - * Reading from thermometers and hygrometers integrated in various devices - * Reading alarm status + * Alarm + * Smartplugs + * Reading from thermometers and hygrometers integrated in various devices + * Mouse Detector + * Locks To integrate Verisure with Home Assistant, add the following section to your `configuration.yaml` file: @@ -32,6 +34,8 @@ verisure: hygrometers: 0 smartplugs: 1 thermometers: 0 + locks: 0 + mouse: 1 code_digits: 4 ``` @@ -42,6 +46,8 @@ Configuration variables: - **alarm** (*Optional*): Set to 1 to show alarm, 0 to disable. Default 1. - **hygrometers** (*Optional*): Set to 1 to show hygrometers, 0 to disable. Default 1. - **smartplugs** (*Optional*): Set to 1 to show smartplugs, 0 to disable. Default 1. +- **locks** (*Optional*): Set to 1 to show locks, 0 to disable. Default 1. - **thermometers** (*Optional*): Set to 1 to show thermometers, 0 to disable. Default 1. +- **mouse** (*Optional*): Set to 1 to show mouse detectors, 0 to disable. Default 1. - **code_digits** (*Optional*): Number of digits in PIN code. Default 4. diff --git a/source/_components/weblink.markdown b/source/_components/weblink.markdown new file mode 100644 index 00000000000..4d08fc67f6f --- /dev/null +++ b/source/_components/weblink.markdown @@ -0,0 +1,34 @@ +--- +layout: page +title: "Weblink" +description: "Instructions how to setup Links within Home Assistant." +date: 2016-02-02 20:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: +ha_category: Other +--- + +The `weblinks` component allows you to display links in the Home Assistant frontend. + +To use this component in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +weblink: + entities: + - name: Router + url: http://192.168.1.1/ + icon: mdi:router-wireless + - name: Home Assistant + url: https://home-assistant.io +``` +Configuration variables: + +- **name** (*Required*): Text for the link. +- **url** (*Required*): The URL for the link. +- **icon** (*Optional*): Icon for entry. + +Pick an icon that you can find on [materialdesignicons.com](https://materialdesignicons.com/) to use for your input and prefix the name with `mdi:`. For example `mdi:car`, `mdi:ambulance`, or `mdi:motorbike`. diff --git a/source/_components/wemo.markdown b/source/_components/wemo.markdown new file mode 100644 index 00000000000..e2bf5c9236a --- /dev/null +++ b/source/_components/wemo.markdown @@ -0,0 +1,34 @@ +--- +layout: page +title: "Belkin WeMo devices" +description: "Instructions how to integrate Belkin WeMo devices into Home Assistant." +date: 2016-02-20 00:41 +sidebar: true +comments: false +sharing: true +footer: true +logo: belkin_wemo.png +ha_category: Hub +--- + +The `wemo` component is the main component to integrate various [Belkin WeMo](http://www.belkin.com/us/Products/home-automation/c/wemo-home-automation/) devices with Home Assistant. + +Supported devices will be automatically discovered if the discovery component is enabled. If you are not using the discovery component, loading the `wemo` component will scan for WeMo devices on the local network. + +```yaml +# Example configuration.yaml entry +wemo: +``` + +Alternately, WeMo devices that are not discoverable can be statically configured. If you have WeMo devices on subnets other than where Home Assistant is running, and/or devices in a remote location reachable over a VPN, you will need to manually configure them. This is also useful if you wish to disable discovery for some wemos, even if they are local. Example static configuration: + +```yaml +wemo: + static: + - 192.168.1.23 + - 192.168.52.172 +``` + +Any WeMo devices that are not statically configured but reachable via discovery will still be added automatically. + +Note that if you use this, you may want to configure your router (or whatever runs your DHCP server) to force your WeMo devices to use a static IP address. Check the DHCP section of your router configuration for this ability. diff --git a/source/_components/wink.markdown b/source/_components/wink.markdown index bebe9368ac2..4cd2283687b 100644 --- a/source/_components/wink.markdown +++ b/source/_components/wink.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Wink" description: "Instructions how to setup the Wink hub within Home Assistant." date: 2015-01-20 22:36 diff --git a/source/_components/zigbee.markdown b/source/_components/zigbee.markdown new file mode 100644 index 00000000000..01770a49e11 --- /dev/null +++ b/source/_components/zigbee.markdown @@ -0,0 +1,55 @@ +--- +layout: page +title: "ZigBee" +description: "Instructions on how to integrate a ZigBee network with Home Assistant." +date: 2016-01-27 17:10 +sidebar: true +comments: false +sharing: true +footer: true +logo: zigbee.png +ha_category: DIY +--- + +[ZigBee](http://www.zigbee.org/what-is-zigbee/) integration for Home Assistant allows you to utilise modules such as the [XBee](http://www.digi.com/lp/xbee) as wireless General Purpose Input/Output (GPIO) devices. The component requires a local ZigBee device to be connected over a serial port. Through this it will send and receive commands to and from other devices on the ZigBee mesh network. + +There is currently support for the following device types within Home Assistant: + +- [Binary Sensor](../binary_sensor.zigbee) (digital input pins) +- [Sensor](../sensor.zigbee) (analog input pins and temperature sensor) +- [Light](../light.zigbee) (digital output pins) +- [Switch](../switch.zigbee) (digital output pins) + +The local ZigBee device (assuming XBee) must have an up to date Router or Coordinator API firmware installed. + +## Configuration + +A `zigbee` section must be present in the `configuration.yaml` file and contain the following options as required: + +- **device**: The serial port to which the local ZigBee device is connected. Default: `/dev/ttyUSB0` + +- **baud**: The baud rate at which to communicate with the local ZigBee device. Default: `9600` + +#### Example + +```yaml +zigbee: + device: /dev/ttyUSB0 + baud: 115200 +``` + +Or to simply use the defaults: + +```yaml +zigbee: +``` + +To find the possible serial port names of your device, run: + +```bash +$ ls /dev/ttyUSB* +``` + +

+The port may also appear as /dev/ttyACM* if you're communicating with the ZigBee device through an Arduino. +

diff --git a/source/_components/zone.markdown b/source/_components/zone.markdown index ceada253041..accd4824824 100644 --- a/source/_components/zone.markdown +++ b/source/_components/zone.markdown @@ -1,5 +1,5 @@ --- -layout: component +layout: page title: "Zone" description: "Instructions how to setup zones within Home Assistant." date: 2015-10-04 09:23 @@ -21,9 +21,7 @@ zone: name: School latitude: 32.8773367 longitude: -117.2494053 - # Optional radius in meters (default: 100) radius: 250 - # Optional icon to show instead of name icon: mdi:school zone 2: @@ -40,10 +38,23 @@ zone 3: icon: mdi:account-multiple ``` +Configuration variables: + +- **name** (*Optional*): Friendly name of entry. +- **latitude** (*Required*): Latitude of the center point of the zone. +- **longitude** (*Required*): Longitude of the center point of the zone. +- **radius** (*Optional*): Optional radius in meters. Defaults to 100 meters. +- **icon** (*Optional*): Optional icon to show instead of name. + + #### {% linkable_title Home zone %} -If no configuration is given, the zone component will create a zone for home. This zone will use location given in the `configuration.yaml` file and have a radius of 100 meters. To override this, create a zone configuration and name it 'Home'. +If no configuration is given, the `zone` component will create a zone for home. This zone will use location given in the `configuration.yaml` file and have a radius of 100 meters. To override this, create a zone configuration and name it **'Home'**. #### {% linkable_title Icons %} -It is preferred to pick an icon to use for your zone. Pick any zone that you can find on [materialdesignicons.com](https://materialdesignicons.com/) and prefix the name with `mdi:`. For example `mdi:school`, `mdi:worker`, `mdi:home`, `mdi:cart`, `mdi:castle`. +It is preferred to pick an icon to use for your zone. Pick any zone that you can find on [materialdesignicons.com](https://materialdesignicons.com/) and prefix the name with `mdi:`. For example `mdi:school`, `mdi:worker`, `mdi:home`, `mdi:cart`, or `mdi:castle`. + +#### State + +`zoning` is the state a `zone` has when it is configured. A `zone` doesn't have another state, all configured zones are `zoning` all the time diff --git a/source/_components/zwave.markdown b/source/_components/zwave.markdown index 1ec9fad3d4f..ba63c7785d0 100644 --- a/source/_components/zwave.markdown +++ b/source/_components/zwave.markdown @@ -1,8 +1,8 @@ --- -layout: component +layout: page title: "Z-Wave" description: "Instructions how to integrate your existing Z-Wave within Home Assistant." -date: 2015-03-23 19:59 +date: 2016-02-27 19:59 sidebar: true comments: false sharing: true @@ -15,33 +15,96 @@ ha_category: Hub There is currently support for switches, lights and sensors. All will be picked up automatically after configuring this platform. -### Installation +### {% linkable_title Installation %} -To allow Home Assistant to talk to your Z-Wave USB stick you will have to compile Python Open Z-Wave. This can be done using [this script](https://github.com/balloob/home-assistant/blob/dev/script/build_python_openzwave). _(The Home Assistant docker image has support for Z-Wave built-in)_ +To allow Home Assistant to talk to your Z-Wave USB stick you will have to compile the OpenZWave library and install the related [python-OpenZWave package](https://github.com/OpenZWave/python-openzwave). This can be done as follows. _(Note: The Home Assistant docker image has support for Z-Wave built-in)_ Make sure you have the correct dependencies installed before running the script: ```bash -$ apt-get install cython3 libudev-dev python-sphinx python3-setuptools -$ pip3 install "cython<0.23" +$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools ``` -### Configuration +Make sure you have at least version 0.23 of cython. + +```bash +$ sudo pip3 install --upgrade cython +``` + +Then get the OpenZWave files and switch to the `python3` branch: + +```bash +$ git clone https://github.com/OpenZWave/python-openzwave.git +$ cd python-openzwave +$ git checkout python3 +$ PYTHON_EXEC=`which python3` make build +$ sudo PYTHON_EXEC=`which python3` make install +``` +

+Instead of `make install`, you can alternatively build your own python-openzwave package which can be easily uninstalled: + +`$ sudo PYTHON_EXEC=`which python3` checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave` + +

+ +With this installation, your `config_path` needed below will resemble: + +```bash +/usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config +``` + + +### {% linkable_title Configuration %} ```yaml # Example configuration.yaml entry zwave: usb_path: /dev/ttyUSB0 config_path: /usr/local/share/python-openzwave/config + polling_interval: 10000 + customize: + sensor.greenwave_powernode_6_port_energy_10: + polling_intensity: 1 ``` Configuration variables: - **usb_path** (*Required*): The port where your device is connected to your Home Assistant host. - **config_path** (*Optional*): The path to the Python Open Z-Wave configuration files. +- **polling_interval** (*Optional*): The time period in milliseconds between polls of a nodes value. +- **customize** (*Optional*): This attribute contains node-specific override values: + - **polling_intensity** (*Optional*): Enables polling of a value and sets the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc) To find the path of your Z-Wave stick, run: ```bash $ ls /dev/ttyUSB* ``` + +Or, on some other systems (such as Raspberry Pi), use: + +```bash +$ ls /dev/ttyACM* +``` + +

+Depending on what's plugged into your USB ports, the name found above may change. You an lock in a name, such as `/dev/zwave`, by following [these instructions](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/). +

+ +#### {% linkable_title Events %} + +Some devices can also trigger scene activation events, which can be used in automation scripts (for example the press of a button on a wall switch): + +```yaml +# Example configuration.yaml automation entry +automation: + - alias: Turn on Desk light + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: zwaveme_zme_wallcs_secure_wall_controller_8 + scene_id: 11 +``` + +The *entity_id* and *scene_id* of all triggered events can be seen in the console output. diff --git a/source/_cookbook/automation_for_rainy_days.markdown b/source/_cookbook/automation_for_rainy_days.markdown index 63d78ce3d4c..566a3001102 100644 --- a/source/_cookbook/automation_for_rainy_days.markdown +++ b/source/_cookbook/automation_for_rainy_days.markdown @@ -3,15 +3,14 @@ layout: page title: "Automation for rainy days" description: "Basic example how to use weather conditions to set states" date: 2015-10-08 19:05 -sidebar: false +sidebar: true comments: false sharing: true footer: true +ha_category: Automation Examples --- -### {% linkable_title Rainy Day Light %} - -This requires a [forecast.io](components/sensor.forecast/) sensor with the condition `weather_precip` that tells if it's raining or not. +This requires a [forecast.io](/components/sensor.forecast/) sensor with the condition `weather_precip` that tells if it's raining or not. Turn on a light in the living room when it starts raining, someone is home, and it's afternoon or later. diff --git a/source/_cookbook/automation_sun.markdown b/source/_cookbook/automation_sun.markdown index 54b986a9dec..73878464180 100644 --- a/source/_cookbook/automation_sun.markdown +++ b/source/_cookbook/automation_sun.markdown @@ -1,12 +1,13 @@ --- layout: page -title: "Automation examples using the sun" +title: "Examples using the sun" description: "Automation examples that use the sun." date: 2015-10-08 19:05 -sidebar: false +sidebar: true comments: false sharing: true footer: true +ha_category: Automation Examples --- #### {% linkable_title Turn on the living room lights 45 minutes before sunset if anyone home %} diff --git a/source/_cookbook/automation_using_timeinterval_inputboolean.markdown b/source/_cookbook/automation_using_timeinterval_inputboolean.markdown new file mode 100644 index 00000000000..02c3cd1a443 --- /dev/null +++ b/source/_cookbook/automation_using_timeinterval_inputboolean.markdown @@ -0,0 +1,42 @@ +--- +layout: page +title: "Using time interval and input boolean" +description: "Automation to get a random color every 2 minutes that can be turned on/off." +date: 2016-02-07 22:35 +0800 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation Examples +--- + +#### {% linkable_title Change Hue light on interval to random color based on state of a input boolean %} + +_Note, Philips Hue is currently the only light platform that support the random effect._ + +```yaml +input_boolean: + loop_livingcolors: + name: Loop LivingColors + initial: off + icon: mdi:spotlight + +automation: +# Changes Hue light every two minutes to random color if input boolean is set to on +- alias: 'Set LivingColors to random color' + trigger: + platform: time + minutes: '/2' + seconds: 0 + condition: + platform: state + entity_id: input_boolean.loop_livingcolors + state: 'on' + action: + service: light.turn_on + entity_id: light.woonkamer_livingcolors + data: + effect: random + transition: 5 + brightness: 255 +``` diff --git a/source/_cookbook/basic_example_use_trigger_values.markdown b/source/_cookbook/basic_example_use_trigger_values.markdown index cbff5a43b62..7c062317aac 100644 --- a/source/_cookbook/basic_example_use_trigger_values.markdown +++ b/source/_cookbook/basic_example_use_trigger_values.markdown @@ -1,16 +1,15 @@ --- layout: page -title: "Automation: use_trigger_values" +title: "Example using use_trigger_values" description: "Basic example how to use use_trigger_values in automation" date: 2015-10-08 19:05 -sidebar: false +sidebar: true comments: false sharing: true footer: true +ha_category: Automation Examples --- -### {% linkable_title Basic example for use_trigger_values %} - Turn on lights during daytime when it's dark enough < 200 lux. ```yaml diff --git a/source/_cookbook/configuration_yaml_by_brusc.markdown b/source/_cookbook/configuration_yaml_by_brusc.markdown new file mode 100644 index 00000000000..762bf536e65 --- /dev/null +++ b/source/_cookbook/configuration_yaml_by_brusc.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Configuration.yaml by brusc" +description: "" +date: 2016-03-14 11:45 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +ha_external_link: https://github.com/brusc/Home-Assistant-Configuration +--- + diff --git a/source/_cookbook/configuration_yaml_by_carlo_costanzo.markdown b/source/_cookbook/configuration_yaml_by_carlo_costanzo.markdown new file mode 100644 index 00000000000..e60659cb24d --- /dev/null +++ b/source/_cookbook/configuration_yaml_by_carlo_costanzo.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Configuration.yaml by Carlo Costanzo" +description: "" +date: 2016-02-07 11:45 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +ha_external_link: https://gist.github.com/CCOSTAN/9934de973a293b809868 +--- + diff --git a/source/_cookbook/configuration_yaml_by_danichispa.markdown b/source/_cookbook/configuration_yaml_by_danichispa.markdown new file mode 100644 index 00000000000..b211599c778 --- /dev/null +++ b/source/_cookbook/configuration_yaml_by_danichispa.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Configuration.yaml by Danichispa" +description: "" +date: 2016-02-20 02:19 -0800 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +ha_external_link: https://github.com/danichispa/hass-config +--- + diff --git a/source/_cookbook/configuration_yaml_by_greenturtwig.markdown b/source/_cookbook/configuration_yaml_by_greenturtwig.markdown new file mode 100644 index 00000000000..dcb11f84540 --- /dev/null +++ b/source/_cookbook/configuration_yaml_by_greenturtwig.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Configuration.yaml by GreenTurtwig" +description: "" +date: 2016-02-13 13:51 +0700 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +ha_external_link: https://github.com/GreenTurtwig/personal-home-automation/tree/master/Home%20Assistant +--- + diff --git a/source/_cookbook/configuration_yaml_by_happyleavesaoc.markdown b/source/_cookbook/configuration_yaml_by_happyleavesaoc.markdown new file mode 100644 index 00000000000..33fc4f05040 --- /dev/null +++ b/source/_cookbook/configuration_yaml_by_happyleavesaoc.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Configuration.yaml by happyleavesaoc" +description: "" +date: 2016-02-07 11:45 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +ha_external_link: https://github.com/happyleavesaoc/my-home-automation/tree/master/homeassistant +--- + diff --git a/source/_cookbook/customize_polling_interval.markdown b/source/_cookbook/customize_polling_interval.markdown new file mode 100644 index 00000000000..e6aff18ebe8 --- /dev/null +++ b/source/_cookbook/customize_polling_interval.markdown @@ -0,0 +1,20 @@ +--- +layout: page +title: "Customize polling interval for any component" +description: "Shows how to customize polling interval for any component via configuration.yaml." +date: 2016-02-12 23:17 -0800 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +--- + +Platforms that require polling will be polled in an interval specified by the main component. For example a light will check every 30 seconds for a changed state. It is possible to overwrite this scan interval for any platform that is being polled by specifying a `scan_interval` config key. In the example below we setup the Philips Hue lights but tell Home Assistant to poll the devices every 10 seconds instead of the default 30 seconds. + +```yaml +# Example configuration.yaml entry to poll Hue lights every 10 seconds. +light: + platform: hue + scan_interval: 10 +``` diff --git a/source/_cookbook/dim_lights_when_playing_media.markdown b/source/_cookbook/dim_lights_when_playing_media.markdown index 488d5752b96..92bea514ca4 100644 --- a/source/_cookbook/dim_lights_when_playing_media.markdown +++ b/source/_cookbook/dim_lights_when_playing_media.markdown @@ -3,10 +3,11 @@ layout: page title: "Dim lights when playing media" description: "Dim lights up or down when playing media" date: 2015-10-15 19:05 -sidebar: false +sidebar: true comments: false sharing: true footer: true +ha_category: Automation Examples --- Like it how the lights dim up/down at the movies? Do it at home as well! diff --git a/source/_cookbook/foscam_away_mode_PTZ.markdown b/source/_cookbook/foscam_away_mode_PTZ.markdown new file mode 100644 index 00000000000..3ac9578ccce --- /dev/null +++ b/source/_cookbook/foscam_away_mode_PTZ.markdown @@ -0,0 +1,84 @@ +--- +layout: page +title: "Foscam Recording during Away Mode Only using Pan/Tilt/Zoom Control and Motion Detection" +description: "Example of how to set Foscam to only have Motion Detection Recording while no one is home. When users are home the Foscam will indicate it is not recording by pointing down and away from users" +date: 2016-03-10 13:05 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation Examples +--- + +This requires a [Foscam IP Camera](/components/camera.foscam/) camera with PTZ (Pan, Tilt, Zoom) and CGI functionality ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)) + +Foscam Cameras can be controlled by Home Assistant through a number of CGI commands. +The following outlines examples of the switch, services, and scripts required to move between 2 preset destinations while controlling motion detection, but many other options of movement are provided in the Foscam CGI User Guide linked above. + +The `switch.foscam_motion` will control whether the motion detection is on or off. This switch supports `statecmd`, which checks the current state of motion detection. + +```yaml +# Replace admin and password with an "Admin" priviledged Foscam user +# Replace ipaddress with the local IP address of your Foscam +switch: + platform: command_line + switches: + #Switch for Foscam Motion Detection + foscam_motion: + oncmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"' + offcmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"' + statecmd: 'curl -k --silent "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep -oP "(?<=isEnable>).*?(?=)"' + value_template: '{{ value == "1" }}' +``` + +The service `shell_command.foscam_turn_off` sets the camera to point down and away to indicate it is not recording, and `shell_command.foscam_turn_on` sets the camera to point where I'd like to record. h of these services require preset points to be added to your camera. See source above for additional information. + +```yaml +shell_command: + #Created a preset point in Foscam Web Interface named Off which essentially points the camera down and away + foscam_turn_off: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Off&usr=admin&pwd=password"' + #Created a preset point in Foscam Web Interface named Main which points in the direction I would like to record + foscam_turn_on: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Main&usr=admin&pwd=password"' +``` + +The `script.foscam_off` and `script.foscam_on` can be used to set the motion detection appropriately, and then move the camera. These scripts can be called as part of an automation with `device_tracker` triggers to set `home` and `not_home` modes for your Foscam and disable motion detection recording while `home`. + +```yaml +script: + foscam_off: + sequence: + - execute_service: switch.turn_off + service_data: + entity_id: switch.foscam_motion + - service: shell_command.foscam_turn_off + foscam_on: + sequence: + - execute_service: switch.turn_off + service_data: + entity_id: switch.foscam_motion + - service: shell_command.foscam_turn_on + - execute_service: switch.turn_on + service_data: + entity_id: switch.foscam_motion +``` + +To automate Foscam being set to "on" (facing the correct way with motion sensor on), I used the following simple automation: + +```yaml +automation: + - alias: Set Foscam to Away Mode when I leave home + trigger: + platform: state + entity_id: group.family + from: 'home' + action: + service: script.foscam_on + - alias: Set Foscam to Home Mode when I arrive Home + trigger: + platform: state + entity_id: group.family + to: 'home' + action: + service: script.foscam_off +``` + diff --git a/source/_cookbook/notify_if_over_threshold.markdown b/source/_cookbook/notify_if_over_threshold.markdown new file mode 100644 index 00000000000..a7651eb534f --- /dev/null +++ b/source/_cookbook/notify_if_over_threshold.markdown @@ -0,0 +1,48 @@ +--- +layout: page +title: "Send notification based on sensor" +description: "Basic example of how to send a templated notification if a sensor is over a given threshold" +date: 2016-02-25 15:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation Examples +--- + +The following example sends a notification via pushbullet if a sensor is over a critical value: + +```yaml + +notify me: + platform: pushbullet + api_key: "API_KEY_HERE" + name: mypushbullet + +automation: + - alias: FanOn + trigger: + platform: numeric_state + entity_id: sensor.furnace + above: 2 + action: + service: notify.mypushbullet + data: + title: "Furnace fan is running" + message: "Fan running because current is {% raw %}{{ states.sensor.furnace.state }}{% endraw %} amps" +``` + +If you also want a notification when it drops back down below that limit, you could add this as well: + +```yaml + - alias: FanOff + trigger: + platform: numeric_state + entity_id: sensor.furnace + below: 2 + action: + service: notify.mypushbullet + data: + title: "Furnace fan is stopped" + message: "Fan stopped because current is {% raw %}{{ states.sensor.furnace.state }}{% endraw %} amps" +``` diff --git a/source/_cookbook/perform_actions_based_on_input_select.markdown b/source/_cookbook/perform_actions_based_on_input_select.markdown new file mode 100644 index 00000000000..63372ff3325 --- /dev/null +++ b/source/_cookbook/perform_actions_based_on_input_select.markdown @@ -0,0 +1,77 @@ +--- +layout: page +title: "Perform actions based on input select" +description: "Example playing media to chromecast based on input select element" +date: 2016-03-07 12:05 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation Examples +--- + +This example uses an [`input_select`](/components/input_select/) element to pick which mp3 file to play on a [Chromecast](components/media_player.cast/). + +```yaml +# Define our dropdown list +input_select: + lullaby: + name: Lullaby + options: + - Rain + - Babbling Brook + - None + initial: None + icon: mdi:weather-rainy + +# Define our media player +media_player: + - platform: cast + host: chromecast-nursery + name: Nursery + +automation: + # If you select "Rain", play the "rain.mp3" file + - alias: Play Rain Lullaby + + trigger: + platform: state + entity_id: input_select.lullaby + to: "Rain" + + action: + service: media_player.play_media + data: + entity_id: media_player.nursery + media_id: http://fileserver/rain.mp3 + media_type: audio/mp4 + + + # If you select "Babbling Brook", play the "babbling_brook.mp3" file + - alias: Play Babbling Brook Lullaby + + trigger: + platform: state + entity_id: input_select.lullaby + to: "Babbling Brook" + + action: + service: media_player.play_media + data: + entity_id: media_player.nursery + media_id: http://fileserver/babbling_brook.mp3 + media_type: audio/mp4 + + # If you select "None, turn the Chromecast off + - alias: Stop the Lullaby + + trigger: + platform: state + entity_id: input_select.lullaby + to: "None" + + action: + service: media_player.turn_off + data: + entity_id: media_player.nursery +``` diff --git a/source/_cookbook/python_component_basic_service.markdown b/source/_cookbook/python_component_basic_service.markdown new file mode 100644 index 00000000000..e6f6bd6b367 --- /dev/null +++ b/source/_cookbook/python_component_basic_service.markdown @@ -0,0 +1,56 @@ +--- +layout: page +title: "Basic Service Example" +description: "" +date: 2016-02-07 12:13 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Custom Python Component Examples +--- + +This is a simple "hello world" example to show the basics of registering a service. To use this example, create the file `/custom_components/hello_service.py` and copy the below example code. + +Services can be called from automation and from the service "Developer tools" in the frontend. + +```python +# The domain of your component. Should be equal to the name of your component. +DOMAIN = 'hello_service' + +ATTR_NAME = 'name' +DEFAULT_NAME = 'World' + + +def setup(hass, config): + """Setup is called when Home Assistant is loading our component.""" + + def handle_hello(call): + name = call.data.get(ATTR_NAME, DEFAULT_NAME) + + hass.states.set('hello.service.hello', name) + + hass.services.register(DOMAIN, 'hello', handle_hello) + + # Return boolean to indicate that initialization was successfully. + return True +``` + +Load the component by adding the following to your `configuration.yaml`. When your component is loaded, a new service should be available to call. + +```yaml +# configuration.yaml entry +hello_service: +``` + +Open the frontend and in the sidebar, click the first icon in the developer tool section. This will open the Call Service developer tool. On the right, find your service and click on it. This will automatically fill in the correct values. + +Pressing "Call Service" will now call your service without any parameters. This will cause your service to create a state with the default name 'World'. If you want to specify the name, you have to specify parameters. Add the following JSON as Service Data and press "Call Service again". + +```json +{ + "name": "Planet" +} +``` + +The service will now overwrite the previous state with "Planet". diff --git a/source/_cookbook/python_component_basic_state.markdown b/source/_cookbook/python_component_basic_state.markdown new file mode 100644 index 00000000000..3eca0d8bbab --- /dev/null +++ b/source/_cookbook/python_component_basic_state.markdown @@ -0,0 +1,43 @@ +--- +layout: page +title: "Basic State Setting Example" +description: "" +date: 2016-02-07 12:13 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Custom Python Component Examples +--- + +This is a simple hello world example to show the basics for setting a state. To use this example, create the file `/custom_components/hello_state.py` and copy the below example code. + +```python +# The domain of your component. Should be equal to the name of your component. +DOMAIN = 'hello_state' + +CONF_NAME = 'name' +DEFAULT_NAME = 'World' + + +def setup(hass, config): + """Setup is called when Home Assistant is loading our component.""" + + # Get the name from the configuration. Use DEFAULT_NAME if no name provided. + name = config[DOMAIN].get(CONF_NAME, DEFAULT_NAME) + + # States are in the format DOMAIN.OBJECT_ID + hass.states.set('hello_state.hello', name) + + # Return boolean to indicate that initialization was successfully. + return True +``` + +Load the component by adding the following to your `configuration.yaml`: + +```yaml +# configuration.yaml entry +hello_state: + # optional + name: Paulus +``` diff --git a/source/_cookbook/python_component_mqtt_basic.markdown b/source/_cookbook/python_component_mqtt_basic.markdown new file mode 100644 index 00000000000..a4f4603dd43 --- /dev/null +++ b/source/_cookbook/python_component_mqtt_basic.markdown @@ -0,0 +1,78 @@ +--- +layout: page +title: "Basic MQTT Example" +description: "" +date: 2016-02-07 12:13 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Custom Python Component Examples +--- + +

+This example requires you to have the [MQTT component](/components/mqtt/) up and running. +

+ +This is a simple hello world example to show the basics of using MQTT in a custom component. To use this example, create the file `/custom_components/hello_mqtt.py` and copy the below example code. + +This example follows a topic on MQTT and updates the state of an entity to the last message received on that topic. It will also register a service 'set_state' that will publish a message to the MQTT topic that we're listening to. + +```python +import homeassistant.loader as loader + +# The domain of your component. Should be equal to the name of your component. +DOMAIN = "hello_mqtt" + +# List of component names (string) your component depends upon. +DEPENDENCIES = ['mqtt'] + + +CONF_TOPIC = 'topic' +DEFAULT_TOPIC = 'home-assistant/hello_mqtt' + + +def setup(hass, config): + """Setup the Hello MQTT component.""" + mqtt = loader.get_component('mqtt') + topic = config[DOMAIN].get('topic', DEFAULT_TOPIC) + entity_id = 'hello_mqtt.last_message' + + # Listener to be called when we receive a message. + def message_received(topic, payload, qos): + """A new MQTT message has been received.""" + hass.states.set(entity_id, payload) + + # Subscribe our listener to a topic. + mqtt.subscribe(hass, topic, message_received) + + # Set the intial state + hass.states.set(entity_id, 'No messages') + + # Service to publish a message on MQTT. + def set_state_service(call): + """Service to send a message.""" + mqtt.publish(hass, topic, call.data.get('new_state')) + + # Register our service with Home Assistant. + hass.services.register(DOMAIN, 'set_state', set_state_service) + + # Return boolean to indicate that initialization was successfully. + return True +``` + +Load the component by adding the following to your `configuration.yaml`. When your component is loaded, a new entity should popup and there should be a new service available to call. + +```yaml +# configuration.yaml entry +hello_mqtt: + topic: some_mqtt/topic/here +``` + +You can call the service with example payload: + +```json +{ + "new_state": "some new state" +} +``` diff --git a/source/_cookbook/python_component_simple_alarm.markdown b/source/_cookbook/python_component_simple_alarm.markdown new file mode 100644 index 00000000000..e014a695f02 --- /dev/null +++ b/source/_cookbook/python_component_simple_alarm.markdown @@ -0,0 +1,124 @@ +--- +layout: page +title: "Flash lights when intruder detected" +description: "Detect intruders by checking if the light is turning on while no one is home." +date: 2016-02-14 0:40 -0800 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation in Python Examples +--- + +This example component will detect intruders. It does so by checking if lights are being turned on while there is no one at home. When this happens it will turn the lights red, flash them for 30 seconds and send a message via [the notifiy component](/components/notify/). It will also flash a specific light when a known person comes home. + +This component depends on the components [device_tracker](/components/device_tracker/) and [light](/components/light/) being setup. + +To set it up, add the following lines to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +simple_alarm: + known_light: light.Bowl + unknown_light: group.living_room +``` + +Configuration variables: + +- **known_light** (*Optional*): Which light/light group has to flash when a known device comes home. +- **unknown_light** (*Optional*): Which light/light group has to flash red when light turns on while no one home. + +Create the file `/custom_components/simple_alarm.py` and copy paste the content below: + +```python +"""Simple alarm component.""" +import logging + +import homeassistant.loader as loader +from homeassistant.components import device_tracker, light, notify +from homeassistant.helpers.event import track_state_change +from homeassistant.const import STATE_ON, STATE_OFF, STATE_HOME, STATE_NOT_HOME + +DOMAIN = "simple_alarm" + +DEPENDENCIES = ['group', 'device_tracker', 'light'] + +# Attribute to tell which light has to flash whem a known person comes home +# If omitted will flash all. +CONF_KNOWN_LIGHT = "known_light" + +# Attribute to tell which light has to flash whem an unknown person comes home +# If omitted will flash all. +CONF_UNKNOWN_LIGHT = "unknown_light" + +# Services to test the alarms +SERVICE_TEST_KNOWN_ALARM = "test_known" +SERVICE_TEST_UNKNOWN_ALARM = "test_unknown" + + +def setup(hass, config): + """ Sets up the simple alarms. """ + logger = logging.getLogger(__name__) + + light_ids = [] + + for conf_key in (CONF_KNOWN_LIGHT, CONF_UNKNOWN_LIGHT): + light_id = config[DOMAIN].get(conf_key, light.ENTITY_ID_ALL_LIGHTS) + + if hass.states.get(light_id) is None: + logger.error( + 'Light id %s could not be found in state machine', light_id) + + return False + + light_ids.append(light_id) + + # pylint: disable=unbalanced-tuple-unpacking + known_light_id, unknown_light_id = light_ids + + if hass.states.get(device_tracker.ENTITY_ID_ALL_DEVICES) is None: + logger.error('No devices are being tracked, cannot setup alarm') + + return False + + def known_alarm(): + """ Fire an alarm if a known person arrives home. """ + light.turn_on(hass, known_light_id, flash=light.FLASH_SHORT) + + def unknown_alarm(): + """ Fire an alarm if the light turns on while no one is home. """ + light.turn_on( + hass, unknown_light_id, + flash=light.FLASH_LONG, rgb_color=[255, 0, 0]) + + # Send a message to the user + notify.send_message( + hass, "The lights just got turned on while no one was home.") + + # Setup services to test the effect + hass.services.register( + DOMAIN, SERVICE_TEST_KNOWN_ALARM, lambda call: known_alarm()) + hass.services.register( + DOMAIN, SERVICE_TEST_UNKNOWN_ALARM, lambda call: unknown_alarm()) + + def unknown_alarm_if_lights_on(entity_id, old_state, new_state): + """ Called when a light has been turned on. """ + if not device_tracker.is_on(hass): + unknown_alarm() + + track_state_change( + hass, light.ENTITY_ID_ALL_LIGHTS, + unknown_alarm_if_lights_on, STATE_OFF, STATE_ON) + + def ring_known_alarm(entity_id, old_state, new_state): + """ Called when a known person comes home. """ + if light.is_on(hass, known_light_id): + known_alarm() + + # Track home coming of each device + track_state_change( + hass, hass.states.entity_ids(device_tracker.DOMAIN), + ring_known_alarm, STATE_NOT_HOME, STATE_HOME) + + return True +``` diff --git a/source/_cookbook/restart_ha_if_wemo_switch_is_not_detected.markdown b/source/_cookbook/restart_ha_if_wemo_switch_is_not_detected.markdown new file mode 100644 index 00000000000..5c7accebee2 --- /dev/null +++ b/source/_cookbook/restart_ha_if_wemo_switch_is_not_detected.markdown @@ -0,0 +1,98 @@ +--- +layout: page +title: "Restart Home Assistant if Wemo Switch is not detected" +description: "Restart Home Assistant if Wemo Switch is not detected." +date: 2016-01-29 08:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation Examples +--- + +### {% linkable_title Restart Home Assistant %} + +This configuration example is restarting Home Assistant if a [WeMo](/components/switch.wemo/) switch is not detected. An additional MQTT switch is present for stopping Home Assistant and can be triggered by [IFTTT](/components/ifttt/). The running batch script will automatically restart Home Assistant if the process isn't found anymore. + +```yaml +mqtt: + broker: 127.0.0.1 + port: 1883 + client_id: home-assistant-1 + keepalive: 60 + +device_tracker: + - platform: nmap_tracker + hosts: 192.168.0.1-255 + home_interval: 1 + interval_seconds: 30 + consider_home: 900 + +ifttt: + key: *** + +notify: + - platform: pushbullet + api_key: *** + name: pushbullet + +switch: + - platform: wemo + - platform: mqtt + state_topic: "home/killhass" + command_topic: "home/killhass" + name: "KillHass" + qos: 0 + payload_on: "ON" + payload_of: "OFF" + optimistic: false + +script: + restarthawemo: + alias: "Restart HA if WeMo isn't found after 15 minutes" + sequence: + - delay: + minutes: 15 + - execute_service: notify.pushbullet + service_data: + message: 'WeMo not found, restarting HA' + - execute_service: switch.turn_on + service_data: + entity_id: switch.killhass + +automation: + - alias: "Restart HA if WeMo switch isn't found after 15 minutes" + trigger: + platform: state + entity_id: device_tracker.wemo + from: 'not_home' + to: 'home' + condition: + - platform: template + value_template: {% raw %}'{% if states.switch.wemo %}false{% else %}true{% endif %}'{% endraw %} + - platform: state + entity_id: script.restarthawemo + state: 'off' + action: + service: homeassistant.turn_on + entity_id: script.restarthawemo + - alias: 'Stop HA' + trigger: + - platform: state + entity_id: switch.KillHass + state: 'on' + action: + service: homeassistant.stop + - alias: 'Stop restarting HA is WeMo is found' + trigger: + platform: template + value_template: {% raw %}'{% if states.switch.wemo %}true{% else %}false{% endif %}'{% endraw %} + condition: + platform: state + entity_id: script.restarthawemo + state: 'on' + action: + service: homeassistant.turn_off + entity_id: script.restarthawemo +``` + diff --git a/source/_cookbook/send_a_reminder.markdown b/source/_cookbook/send_a_reminder.markdown index bb0296f04aa..e08d2c9767d 100644 --- a/source/_cookbook/send_a_reminder.markdown +++ b/source/_cookbook/send_a_reminder.markdown @@ -3,16 +3,16 @@ layout: page title: "Send a reminder" description: "Send a reminder" date: 2015-12-16 08:00 -sidebar: false +sidebar: true comments: false sharing: true footer: true +ha_category: Automation Examples --- -#### {% linkable_title Send a reminder %} Always forget to eat lunch? Let Home Assistant send you a reminder. -Add a [notify platform](/components/notify/) of your choice +Add a [notify platform](/components/notify/) of your choice. ```yaml notify: diff --git a/source/_cookbook/track_battery_level.markdown b/source/_cookbook/track_battery_level.markdown new file mode 100644 index 00000000000..905ae5f30fa --- /dev/null +++ b/source/_cookbook/track_battery_level.markdown @@ -0,0 +1,39 @@ +--- +layout: page +title: "Track your battery level" +description: "Basic example how to track the battery level of your mobile devices." +date: 2016-01-29 09:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation Examples +--- + +The [iCloud](/components/device_tracker.icloud/) is gathering various details about your device including the battery level. To display it in the Frontend use a [template sensor](/components/sensor.template/). + +```yaml + - platform: template + sensors: + battery_iphone: + unit_of_measurement: '%' + value_template: >- + {% raw %}{%- if states.device_tracker.iphone.attributes.battery %} + {{ states.device_tracker.iphone.attributes.battery }} + {% else %} + {{ states.sensor.battery_iphone.state }} + {%- endif %}{% endraw %} +``` + +The `else` part is used to have the sensor keep it's last state if the newest [iCloud](/components/device_tracker.icloud/) update doesn't have any battery state in it (which happens sometimes). Otherwise the sensor will be blank. + +While running the [Owntracks](/components/device_tracker.owntracks/) device tracker you can retrieve the battery level with a MQTT sensor. + +```yaml + - platform: mqtt + state_topic: "owntracks/tablet/tablet" + name: "Battery Tablet" + unit_of_measurement: "%" + value_template: {% raw %}'{{ value_json.batt }}'{% endraw %} +``` + diff --git a/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown b/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown index ff04a27bfa9..1cbdbdde6e1 100644 --- a/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown +++ b/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown @@ -1,21 +1,22 @@ --- layout: page -title: "Motion detected light" +title: "Turn on lights for 10 minutes after motion detected" description: "Turn on lights for 10 minutes when motion detected." date: 2015-10-08 19:05 -sidebar: false +sidebar: true comments: false sharing: true footer: true +ha_category: Automation Examples --- #### {% linkable_title Turn on lights with a resettable off timer %} -This recipe will turn on a light when there is motion and turn off the light when ten minutes has passed without any motion events . +This recipe will turn on a light when there is motion and turn off the light when ten minutes has passed without any motion events. ```yaml automation: - alias: Turn on kitchen lights when there is movement + alias: Turn on kitchen lights when there is movement trigger: - platform: state entity_id: sensor.motion_sensor @@ -28,14 +29,14 @@ script: timed_lamp: alias: "Turn on lamp and set timer" sequence: - # Cancel ev. old timers + # Cancel ev. old timers - execute_service: script.turn_off - service_data: + service_data: entity_id: script.timer_off - execute_service: light.turn_on service_data: entity_id: light.kitchen - # Set new timer + # Set new timer - execute_service: script.turn_on service_data: entity_id: script.timer_off @@ -46,6 +47,6 @@ script: - delay: minutes: 10 - execute_service: light.turn_off - service_data: + service_data: entity_id: light.kitchen ``` diff --git a/source/_includes/asides/component_navigation.html b/source/_includes/asides/component_navigation.html index 0bb8f074e01..6fc98ef0236 100644 --- a/source/_includes/asides/component_navigation.html +++ b/source/_includes/asides/component_navigation.html @@ -21,7 +21,13 @@ {% assign imp_name = file_parts | first %} {% endif %} - {% if is_platform and parent_name != 'sensor' %} + {% if page.ha_iot_class %} +
+ IoT class: {{ page.ha_iot_class }} +
+ {% endif %} + + {% if is_platform and parent_name != 'sensor' and parent_name != 'binary_sensor' %}
This is a platform for the {{parent_component.title}} component. diff --git a/source/_includes/asides/cookbook_navigation.html b/source/_includes/asides/cookbook_navigation.html new file mode 100644 index 00000000000..7b6287c0565 --- /dev/null +++ b/source/_includes/asides/cookbook_navigation.html @@ -0,0 +1,27 @@ +
+ {% include edit_github.html %} + {% assign cookbook = site.cookbook | sort: 'title' %} + + + +
+

{{page.ha_category}}

+
    + {% for recipe in cookbook %} + {% if recipe.ha_category == page.ha_category %} +
  • + {% if recipe.url == page.url %} + {{recipe.title}} + {% elsif recipe.ha_external_link %} + {{recipe.title}} + {% else %} + {{recipe.title}} + {% endif %} +
  • + {% endif %} + {% endfor %} +
+
+
diff --git a/source/_includes/custom/grid_item_right.html b/source/_includes/custom/grid_item_right.html index ba27398e2db..a1b637ad6b1 100644 --- a/source/_includes/custom/grid_item_right.html +++ b/source/_includes/custom/grid_item_right.html @@ -9,3 +9,4 @@
  • receive a message when the lights turn on while you are not at home?
  • We've got you covered.

    +

    View examples by the community.

    diff --git a/source/_includes/custom/header.html b/source/_includes/custom/header.html index f2a42ff7be8..15f04816fdc 100644 --- a/source/_includes/custom/header.html +++ b/source/_includes/custom/header.html @@ -1,6 +1,6 @@ diff --git a/source/_includes/custom/navigation.html b/source/_includes/custom/navigation.html index 52f378b5495..2653839f67b 100644 --- a/source/_includes/custom/navigation.html +++ b/source/_includes/custom/navigation.html @@ -1,32 +1,33 @@ diff --git a/source/_includes/edit_github.html b/source/_includes/edit_github.html index 22c4a524ce9..be883cf42a2 100644 --- a/source/_includes/edit_github.html +++ b/source/_includes/edit_github.html @@ -1 +1,3 @@ - \ No newline at end of file +{% if page.hide_github_edit != true %} + +{% endif %} \ No newline at end of file diff --git a/source/_includes/site/sidebar.html b/source/_includes/site/sidebar.html index 862c78ffe8a..e7b0e2dbaaa 100644 --- a/source/_includes/site/sidebar.html +++ b/source/_includes/site/sidebar.html @@ -2,6 +2,8 @@ {% assign url_parts = page.url | split: '/' %} {% if url_parts[1] == 'components' %} {% include asides/component_navigation.html | compact_newlines %} + {% elsif url_parts[1] == 'cookbook' %} + {% include asides/cookbook_navigation.html | compact_newlines %} {% else %} {% include asides/about.html %} diff --git a/source/_layouts/component.html b/source/_layouts/component.html deleted file mode 100644 index 3f387fde493..00000000000 --- a/source/_layouts/component.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: default ---- - -
    -
    -

    - {{ page.title }} -

    -
    -
    - - {{ content }} -
    diff --git a/source/_layouts/page.html b/source/_layouts/page.html index c4f667776a0..9701938066a 100644 --- a/source/_layouts/page.html +++ b/source/_layouts/page.html @@ -3,8 +3,10 @@ layout: default ---
    - - {% include edit_github.html %} + {% assign url_parts = page.url | split: '/' %} + {% if url_parts[1] != 'components' and url_parts[1] != 'cookbook' %} + {% include edit_github.html %} + {% endif %} {% if page.title and page.show_title != false %}
    diff --git a/source/_posts/2015-12-13-setup-encryption-using-lets-encrypt.markdown b/source/_posts/2015-12-13-setup-encryption-using-lets-encrypt.markdown index 19ba680da44..6a12fddecce 100644 --- a/source/_posts/2015-12-13-setup-encryption-using-lets-encrypt.markdown +++ b/source/_posts/2015-12-13-setup-encryption-using-lets-encrypt.markdown @@ -54,7 +54,7 @@ Now you're ready to run Let's Encrypt: $ git clone https://github.com/letsencrypt/letsencrypt […] $ cd letsencrypt -$ ./letsencrypt-auto certonly --email $ ./letsencrypt-auto certonly --email your@email.address -d hass-example.duckdns.org +$ ./letsencrypt-auto certonly --email your@email.address -d hass-example.duckdns.org Updating letsencrypt and virtual environment dependencies....... Running with virtualenv: sudo /path/letsencrypt/bin/letsencrypt certonly --email your@e-mail.address -d hass-example.duckdns.org diff --git a/source/_posts/2015-12-20-amazon-echo-icloud-and-templates.markdown b/source/_posts/2015-12-20-amazon-echo-icloud-and-templates.markdown index a73ff8322a5..db5a83b6bbd 100644 --- a/source/_posts/2015-12-20-amazon-echo-icloud-and-templates.markdown +++ b/source/_posts/2015-12-20-amazon-echo-icloud-and-templates.markdown @@ -34,7 +34,7 @@ Alrighty, it's time for Home Assistant 0.10. A lot amazing things have changed a [iCloud]: /components/device_tracker.icloud/ [Twitch]: /components/sensor.twitch/ -[Template]: /getting-started/templating/ +[Template]: /topics/templating/ [Heatmiser]: /components/thermostat.heatmiser/ [Dweet.io]: /components/sensor.dweet/ [Alexa/Amazon echo]: /components/alexa/ diff --git a/source/_posts/2016-01-17-extended-support-for-diy-solutions.markdown b/source/_posts/2016-01-17-extended-support-for-diy-solutions.markdown index f679c6f7068..a439256b957 100644 --- a/source/_posts/2016-01-17-extended-support-for-diy-solutions.markdown +++ b/source/_posts/2016-01-17-extended-support-for-diy-solutions.markdown @@ -47,7 +47,7 @@ First release of 2016 and we are on 🔥! The [main repository][github-ha] has p [wemo]: /components/switch.wemo/ [Telldus Live]: /components/tellduslive/ [Vera]: /components/vera/ -[template helper method]: /getting-started/templating/#home-assistant-template-extensions +[template helper method]: /topics/templating/#home-assistant-template-extensions [OwnTracks]: /components/device_tracker.owntracks/ [Philips Hue]: /components/light.hue/ [Free Mobile]: /components/notify.free_mobile/ @@ -63,7 +63,7 @@ First release of 2016 and we are on 🔥! The [main repository][github-ha] has p [MySensors sensor platform]: /components/sensor.mysensors/ [Amazon Echo]: /components/alexa/ -### Deprecations +### Backwards incompatible changes - The [RPi.GPIO sensor platform][rpi-bs] has been moved to the `binary_sensor` component. - [MySensors sensor platform] now requires the [MySensors] component to be configured. - Geofancy platform has been renamed to [Locative]. diff --git a/source/_posts/2016-01-29-insteon-lifx-twitter-and-zigbee.markdown b/source/_posts/2016-01-29-insteon-lifx-twitter-and-zigbee.markdown new file mode 100644 index 00000000000..a43fa0e7106 --- /dev/null +++ b/source/_posts/2016-01-29-insteon-lifx-twitter-and-zigbee.markdown @@ -0,0 +1,92 @@ +--- +layout: post +title: "0.12: Insteon, LIFX, Twitter and ZigBee" +description: "Home Assistant 0.12 brings improved organizational tools and makes writing automation in Python easier." +date: 2016-01-30 00:22:00 -0800 +date_formatted: "January 30, 2016" +author: Paulus Schoutsen +author_twitter: balloob +comments: true +categories: Release-Notes +og_image: /images/blog/2016-01-release-12/social.png +--- + +Another sprint has come to an end and it seems that we have not slowed down a single bit 🚀. 0.12 is full of new components, platforms and organizational additions. + +I would like to give a shout out to [Greg Dowling (@pavoni)][@pavoni] as every release includes new work from him. He is constantly adding support for new platforms or improving the reliablity of existing components and platforms. Keep up the good work! + +This release includes a very frequent requested feature: the ability to organize entities in different tabs in the frontend. See [the demo] to see this in action and read more in the [group documentation][group] how to get started. + +

    + +Example of the new views in the frontend. Learn more. +

    + + + + - Binary sensor: [command sensor] added ([@Bart274]) + - [Nest] support extended to include sensors and binary sensors ([@joshughes]) + - Light: [LIFX] platform added ([@TangoAlpha]) + - Notify: [Twitter] platform added ([@HydrelioxGitHub]) + - Sensor: [Template] platform added ([@pavoni]) + - Switch: [Wink] platform now supports sirens ([@w1ll1am23]) + - [Insteon hub] support added ([@FreekingDean]) + - [Statsd] component added ([@michaelkuty]) + - Light: [Rfxtrx] platform now supports dimming ([@turbokongen]) + - Time scheduling (including [time automation]) now works with intervals (ie. `/5`) ([@kennedyshead]) + - Sensor: [onewire] support added ([@deisi]) + - [Zigbee] support added ([@flyte]) + - Device Tracker: [OwnTracks] can now track iBeacons ([@pavoni]) + - Notify: [Google Voice SMS] platform added ([@w1ll1am23]) + - Toggle service added to `homeassistant`, `switch`, `light` and `media_player` ([@rmkraus]) + - [Thermostat] services added to control fans ([@auchter]) + - Improved Python automation: Event helpers are now also available as decorators for custom components ([@rmkraus]) + - Frontend: support added for tabs to show [different views][group] of your house ([@balloob]) + - Bugfixes by [@molobrakos], [@MartinHjelmare], [@pavoni], [@trollkarlen], [@zmrow], [@maddox], [@persandstrom], [@happyleavesaoc], [@balloob], [@fabaff], [@stefan-jonasson], [@haraldnagel]. + +[the demo]: /demo/ +[command sensor]: /components/binary_sensor.command/ +[Google Voice SMS]: /components/notify.google_voice/ +[Insteon hub]: /components/insteon_hub/ +[LIFX]: /components/light.lifx/ +[Nest]: /components/nest/ +[onewire]: /components/sensor.onewire/ +[OwnTracks]: /components/device_tracker.owntracks/ +[Rfxtrx]: /components/light.rfxtrx/ +[Statsd]: /components/statsd/ +[Template]: /components/sensor.template/ +[Thermostat]: /components/thermostat/ +[time automation]: /components/automation/#time-trigger +[Twitter]: /components/notify.twitter/ +[Wink]: /components/wink/ +[Zigbee]: /components/zigbee/ +[group]: /components/group/ +[@auchter]: https://github.com/auchter +[@balloob]: https://github.com/balloob +[@Bart274]: https://github.com/Bart274 +[@deisi]: https://github.com/deisi +[@fabaff]: https://github.com/fabaff +[@flyte]: https://github.com/flyte +[@FreekingDean]: https://github.com/FreekingDean +[@happyleavesaoc]: https://github.com/happyleavesaoc +[@haraldnagel]: https://github.com/haraldnagel +[@HydrelioxGitHub]: https://github.com/HydrelioxGitHub +[@joshughes]: https://github.com/joshughes +[@kennedyshead]: https://github.com/kennedyshead +[@maddox]: https://github.com/maddox +[@MartinHjelmare]: https://github.com/MartinHjelmare +[@michaelkuty]: https://github.com/michaelkuty +[@molobrakos]: https://github.com/molobrakos +[@pavoni]: https://github.com/pavoni +[@persandstrom]: https://github.com/persandstrom +[@rmkraus]: https://github.com/rmkraus +[@stefan-jonasson]: https://github.com/stefan-jonasson +[@TangoAlpha]: https://github.com/TangoAlpha +[@trollkarlen]: https://github.com/trollkarlen +[@turbokongen]: https://github.com/turbokongen +[@w1ll1am23]: https://github.com/w1ll1am23 +[@zmrow]: https://github.com/zmrow + +### Backwards incompatible changes + - Nest config has moved from thermostat to the [Nest component][Nest]. + - Entity IDs for Z-Wave devices are now generated in a deterministic way causing all IDs to change starting this release. This is a one time change. diff --git a/source/_posts/2016-02-09-Smarter-Smart-Things-with-MQTT-and-Home-Assistant.markdown b/source/_posts/2016-02-09-Smarter-Smart-Things-with-MQTT-and-Home-Assistant.markdown new file mode 100644 index 00000000000..954af96e10f --- /dev/null +++ b/source/_posts/2016-02-09-Smarter-Smart-Things-with-MQTT-and-Home-Assistant.markdown @@ -0,0 +1,219 @@ +--- +layout: post +title: "Smarter SmartThings with MQTT and Home Assistant" +description: "Jer and St. John describe how they connected SmartThings with Home Assistant." +date: 2016-02-09 0:44 -0700 +date_formatted: "February 09, 2016" +author: Jeremiah Wuenschel and St. John Johnson +comments: true +categories: How-To MQTT +og_image: /images/blog/2016-02-smartthings/social.png +--- + + +_This is a guest post by Home Assistant users [Jeremiah Wuenschel](https://github.com/jer) and [St. John Johnson](https://github.com/stjohnjohnson)._ + +So you own a [SmartThings][smartthings] Hub. You probably bought it when you were looking to get into the whole Home Automation hobby because it worked with pretty much everything and offered you the ability to automate __anything.__ After a week of ownership, you realized that building dashboards and automating required writing way more Groovy then you expected. Then one day you were browsing [reddit][r/homeautomation] and discovered the amazingness that is Home Assistant! A solution that offered dashboards, graphs, working support for Nest, and REAL EASY automation! + +You spent your weekend getting everything set up, showing it off to your significant other, but in the end you got stumped when it came to integrating with all your existing SmartThings toys. What do I do now? Should I buy another hub? Should I just buy a Z-Wave stick? + +That's where we came in. We wanted a solution that can bridge the awesomeness of Home Assistant with the SmartThings hub that works with almost everything. + +

    + +

    + + + +## Glossary + +This is going to be a pretty detailed tutorial on setting up our SmartThings bridge. However, there are a couple key terms that _might_ be new to you: + + - [MQTT][mqtt]: A lightweight message protocol for listening and publishing events that happen. Many home automation platforms have built in support for this [(especially Home Assistant)][mqtt-ha]. + - [Docker][docker]: A tool for running applications that are self-contained. No need for installing any dependencies or worrying about conflicts. Installs easily on Linux and OSX. + +## Setting up the Bridge + +### MQTT + +Assuming that you already have Home Assistant and Smart Things running, you will first want to get an MQTT broker running. There are a handful of [MQTT][mosquitto] [brokers][emqttd] available in Open Source land. We chose [Mosca][mosca] for its simplicity. + +There is very little you need to do to get Mosca running. The easiest approach is to use [Docker][docker], and run a command like the following: + +```bash +$ docker run \ + -d \ + --name="mqtt" \ + -v /opt/mosca:/db \ + -p 1883:1883 \ + matteocollina/mosca +``` + +This will start Mosca up inside of a docker container, while keeping persistent storage for Mosca in `/opt/mosca`. The default configuration is the only thing we need to get things up and running. + +If you don't want to mess with Docker and can get node.js installed without trouble, the [standalone][mosca-standalone] instructions are all you need. + +### MQTT Bridge + +This is the small piece of magic that bridges the gap between MQTT and SmartThings. It is a node.js app, and like Mosca it is probably easiest to install with Docker: + +```bash +$ docker run \ + -d \ + --name="mqtt-bridge" \ + -v /opt/mqtt-bridge:/config \ + -p 8080:8080 \ + stjohnjohnson/smartthings-mqtt-bridge +``` + +The code for this bridge is [on Github][mqtt-bridge] if you want to start it up independently. + +The MQTT Bridge only needs to know where your MQTT broker lives. If you are using these docker commands as-is, edit `/opt/mqtt-bridge/config.yml` to look like this: + +```yaml +--- +mqtt: + host: +``` + +Restart the bridge, and you are ready to go: + +```bash +$ docker restart mqtt-bridge +``` + +### SmartThings Device + +The next step (and possibly the most confusing) is the device type. Go to the [Smart Things Device IDE][ide-dt] and `Create New Device Handler`. Choose `From Code` and paste in the [MQTT Bridge Device Code][devicetype]. Click `Save`, `Publish`, and then `For Me`. + +Now to install your new Device Handler. Go back to `My Devices` in the IDE, and click `New Device`. Enter a name, and pick any random set of characters for the Device Network Id (this will automatically update later). For Type, scroll to the bottom of the list and find your newly created `MQTT Bridge`. Fill in the other boxes however you like. + +Go back to `My Devices`, and click on your new device in the list. This will bring up a page that allows you to edit your device's Preferences. Click `edit` and fill in the 3 pieces of information it asks for. + + - MQTT Bridge IP Address: \ + - MQTT Bridge Port: \<8080 if you have changed nothing in the previous commands> + - MQTT Bridge MAC Address: \ + +This will create the link between SmartThings and the MQTT Bridge. + +### SmartThings App + +The last step is to setup the SmartApp. After this, any registered devices will start sending their events to MQTT. + +Go to the [Smart App IDE][ide-app]. Click `New SmartApp`, followed by `From Code`. Paste in the [MQTT Bridge SmartApp code][smartapp] and click `Save`. Click `Publish` and then `For Me`. In the SmartThings mobile app, add the new SmartApp and configure it with your devices and MQTT Bridge device. Clicking `done` will subscribe SmartThings to your MQTT broker and begin 2-way propagation of events. + +### Configure Home Assistant + +To add SmartThings devices to Home Assistant over MQTT, first enable MQTT in Home Assistant: + +```yaml +mqtt: + broker: localhost +``` + +Replace `localhost` with the location of the running MQTT Broker. Devices from the MQTT Bridge are published to the path `/smartthings//` + +For example, my Dimmer Z-Wave Lamp is called "Fireplace Lights" in SmartThings. The following topics are published: + +| Topic | Description +| ----- | ----------- +| /smartthings/Fireplace Lights/level | Brightness (0-99) +| /smartthings/Fireplace Lights/switch | Switch State (on/off) + +Here is an example Home Assistant config: + +```yaml +switch: + platform: mqtt + name: "Fireplace Lights" + state_topic: "/smartthings/Fireplace Lights/switch" + command_topic: "/smartthings/Fireplace Lights/switch" + brightness_state_topic: "/smartthings/Fireplace Lights/level" + brightness_command_topic: "/smartthings/Fireplace Lights/level" + payload_on: "on" + payload_off: "off" + retain: true +``` + +We recommend `retain: true` for every MQTT device in order to keep states in sync when things become disconnected. + +Start digging through the [MQTT Components][mqtt-ha] in Home Assistant to find which components map to the new events being published to MQTT. + +### Configuring with Docker-Compose + +Our personal preference for starting the whole suite of software is to use a single Docker-Compose file. Just create a file called `docker-compose.yml` like this: + +```yaml +mqtt: + image: matteocollina/mosca + ports: + - 1883:1883 + +mqttbridge: + image: stjohnjohnson/smartthings-mqtt-bridge + volumes: + - ./mqtt-bridge:/config + ports: + - 8080:8080 + links: + - mqtt + +homeassistant: + image: balloob/home-assistant + ports: + - 80:80 + volumes: + - ./home-assistant:/config + - /etc/localtime:/etc/localtime:ro + links: + - mqtt +``` + +This will start home-assistant, MQTT, and the Bridge, in dependency order. All config can reference the name of the docker container instead of using IP addresses (e.g. mqtt for the broker host in Home Assistant). + +### How it works + +**HTTP Endpoint**: There are really only 2 ways to communicate with the SmartThings hub that we could find. The easiest approach is to create a RESTful SmartApp authenticated with OAuth that provides state changes via HTTP directly. This approach is pretty straightforward to implement, but it requires communication with the SmartThings cloud service, and can't be done entirely on your LAN. We hoped to keep all communication internal, and came up with a second approach. + +**Custom Device Type:** SmartThings custom device types allow developers to define handlers for HTTP events received directly over the local network by the SmartThings hub. Messages received are authenticated by MAC address, and can contain arbitrary strings in their payload. Since a Device Type is only ever tied to a single device, we need to add a SmartApp to the mix in order to translate events between individual devices and our special Home Assistant Bridge device. Here is what we have so far: + +```text +Z-Wave Switch | +Zigbee motion sensor |<---> Bridge App <---> Bridge Device Type <---> +Z-Wave light bulb | +``` + +On the Home Assistant side, there is a powerful platform available based on the MQTT lightweight message bus protocol. Everything from lights to switches to temperature sensors can be defined in Home Assistant as an MQTT component, so it makes for a convenient integration point. This requires an MQTT broker for handling the message bus, and one last piece to translate between the HTTP that SmartThings supports and MQTT. + +Here is the final sequence of events: + +

    + + SmartThings Bridge Sequence + + SmartThings Bridge Sequence +

    + + +There are a lot of stops along the way for these events, but each piece is a simple translation layer to shuttle the events between systems. + +### Future Improvements +- **Raspberry pi**: There is a lot of interest in getting this running on the Raspberry Pi. It only requires binaries compiled for ARM, so we plan to get ARM-compatible versions of the containers going at some point. +- **Authentication for MQTT**: At the moment, the MQTT bridge doesn't understand how to authenticate to MQTT, so only unauthenticated MQTT is supported. This is mitigated to some degree if you use our Docker Compose config, because MQTT's port is not actually shared publicly. +- **Authentication for MQTT Bridge**: Right now the bridge expects that anyone subscribing is the SmartThings hub. This could use proper authentication. + + +[mosquitto]: http://mosquitto.org/ +[emqttd]: https://github.com/emqtt/emqttd +[mosca]: http://www.mosca.io/ +[docker]: https://www.docker.com/ +[mosca-standalone]: https://github.com/mcollina/mosca#standalone +[mqtt-bridge]: https://github.com/stjohnjohnson/smartthings-mqtt-bridge +[ide-dt]: https://graph.api.smartthings.com/ide/devices +[devicetype]: https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/devicetypes/stj/mqtt-bridge.src/mqtt-bridge.groovy +[ide-app]: https://graph.api.smartthings.com/ide/apps +[smartapp]: https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/smartapps/stj/mqtt-bridge.src/mqtt-bridge.groovy +[mqtt-ha]: /components/mqtt/ +[smartthings]: http://smartthings.com +[r/homeautomation]: https://www.reddit.com/r/homeautomation +[mqtt]: https://en.wikipedia.org/wiki/MQTT diff --git a/source/_posts/2016-02-11-classifying-the-internet-of-things.markdown b/source/_posts/2016-02-11-classifying-the-internet-of-things.markdown new file mode 100644 index 00000000000..19abcaf50c6 --- /dev/null +++ b/source/_posts/2016-02-11-classifying-the-internet-of-things.markdown @@ -0,0 +1,167 @@ +--- +layout: post +title: "Classifying the Internet of Things" +description: "" +date: 2016-02-11 22:31:00 -0800 +date_formatted: "February 12, 2016" +author: Paulus Schoutsen +author_twitter: balloob +comments: true +categories: Architecture +og_image: /images/blog/2016-02-classifying-internet-of-things/social.png +--- + +The core of home automation is knowing what’s going on. The faster we know about a state change, the better we can serve the user. If you want to have your lights to turn on when you arrive at home, it doesn’t help if it only knows about it after you’ve already opened the door and manually (!!) turned on the light. + +Each smart device consists of the ‘normal’ device and the piece that makes it ‘smart’: the connectivity. The connectivity part of a device can consists of either control, state or both. + +State describes what a device is up to right now. For example, a light can be on with a red color and a medium brightness. + +Control is about controlling the smart device by sending commands via an API. These commands can vary from configuring how a device works till mimicking how a user would interact with a device. A media player can allow skipping to the next track and a sensor could allow to configure its sensitivity or polling interval. + +The Home Assistant APIs are setup to be as convenient as possible. However, a network is always as weak as it’s weakest link. In our case these are the integrations. Take for example controlling a light that does not report state. The only state Home Assistant can report on after sending a command is the assumed state: what do we expect the state of the light to be if the command worked. + +We want our users to get the best home automation experience out there and this starts with making sure they have devices that work well with Home Assistant. That’s why we will start applying the following classifiers to our integrations: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ClassifierDescription
    Assumed State + We are unable to get the state of the device. Best we can do is to assume the state based on our last command. +
    Cloud Polling + Integration of this device happens via the cloud and requires an active internet connection. Polling the state means that an update might be noticed later. +
    Cloud Push + Integration of this device happens via the cloud and requires an active internet connection. Home Assistant will be notified as soon as a new state is available. +
    Local Polling + Offers direct communication with device. Polling the state means that an update might be noticed later. +
    Local Push + Offers direct communication with device. Home Assistant will be notified as soon as a new state is available. +
    + +The background to how we got to these classifiers can be read after the break. + + +## {% linkable_title State %} + +How state is communicated can be broken down into 5 categories. They are not mutually exclusive - a device state can be available both via the cloud and local connectivity. + +### {% linkable_title No state available %} +These are devices that do not have the capabilities to make their state available. They only allow to be controlled. For example, devices with infrared remote controls like TVs and ACs. You can press the turn on button on the remote but can only assume that your command was received and executed successfully. The device might not be powered or something is blocking the infrared receiver. + +Home automation will have to approach such devices based on the assumption that it’s commands are received correctly: using optimistic updates. This means that after sending a command it will update the state of the device as if the command was received successfully. + +Advantages: + + - None + +Disadvantages: + + - Home automation will assume the wrong state if the the command is not received correctly or if the device is controlled in any other way outside of the home automation system. + +### {% linkable_title Polling the cloud %} +These are devices that will only report their state to their own cloud backend. The cloud backend will allow reading the state but will not notify when a new state has arrived. This requires the home automation to check frequently if the state has been updated. + +Advantages: + + - Able to control devices while at home or away. + - Cloud has access to more computing power to mine the device data to suggest optimizations to the user. + +Disadvantages: + + - It doesn’t work if the internet is down or the company stops support. + - You are no longer in control about who has access to your data. + +### {% linkable_title Cloud pushing new state %} +All off the previous section applies to this one. On top of that the cloud will now notify the home automation when a new state has arrived. This means that as soon as the cloud knows, the home automation knows. + +Advantages: + + - New state known as soon as available in the cloud. + +### {% linkable_title Polling the local device %} +These devices will offer an API that is locally accessible. The home automation will have to frequently check if the state has been updated. + +Advantages: + + - Does not depend on the internet + +Disadvantages: + + - To be pollable, a device needs to be always online which requires the device to be connected to a power source. + +### {% linkable_title Local device pushing new state %} +The best of the best. These devices will send out a notice when they get to a new state. These devices usually use a home automation protocol to pass it’s message to a hub that will do the heavy lifting of managing and notifying subscribers + +Advantages: + + - Near instant delivery of new states. + - Able to get a long battery life by going into deep sleep between state updates. + +Disadvantages: + + - If it does not also support polling, home automation will not be made aware of the state after booting up until it changes. + - If using deep sleep and wifi, will suffer a delay when waking up because connecting to WiFi and receiving an IP takes time. + + +## {% linkable_title Control %} + +Controlling a device can, just like state, be done through cloud and/or local connectivity. But the more important part of control is knowing if your command was a success and the new state of the device. + +### {% linkable_title No control available %} +These devices are not able to be controlled. They will only offer state. + +### {% linkable_title Poll State after sending command %} +These devices will require the state to be polled after sending a command to see if a command was successfull. + +Advantages: + + - The state will be known right after the command was issued. + +Disadvantages: + + - It can take time before the state gets updated. How often do we poll and how long do we wait till we consider the command failed? Also, a state may change because of other factors. Difficult to determine if the updated state is because of our command. + +### {% linkable_title Device pushes state update %} +These devices will not return a new state as a result of the command but instead will push a new state right away. The downside of this approach is that we have to assume that a state update coming in within a certain period of time after a command is related to the command. + +### {% linkable_title Command returns new state %} +The very best. These devices will answer the command with the new state after executing the command. + +## {% linkable_title Classifying Home Assistant %} +Home Assistant tries to offer the best experience possible via its APIs. There are different ways of interacting with Home Assistant but all are local. + + - State polling is available via the REST API + - There is a stream API that will push new states as soon as they arrive to subscribers. This is how the frontend is able to always stay in sync. + - Calling a service on Home Assistant will return all states that changed while the service was executing. This sadly does not always include the new state of devices that push their new state, as they might arrive after the service has finished. diff --git a/source/_posts/2016-02-13-speedtest-bloomsky-splunk-and-garage-doors.markdown b/source/_posts/2016-02-13-speedtest-bloomsky-splunk-and-garage-doors.markdown new file mode 100644 index 00000000000..19f9169fb6f --- /dev/null +++ b/source/_posts/2016-02-13-speedtest-bloomsky-splunk-and-garage-doors.markdown @@ -0,0 +1,116 @@ +--- +layout: post +title: "0.13: Speedtest.net, Bloomsky, Splunk and Garage Doors" +description: "Home Assistant 0.13 brings test coverage to a whopping 90% and adds a whole bunch of new components." +date: 2016-02-12 22:15:00 -0800 +date_formatted: "February 13, 2016" +author: Paulus Schoutsen +author_twitter: balloob +comments: true +categories: Release-Notes +og_image: /images/blog/2016-02-release-13/social-img.png +--- + +The focus of 0.13 was on test coverage, big cheers to [@rmkraus] for his hard work on this. I'm proud to announce that we've hit the 90% test coverage of the core + important components. A big milestone for the project. + +

    + + Examples of the new [input_select] and [weblink] components. +

    + +Not only did we gain a lot of test coverage, we also attracted a lot of new developers that contributed a variety of components and platforms: + + + + - Core: Add service to restart Home Assistant ([@rmkraus]) + - Core: Allow device to report as unavailable ([@MartinHjelmare]) + - Core: Allow overriding polling interval in platforms and [via config][polling-config] ([@balloob]) + - Frontend: support for a [default view] have been added to replace the show all view ([@balloob]) + - Component: Added [apcupsd] component ([@flyte]) + - Component: Added component to log values to [Splunk] ([@miniconfig]) + - Component: Added [garage door] component including [Wink] support ([@xrolfex]) + - Component: Added [input_select] component ([@balloob]) + - Component: Added [proximity] component to track people closest to a location ([@nickwaring], [@Bart274] ) + - Component: Added support for [Bloomsky Weather Station] ([@haraldnagel]) + - Component: Added support for pushing stats to [graphite] ([@kk7ds]) + - Component: Added support for [SCSGate] devices ([@flavio]) + - Component: Added [weblink] component to link to other pages ([@MagnusKnutas]) + - Component: Support for Ubiquiti mFI [sensors][mfi.sensor] and [switchable devices][mfi.switch] added ([@kk7ds]) + - Alarm control panel: Added [Caddx/GE/Interlogix NetworX][nx584] support ([@kk7ds]) + - Camera: [MJPEG] camera's will now show real stream instead of a 2fps stream ([@stjohnjohnson]) + - Camera: Added [Unifi video cameras][unifi] support ([@kk7ds]) + - Device Tracker: [Aruba] platform now uses SSH instead of telnet ([@carlosmgr]) + - History: Show correct graphs for thermostats ([@sdague]) + - Light: Added [MySensors] support ([@MartinHjelmare]) + - Lock: Added [Verisure] support ([@turbokongen]) + - Media Player: Added [Samsung TV] support ([@stefan-jonasson]) + - Media Player: Added [Snapcast] support ([@happyleavesaoc]) + - MQTT: Allow using templates in [publish service][mqtt-publish] ([@flyte]) + - Notify: Added [REST] support ([@Theb-1]) + - Sensor: Added [Speedtest.net] support ([@nkgilley]) + - Switch: Added [template] platform ([@pavoni]) + - Thermostat: Support for [Honeywell] in the US added ([@kk7ds]) + - Z-Wave: Allow [configuring polling][zwave-polling] and [support scenes][zwave-scene] ([@lukas-hetzenecker]) + - Bug fixes and improvements by [@persandstrom], [@fabaff], [@balloob], [@pavoni], [@philipbl], [@MartinHjelmare], [@rmkraus], [@molobrakos], [@lukas-hetzenecker], [@TangoAlpha], [@deisi], [@Danielhiversen], [@roqeer], [@jaharkes] + +[@rmkraus]: https://github.com/rmkraus/ +[@MartinHjelmare]: https://github.com/MartinHjelmare/ +[@balloob]: https://github.com/balloob/ +[@flyte]: https://github.com/flyte/ +[@miniconfig]: https://github.com/miniconfig/ +[@xrolfex]: https://github.com/xrolfex/ +[@nickwaring]: https://github.com/nickwaring/ +[@Bart274]: https://github.com/Bart274/ +[@haraldnagel]: https://github.com/haraldnagel/ +[@kk7ds]: https://github.com/kk7ds/ +[@flavio]: https://github.com/flavio/ +[@MagnusKnutas]: https://github.com/MagnusKnutas/ +[@stjohnjohnson]: https://github.com/stjohnjohnson/ +[@carlosmgr]: https://github.com/carlosmgr/ +[@sdague]: https://github.com/sdague/ +[@turbokongen]: https://github.com/turbokongen/ +[@stefan-jonasson]: https://github.com/stefan-jonasson/ +[@happyleavesaoc]: https://github.com/happyleavesaoc/ +[@Theb-1]: https://github.com/Theb-1/ +[@nkgilley]: https://github.com/nkgilley/ +[@pavoni]: https://github.com/pavoni/ +[@lukas-hetzenecker]: https://github.com/lukas-hetzenecker/ +[@persandstrom]: https://github.com/persandstrom/ +[@fabaff]: https://github.com/fabaff/ +[@philipbl]: https://github.com/philipbl/ +[@molobrakos]: https://github.com/molobrakos/ +[@TangoAlpha]: https://github.com/TangoAlpha/ +[@deisi]: https://github.com/deisi/ +[@Danielhiversen]: https://github.com/Danielhiversen/ +[@roqeer]: https://github.com/roqeer/ +[@jaharkes]: https://github.com/jaharkes/ +[polling-config]: /cookbook/customize_polling_interval/ +[default view]: /components/group/ +[apcupsd]: /components/apcupsd/ +[Splunk]: /components/splunk/ +[garage door]: /components/garage_door/ +[Wink]: /components/garage_door.wink/ +[input_select]: /components/input_select/ +[proximity]: /components/proximity/ +[Bloomsky Weather Station]: /components/bloomsky/ +[graphite]: /components/graphite/ +[SCSGate]: /components/scsgate/ +[weblink]: /components/weblink/ +[mfi.switch]: /components/switch.mfi/ +[mfi.sensor]: /components/sensor.mfi/ +[nx584]: /components/alarm_control_panel.nx584/ +[MJPEG]: /components/camera.mjpeg/ +[unifi]: /components/camera.uvc/ +[Aruba]: /components/device_tracker.aruba/ +[History]: /components/history/ +[MySensors]: /components/light.mysensors/ +[Verisure]: /components/lock.verisure/ +[Speedtest.net]: /components/sensor.speedtest/ +[Samsung TV]: /components/media_player.samsungtv/ +[Snapcast]: /components/media_player.snapcast/ +[mqtt-publish]: /components/mqtt/#publish-service +[REST]: /components/notify.rest/ +[template]: /components/switch.template/ +[Honeywell]: /components/thermostat.honeywell/ +[zwave-polling]: /components/zwave/#configuration +[zwave-scene]: /components/zwave/#events diff --git a/source/_posts/2016-02-18-multi-room-audio-with-snapcast.markdown b/source/_posts/2016-02-18-multi-room-audio-with-snapcast.markdown new file mode 100644 index 00000000000..382d895ad92 --- /dev/null +++ b/source/_posts/2016-02-18-multi-room-audio-with-snapcast.markdown @@ -0,0 +1,141 @@ +--- +layout: post +title: "Multi-room audio with Snapcast, Mopidy, and Home Assistant" +date: 2016-02-18 00:10:56 -0500 +author: happyleavesaoc +comments: true +categories: How-To +date_formatted: "February 18, 2016" +og_image: /images/blog/2016-02-snapcast/diagram.png +--- + +Would you like to listen to music in every room in your home, controlled from one source? Then multi-room audio is for you. + +Multi-room audio can be achieved by having a computer attached to speakers in every room. On each computer, services run to play and/or control the audio. With this DIY approach, the kind of computer and speakers is very much up to you. It could be your desktop computer with attached powered speakers, your HTPC hooked up to your TV and receiver, a Raspberry Pi with Amp or DAC, or even an Android device. + +You'll need two key software packages, besides Home Assistant. The first is [Mopidy](https://www.mopidy.com/), a music server that can play local files, or connect to streaming music services like Spotify. The second is [Snapcast](https://github.com/badaix/snapcast/), which enables synchronized audio streaming across your network. Both can be integrated into Home Assistant. Each room audio device will run an instance of the Snapcast client, and optionally a Mopidy instance. Your server will run a special instance of Mopidy and the Snapcast server. + +Finally, you also need a player to control Mopidy. Any MPD-compatible player will work, and there are several [Mopidy-only web-based options](https://docs.mopidy.com/en/latest/ext/web/#ext-web) available. On Android, [Remotedy](https://play.google.com/store/apps/details?id=se.anil.remotedy) is particularly nice since you can access multiple Mopidy instances in one place. + +Home Assistant will provide device status, and volume control for each room. If you want to play music in all your rooms (on all your clients), access the server instance of Mopidy. If you want to play music only in a specific room, access that specific Mopidy instance. If you're using a web UI for Mopidy, you can add links to each instance in Home Assistant with the [weblink] component. + +

    + +

    + + + +## Staging + +- [Install](https://www.mopidy.com/) Mopidy (2.0.0 or greater) +- [Download](https://github.com/badaix/snapcast/releases/) and [Install](https://github.com/badaix/snapcast/tree/v0.5.0-beta-1#installation) Snapcast (0.5.0 or greater) + +## Configure Mopidy + +Mopidy can be run with multiple configuration files, each extending the previous file. This is helpful when we're running multiple instances with varying functionality. + + +### core.conf +The core configuration is shared between all instances: + +```conf +[mpd] +hostname = :: + +[http] +hostname = :: + +[audio] +output = alsasink + +[spotify] +username = +password = +``` + +### local.conf +Add the local configuration on computers that have local media files: + +```conf +[local] +media_dir = +``` + +### snapcast.conf +Finally, the Mopidy instance that connects with Snapcast needs special configuration. Run on a different port to avoid conflicts if you have a second Mopidy instance running on your computer. The audio output is sent to a named pipe - Snapcast will read from there. Note that you may have to adjust the audio output attribute depending on your system and audio sources. + +```conf +[mpd] +hostname = :: +port = 6601 + +[http] +hostname = :: +port = 6681 + +[audio] +output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioconvert ! wavenc ! filesink location=/tmp/snapfifo +``` + +## Run Mopidy + +To run a room-specific instance: + +```bash +$ mopidy --config $CONF_DIR/core.conf +``` + +To run a room-specific instance with local media: + +```bash +$ mopidy --config $CONF_DIR/core.conf:$CONF_DIR/local.conf +``` + +To run the special Snapcast-connected instance (with local media): + +```bash +$ mopidy --config $CONF_DIR/core.conf:$CONF_DIR/local.conf:$CONF_DIR/snapcast.conf +``` + +## Run Snapcast + +Start the `snapserver` on the same server running Mopidy with the snapcast configuration. + +```bash +$ snapserver # or use systemd +``` + +Start the `snapclient` on computers that will be playing audio. + +```bash +$ snapclient # or use systemd, add -h if necessary +``` + +## Configure Snapcast + +There are a number of snapcast configuration options, but the one relevant to Home Assistant is the client names. You can set them in the snapserver configuration file, by default located at `~/.config/Snapcast/settings.json`. Only edit this file while the `snapserver` is not running. Modify the `name` JSON value to your liking - this is how the client will be named in Home Assistant. + +## Configure Home Assistant + +Use the [mpd] and [snapcast] components. Optionally, use [weblink] to provide easy access to a Mopidy web UI. + +```yaml +media_player: +- platform: snapcast + host: xxxxx +- platform: mpd + server: xxxx + location: Multi-Room Controller +- platform: mpd + server: xxx + location: Room 1 + +weblink: + entities: + - name: Multi-Room Player + url: xxxx +``` + +[weblink]: /components/weblink/ +[snapcast]: /components/media_player.snapcast/ +[mpd]: /components/media_player.mpd/ diff --git a/source/_posts/2016-02-20-community-highlights.markdown b/source/_posts/2016-02-20-community-highlights.markdown new file mode 100644 index 00000000000..d3a277cca1e --- /dev/null +++ b/source/_posts/2016-02-20-community-highlights.markdown @@ -0,0 +1,60 @@ +--- +layout: post +title: Community Highlights +description: Another round-up of the amazing things from our community including Alexa Lightning skill and HomeKit integration. +date: 2016-02-20 01:06:00 -0800 +date_formatted: "February 20, 2016" +author: Paulus Schoutsen +author_twitter: balloob +comments: true +categories: Community +og_image: /images/blog/2016-02-community-highlights/part-of-the-thing.png +--- + +Home Assistant land has been busy and a lot of people have been creating awesome stuff. We've added [a cookbook section](/cookbook/) to the website full of examples how you can automate different things. Make sure you take a look and share your own recipes too! + +### {% linkable_title Home automation demo by Part of the Thing %} + +
    + +
    + +### {% linkable_title Haaska - Alexa Skill Adapter for Home Assistant %} + +Haaska allows you to control lights, switches, and scenes exposed by your Home Assistant instance using an Amazon Echo. This is different from our own [Alexa](/components/alexa/) component because it will teach the Amazon Echo directly about the devices instead of teaching it to talk to Home Assistant. It will not allow you to use custom sentences but it will allow you to skip the 'Ask Home Assistant' part when giving commands: + + - "Alexa, set kitchen to twenty percent" + - "Alexa, turn on evening scene" + - "Alexa, turn off bedroom light" + +[Haaska on GitHub](https://github.com/auchter/haaska) + +### {% linkable_title Integrating Home Assistant with HomeKit %} + +Contributor Maddox has created a plugin for HomeBridge, an open-source HomeKit bridge. This will allow you to control your home using Siri on your Apple devices. HomeBridge has recently restructured so you'll have to install the plugin separately with the homebridge-homeassistant npm package. + +Example config.json entry to load Home Assistant: + +```json +"platforms": [ + { + "platform": "HomeAssistant", + "name": "HomeAssistant", + "host": "http://192.168.1.50:8123", + "password": "xxx", + "supported_types": ["light", "switch", "media_player", "scene"] + } +] +``` + +[HomeBridge on GitHub](https://github.com/nfarina/homebridge) +[HomeBridge Home Assistant Plugin](https://github.com/maddox/homebridge-homeassistant) + +### {% linkable_title Custom alarm system with Home Assistant %} + +User thaijames [describes in the Home Assistant forums](https://automic.us/forum/viewtopic.php?f=4&t=43&hilit=nfc) how he has created his own NFC-based alarm system using Home Assistant, DIY components and Garfield dolls. + +

    + +Hold your NFC tag against the belly of Garfield to unlock the alarm. +

    diff --git a/source/_posts/2016-02-28-steam-d-link-smart-plugs-and-neurio-energy-sensors.markdown b/source/_posts/2016-02-28-steam-d-link-smart-plugs-and-neurio-energy-sensors.markdown new file mode 100644 index 00000000000..076bb8f48a3 --- /dev/null +++ b/source/_posts/2016-02-28-steam-d-link-smart-plugs-and-neurio-energy-sensors.markdown @@ -0,0 +1,95 @@ +--- +layout: post +title: "0.14: Steam, D-Link smart plugs and Neurio Energy Sensors" +description: "Home Assistant 0.14 has arrived." +date: 2016-02-27 14:15:00 -0800 +date_formatted: "February 28, 2016" +author: Paulus Schoutsen +author_twitter: balloob +comments: true +categories: Release-Notes +og_image: /images/blog/2016-02-release-14/social.png +--- + +It's been another two weeks which means it's time for release: 0.14! + + + + - Notify: [Command line platform][notify.command_line] added ([@stefan-jonasson]) + - Sensor: [Verisure] mousedetectors now supported ([@turbokongen]) + - Core: Entities can now expose if they assume their state representation is correct ([@balloob]) + - Sensor: [TCP][sensor.tcp] platform added ([@flyte]) + - Binary Sensor: [TCP][binary_sensor.tcp] platform added ([@flyte]) + - Sensor: [Neurio energy sensor] now supported ([@infamy]) + - Binary Sensor: [nx584] support added ([@kk7ds]) + - Improve and clarify CI testing ([@sdague]) + - Automation: State [triggers] and [conditions] now takes optional `for` config parameter to only trigger when a state hasn't changed for a certain period of time ([@pavoni], [@stefan-jonasson]) + - Sensor: [Nest] weather data added ([@w1ll1am23]) + - Device Tracker: [Ubiquiti Unifi] now supported ([@kk7ds]) + - Binary Sensor: [MySensors] now supported ([@MartinHjelmare]) + - Binary Sensor: [Bloomsky] now supported ([@balloob]) + - Binary Sensor: [Z-Wave] now supported ([@tpatja]) + - Switch: [D-Link smart plugs] now supported ([@LinuxChristian]) + - Script: Toggle support added ([@Andythigpen]) + - Light: [Wemo] now supported ([@jaharkes]) + - Rollershutter: [Command line platform][rollershutter.command_line] added ([@t30]) + - Sensor: [Steam] now supported ([@GreenTurtwig]) + - Binary Sensor: [Wink] now supported ([@w1ll1am23]) + - Demo has been updated ([@kfgoode]) + - Frontend: new UI for camera's ([@balloob]) + +

    + + Camera feeds are now directly embedded in the frontend. +

    + +### Backwards incompatible changes + - Component: Simple Alarm has been removed. Still available in [the cookbook]. + - Script: Turning on a [script] that is already on is now a no-op instead of skipping current delay. + - Wemo switches now have to be set up via the main [Wemo component] + - Command line platforms for [switch][switch.cmd], [sensor][sensor.cmd] and [binary_sensor][binary_sensor.cmd] have been renamed to `command_line`. + - The rfxtrx sensors entity ids will incur a one time change to move to a stable format. See [the docs][sensor.rfxtrx] for more details. + +[sensor.rfxtrx]: /components/sensor.rfxtrx/ +[notify.command_line]: /components/notify.command_line/ +[Verisure]: /components/sensor.verisure/ +[binary_sensor.tcp]: /components/binary_sensor.tcp/ +[sensor.tcp]: /components/sensor.tcp/ +[Neurio energy sensor]: /components/sensor.neurio_energy/ +[nx584]: /components/binary_sensor.nx584/ +[triggers]: /components/automation/#state-trigger +[conditions]: /components/automation/#state-condition +[Nest]: /components/sensor.nest/ +[Ubiquiti Unifi]: /components/device_tracker.unifi/ +[MySensors]: /components/binary_sensor.mysensors/ +[Bloomsky]: /components/binary_sensor.bloomsky/ +[Z-Wave]: /components/binary_sensor.zwave/ +[D-Link smart plugs]: /components/switch.dlink/ +[Wemo]: /components/light.wemo/ +[rollershutter.command_line]: /components/rollershutter.command_line/ +[Steam]: /components/sensor.steam_online/ +[Wink]: /components/binary_sensor.wink/ +[the cookbook]: https://home-assistant.io/cookbook/python_component_simple_alarm/ +[script]: /components/script/ +[Wemo component]: /components/wemo/ +[switch.cmd]: /components/switch.command_line/ +[sensor.cmd]: /components/sensor.command_line/ +[binary_sensor.cmd]: /components/binary_sensor.command_line/ + +[@stefan-jonasson]: https://github.com/stefan-jonasson +[@turbokongen]: https://github.com/turbokongen +[@balloob]: https://github.com/balloob +[@flyte]: https://github.com/flyte +[@infamy]: https://github.com/infamy +[@kk7ds]: https://github.com/kk7ds +[@sdague]: https://github.com/sdague +[@pavoni]: https://github.com/pavoni +[@w1ll1am23]: https://github.com/w1ll1am23 +[@MartinHjelmare]: https://github.com/MartinHjelmare +[@tpatja]: https://github.com/tpatja +[@LinuxChristian]: https://github.com/LinuxChristian +[@Andythigpen]: https://github.com/Andythigpen +[@jaharkes]: https://github.com/jaharkes +[@t30]: https://github.com/t30 +[@GreenTurtwig]: https://github.com/GreenTurtwig +[@kfgoode]: https://github.com/kfgoode diff --git a/source/_posts/2016-03-12-z-wave-pep257-templated-service-calls.markdown b/source/_posts/2016-03-12-z-wave-pep257-templated-service-calls.markdown new file mode 100644 index 00000000000..233ed002304 --- /dev/null +++ b/source/_posts/2016-03-12-z-wave-pep257-templated-service-calls.markdown @@ -0,0 +1,71 @@ +--- +layout: post +title: "0.15: Unforked Open Z-Wave, templated service calls, extended scene support and PEP257 compliance." +description: "Home Assistant 0.15 has arrived." +date: 2016-03-12 10:55:00 -0800 +date_formatted: "March 12, 2016" +author: Paulus Schoutsen +author_twitter: balloob +comments: true +categories: Release-Notes +--- + +Two weeks has past so here is 0.15! We have been focussing a lot on quality. Making sure the system is more stable and reliable. I usually try to highlight one cool thing in the release notes but this release has 4 exciting announcements! + + - [@fabaff] has upgraded the codebase to follow the PEP257 documentation standard. + - [@partofthething] has migrated us to use the main Python Open Z-Wave library instead of our forked version. + - To make our automations more powerful, [@persandstrom] added the option to use templates to dynamically create service calls. This works for automation, Alexa, universal media player, template switch. [Learn more.][services] + - [@MartinHjelmare] has upgraded our scene support to now support all built-in services and components. + +Besides bug fixes, this release also brings: + + + + - Scene: Converted to a platform based component ([@sander76]) + - Scene: [Hunter Douglas Powerview] now supported ([@sander76]) + - Lock: [MQTT] platform added ([@fabaff]) + - Device Tracker: [OwnTracks] will allow filtering inaccurate GPS locations ([@HydrelioxGitHub]) + - Binary Sensor: Wemo Motion now supported ([@pavoni], [@ryanlaux]) + +```yaml +# Example using templates for service and data in service call. +# Works for automation, Alexa, universal media player, template switch. +automation: + - trigger: + - platform: state + entity_id: switch.bathroom + action: + service_template: > + {% raw %}{% if is_state('switch.bathroom', 'on') %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %}{% endraw %} + data_template: + entity_id: switch.{% raw %}{{ states('input_select.is') }}{% endraw %} +``` + +### Breaking Changes + + - Media Player: Attributes to call service play_media has been renamed to +`media_content_type` and `media_content_id`, to match the corresponding media +player state attributes. This change affects automations, scripts and scenes. + +[services]: /topics/service_calls/#use-templates-to-decide-which-service-to-call +[Hunter Douglas Powerview]: /components/scene.hunterdouglas_powerview/ +[MQTT]: /components/lock.mqtt/ +[OwnTracks]: /components/device_tracker.owntracks/ +[Wemo Motion]: /components/binary_sensor.wemo/ +[@fabaff]: https://github.com/fabaff +[@partofthething]: https://github.com/partofthething +[@persandstrom]: https://github.com/persandstrom +[@fabaff]: https://github.com/fabaff +[@persandstrom]: https://github.com/persandstrom +[@PartOfTheThing]: https://github.com/PartOfTheThing +[@sander76]: https://github.com/sander76 +[@sander76]: https://github.com/sander76 +[@fabaff]: https://github.com/fabaff +[@HydrelioxGitHub]: https://github.com/HydrelioxGitHub +[@MartinHjelmare]: https://github.com/MartinHjelmare +[@pavoni]: https://github.com/pavoni +[@ryanlaux]: https://github.com/ryanlaux diff --git a/source/_topics/events.markdown b/source/_topics/events.markdown new file mode 100644 index 00000000000..f3d5d8b4e7f --- /dev/null +++ b/source/_topics/events.markdown @@ -0,0 +1,84 @@ +--- +layout: page +title: "Events" +description: "Describes all there is to know about events in Home Assistant." +date: 2016-03-12 12:00 -0800 +sidebar: false +comments: false +sharing: true +footer: true +--- + +The core of Home Assistant is the event bus. The event bus allows any component to fire or listen for events. It is the core of everything. For example, any state change will be announced on the event bus as a `state_changed` event containing the previous and the new state of an entity. + +Home Assistant contains a few built-in events that are used to coordinate between various components. + +### {% linkable_title Event `homeassistant_start` %} +Event `homeassistant_start` is fired when all components from the configuration have been intitialized. This is the event that will start the timer firing off `time_changed` events. + + +### {% linkable_title Event `homeassistant_stop` %} +Event `homeassistant_stop` is fired when Home Assistant is shutting down. It should be used to close any open connection or release any resources. + + +### {% linkable_title Event `state_changed` %} +Event `state_changed` is fired when a state changes. Both `old_state` and `new_state` are state objects. [Documentation about state objects.](/topics/state_object/) + +Field | Description +----- | ----------- +`entity_id` | Entity ID of the changed entity. Example: `light.kitchen` +`old_state` | The previous state of the entity before it changed. This field is ommitted if the entity is new. +`new_state` | The new state of the entity. This field is ommitted if the entity is removed from the state machine. + + +### {% linkable_title Event `time_changed` %} +Event `time_changed` is fired every second by the timer and contains the current time. + +Field | Description +----- | ----------- +`now` | A [datetime object](https://docs.python.org/3.4/library/datetime.html#datetime.datetime) containing the current time in UTC. + + +### {% linkable_title Event `service_registered` %} +Event `service_registered` is fired when a new service has been registered within Home Assistant. + +Field | Description +----- | ----------- +`domain` | Domain of the service. Example: `light`. +`service` | The service to call. Example: `turn_on` + + +### {% linkable_title Event `call_service` %} +Event `call_service` is fired to call a service. + +Field | Description +----- | ----------- +`domain` | Domain of the service. Example: `light`. +`service` | The service to call. Example: `turn_on` +`service_data` | Dictionary with the service call parameters. Example: `{ 'brightness': 120 }`. +`service_call_id` | String with a unique call id. Example: `23123-4`. + + +### {% linkable_title Event `service_executed` %} +Event `service_executed` is fired by the service handler to indicate the service is done. + +Field | Description +----- | ----------- +`service_call_id` | String with the unique call id of the service call that was executed. Example: `23123-4`. + + +### {% linkable_title Event `platform_discovered` %} +Event `platform_discovered` is fired when a new platform has been discovered by the discovery component. + +Field | Description +----- | ----------- +`service` | The service that is discovered. Example: `zwave`. +`discovered` | Information that is discovered. Can be a dict, tuple etc. Example: `(192.168.1.10, 8889)`. + + +### {% linkable_title Event `component_loaded` %} +Event `component_loaded` is fired when a new component has been loaded and initialized. + +Field | Description +----- | ----------- +`component` | Domain of the component that has just been initialized. Example: `light`. diff --git a/source/_topics/service_calls.markdown b/source/_topics/service_calls.markdown new file mode 100644 index 00000000000..fb30a38d0d1 --- /dev/null +++ b/source/_topics/service_calls.markdown @@ -0,0 +1,93 @@ +--- +layout: page +title: "Service Calls" +description: "Instructions how to call services in Home Assistant." +date: 2016-03-12 12:00 -0800 +sidebar: false +comments: false +sharing: true +footer: true +--- + +Various components allow calling services when a certain event occurs. The most common one is calling a service when an automation trigger happens. But a service can also be called from a script or via the Amazon Echo. + +The configuration options to call a config are the same between all components and are described on this page. + +Examples on this page will be given as part of an automation component configuration but different approaches can be used for other components too. + +

    +Use the service developer tool in the frontend to discover available services. +

    + +### {% linkable_title The basics %} + +Call the service `homeassistant.turn_on` on the entity `group.living_room`. This will turn all members of `group.living_room` on. You can also omit `entity_id` and it will turn on all possible entities. + +```yaml +automation: +- trigger: + platform: sun + event: sunset + action: + service: homeassistant.turn_on + entity_id: group.living_room +``` + +### {% linkable_title Passing data to the service call %} + +You can also specify other parameters beside the entity to target. For example, the light turn on service allows specifying the brightness. + +```yaml +automation: +- trigger: + platform: sun + event: sunset + action: + service: light.turn_on + entity_id: group.living_room + data: + brightness: 120 + rgb_color: [255, 0, 0] +``` + +### {% linkable_title Use templates to decide which service to call %} + +You can use [templating] support to dynamically choose which service to call. For example, you can call a certain service based on if a light is on. + +```yaml +automation: +- trigger: + platform: sun + event: sunset + action: + service_template: > + {% raw %}{% if states.sensor.temperature | float > 15 %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %}{% endraw %} + entity_id: switch.ac +``` + +### {% linkable_title Use templates to determine the attributes %} + +Templates can also be used for the data that you pass to the service call. + +```yaml +automation: +- trigger: + platform: sun + event: sunset + action: + service_template: thermostat.set_temperature + data_template: + entity_id: > + {% raw %}{% if is_state('device_tracker.paulus', 'home') %} + thermostat.upstairs + {% else %} + thermostat.downstairs + {% endif %}{% endraw %} + temperature: {% raw %}{{ 22 - distance(states.device_tracker.paulus) }}{% endraw %} +``` + +[templating]: /topics/templating/ diff --git a/source/_topics/state_object.markdown b/source/_topics/state_object.markdown new file mode 100644 index 00000000000..1f1a16425f3 --- /dev/null +++ b/source/_topics/state_object.markdown @@ -0,0 +1,39 @@ +--- +layout: page +title: "State Objects" +description: "Describes all there is to know about state objects in Home Assistant." +date: 2016-03-12 12:00 -0800 +sidebar: false +comments: false +sharing: true +footer: true +--- + +Your devices are represented in Home Assistant as entities. The entities will write their current state to the state machine for other entities/templates/frontend to access. States are a current representation of the entity. + +If you overwrite a state via the states dev tool or the API, it will not impact the actual device. If the device state is being polled, it will overwrite the state in the state machine the next polling. + +All states will always have an entity id, a state and a timestamp when last updated and last changed. + +Field | Description +----- | ----------- +`state.entity_id` | Entity ID. Format: `.`. Example: `light.kitchen`. +`state.domain` | Domain of the entity. Example: `light`. +`state.object_id` | Object ID of entity. Example: `kitchen`. +`state.name` | Name of the entity. Based on `friendly_name` attribute with fall back to object ID. Example: `Kitchen Ceiling`. +`state.last_updated` | Time the state was written to the state machine. Note that writing the exact same state including attributes will not result in this field being updated. Example: `14:10:03 13-03-2016`. +`state.last_changed` | Time the state changed. This is not updated when there are only updated attributes. Example: `14:10:03 13-03-2016`. +`state.attributes` | A dictionary with extra attributes related to the current state. + +The attributes of an entity are optional. There are a few attributes that are used by Home Assistant for representing the entity in a specific way. Each component will also have it's own attributes to represent extra state data about the entity. For example, the light component has attributes for the current brightness and color of the light. When an attribute is not available, Home Assistant will not write it to the state. + +When using templates, attributes will be available by their name. For example `state.attributes.assumed_state`. + +Attribute | Description +--------- | ----------- +`friendly_name` | Name of the entity. Example: `Kitchen Ceiling`. +`icon` | Icon to use for the entity in the frontend. Example: `mdi:home`. +`hidden` | Boolean if the entity should not be shown in the frontend. Example: `true`. +`entity_picture` | Url to a picture that should be used instead of showing the domain icon. Example: `http://example.com/picture.jpg`. +`assumed_state` | Boolean if the current state is an assumption. [More info](https://home-assistant.io/blog/2016/02/12/classifying-the-internet-of-things/#classifiers) Example: `True`. +`unit_of_measurement` | The unit of measurement the state is expressed in. Used for grouping graphs or understanding the entity. Example: `°C`. diff --git a/source/getting-started/templating.markdown b/source/_topics/templating.markdown similarity index 51% rename from source/getting-started/templating.markdown rename to source/_topics/templating.markdown index af5b863919c..a212e11030f 100644 --- a/source/getting-started/templating.markdown +++ b/source/_topics/templating.markdown @@ -10,7 +10,7 @@ footer: true ---

    -This is an advanced feature of Home Assistant. You need a basic understanding of the [Home Assistant architecture], especially states. +This is an advanced feature of Home Assistant. You'll need a basic understanding of the [Home Assistant architecture], especially states.

    [Home Assistant architecture]: /developers/architecture/ @@ -36,7 +36,7 @@ Templating in Home Assistant is powered by the Jinja2 templating engine. This me The frontend has a template editor developer tool to help develop and debug templates.

    -Templates can get pretty big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates: +Templates can get big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates: ```yaml script: @@ -52,36 +52,54 @@ script: {% endif %}{% endraw %} ``` -### {% linkable_title Home Assistant template extensions %} +## {% linkable_title Home Assistant template extensions %} Home Assistant adds extensions to allow templates to access all of the current states: - - Iterating `states` will yield each state sorted alphabetically by entity id - - Iterating `states.domain` will yield each state of that domain sorted alphabetically by entity id - - `states.sensor.temperature` returns state object for `sensor.temperature` - - `states('device_tracker.paulus')` will return the state string (not the object) of given entity or `unknown` if it doesn't exist. - - `is_state('device_tracker.paulus', 'home')` will test if given entity is specified state. - - `is_state_attr('device_tracker.paulus', 'battery', 40)` will test if given entity is specified state. - - Filter `multiply(x)` will convert input to number and multiply it with `x` - - Filter `round(x)` will convert input to number and round it to `x` decimals. + - Iterating `states` will yield each state sorted alphabetically by entity ID. + - Iterating `states.domain` will yield each state of that domain sorted alphabetically by entity ID. + - `states.sensor.temperature` returns the state object for `sensor.temperature`. + - `states('device_tracker.paulus')` will return the state string (not the object) of the given entity or `unknown` if it doesn't exist. + - `is_state('device_tracker.paulus', 'home')` will test if the given entity is specified state. + - `is_state_attr('device_tracker.paulus', 'battery', 40)` will test if the given entity is specified state. + - Filter `multiply(x)` will convert the input to a number and multiply it with `x`. + - Filter `round(x)` will convert the input to a number and round it to `x` decimals. + - `now` will be rendered as current time in your time zone. + - `utcnow` will be rendered as UTC time. + - `distance()` will measure the distance in meters between home, entity, coordinates. + - `closest()` will find the closest entity. -#### {% linkable_title Examples %} + +## {% linkable_title Examples %} + +### {% linkable_title States %} +Next two statements result in same value if state exists. Second one will result in an error if state does not exist. ```jinja2 {% raw %} -# Next two statements result in same value if state exists -# Second one will result in an error if state does not exist {{ states('device_tracker.paulus') }} -{{ states.device_tracker.paulus.state }} +{{ states.device_tracker.paulus.state }}{% endraw %} +``` -# Print an attribute if state is defined +### {% linkable_title Attributes %} + +Print an attribute if state is defined + +```jinja2 +{% raw %} {% if states.device_tracker.paulus %} {{ states.device_tracker.paulus.attributes.battery }} {% else %} ?? -{% endif %} +{% endif %}{% endraw %} +``` -# Print out a list of all the sensor states +### {% linkable_title Sensor states %} + +Print out a list of all the sensor states. + +```jinja2 +{% raw %} {% for state in states.sensor %} {{ state.entity_id }}={{ state.state }}, {% endfor %} @@ -99,9 +117,53 @@ Home Assistant adds extensions to allow templates to access all of the current s {%endif %}{% endraw %} ``` +### {% linkable_title Distance examples %} + +If only 1 location is passed in will measure the distance from home. + +```jinja2 +{% raw %} +Using Lat Lng coordinates: {{ distance(123.45, 123.45) }} + +Using State: {{ distance(device_tracker.paulus) }} + +These can also be combined in any combination: +{{ distance(123.45, 123.45, device_tracker.paulus) }} +{{ distance(device_tracker.anne_therese, device_tracker.paulus) }}{% endraw %} +``` + +### {% linkable_title Closest examples %} + +Find entities closest to the Home Assistant location: + +```jinja2 +{% raw %} +Query all entities: {{ closest(states) }} +Query all entities of a specific domain: {{ closest(states.device_tracker) }} +Query all entities in group.children: {{ closest('group.children') }} +Query all entities in group.children: {{ closest(states.group.children) }}{% endraw %} +``` + +Find entities closest to a coordinate or another entity. All previous arguments still apply for 2nd argument. + +```jinja2 +{% raw %} +Closest to a coordinate: {{ closest(23.456, 23.456, 'group.children') }} +Closest to an entity: {{ closest('zone.school', 'group.children') }} +Closest to an entity: {{ closest(states.zone.school, 'group.children') }}{% endraw %} +``` + +### {% linkable_title Combined %} +Since closest returns a state, we can combine it with distance too + +```jinja2 +{% raw %} +{{ closest(states).name }} is {{ distance(closest(states)) }} meters away.{% endraw %} +``` + ## {% linkable_title Processing incoming data %} -The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data that you care about. This will work only for platforms and components that mentioned support for this in their documentation. +The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data you care about. This will work only for platforms and components that mentioned support for this in their documentation. It depends per component or platform but it is common to be able to define a template using the `value_template` configuration key. When a new value arrives, your template will be rendered while having access to the following values on top of the usual Home Assistant extensions: diff --git a/source/components/index.html b/source/components/index.html index 14f582cd103..87b08f3085b 100644 --- a/source/components/index.html +++ b/source/components/index.html @@ -8,6 +8,7 @@ comments: false sharing: true footer: true is_homepage: true +hide_github_edit: true body_id: components-page regenerate: true --- @@ -35,7 +36,9 @@ Support for these components is provided by the Home Assistant community.
    {% for component in components %} {% if component.ha_category %} - +
    {% if component.logo %} @@ -59,8 +62,19 @@ Support for these components is provided by the Home Assistant community. {% endcomment %} - - + + diff --git a/source/cookbook/index.markdown b/source/cookbook/index.markdown index 458f8cac657..61990b01be9 100644 --- a/source/cookbook/index.markdown +++ b/source/cookbook/index.markdown @@ -1,24 +1,45 @@ --- layout: page -title: "Configuration Cookbook" -description: "Community maintained list of configuration exmaples." +title: "Cookbook" +description: "Community maintained list of different ways to use Home Assistant." date: 2015-10-08 19:05 sidebar: false comments: false sharing: true footer: true regenerate: true +hide_github_edit: true --- -This is a community currated list of `configuration.yaml` examples. New recipes can be added via the [home-assistant.io repository](https://github.com/balloob/home-assistant.io/tree/master/source/_cookbook). +This is a community curated list of different ways to use Home Assistant. Most of these examples are using the [automation] component and other built-in [automation related][sec-automation] and [organization] components available. -{% for recipe in site.cookbook %} - * [{{recipe.title}}]({{recipe.url}}) -{% endfor %} +[automation]: /components/automation/ +[sec-automation]: /components/#automation +[organization]: /components/#organization -### {% linkable_title Configuration.yaml Gists %} +New recipes can be added via the [home-assistant.io repository](https://github.com/balloob/home-assistant.io/tree/master/source/_cookbook). +{% assign cookbook = site.cookbook | sort: 'title' %} +{% assign categories = cookbook | map: 'ha_category' | uniq | sort %} + +{% for category in categories %} +### {% linkable_title {{ category }} %} + + {% if category == 'Automation Examples' %} + + {% elsif category == 'Full configuration.yaml examples' %} Some users keep a public scrubbed copy of their `configuration.yaml` to learn from. + {% elsif category == '' %} -- [Configuration.yaml by Carlo Costanzo](https://gist.github.com/CCOSTAN/9934de973a293b809868) -- [Configuration.yaml by happyleavesaoc](https://github.com/happyleavesaoc/my-home-automation/tree/master/homeassistant) + {% endif %} + + {% for recipe in cookbook %} + {% if recipe.ha_category == category %} + {% if recipe.ha_external_link %} + * [{{recipe.title}} ]({{recipe.ha_external_link}}) + {% else %} + * [{{recipe.title}}]({{recipe.url}}) + {% endif %} + {% endif %} + {% endfor %} +{% endfor %} diff --git a/source/demo/frontend.html b/source/demo/frontend.html index 26e5d1e824f..aa9efcef31f 100644 --- a/source/demo/frontend.html +++ b/source/demo/frontend.html @@ -1,6 +1,7 @@ --
    \ No newline at end of file + } \ No newline at end of file diff --git a/source/demo/index.html b/source/demo/index.html index 37d0ce3c48e..49e4744b733 100644 --- a/source/demo/index.html +++ b/source/demo/index.html @@ -2,7 +2,7 @@ - Home Assistant + Home Assistant Demo diff --git a/source/demo/webcomponents-lite.min.js b/source/demo/webcomponents-lite.min.js index 3a3fd4e8564..91841eec55e 100644 --- a/source/demo/webcomponents-lite.min.js +++ b/source/demo/webcomponents-lite.min.js @@ -7,6 +7,6 @@ * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -// @version 0.7.17 -!function(){window.WebComponents=window.WebComponents||{flags:{}};var e="webcomponents-lite.js",t=document.querySelector('script[src*="'+e+'"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,r=e.split("=");r[0]&&(t=r[0].match(/wc-(.+)/))&&(n[t[1]]=r[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);if(n.log&&n.log.split){var i=n.log.split(",");n.log={},i.forEach(function(e){n.log[e]=!0})}else n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";function t(e){return void 0!==h[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){g.push(e)}var d=a||"scheme start",u=0,l="",_=!1,w=!1,g=[];e:for(;(e[u-1]!=p||0==u)&&!this._isInvalid;){var b=e[u];switch(d){case"scheme start":if(!b||!m.test(b)){if(a){c("Invalid scheme.");break e}l="",d="no scheme";continue}l+=b.toLowerCase(),d="scheme";break;case"scheme":if(b&&v.test(b))l+=b.toLowerCase();else{if(":"!=b){if(a){if(p==b)break e;c("Code point not allowed in scheme: "+b);break e}l="",u=0,d="no scheme";continue}if(this._scheme=l,l="",a)break e;t(this._scheme)&&(this._isRelative=!0),d="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==b?(this._query="?",d="query"):"#"==b?(this._fragment="#",d="fragment"):p!=b&&" "!=b&&"\n"!=b&&"\r"!=b&&(this._schemeData+=o(b));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=b||"/"!=e[u+1]){c("Expected /, got: "+b),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),p==b){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==b||"\\"==b)"\\"==b&&c("\\ is an invalid code point."),d="relative slash";else if("?"==b)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,d="query";else{if("#"!=b){var y=e[u+1],E=e[u+2];("file"!=this._scheme||!m.test(b)||":"!=y&&"|"!=y||p!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),d="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,d="fragment"}break;case"relative slash":if("/"!=b&&"\\"!=b){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),d="relative path";continue}"\\"==b&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=b){c("Expected '/', got: "+b),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=b){c("Expected '/', got: "+b);continue}break;case"authority ignore slashes":if("/"!=b&&"\\"!=b){d="authority";continue}c("Expected authority, got: "+b);break;case"authority":if("@"==b){_&&(c("@ already seen."),l+="%40"),_=!0;for(var L=0;L>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){b.push(e),g||(g=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){g=!1;var e=b;b=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o0){var o=n[r-1],i=f(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n":return">";case" ":return" "}}function t(t){return t.replace(a,e)}var n="template",r=document.implementation.createHTMLDocument("template"),o=!0;HTMLTemplateElement=function(){},HTMLTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){e.content||(e.content=r.createDocumentFragment());for(var n;n=e.firstChild;)e.content.appendChild(n);if(o)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",n=this.content.firstChild;n;n=n.nextSibling)e+=n.outerHTML||t(n.data);return e},set:function(e){for(r.body.innerHTML=e,HTMLTemplateElement.bootstrap(r);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;r.body.firstChild;)this.content.appendChild(r.body.firstChild)},configurable:!0})}catch(i){o=!1}},HTMLTemplateElement.bootstrap=function(e){for(var t,r=e.querySelectorAll(n),o=0,i=r.length;i>o&&(t=r[o]);o++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)});var i=document.createElement;document.createElement=function(){"use strict";var e=i.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e};var a=/[&\u00A0<>]/g}(),function(e){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var r=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(r.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===_}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===_)&&(t.removeEventListener(w,o),r(e,t))};t.addEventListener(w,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){c==d&&e&&e({allImports:s,loadedImports:u,errorImports:l})}function r(e){o(e),u.push(this),c++,n()}function i(e){l.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,d=s.length,u=[],l=[];if(d)for(var h,f=0;d>f&&(h=s[f]);f++)a(h)?(c++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),f=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},p=f(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return f(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(p,"_currentScript",m);var v=/Trident/.test(navigator.userAgent),_=v?"complete":"interactive",w="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)d(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(o){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),d&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode&&r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r.__doc,r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e.__doc?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){f.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);f.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n.__doc=c}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},f=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(c,"baseURI",p)}e.importer=h,e.importLoader=f}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(r)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var r=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||r(e,t)}function n(t,n){return e.upgrade(t,n)?!0:void(n&&a(t))}function r(e,t){b(e,function(e){return n(e,t)?!0:void 0})}function o(e){T.push(e),L||(L=!0,setTimeout(i))}function i(){L=!1;for(var e,t=T,n=0,r=t.length;r>n&&(e=t[n]);n++)e();T=[]}function a(e){E?o(function(){s(e)}):s(e)}function s(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){d(e),b(e,function(e){d(e)})}function d(e){E?o(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function l(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function h(e){if(e.shadowRoot&&!e.shadowRoot.__watched){g.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function f(e,n){if(g.dom){var r=n[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var o=r.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var i=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=l(e);n.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e,a)}),M(e.removedNodes,function(e){e.localName&&c(e)}))}),g.dom&&console.groupEnd()}function p(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(f.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),g.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document); -t(e,n),m(e),g.dom&&console.groupEnd()}function _(e){y(e,v)}function w(e){HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(e),t(e)}var g=e.flags,b=e.forSubtree,y=e.forDocumentTree,E=window.MutationObserver._isPolyfilled&&g["throttle-attached"];e.hasPolyfillMutations=E,e.hasThrottledAttached=E;var L=!1,T=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),N=Element.prototype.createShadowRoot;N&&(Element.prototype.createShadowRoot=function(){var e=N.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=h,e.upgradeDocumentTree=_,e.upgradeDocument=v,e.upgradeSubtree=r,e.upgradeAll=w,e.attached=a,e.takeRecords=p}),window.CustomElements.addModule(function(e){function t(t,r){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(o);if(i&&(o&&i.tag==t.localName||!o&&!i["extends"]))return n(t,i,r)}}function n(t,n,o){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),o&&e.attached(t),e.upgradeSubtree(t,o),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(d(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=l(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&_(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t=0&&b(r,HTMLElement),r)}function p(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return w(e),e}}var m,v=e.isIE,_=e.upgradeDocumentTree,w=e.upgradeAll,g=e.upgradeWithDefinition,b=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],L={},T="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),N=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},p(Node.prototype,"cloneNode"),p(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=f,document.createElementNS=h,e.registry=L,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,r=e.initializeModules;e.isIE;if(n){var o=function(){};e.watchShadow=o,e.upgrade=o,e.upgradeAll=o,e.upgradeDocumentTree=o,e.upgradeSubtree=o,e.takeRecords=o,e["instanceof"]=function(e,t){return e instanceof t}}else r();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t()}(window.CustomElements),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents); \ No newline at end of file +// @version 0.7.20 +!function(){window.WebComponents=window.WebComponents||{flags:{}};var e="webcomponents-lite.js",t=document.querySelector('script[src*="'+e+'"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,r=e.split("=");r[0]&&(t=r[0].match(/wc-(.+)/))&&(n[t[1]]=r[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);if(n.log&&n.log.split){var i=n.log.split(",");n.log={},i.forEach(function(e){n.log[e]=!0})}else n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";function t(e){return void 0!==h[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){g.push(e)}var d=a||"scheme start",u=0,l="",w=!1,_=!1,g=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var b=e[u];switch(d){case"scheme start":if(!b||!m.test(b)){if(a){c("Invalid scheme.");break e}l="",d="no scheme";continue}l+=b.toLowerCase(),d="scheme";break;case"scheme":if(b&&v.test(b))l+=b.toLowerCase();else{if(":"!=b){if(a){if(f==b)break e;c("Code point not allowed in scheme: "+b);break e}l="",u=0,d="no scheme";continue}if(this._scheme=l,l="",a)break e;t(this._scheme)&&(this._isRelative=!0),d="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==b?(this._query="?",d="query"):"#"==b?(this._fragment="#",d="fragment"):f!=b&&" "!=b&&"\n"!=b&&"\r"!=b&&(this._schemeData+=o(b));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=b||"/"!=e[u+1]){c("Expected /, got: "+b),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==b){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==b||"\\"==b)"\\"==b&&c("\\ is an invalid code point."),d="relative slash";else if("?"==b)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,d="query";else{if("#"!=b){var y=e[u+1],E=e[u+2];("file"!=this._scheme||!m.test(b)||":"!=y&&"|"!=y||f!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),d="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,d="fragment"}break;case"relative slash":if("/"!=b&&"\\"!=b){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),d="relative path";continue}"\\"==b&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=b){c("Expected '/', got: "+b),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=b){c("Expected '/', got: "+b);continue}break;case"authority ignore slashes":if("/"!=b&&"\\"!=b){d="authority";continue}c("Expected authority, got: "+b);break;case"authority":if("@"==b){w&&(c("@ already seen."),l+="%40"),w=!0;for(var L=0;L>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){b.push(e),g||(g=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){g=!1;var e=b;b=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o0){var o=n[r-1],i=p(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n":return">";case" ":return" "}}function t(t){return t.replace(a,e)}var n="template",r=document.implementation.createHTMLDocument("template"),o=!0;HTMLTemplateElement=function(){},HTMLTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){if(!e.content){e.content=r.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(o)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",n=this.content.firstChild;n;n=n.nextSibling)e+=n.outerHTML||t(n.data);return e},set:function(e){for(r.body.innerHTML=e,HTMLTemplateElement.bootstrap(r);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;r.body.firstChild;)this.content.appendChild(r.body.firstChild)},configurable:!0})}catch(i){o=!1}HTMLTemplateElement.bootstrap(e.content)}},HTMLTemplateElement.bootstrap=function(e){for(var t,r=e.querySelectorAll(n),o=0,i=r.length;i>o&&(t=r[o]);o++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)});var i=document.createElement;document.createElement=function(){"use strict";var e=i.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e};var a=/[&\u00A0<>]/g}(),function(e){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var r=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(r.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||f,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===w}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===w)&&(t.removeEventListener(_,o),r(e,t))};t.addEventListener(_,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){c==d&&e&&e({allImports:s,loadedImports:u,errorImports:l})}function r(e){o(e),u.push(this),c++,n()}function i(e){l.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,d=s.length,u=[],l=[];if(d)for(var h,p=0;d>p&&(h=s[p]);p++)a(h)?(u.push(this),c++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),p=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},f=p(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return p(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var v=/Trident/.test(navigator.userAgent),w=v?"complete":"interactive",_="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)d(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=f,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(o){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),d&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode&&r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r.__doc,r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e.__doc?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){p.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);p.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n.__doc=c}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},p=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=h,e.importLoader=p}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(r)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var r=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||r(e,t)}function n(t,n){return e.upgrade(t,n)?!0:void(n&&a(t))}function r(e,t){g(e,function(e){return n(e,t)?!0:void 0})}function o(e){L.push(e),E||(E=!0,setTimeout(i))}function i(){E=!1;for(var e,t=L,n=0,r=t.length;r>n&&(e=t[n]);n++)e();L=[]}function a(e){y?o(function(){s(e)}):s(e)}function s(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){d(e),g(e,function(e){d(e)})}function d(e){y?o(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function l(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function h(e){if(e.shadowRoot&&!e.shadowRoot.__watched){_.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function p(e,n){if(_.dom){var r=n[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var o=r.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var i=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=l(e);n.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e,a)}),T(e.removedNodes,function(e){e.localName&&c(e)}))}),_.dom&&console.groupEnd()}function f(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(p(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(p.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),_.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()); +var n=e===window.wrap(document);t(e,n),m(e),_.dom&&console.groupEnd()}function w(e){b(e,v)}var _=e.flags,g=e.forSubtree,b=e.forDocumentTree,y=window.MutationObserver._isPolyfilled&&_["throttle-attached"];e.hasPolyfillMutations=y,e.hasThrottledAttached=y;var E=!1,L=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),M=Element.prototype.createShadowRoot;M&&(Element.prototype.createShadowRoot=function(){var e=M.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=h,e.upgradeDocumentTree=w,e.upgradeDocument=v,e.upgradeSubtree=r,e.upgradeAll=t,e.attached=a,e.takeRecords=f}),window.CustomElements.addModule(function(e){function t(t,r){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(o);if(i&&(o&&i.tag==t.localName||!o&&!i["extends"]))return n(t,i,r)}}function n(t,n,o){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),o&&e.attached(t),e.upgradeSubtree(t,o),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(d(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=l(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&w(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t=0&&b(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return _(e),e}}var m,v=e.isIE,w=e.upgradeDocumentTree,_=e.upgradeAll,g=e.upgradeWithDefinition,b=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],L={},T="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),N=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=h,e.registry=L,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,r=e.initializeModules;e.isIE;if(n){var o=function(){};e.watchShadow=o,e.upgrade=o,e.upgradeAll=o,e.upgradeDocumentTree=o,e.upgradeSubtree=o,e.takeRecords=o,e["instanceof"]=function(e,t){return e instanceof t}}else r();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t()}(window.CustomElements),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents); \ No newline at end of file diff --git a/source/developers/add_new_platform.markdown b/source/developers/add_new_platform.markdown index d1d3c540046..ffe7dafdd38 100644 --- a/source/developers/add_new_platform.markdown +++ b/source/developers/add_new_platform.markdown @@ -11,13 +11,7 @@ footer: true Components that interact with devices are structured in core- and platform logic. This allows the same logic to be used for different platforms. -For example, the built-in `switch` component consists of the following files in [`homeassistant/components/switch/`](https://github.com/balloob/home-assistant/tree/master/homeassistant/components/switch): - -| File | Description | -| ---- | ----------- | -| \_\_init\_\_.py | Contains the Switch core logic.| -| wemo.py | WeMo platform logic. Included if in config `platform=wemo`. | -| tellstick.py | Tellstick platform logic. Included if in config `platform=tellstick`. | +For example, the built-in `switch` component consists of various platform in [`homeassistant/components/switch/`](https://github.com/balloob/home-assistant/tree/master/homeassistant/components/switch). The file `__init__.py` contains the core logic of all platform and the `vendor_name.py` files only the relevant platform code. If you are planning to add support for a new type of device to an existing component, you can get away with only writing platform logic. Have a look at how the component works with other platforms and create a similar file for the platform that you would like to add. @@ -25,19 +19,85 @@ If you are planning to add support for a new type of device to an existing compo One of the rules for Home Assistant is that platform logic should never interface directly with devices but use a third-party Python 3 library to do so. This way Home Assistant is able to share code with the Python community and we can keep the project maintainable. -Platforms can specify dependencies and requirements the same way as a component does. Please see [the component page](/developers/creating_components/#dependencies) for more information. - -### {% linkable_title Creating Entities %} - -Home Assistant will call a function with the following signature to initialize your new platform. This function must exist in the platform module you create. +Platforms can specify dependencies and requirements the same way as a component does. ```python -def setup_platform(hass, config, add_devices, discovery_info=None) +REQUIREMENTS = ['some-package==2.0.0', 'some-other-package==2.5.0'] +DEPENDENCIES = ['mqtt'] ``` -In this function, your platform should create the appropriate entities and register them with the Home Assistant core. Entities are Home Assistant's representation of lights, switches, sensors, etc. and are derived from the [Entity Abstract Class](https://github.com/balloob/home-assistant/blob/master/homeassistant/helpers/entity.py). This abstract class contains logic for integrating most standard features into your entities, such as visibility, entity IDs, updates, and many more. +### {% linkable_title Platform example %} -A list of entities can be registered with Home Assistant using the *add_devices* function that is provided as an input to *setup_platform*. Once entities are registered with with Home Assistant their updates will be provided to the core and the core will have control over them. For more information on how Entities can be customized, take a look at the [Entity Abstract Class](https://github.com/balloob/home-assistant/blob/master/homeassistant/helpers/entity.py#L18). + + +Entities are Home Assistant's representation of lights, switches, sensors, etc. and are derived from the [Entity Abstract Class](https://github.com/balloob/home-assistant/blob/master/homeassistant/helpers/entity.py). This abstract class contains logic for integrating most standard features into your entities, such as visibility, entity IDs, updates, and many more. + +This example is for adding support for the imaginary Awesome Lights. + +```python +import logging + +# Import the device class from the component that you want to support +from homeassistant.components.light import Light +from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD + +# Home Assistant depends on 3rd party packages for API specific code. +REQUIREMENTS = ['awesome_lights==1.2.3'] + +_LOGGER = logging.getLogger(__name__) + + +setup_platform(hass, config, add_devices, discovery_info=None): + """Initialize Awesome Light platform.""" + import awesomelights + + # Validate passed in config + host = config.get(CONF_HOST) + username = config.get(CONF_USERNAME) + password = config.get(CONF_PASSWORD) + + if host is None or username is None or password is None: + _LOGGER.error('Invalid config. Expected %s, %s and %s', + CONF_HOST, CONF_USERNAME, CONF_PASSWORD) + return False + + # Setup connection with devices/cloud + hub = awesomelights.Hub(host, username, password) + + # Verify that passed in config works + if not hub.is_valid_login(): + _LOGGER.error('Could not connect to AwesomeLight hub') + return False + + # Add devices + add_devices(AwesomeLight(light) for light in hub.lights()) + +class AwesomeLight(Light): + """Represents an AwesomeLight in Home Assistant.""" + + def __init__(self, light): + """Initialize an AwesomeLight.""" + self._light = light + + def update(self): + """Fetch new state data for this light. + + This is the only method that should fetch new data for Home Assitant. + """ + self._light.update() + + def brightness(self): + """Brightness of the light. + + This method is optional. Removing it indicates to Home Assistant + that brightness is not supported for this light. + """ + return self._light.brightness + + def is_on(self): + """If light is on.""" + return self._light.is_on() +``` ## {% linkable_title Allowing your platform to be discovered %} diff --git a/source/developers/api.markdown b/source/developers/api.markdown index e2a3fb24705..2b69960b015 100644 --- a/source/developers/api.markdown +++ b/source/developers/api.markdown @@ -12,5 +12,5 @@ footer: true Home Assistant is offering a RESTful API and a Python API for convenient access to a Home Assistant instance over HTTP. -- [Rest API](/developers/rest_api/) +- [RESTful API](/developers/rest_api/) - [Python API](/developers/python_api/) diff --git a/source/developers/architecture.markdown b/source/developers/architecture.markdown index 974cc312990..3bf10db703a 100644 --- a/source/developers/architecture.markdown +++ b/source/developers/architecture.markdown @@ -16,7 +16,7 @@ Before we dive into the Home Assistant architecture, it is important to get a cl * Smart Home triggers commands based on previous behavior.

    - + Home Automation landscape @@ -31,7 +31,7 @@ The Home Assistant core is responsible for Home Control. It has four parts to ma * The **Timer** will send every 1 second a `time_changed` event on the event bus.

    - + Overview of the Home Assistant core architecture diff --git a/source/developers/creating_components.markdown b/source/developers/creating_components.markdown index 57ce55700ae..db00d1fb8b1 100644 --- a/source/developers/creating_components.markdown +++ b/source/developers/creating_components.markdown @@ -9,9 +9,9 @@ sharing: true footer: true --- -Home Assistant offers [built-in components]({{site_root}}/components/) but it is easy to built your own. If you are the kind of person that likes to learn from code rather then guide then head over to the [`config/custom_components`](https://github.com/balloob/home-assistant/tree/master/config/custom_components) folder in the repository for two example components. +Home Assistant offers [built-in components]({{site_root}}/components/) but it is easy to build your own. If you are the kind of person that likes to learn from code rather then guide then head over to the [`config/custom_components`](https://github.com/balloob/home-assistant/tree/master/config/custom_components) folder in the repository for two example components. Or visit the [Custom Python Component Examples]({{site_root}}/cookbook/#custom-python-component-examples). -The first is [hello_world.py](https://github.com/balloob/home-assistant/blob/master/config/custom_components/hello_world.py), which is the classic Hello World example for Home Assistant. The second one is [example.py](https://github.com/balloob/home-assistant/blob/master/config/custom_components/example.py) which showcases various ways you can tap into Home Assistant to be notified when certain events occur. +The first is [hello_world.py](https://github.com/balloob/home-assistant/blob/master/config/custom_components/hello_world.py) (this is similar to the [Basic State Setting Example](https://home-assistant.io/cookbook/python_component_basic_state/)), which is the classic "Hello World" example for Home Assistant. The second one is [example.py](https://github.com/balloob/home-assistant/blob/master/config/custom_components/example.py) which showcases various ways you can tap into Home Assistant to be notified when certain events occur. If you want to load these components in Home Assistant, add the following lines to your `configuration.yaml` file: @@ -55,7 +55,7 @@ After loading, the bootstrapper will call `setup(hass, config)` method on the co ### {% linkable_title `hass`: the Home Assistant instance %} -The Home Assistant instace contains three objects to help you interact with the system. +The Home Assistant instance contains three objects to help you interact with the system. | Object | Description | | ------ | ----------- | @@ -66,7 +66,7 @@ The Home Assistant instace contains three objects to help you interact with the ### {% linkable_title `config`: User given configuration. %} -The `config` paramter is a dictionary containing the user supplied configuration. The keys of the dictionary are the component names and the value is another dictionary with the component configuration. +The `config` parameter is a dictionary containing the user supplied configuration. The keys of the dictionary are the component names and the value is another dictionary with the component configuration. If your configuration file contains the following lines: @@ -79,4 +79,4 @@ Then in the setup method of your component you will be able to refer to `config[ ## {% linkable_title Responding to events %} -Home Assistant has different ways of responding to events that occur in Home Assistant. These have been organized in [helper methods](https://github.com/balloob/home-assistant/blob/dev/homeassistant/helpers/event.py). Examples are `track_state_change`, `track_point_in_time`, `track_time_change`. \ No newline at end of file +Home Assistant has different ways of responding to events that occur in Home Assistant. These have been organized in [helper methods](https://github.com/balloob/home-assistant/blob/dev/homeassistant/helpers/event.py). Examples are `track_state_change`, `track_point_in_time`, `track_time_change`. diff --git a/source/developers/credits.markdown b/source/developers/credits.markdown index 1d7aa491e9a..8b8b6413fb6 100644 --- a/source/developers/credits.markdown +++ b/source/developers/credits.markdown @@ -20,6 +20,7 @@ This page contains a list of people who have contributed in one way or another t (in alphabetical order) - [Adrien Brault](https://github.com/adrienbrault) +- [Alex Harvey](https://github.com/infamy) - [Allan Glen](https://github.com/allanglen) - [Andy Loughran](https://github.com/andylockran) - [andythigpen](https://github.com/andythigpen) @@ -31,12 +32,18 @@ This page contains a list of people who have contributed in one way or another t - [Bruno Adele](https://github.com/badele) - [Carlo Costanzo](https://github.com/CCOSTAN) - [Chris Mulder](https://github.com/chrisvis) +- [Christian Braedstrup](https://github.com/LinuxChristian) - [Daniel Iversen](https://github.com/danielhiversen) +- [Dan Smith](https://github.com/kk7ds) - [Daren Lord](https://github.com/Xorso) +- [Dean Galvin](https://github.com/FreekingDean) - [Edwin Smulders](https://github.com/Dutchy-) +- [Ellis Percival](https://github.com/flyte) +- [Eric Rolf](https://github.com/xrolfex) - [ettisan](https://github.com/ettisan) - [Fabian Affolter](https://github.com/fabaff) - [Finbarr Brady](https://github.com/fbradyirl) +- [Flavio Castelli](https://github.com/flavio) - [Geoff Norton](https://github.com/kangaroo) - [goir](https://github.com/goir) - [gottsman](https://github.com/gottsman) @@ -48,25 +55,36 @@ This page contains a list of people who have contributed in one way or another t - [Hydreliox](https://github.com/HydrelioxGitHub) - [Issac Kelly](https://github.com/issackelly) - [James Cole](https://github.com/jamespcole) +- [Jan Harkes](https://github.com/jaharkes) - [Jeffrey Tang](https://github.com/Qrtn) - [Jeff Schroeder](https://github.com/SEJeff) +- [Joe McMonagle](https://github.com/joemcmonagle) +- [John Arild Berentsen](https://github.com/turbokongen) - [John McLaughlin](https://github.com/loghound) - [John Williams](https://github.com/Jaidan) - [Jon Maddox](https://github.com/maddox) - [Joseph Hughes](https://github.com/joshughes) - [Joseph Piron](https://github.com/eagleamon) - [Julien Danjou](https://github.com/jd) +- [Justin Moy](https://github.com/justincmoy) +- [Karen Goode](https://github.com/kfgoode) +- [kennedyshead](https://github.com/kennedyshead) - [kixam](https://github.com/kixam) +- [Lukas Hetzenecker](https://github.com/lukas-hetzenecker) - [Magnus Knutas](https://github.com/MagnusKnutas) - [MakeMeASandwich](https://github.com/MakeMeASandwich) - [Markus Stenberg](https://github.com/fingon) +- [Martin Hjelmare](https://github.com/MartinHjelmare) +- [Matteo Lampugnani](https://github.com/t30) - [Michael Arnauts](https://github.com/michaelarnauts) - [Michael Auchter](https://github.com/auchter) - [Michael Gilbert](https://github.com/Zyell) +- [Michael Kuty](https://github.com/michaelkuty) - [miniconfig](https://github.com/miniconfig) - [molobrakos](https://github.com/molobrakos) - [Moon Shot](https://github.com/moonshot) - [Nick Touran](https://github.com/partofthething) +- [Nick Waring](https://github.com/nickwaring) - [Nolan Gilley](https://github.com/nkgilley) - [Oliver van Porten](https://github.com/mcdeck)) - [Pascal Bach](https://github.com/bachp) @@ -81,12 +99,20 @@ This page contains a list of people who have contributed in one way or another t - [Ryan Kraus](https://github.com/rmkraus) - [Ryan Turner](https://github.com/ryanturner) - [sander76](https://github.com/sander76) +- [Sean Dague](https://github.com/sdague) - [sfam](https://github.com/sfam) - [Stefan Jonasson](https://github.com/stefan-jonasson) +- [St. John Johnson](https://github.com/stjohnjohnson) +- [TangoAlpha](https://github.com/TangoAlpha) +- [Teemu Patja](https://github.com/tpatja) +- [Theb-1](https://github.com/Theb-1) - [Theodor Lindquist](https://github.com/theolind) - [toddeye](https://github.com/toddeye) - [Tom Duijf](https://github.com/tomduijf) +- [trollkarlen](https://github.com/trollkarlen) - [vitorespindola](https://github.com/vitorespindola) +- [w1ll1am23](https://github.com/w1ll1am23) - [wind-rider](https://github.com/wind-rider) +- [Zac Mrowicki](https://github.com/zmrow) This page is irregularly updated. As a base we use the Github [contributors overview](https://github.com/balloob/home-assistant/graphs/contributors) of the Home Assistant git repository and the [overview](https://github.com/balloob/home-assistant.io/graphs/contributors) for [home-assistant.io](https://home-assistant.io). If you think that you are missing, please let us know or add yourself. diff --git a/source/developers/frontend.markdown b/source/developers/frontend.markdown index c1a2d5bd620..983935b339f 100644 --- a/source/developers/frontend.markdown +++ b/source/developers/frontend.markdown @@ -72,18 +72,24 @@ Polymer build architecture diagram # {% linkable_title Adding state cards %} -The main interface of Home Assistant is a list of the current entities and their states. For each entity in the system, a state card will be rendered. State cards will show a state badge, the name of the entity, when the state has last changed and the current state or a control to interact with it. +The main interface of Home Assistant is a list of the current entities and their states. For each entity in the system, a state card will be rendered. State cards will show an icon, the name of the entity, when the state has last changed and the current state or a control to interact with it. -![Cards in the frontend](/images/frontend/frontend-cards.png) +![Cards in the frontend](/images/frontend/frontend-cards1.png) The different card types can be found [here](https://github.com/balloob/home-assistant-polymer/tree/master/src/state-summary). -Adding a custom card type can be done with a few simple steps. For this example we will add a new state card for the domain `camera`: _(All files in this example link to their source-code)_ +Sensors, when not [grouped](/components/group/), are shown as so-called badges on top of the state cards. - 1. Add `'camera'` to the array `DOMAINS_WITH_CARD` in the file [`/util/state-card-type.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/util/state-card-type.js#L3-L4). - 2. Create the files `state-card-camera.html` and `state-card-camera.js` in the folder [`/state-summary/`](https://github.com/balloob/home-assistant-polymer/tree/master/src/state-summary). - 3. Add `require('./state-card-camera')` to [`state-card-content.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/state-summary/state-card-content.js). - 4. Add `` to [`state-card-content.html`](https://github.com/balloob/home-assistant-polymer/blob/master/src/state-summary/state-card-content.html). +![Badges in the frontend](/images/frontend/frontend-badges.png) + +The different badges are located in the file [`/src/components/entity/ha-state-label-badge.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/components/entity/ha-state-label-badge.js). + +Adding a custom card type can be done with a few simple steps. For this example we will add a new state card for the domain `camera`: + + 1. Add `'camera'` to the array `DOMAINS_WITH_CARD` in the file [/util/state-card-type.js](https://github.com/balloob/home-assistant-polymer/blob/master/src/util/state-card-type.js#L3-L4). + 2. Create the files `state-card-camera.html` and `state-card-camera.js` in the folder [/state-summary/](https://github.com/balloob/home-assistant-polymer/tree/master/src/state-summary). + 3. Add `require('./state-card-camera')` to [state-card-content.js](https://github.com/balloob/home-assistant-polymer/blob/master/src/state-summary/state-card-content.js). + 4. Add `` to [state-card-content.html](https://github.com/balloob/home-assistant-polymer/blob/master/src/state-summary/state-card-content.html). # {% linkable_title More info screens for custom types %} @@ -95,9 +101,8 @@ Whenever the user taps or clicks on one of the cards, a more info dialog will sh

    The instructions to add a more info dialog are very similar to adding a new card type. This example will add a new more info component for the domain `camera`: -_(All files in this example link to their source-code)_ - 1. Add `'camera'` to the array `DOMAINS_WITH_MORE_INFO` in the file [`util/state-more-info-type.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/util/state-more-info-type.js#L1). - 2. Create the files `more-info-camera.html` and `more-info-camera.js` in the folder [`/more-infos`](https://github.com/balloob/home-assistant-polymer/tree/master/src/more-infos). - 3. Add `require('./more-info-camera')` to [`more-info-content.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/more-infos/more-info-content.js) - 4. Add `` to [`more-info-content.html`](https://github.com/balloob/home-assistant-polymer/blob/master/src/more-infos/more-info-content.html) + 1. Add `'camera'` to the array `DOMAINS_WITH_MORE_INFO` in the file [util/state-more-info-type.js](https://github.com/balloob/home-assistant-polymer/blob/master/src/util/state-more-info-type.js#L1). + 2. Create the files `more-info-camera.html` and `more-info-camera.js` in the folder [/more-infos](https://github.com/balloob/home-assistant-polymer/tree/master/src/more-infos). + 3. Add `require('./more-info-camera')` to [more-info-content.js](https://github.com/balloob/home-assistant-polymer/blob/master/src/more-infos/more-info-content.js) + 4. Add `` to [more-info-content.html](https://github.com/balloob/home-assistant-polymer/blob/master/src/more-infos/more-info-content.html) diff --git a/source/developers/index.markdown b/source/developers/index.markdown index fbf3fa5e1c9..1b1e571000f 100644 --- a/source/developers/index.markdown +++ b/source/developers/index.markdown @@ -1,7 +1,7 @@ --- layout: page -title: "Developers" -description: "Home Assistant developer information. Everything to get you started" +title: "Setup Development" +description: "Everything to get you started developing for Home Assistant." date: 2014-12-21 13:32 sidebar: false comments: false @@ -9,7 +9,7 @@ sharing: true footer: true --- -Home Assistant is build 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 (Webcomponents)](https://www.polymer-project.org/) for the frontend. +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 (Webcomponents)](https://www.polymer-project.org/) for the frontend. Home Assistant is open-source and MIT licensed. The source can be found here: @@ -19,34 +19,40 @@ Home Assistant is open-source and MIT licensed. The source can be found here: ### {% linkable_title Starting development %} -You will need to setup a development environment if you want to start developing a new feature or component for Home Assistant perform theses steps +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 perform it. Visit the [the Home Assistant repository](https://github.com/balloob/home-assistant) first and click fork in the top right. ```bash -$ git clone https://github.com/balloob/home-assistant.git +$ git clone https://github.com/YOUR_GIT_USERNAME/home-assistant.git $ cd home-assistant +$ git remote add upstream https://github.com/balloob/home-assistant.git $ script/setup ``` +We suggest that you setup a [virtual environment](https://docs.python.org/3.4/library/venv.html) aka `venv` before running the setup script. + After following these steps, running `hass` will invoke your local installation. ### {% linkable_title Submitting improvements %} -Improvements to Home Assistant should be submitted one feature at a time using Github pull -requests. +Improvements to Home Assistant should be submitted one feature at a time using Github pull requests. - 1. Go to [the Home Assistant repository](https://github.com/balloob/home-assistant) and click fork in the top right. - 2. Follow steps in the previous section but with your forked repository. - 3. Create a new branch to hold your changes + 1. From your fork, create a new branch to hold your changes `git checkout -b some-feature` - 4. Make the changes you want - 5. Check your changes for style violations - `./script/lint` - 6. Commit the changes + 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"` - 7. Push your commited changes back to your fork on GitHub + 5. Push your commited changes back to your fork on GitHub `git push origin HEAD` - 8. Follow [these steps](https://help.github.com/articles/creating-a-pull-request/) to create your pull request. + 6. Follow [these steps](https://help.github.com/articles/creating-a-pull-request/) to create your pull request. + +Note that the above requires `tox` to be installed. If you don't have it, do this: + +```bash +$ pip3 install tox +``` ### {% linkable_title Further reading %} diff --git a/source/developers/rest_api.markdown b/source/developers/rest_api.markdown index d76449fea94..610b18cad62 100644 --- a/source/developers/rest_api.markdown +++ b/source/developers/rest_api.markdown @@ -1,7 +1,7 @@ --- layout: page -title: "Rest API" -description: "Home Assistant Rest API documentation" +title: "RESTful API" +description: "Home Assistant RESTful API documentation" date: 2014-12-21 13:27 sidebar: false comments: false @@ -11,17 +11,17 @@ footer: true Home Assistant runs a web server accessible on port 8123. - * http://localhost:8123/ is an interface to control Home Assistant. - * http://localhost:8123/api/ is a Rest API. + * http://IP_ADDRESS:8123/ is an interface to control Home Assistant. + * http://IP_ADDRESS:8123/api/ is a Rest API. -The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header `X-HA-Access: YOUR_PASSWORD` (YOUR_PASSWORD as specified in your `configuration.yaml` file). +The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header `X-HA-Access: YOUR_PASSWORD` (YOUR_PASSWORD as specified in your `configuration.yaml` file in the [`http:` section](/components/http/)). There are multiple ways to consume the Home Assistant Rest API. One is with `curl`: ```bash curl -X GET \ -H "x-ha-access: YOUR_PASSWORD" \ - http://localhost:8123/ENDPOINT + http://IP_ADDRESS:8123/ENDPOINT ``` Another option is to use Python and the [Requests](http://docs.python-requests.org/en/latest/) module. @@ -64,7 +64,7 @@ Returns message if API is up and running. Sample `curl` command: ```bash -$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/ +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/ ``` #### {% linkable_title GET /api/config %} @@ -96,7 +96,7 @@ Returns the current configuration as JSON. Sample `curl` command: ```bash -$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/config +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/config ``` #### {% linkable_title GET /api/bootstrap %} @@ -114,7 +114,7 @@ Returns all data needed to bootstrap Home Assistant. Sample `curl` command: ```bash -$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/bootstrap +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/bootstrap ``` #### {% linkable_title GET /api/events %} @@ -136,7 +136,7 @@ Returns an array of event objects. Each event object contain event name and list Sample `curl` command: ```bash -$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/events +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/events ``` #### {% linkable_title GET /api/services %} @@ -163,7 +163,47 @@ Returns an array of service objects. Each object contains the domain and which s Sample `curl` command: ```bash -$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/services +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/services +``` + +#### {% linkable_title GET /api/history %} +Returns an array of state changes in the past. Each object contains further detail for the entities. + +```json +[ + [ + { + "attributes": { + "friendly_name": "Weather Temperature", + "unit_of_measurement": "\u00b0C" + }, + "entity_id": "sensor.weather_temperature", + "last_changed": "23:30:00 05-02-2016", + "last_updated": "23:30:00 05-02-2016", + "state": "-3.9" + }, + { + "attributes": { + "friendly_name": "Weather Temperature", + "unit_of_measurement": "\u00b0C" + }, + "entity_id": "sensor.weather_temperature", + "last_changed": "07:03:30 06-02-2016", + "last_updated": "07:03:30 06-02-2016", + "state": "-1.9" + }, + ] +] +``` + +Sample `curl` commands: + +```bash +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/history/period/2016-02-06 +``` + +```bash +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/history/period/2016-02-06?filter_entity_id=sensor.temperature ``` #### {% linkable_title GET /api/states %} @@ -192,7 +232,7 @@ Returns an array of state objects. Each state has the following attributes: enti Sample `curl` command: ```bash -$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/states +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://localhost:8123/api/states ``` #### {% linkable_title GET /api/states/<entity_id> %} @@ -214,7 +254,7 @@ Sample `curl` command: ```bash $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ - http://IP_ADDRESS:8123/api/states/sensor.kitchen_temperature + http://localhost:8123/api/states/sensor.kitchen_temperature ``` #### {% linkable_title GET /api/error_log %} @@ -226,6 +266,13 @@ Retrieve all errors logged during the current session of Home Assistant as a pla 15-12-20 11:04:36 homeassistant.components.alexa: Received unknown intent HelpIntent ``` +Sample `curl` command: + +```bash +$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ + http://localhost:8123/api/error_log +``` + #### {% linkable_title POST /api/states/<entity_id> %} Updates or creates the current state of an entity. @@ -328,7 +375,7 @@ The result will include any changed states that changed while the service was be

    #### {% linkable_title POST /api/template %} -Render a Home Assistant template. [See template docs for more information.](/getting-started/templating/) +Render a Home Assistant template. [See template docs for more information.](/topics/templating/) ```json { @@ -342,6 +389,14 @@ Returns the rendered template in plain text. Paulus is at work! ``` +Sample `curl` command: + +```bash +$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \ + -d '{"template": "It is {{ now }}!"}' \ + http://localhost:8123/api/template +``` + #### {% linkable_title POST /api/event_forwarding %} Setup event forwarding to another Home Assistant instance. diff --git a/source/developers/website.markdown b/source/developers/website.markdown index 72e1b873729..cc0a3f6c756 100644 --- a/source/developers/website.markdown +++ b/source/developers/website.markdown @@ -18,7 +18,8 @@ To work on the website the process is no different to working on Home Assistant - Fork the home-assistant.io [git repository](https://github.com/balloob/home-assistant.io). - Create/edit/update a page in the directory `source/_components/` for your platform/component. - To test changes to home-assistant.io locally, run ``rake preview`` and navigate to http://127.0.0.1:4000. -- Create a Pull Request (PR) against the **next** branch of home-assistant.io. +- 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 **master** branch of home-assistant.io if you fix stuff, create Cookbook entries, or expand existing documentation. For a platform page it would be the fastest way 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 that your page. diff --git a/source/getting-started/automation.markdown b/source/getting-started/automation.markdown index 1538529f1c5..4c790f9f275 100644 --- a/source/getting-started/automation.markdown +++ b/source/getting-started/automation.markdown @@ -21,7 +21,7 @@ Actions will call services within Home Assistant. For example, turn a light on, Conditions are used to prevent actions from firing unless certain conditions are met. For example, it is possible to only turn on the light if someone comes home and it is after a certain point in time. -The difference between a condition and a trigger can be confusing. The difference is that the trigger looks at the event that is happening, ie a car engine turning on. Conditions looks at the current state of the system, ie is the car engine on. +The difference between a condition and a trigger can be confusing. The difference is that the trigger looks at the event that is happening, e.g., a car engine turning on. Conditions looks at the current state of the system, e.g., is the car engine on. ### {% linkable_title Exploring the internal state %} @@ -76,7 +76,7 @@ Now you're happy and all is good. You start to like this automation business and The first thing you do is to look at the entities in the developer tools (second icon) in the app. You see the names of your lights and you write them down: `light.table_lamp`, `light.bedroom`, `light.ceiling`. -Instead of hard coding the entity ids of the lights in the automation rule, we will set up a group. This will allow us to see the living room separate in the app and be able to address it from automation rules. +Instead of hard coding the entity IDs of the lights in the automation rule, we will set up a group. This will allow us to see the living room separate in the app and be able to address it from automation rules. So we tweak the config to add the group and have the automation rule only turn on the group. @@ -102,9 +102,9 @@ automation: entity_id: group.living_room ``` -Christmas is coming along and you decide to buy a remote switch to control the christmas lights from Home Assistant. You can't claim to live in the house of the future if you're still manually turn on your christmas lights! +Christmas is coming along and you decide to buy a remote switch to control the Christmas lights from Home Assistant. You can't claim to live in the house of the future if you're still manually turning on your Christmas lights! -We hook the switch up to Home Assistant and grab the entity id from the developer tools: `switch.christmas_lights`. We will update the group to include the switch and will change our action. We are no longer able to call `light.turn_on` because we also want to turn on a switch. This is where `homeassistant.turn_on` comes to the rescue. This service is capable of turning any entity on. +We hook the switch up to Home Assistant and grab the entity ID0 from the developer tools: `switch.christmas_lights`. We will update the group to include the switch and will change our action. We are no longer able to call `light.turn_on` because we also want to turn on a switch. This is where `homeassistant.turn_on` comes to the rescue. This service is capable of turning any entity on. ```yaml # Example configuration.yaml entry @@ -131,7 +131,7 @@ automation: ### {% linkable_title Further reading %} -We went over the basics of creating a home automation rule. From here no longer any hand holding, go automate! +We went over the basics of creating a home automation rule. Now, go automate! - Learn about the available [automation triggers](/components/automation/#triggers) - Learn about the available [automation conditions](/components/automation/#conditions) diff --git a/source/getting-started/autostart.markdown b/source/getting-started/autostart.markdown index 1907e2521f0..000ed53c2c7 100644 --- a/source/getting-started/autostart.markdown +++ b/source/getting-started/autostart.markdown @@ -13,9 +13,11 @@ footer: true + +
    Many linux distributions use the Upstart system (or similar) for managing daemons. Typically, systems based on Debian 7 or previous use Upstart. This includes Ubuntu releases before 15.04 and all current Raspian releases. If you are unsure if your system is using Upstart, you may check with the following command: @@ -70,7 +72,6 @@ User=pi [Install] WantedBy=multi-user.target EOF' - ``` You need to reload systemd to make the daemon aware of the new configuration. Enable and launch Home Assistant after that. @@ -80,7 +81,6 @@ You need to reload systemd to make the daemon aware of the new configuration. En $ sudo systemctl --system daemon-reload $ sudo systemctl enable home-assistant $ sudo systemctl start home-assistant - ``` If everything went well, `sudo systemctl start home-assistant` should give you a positive feedback. @@ -95,7 +95,6 @@ $ sudo systemctl status home-assistant -l CGroup: /system.slice/home-assistant.service └─8557 /usr/bin/python3.4 -m homeassistant [...] - ``` To get Home Assistant's logging output, simple use `journalctl`. @@ -130,6 +129,47 @@ Home Assistant has been uninstalled. ```
    + +
    +To get Home Assistant to automatically start when you boot your Synology NAS: + +SSH onto your synology & login as admin or root + +```bash +$ cd /volume1/homeassistant +``` + +Create "homeassistant.conf" file using the following code + +```bash +# only start this service after the httpd user process has started +start on started httpd-user + +# stop the service gracefully if the runlevel changes to 'reboot' +stop on runlevel [06] + +# run the scripts as the 'http' user. Running as root (the default) is a bad ide +#setuid admin + +# exec the process. Use fully formed path names so that there is no reliance on +# the 'www' file is a node.js script which starts the foobar application. +exec /bin/sh /volume1/homeassistant/hass-daemon start +``` + +Register the autostart + +```bash +$ ln -s homeassistant-conf /etc/init/homeassistant-conf +``` + +Make the relevant files executable: + +```bash +$ chmod -r 777 /etc/init/homeassistant-conf +``` + +That's it - reboot your NAS and Home Assistant should automatically start +
    ### [« Back to Getting Started](/getting-started/) diff --git a/source/getting-started/configuration.markdown b/source/getting-started/configuration.markdown index c267a9d87c7..c236513ee9b 100644 --- a/source/getting-started/configuration.markdown +++ b/source/getting-started/configuration.markdown @@ -9,7 +9,7 @@ sharing: true footer: true --- -Home Assistant will create a configuration folder when it is run for the first time. The location of the folder depends on operating system: on OS X/Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`. If you want to use a different folder for configuration, run `hass --config path/to/config`. +Home Assistant will create a configuration folder when it is run for the first time. The location of the folder differs between operating systems: on OS X/Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`. If you want to use a different folder for configuration, run `hass --config path/to/config`. Inside your configuration folder is the file `configuration.yaml`. This is the main file that contains which components will be loaded and what their configuration is. An example configuration file is located [here](https://github.com/balloob/home-assistant/blob/master/config/configuration.yaml.example). @@ -65,6 +65,6 @@ Home Assistant runs as a self hosted web application and contains support to be To make Home Assistant accessible while away from home, you will have to setup port forwarding from your router to port 8123 on the computer that is hosting Home Assistant. Instructions on how to do this can be found by searching ` port forwarding instructions`. -Some internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while being remote. You can solve this by using a free Dynamic DNS service like [DuckDNS](https://www.duckdns.org/). +Some internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while away. You can solve this by using a free Dynamic DNS service like [DuckDNS](https://www.duckdns.org/). ### [Next step: Setting up devices »](/getting-started/devices/) diff --git a/source/getting-started/devices.markdown b/source/getting-started/devices.markdown index a026836a85b..265d1f39f20 100644 --- a/source/getting-started/devices.markdown +++ b/source/getting-started/devices.markdown @@ -9,11 +9,11 @@ sharing: true footer: true --- -Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers in your network if you have [the discovery component]({{site_root}}/components/discovery/) enabled (which is by default). +Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers on your network if you have [the discovery component]({{site_root}}/components/discovery/) enabled (which is by default). See the [components overview page](/components/) to find installation instructions for your devices and services. If you can't find support for your favorite device or service, [consider adding support](/developers/add_new_platform/). -Usually every entity needs its own entry in the `configuration.yaml` file. There are two kind of styles for multiple entries: +Usually every entity needs its own entry in the `configuration.yaml` file. There are two kinds of style for multiple entries: #### {% linkable_title Style 1 %} @@ -59,7 +59,7 @@ If your devices are not showing up in the frontend then check the entries in you ### {% linkable_title Grouping devices %} -Once you get a bunch of devices set up, it is time to organize them. This can be done using 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 (icon in the middle). +Once you have a bunch of devices set up, it is time to organize them. This can be done using 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 (icon in the middle). ```yaml # Example configuration.yaml entry @@ -70,11 +70,13 @@ group: - media_player.nexus_player ``` +For more details please check the [Group](https://home-assistant.io/components/group/) page. + ### {% linkable_title Customizing devices and services %} -By default, all of your devices will be visible and have a default icon determined by their domain. You may find it desireable to customize the look and feel of your front page by altering some of these parameters. This can be done by adding the following config to the `homeassistant:` section. +By default, all of your devices will be visible and have a default icon determined by their domain. You may find it desireable to customize the look and feel of your front page by altering some of these parameters. This can be done by adding the following configuration to the `homeassistant:` section. -Entity_pictures, badges, device_tracker pictures, etc can either be a URL or `/local/file.jpg`, which points to directory `www` in the HASS configuration directory. +`entity_pictures`, badges, `device_tracker` pictures, etc. can either be a URL or `/local/file.jpg`, which points to directory `www` in the HASS configuration directory. ```yaml # Example configuration.yaml entry diff --git a/source/getting-started/index.markdown b/source/getting-started/index.markdown index 3e3951ef5ce..d8d95d3c10c 100644 --- a/source/getting-started/index.markdown +++ b/source/getting-started/index.markdown @@ -13,12 +13,14 @@ footer: true - - - + + + + +
    -Installing and running Home Assistant on your local machine is easy. Make sure you have [Python 3.4](https://www.python.org/downloads/) installed and execute the following code in a console: +Installing and running Home Assistant on your local machine is easy. Make sure you have [Python 3.4 or higher](https://www.python.org/downloads/) installed and execute the following code in a console: ```bash $ pip3 install homeassistant @@ -28,7 +30,14 @@ $ hass --open-ui Running these commands will: - Install Home Assistant - - Launch Home Assistant and serve web interface on [http://localhost:8123](http://localhost:8123) + - Launch Home Assistant and serve the web interface on [http://localhost:8123](http://localhost:8123) + + +If you prefer to watch a video tutorial, [tktino](https://github.com/tktino) has made some great ones. + + - [Windows 10](https://www.youtube.com/watch?v=X27eVvuqwnY) + - [Mac OS X](https://www.youtube.com/watch?v=hej6ipN86ls) + - [Ubuntu 14.04](https://www.youtube.com/watch?v=SXaAG1lGNH0)
    @@ -41,7 +50,7 @@ Installation with Docker is straightforward. Adjust the following command so tha $ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host balloob/home-assistant ``` -This will launch Home Assistant and serve its web interface from port 8123 on your Docker host. +This will launch Home Assistant and serve the web interface from port 8123 on your Docker host.

    When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace `-v /etc/localtime:/etc/localtime:ro` with `-e "TZ=America/Los_Angeles"` (replacing America/Los_Angeles with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones)) @@ -64,9 +73,205 @@ $ hass Running these commands will: - Install Home Assistant - - Launch Home Assistant and serve web interface on [http://localhost:8123](http://localhost:8123) + - Launch Home Assistant and serve the web interface on [http://localhost:8123](http://localhost:8123) + +There is also a [video tutorial](https://www.youtube.com/watch?v=GjzOXkPb7XE) created by [brusc](https://github.com/brusc). +

    + +
    + +The following configuration has been tested on Synology 415+ running DSM 5.2-5644 Update 3. + +Running these commands will: + + - Install Home Assistant + - Enable Home Assistant to be launched on [http://localhost:8123](http://localhost:8123) + +Using the Synology webadmin: + + - Install python3 using the Synology package centre + - Create homeassistant user and add to the "users" group + +SSH onto your synology & login as admin or root + +Check the path to python3 (assumed to be /usr/local/python3/bin) + +```bash +$ cd /usr/local/python3/bin +``` + +Use PIP to install Homeassistant package + +```bash +$ pip3 install homeassistant +``` + +Create homeassistant config directory & switch to it + +```bash +$ mkdir /volume1/homeassistant +$ cd /volume1/homeassistant +``` + +Create hass-daemon file using the following code (edit the variables in uppercase if necessary) + +```bash +#!/bin/sh + +# Package +PACKAGE="homeassistant" +DNAME="Home Assistant" + +# Others +USER="homeassistant" +PYTHON_DIR="/usr/local/python3/bin" +PYTHON="$PYTHON_DIR/python3" +HASS="$PYTHON_DIR/hass" +INSTALL_DIR="/volume1/homeassistant" +PID_FILE="$INSTALL_DIR/home-assistant.pid" +FLAGS="-v --config $INSTALL_DIR --pid-file $PID_FILE --daemon" +REDIRECT="> $INSTALL_DIR/home-assistant.log 2>&1" + +start_daemon () +{ + su ${USER} -s /bin/sh -c "$PYTHON $HASS $FLAGS $REDIRECT;" +} + +stop_daemon () +{ + kill `cat ${PID_FILE}` + wait_for_status 1 20 || kill -9 `cat ${PID_FILE}` + rm -f ${PID_FILE} +} + +daemon_status () +{ + if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then + return + fi + rm -f ${PID_FILE} + return 1 +} + +wait_for_status () +{ + counter=$2 + while [ ${counter} -gt 0 ]; do + daemon_status + [ $? -eq $1 ] && return + let counter=counter-1 + sleep 1 + done + return 1 +} + +case $1 in + start) + if daemon_status; then + echo ${DNAME} is already running + exit 0 + else + echo Starting ${DNAME} ... + start_daemon + exit $? + fi + ;; + stop) + if daemon_status; then + echo Stopping ${DNAME} ... + stop_daemon + exit $? + else + echo ${DNAME} is not running + exit 0 + fi + ;; + restart) + if daemon_status; then + echo Stopping ${DNAME} ... + stop_daemon + echo Starting ${DNAME} ... + start_daemon + exit $? + else + echo ${DNAME} is not running + echo Starting ${DNAME} ... + start_daemon + exit $? + fi + ;; + status) + if daemon_status; then + echo ${DNAME} is running + exit 0 + else + echo ${DNAME} is not running + exit 1 + fi + ;; + log) + echo ${LOG_FILE} + exit 0 + ;; + *) + exit 1 + ;; +esac + +``` + +Create links to python folders to make things easier in the future: + +```bash +$ ln -s /usr/local/python3/bin python3 +$ ln -s /usr/local/python3/lib/python3.4/site-packages/homeassistant +``` + +Set the owner and permissions on your config folder + +```bash +$ chown -r homeassistant:users /volume1/homeassistant +$ chmod -r 660 /volume1/homeassistant +``` + +Make the daemon file executable: + +```bash +$ chmod -r 777 /volume1/homeassistant/hass-daemon +``` + +Copy your configuration.yaml file into the config folder +That's it... you're all set to go + +Here are some useful commands: + +- Start Home Assistant: + +```bash +$ sh hass-daemon start +``` + +- Stop Home Assistant: + +```bash +$ sh hass-daemon stop +``` + +- Restart Home Assistant: + +```bash +$ sh hass-daemon restart +``` + +- Upgrade Home Assistant:: + +```bash +$ python3/pip3 install --upgrade homeassistant +``` + +
    ### {% linkable_title Troubleshooting %} @@ -77,14 +282,18 @@ For additional help, in addition to this site, there are four sources: - [Forum](https://automic.us/forum/) - [Gitter Chatroom](https://gitter.im/balloob/home-assistant) for general Home Assistant discussions and questions. - - [Development Mailing List](https://groups.google.com/forum/#!forum/home-assistant-dev) for development related questions and discussing new features. - [GitHub Page](https://github.com/balloob/home-assistant/issues) for issue reporting. -### What's next +### {% linkable_title Updating %} + +To update Home Assistant to the latest release run: `pip3 install --upgrade homeassistant` + +You have to restart Home Assistant (`hass` itself or with the help of the autostarting daemon if you use any) for the changes to take effect. + +### {% linkable_title What's next %} + If you want to have Home Assistant start on boot, autostart instructions can be found [here](/getting-started/autostart/). To see what Home Assistant can do, launch demo mode: `hass --demo-mode` or visit the [demo page](/demo). -To update Home Assistant to the latest release run: `pip3 install --upgrade homeassistant` - ### [Next step: Configuring Home Assistant »](/getting-started/configuration/) diff --git a/source/getting-started/presence-detection.markdown b/source/getting-started/presence-detection.markdown index c6b8f3ef805..edb2093da74 100644 --- a/source/getting-started/presence-detection.markdown +++ b/source/getting-started/presence-detection.markdown @@ -16,7 +16,7 @@ We care about privacy. Collected data is only stored in your instance of Presence detection detects if people are home, an important input for automation. The most important piece of information is to know if anyone is home. But knowing who is home or where they are will open a whole range of other automation options: - Send me a notification when my child arrives at school - - Turn on AC when I leave work + - Turn on the AC when I leave work

    @@ -27,7 +27,7 @@ Screenshot of Home Assistant showing a school, work and home zone and two people The device tracker component offers presence detection for Home Assistant. It supports two different methods for presence detection: scan for connected devices on the local network and connect to third party service. -Scanning for connected devices is easy to setup. See the instructions for our [supported routers][routers] or [scan the network using nmap][nmap]. This approach does have its limitations. It will only be able to detect if a device is home. It also struggles with iPhones because they disconnect from the WiFi if idle, marking them as not home while they are not. +Scanning for connected devices is easy to setup. See the instructions for our [supported routers][routers] or [scan the network using nmap][nmap]. This approach does have its limitations however, it will only be able to detect if a device is home. It also struggles with iPhones because they disconnect from WiFi if idle, marking them as not home when they actually are. Home Assistant currently supports two third party services for presence detection: [OwnTracks][ha-owntracks] and [Locative][ha-locative]. OwnTracks is an app that you install on your iPhone or Android phone that allows you to push the location of your device to Home Assistant using an MQTT broker. An MQTT broker is an Internet of Things communication platform that you can [freely host yourself][mqtt-self] or get [a private instance for free in the cloud](/components/mqtt/#run-your-own). @@ -39,7 +39,7 @@ OwnTracks communicates directly with your MQTT broker, no data will pass through -Home Assistant will know about the location for your device if you are using OwnTracks. By [setting up zones][zone] you will be able to add names to locations of your devices. This way you can easily spot on the state page where the people in your house are and use it as [triggers][trigger] and [conditions][condition] for automation. +Home Assistant will know the location of your device if you are using OwnTracks. By [setting up zones][zone] you will be able to add names to the locations of your devices. This way you can easily spot on the state page where the people in your house are and use it as [triggers][trigger] and [conditions][condition] for automation. ### [Next step: Setting up automation »](/getting-started/automation/) diff --git a/source/getting-started/templating.html b/source/getting-started/templating.html new file mode 100644 index 00000000000..8fce0b291be --- /dev/null +++ b/source/getting-started/templating.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/source/getting-started/troubleshooting-configuration.markdown b/source/getting-started/troubleshooting-configuration.markdown index 3a4ca40fe36..43fd9234c04 100644 --- a/source/getting-started/troubleshooting-configuration.markdown +++ b/source/getting-started/troubleshooting-configuration.markdown @@ -46,7 +46,7 @@ sensor: state_topic: sensor2/topic ``` -Indentation is used to specify which objects are nested under one anohter. Getting the right indentation can be tricky if you're not using an editor with a fixed width font. Tabs are not allowed to be used for indentation. +Indentation is used to specify which objects are nested under one anohter. Getting the right indentation can be tricky if you're not using an editor with a fixed width font. Tabs are not allowed to be used for indentation. You can test your configuration using [online YAML parser](http://yaml-online-parser.appspot.com/) or [YAML Lint](http://www.yamllint.com/). - To learn more about the quirks of YAML, read [YAML IDIOSYNCRASIES](https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html) by SaltStack. - You can test your configuration using [this online YAML parser](http://yaml-online-parser.appspot.com/). @@ -55,31 +55,62 @@ Indentation is used to specify which objects are nested under one anohter. Getti When a component does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your component you are trying to set up. -**Problems with the configuration** -`configuration.yaml` does not allow multiple sections to have the same name. If you want a specific component to be loaded twice, append a number to the name. +#### {% linkable_title Problems with the configuration %} + +`configuration.yaml` does not allow multiple sections to have the same name. If you want a specific platform to be loaded twice, append a [number/string](/getting-started/devices/#style-2) to the name or use [this style](/getting-started/devices/#style-1). ```yaml sensor: platform: forecast - […] + [...] sensor 2: platform: bitcoin - […] + [...] ``` Another common problem is that a required configuration setting is missing. If this is the case, the component will report this to `home-assistant.log`. You can have a look at [the component page](/components/) for instructions how to setup the components. If you find any errors or want to expand the documentation, please [let us know](https://github.com/balloob/home-assistant.io/issues). -**Problems with dependencies** +#### {% linkable_title Problems with dependencies %} + Almost all components have external dependencies to communicate with your devices and services. Sometimes Home Assistant is unable to install the necessary dependencies. If this is the case, it should show up in `home-assistant.log`. First step is trying to restart Home Assistant and see if the problem persists. If it does, please [report it](https://github.com/balloob/home-assistant/issues) so we can investigate what is going on. -**Problems with components** +#### {% linkable_title Problems with components %} + It can happen that some components either do not work right away or stop working after Home Assistant has been running for a while. If this happens to you, please [report it](https://github.com/balloob/home-assistant/issues) so that we can have a look. +#### {% linkable_title Multiple files %} + +If you are using multiple files for your setup, make sure that the pointers are correct and the format of the files is valid. + +```yaml +light: !include devices/lights.yaml +sensor: !include devices/sensors.yaml +``` +Contents of `lights.yaml`: + +```yaml +- platform: hyperion + host: 192.168.1.98 + [...] +``` + +Contents of `sensors.yaml`: + +```yaml +- platform: mqtt + name: "Room Humidity" + state_topic: "room/humidity" +- platform: mqtt + name: "Door Motion" + state_topic: "door/motion" + [...] +``` +

    Whenever you report an issue, be aware that we are a group of volunteers that do not have access to every single device in the world nor unlimited time to fix every problem out there.

    diff --git a/source/getting-started/troubleshooting.markdown b/source/getting-started/troubleshooting.markdown index 35db4af8b14..4fd9c7b57aa 100644 --- a/source/getting-started/troubleshooting.markdown +++ b/source/getting-started/troubleshooting.markdown @@ -9,10 +9,10 @@ sharing: true footer: true --- -It can happen that you run into trouble while installing Home Assistant. This page is here to help -you figure out the most common problems. +It can happen that you run into trouble while installing Home Assistant. This page is here to help you figure out the most common problems. -**pip3: command not found** + +#### {% linkable_title pip3: command not found %} This utility should have been installed as part of the Python 3.4 installation. Check if Python 3.4 is installed by running `python3 --version`. If it is not installed, [download it here](https://www.python.org/getit/). If you are able to successfully run `python3 --version` but not `pip3`, run the following command instead to install Home Assistant: @@ -21,28 +21,28 @@ If you are able to successfully run `python3 --version` but not `pip3`, run the $ python3 -m pip install homeassistant ``` -**No module named pip** +#### {% linkable_title No module named pip %} [Pip](https://pip.pypa.io/en/stable/) should come bundled with the latest Python 3 but is ommitted by some distributions. If you are unable to run `python3 -m pip --version` you can install `pip` by [downloading the installer](https://bootstrap.pypa.io/get-pip.py) and run it with Python 3: ```bash $ python3 get-pip.py ``` -**distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both** +#### {% linkable_title distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both %} This is a known issue if you're on a Mac using Homebrew to install Python. Please follow [these instructions](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md#note-on-pip-install---user) to resolve it. -**CentOS and Python 3** +#### {% linkable_title CentOS and Python 3 %} To run Python 3.x on [CentOS](https://www.centos.org/) or RHEL, [Software Collections](https://www.softwarecollections.org/en/scls/rhscl/rh-python34/) needs to be activated. -**No access to the frontend** -In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host is very limited. This means that you can't access the Home Assistant Frontend that is running on a host outside of the host machine. Windows and OSX machines may also have issues with this. +#### {% linkable_title No access to the frontend %} +In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host is very limited. This means that you can't access the Home Assistant frontend that is running on a host outside of the host machine. Windows and OSX machines may also have issues with this. To fix this you will need to open your machine's firewall for TCP traffic over port 8123. The method for doing this will vary depending on your operating system and the firewall you have installed. Below are some suggestions to try. Google is your friend here. [Windows instructions](http://windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7) [Mac OSX instructions](https://support.apple.com/en-us/HT201642) -For firewalld systems (Fedora, RHEL, etc.): +For systems with **firewalld** (Fedora, CentOS/RHEL, etc.): ```bash $ sudo firewall-cmd --permanent --add-port=8123/tcp @@ -55,15 +55,15 @@ For UFW systems (Ubuntu, Debian, Raspbian, etc.): $ sudo ufw allow 8123/tcp ``` -For iptables systems (usually the default): +For `iptables` systems (was the default for older distributions): ```bash $ iptables -I INPUT -p tcp --dport 8123 -j ACCEPT $ iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere ``` -**Run the development version** -If you want to stay on top of the development of Home Assistant then you can upgrade to the dev branch. This can result in an unstable system, loss of data etc etc. +#### {% linkable_title Run the development version %} +If you want to stay on top of the development of Home Assistant then you can upgrade to the `dev` branch. This can result in an unstable system, loss of data, etc, etc. ```bash $ pip3 install --upgrade git+git://github.com/balloob/home-assistant.git@dev diff --git a/source/help/index.markdown b/source/help/index.markdown index e7c026bc4a4..6f578f97ff3 100644 --- a/source/help/index.markdown +++ b/source/help/index.markdown @@ -15,7 +15,6 @@ There are various ways to get in touch with the Home Assistant community. It doe - [Forum](https://automic.us/forum/) - [Gitter Chatroom](https://gitter.im/balloob/home-assistant) for general Home Assistant discussions and questions. - - [Development Mailing List](https://groups.google.com/forum/#!forum/home-assistant-dev) for development related questions and discussing new features. ### {% linkable_title Bugs, Feature requests, and alike %} @@ -27,8 +26,3 @@ Have you found an issue in your Home Assistant installation? Please report it in ### {% linkable_title Roadmap %} There is no explicit roadmap available but the public [tracker](https://www.pivotaltracker.com/n/projects/1250084) can give you some insight into what is going on. - -### {% linkable_title Commercial vendors %} - -If you are a commercial vendor and would like to get your product integrated into Home Assistant, please submit a [Pull request](https://github.com/balloob/home-assistant/pulls) or get in touch with us. - diff --git a/source/help/trivia.markdown b/source/help/trivia.markdown index 850afc8bcc3..0fdd107d19a 100644 --- a/source/help/trivia.markdown +++ b/source/help/trivia.markdown @@ -53,6 +53,12 @@ The numbers below only covers the [main git repository](https://github.com/ballo More details and statistics can be found on [Github](https://github.com/balloob/home-assistant/graphs/contributors). +[RocketGraph](https://rocketgraph.com) reports shows commit stats for the last 90 days and a neat visual calendar for the current calendar year. + +- [home-assistant](https://rocketgraph.com/s/O163F6yWdgR) +- [home-assistant-polymer](https://rocketgraph.com/s/AfvsRKE_WfB) +- [home-assistant.io](https://rocketgraph.com/s/PvCS9rv7ODL) + ### {% linkable_title First commit %} The first commit in `git` was made on Sep 17, 2013 by [Paulus Schoutsen](https://github.com/balloob). diff --git a/source/images/blog/2016-01-release-12/social.png b/source/images/blog/2016-01-release-12/social.png new file mode 100644 index 00000000000..e13e946a35d Binary files /dev/null and b/source/images/blog/2016-01-release-12/social.png differ diff --git a/source/images/blog/2016-01-release-12/views.png b/source/images/blog/2016-01-release-12/views.png new file mode 100644 index 00000000000..08d85d76b0f Binary files /dev/null and b/source/images/blog/2016-01-release-12/views.png differ diff --git a/source/images/blog/2016-02-classifying-internet-of-things/social.png b/source/images/blog/2016-02-classifying-internet-of-things/social.png new file mode 100644 index 00000000000..80f60a2e760 Binary files /dev/null and b/source/images/blog/2016-02-classifying-internet-of-things/social.png differ diff --git a/source/images/blog/2016-02-community-highlights/garfield-nfc.png b/source/images/blog/2016-02-community-highlights/garfield-nfc.png new file mode 100644 index 00000000000..c9ecb61c54b Binary files /dev/null and b/source/images/blog/2016-02-community-highlights/garfield-nfc.png differ diff --git a/source/images/blog/2016-02-community-highlights/part-of-the-thing.png b/source/images/blog/2016-02-community-highlights/part-of-the-thing.png new file mode 100644 index 00000000000..d480f4a8b66 Binary files /dev/null and b/source/images/blog/2016-02-community-highlights/part-of-the-thing.png differ diff --git a/source/images/blog/2016-02-release-13/input_select__input_boolean__weblink.png b/source/images/blog/2016-02-release-13/input_select__input_boolean__weblink.png new file mode 100644 index 00000000000..1aeab11ee45 Binary files /dev/null and b/source/images/blog/2016-02-release-13/input_select__input_boolean__weblink.png differ diff --git a/source/images/blog/2016-02-release-13/social-img.png b/source/images/blog/2016-02-release-13/social-img.png new file mode 100644 index 00000000000..2b92be9539c Binary files /dev/null and b/source/images/blog/2016-02-release-13/social-img.png differ diff --git a/source/images/blog/2016-02-release-14/screenshot-webcam.png b/source/images/blog/2016-02-release-14/screenshot-webcam.png new file mode 100644 index 00000000000..2d596ded3cc Binary files /dev/null and b/source/images/blog/2016-02-release-14/screenshot-webcam.png differ diff --git a/source/images/blog/2016-02-release-14/social.png b/source/images/blog/2016-02-release-14/social.png new file mode 100644 index 00000000000..35f97e22099 Binary files /dev/null and b/source/images/blog/2016-02-release-14/social.png differ diff --git a/source/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png b/source/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png new file mode 100644 index 00000000000..4e0d2b970de Binary files /dev/null and b/source/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png differ diff --git a/source/images/blog/2016-02-smartthings/social.png b/source/images/blog/2016-02-smartthings/social.png new file mode 100644 index 00000000000..783d4512778 Binary files /dev/null and b/source/images/blog/2016-02-smartthings/social.png differ diff --git a/source/images/blog/2016-02-smartthings/splash.png b/source/images/blog/2016-02-smartthings/splash.png new file mode 100644 index 00000000000..713452db894 Binary files /dev/null and b/source/images/blog/2016-02-smartthings/splash.png differ diff --git a/source/images/blog/2016-02-snapcast/diagram.png b/source/images/blog/2016-02-snapcast/diagram.png new file mode 100644 index 00000000000..fa894caae45 Binary files /dev/null and b/source/images/blog/2016-02-snapcast/diagram.png differ diff --git a/source/images/frontend/frontend-badges.png b/source/images/frontend/frontend-badges.png new file mode 100644 index 00000000000..90708bac74a Binary files /dev/null and b/source/images/frontend/frontend-badges.png differ diff --git a/source/images/frontend/frontend-cards1.png b/source/images/frontend/frontend-cards1.png new file mode 100644 index 00000000000..5b760fc9491 Binary files /dev/null and b/source/images/frontend/frontend-cards1.png differ diff --git a/source/images/screenshots/mqtt-notify.png b/source/images/screenshots/mqtt-notify.png new file mode 100644 index 00000000000..b3c3f815bd5 Binary files /dev/null and b/source/images/screenshots/mqtt-notify.png differ diff --git a/source/images/supported_brands/apcupsd.png b/source/images/supported_brands/apcupsd.png new file mode 100644 index 00000000000..67a763c77e2 Binary files /dev/null and b/source/images/supported_brands/apcupsd.png differ diff --git a/source/images/supported_brands/bloomsky.png b/source/images/supported_brands/bloomsky.png new file mode 100644 index 00000000000..3332684dd33 Binary files /dev/null and b/source/images/supported_brands/bloomsky.png differ diff --git a/source/images/supported_brands/bus_scs.png b/source/images/supported_brands/bus_scs.png new file mode 100644 index 00000000000..10adec16a76 Binary files /dev/null and b/source/images/supported_brands/bus_scs.png differ diff --git a/source/images/supported_brands/command_line.png b/source/images/supported_brands/command_line.png new file mode 100644 index 00000000000..9e7cd7173b9 Binary files /dev/null and b/source/images/supported_brands/command_line.png differ diff --git a/source/images/supported_brands/db.png b/source/images/supported_brands/db.png new file mode 100644 index 00000000000..58f5d1a9f29 Binary files /dev/null and b/source/images/supported_brands/db.png differ diff --git a/source/images/supported_brands/dlink.png b/source/images/supported_brands/dlink.png new file mode 100644 index 00000000000..ea5120da699 Binary files /dev/null and b/source/images/supported_brands/dlink.png differ diff --git a/source/images/supported_brands/google_voice.png b/source/images/supported_brands/google_voice.png new file mode 100644 index 00000000000..d279cd56169 Binary files /dev/null and b/source/images/supported_brands/google_voice.png differ diff --git a/source/images/supported_brands/hunter-douglas-powerview.png b/source/images/supported_brands/hunter-douglas-powerview.png new file mode 100644 index 00000000000..53fdc95027b Binary files /dev/null and b/source/images/supported_brands/hunter-douglas-powerview.png differ diff --git a/source/images/supported_brands/insteon.png b/source/images/supported_brands/insteon.png index d681450cb56..350885f316d 100644 Binary files a/source/images/supported_brands/insteon.png and b/source/images/supported_brands/insteon.png differ diff --git a/source/images/supported_brands/lifx.png b/source/images/supported_brands/lifx.png new file mode 100644 index 00000000000..d6175dbf987 Binary files /dev/null and b/source/images/supported_brands/lifx.png differ diff --git a/source/images/supported_brands/networx.png b/source/images/supported_brands/networx.png new file mode 100644 index 00000000000..560e4c96062 Binary files /dev/null and b/source/images/supported_brands/networx.png differ diff --git a/source/images/supported_brands/neurio.png b/source/images/supported_brands/neurio.png new file mode 100644 index 00000000000..5531c7eee42 Binary files /dev/null and b/source/images/supported_brands/neurio.png differ diff --git a/source/images/supported_brands/samsung.png b/source/images/supported_brands/samsung.png new file mode 100644 index 00000000000..fe36a9500b0 Binary files /dev/null and b/source/images/supported_brands/samsung.png differ diff --git a/source/images/supported_brands/sendgrid.png b/source/images/supported_brands/sendgrid.png new file mode 100644 index 00000000000..49a379ae5b8 Binary files /dev/null and b/source/images/supported_brands/sendgrid.png differ diff --git a/source/images/supported_brands/smartthings.png b/source/images/supported_brands/smartthings.png new file mode 100644 index 00000000000..b036d3bc496 Binary files /dev/null and b/source/images/supported_brands/smartthings.png differ diff --git a/source/images/supported_brands/speedtest.png b/source/images/supported_brands/speedtest.png new file mode 100644 index 00000000000..adc57126b7d Binary files /dev/null and b/source/images/supported_brands/speedtest.png differ diff --git a/source/images/supported_brands/splunk.png b/source/images/supported_brands/splunk.png new file mode 100644 index 00000000000..062ae1503ee Binary files /dev/null and b/source/images/supported_brands/splunk.png differ diff --git a/source/images/supported_brands/steam.png b/source/images/supported_brands/steam.png new file mode 100644 index 00000000000..7b3750b85b1 Binary files /dev/null and b/source/images/supported_brands/steam.png differ diff --git a/source/images/supported_brands/twitter.png b/source/images/supported_brands/twitter.png new file mode 100644 index 00000000000..c9b89357977 Binary files /dev/null and b/source/images/supported_brands/twitter.png differ diff --git a/source/images/supported_brands/ubiquiti.png b/source/images/supported_brands/ubiquiti.png new file mode 100644 index 00000000000..363b4a617ae Binary files /dev/null and b/source/images/supported_brands/ubiquiti.png differ diff --git a/source/images/supported_brands/zigbee.png b/source/images/supported_brands/zigbee.png new file mode 100644 index 00000000000..444407c349e Binary files /dev/null and b/source/images/supported_brands/zigbee.png differ diff --git a/source/index.html b/source/index.html index b79b7657b80..e269f78d9c4 100644 --- a/source/index.html +++ b/source/index.html @@ -6,7 +6,9 @@ show_title: false sidebar: false hero_unit: true is_homepage: true +hide_github_edit: true description: Open-source home automation platform running on Python 3. Track and control all devices at home and automate control. Installation in less than a minute. +hide_github_edit: true ---
    diff --git a/source/static/mdi-demo.html b/source/static/mdi-demo.html index 42212a3a301..95a96f76758 100644 --- a/source/static/mdi-demo.html +++ b/source/static/mdi-demo.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/topics/index.markdown b/source/topics/index.markdown new file mode 100644 index 00000000000..421b3215041 --- /dev/null +++ b/source/topics/index.markdown @@ -0,0 +1,20 @@ +--- +layout: page +title: "Advanced Topics" +description: "Documentation about the more advanced features in Home Assistant." +date: 2016-03-12 12:00 -0800 +sidebar: false +comments: false +sharing: true +footer: true +regenerate: true +hide_github_edit: true +--- + +Home Assistant is built from many small building blocks that together offer a powerful and customizable system. This page is a collection of the more advanced topics. + +{% assign topics = site.topics | sort: 'title' %} + +{% for topic in topics %} +* [{{topic.title}}]({{topic.url}}) +{% endfor %}