mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 10:17:23 +00:00
Merge remote-tracking branch 'home-assistant/next' into next
This commit is contained in:
commit
5268be6c29
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -3,3 +3,9 @@
|
||||
|
||||
**Pull request in [home-assistant](https://github.com/home-assistant/home-assistant) (if applicable):** home-assistant/home-assistant#<home-assistant PR number goes here>
|
||||
|
||||
## Checklist:
|
||||
|
||||
- [ ] Branch: Fixes, changes and adjustments should be created against `current`. New documentation for platforms/components and features should go to `next`.
|
||||
- [ ] The documentation follow the [standards][standards].
|
||||
|
||||
[standards]: https://home-assistant.io/developers/documentation/standards/
|
||||
|
11
.project
Normal file
11
.project
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>home-assistant.github.io</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -1 +1 @@
|
||||
2.3.1
|
||||
2.4.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
language: ruby
|
||||
sudo: false
|
||||
cache: bundler
|
||||
script: bundle exec rake generate
|
||||
script: travis_wait bundle exec rake generate
|
||||
after_success:
|
||||
- '[ "${TRAVIS_BRANCH}" = "current" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && bundle exec rake deploy || false'
|
||||
|
10
Gemfile
10
Gemfile
@ -3,18 +3,9 @@ source "https://rubygems.org"
|
||||
group :development do
|
||||
gem 'rake', '~> 10.0'
|
||||
gem 'jekyll', '~> 3.0'
|
||||
gem 'pygments.rb', '~> 0.6.3'
|
||||
gem 'rdiscount', '~> 2.0'
|
||||
gem 'RedCloth', '~> 4.2'
|
||||
gem 'haml', '~> 4.0'
|
||||
gem 'compass', '~> 0.12'
|
||||
gem 'sass-globbing', '~> 1.0'
|
||||
gem 'rubypants', '~> 0.2'
|
||||
gem 'rb-fsevent', '~> 0.9'
|
||||
gem 'stringex', '~> 1.4'
|
||||
gem 'execjs'
|
||||
gem 'therubyracer', :platforms => :ruby
|
||||
gem 'coderay'
|
||||
gem 'pry'
|
||||
end
|
||||
|
||||
@ -24,7 +15,6 @@ group :jekyll_plugins do
|
||||
gem 'jekyll-sitemap'
|
||||
gem 'jekyll-time-to-read'
|
||||
gem 'octopress', '~> 3.0'
|
||||
gem 'octopress-filters'
|
||||
gem 'octopress-include-tag'
|
||||
end
|
||||
|
||||
|
75
Gemfile.lock
75
Gemfile.lock
@ -1,45 +1,42 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
RedCloth (4.3.2)
|
||||
addressable (2.4.0)
|
||||
chunky_png (1.3.6)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
chunky_png (1.3.8)
|
||||
coderay (1.1.1)
|
||||
colorator (1.1.0)
|
||||
compass (0.12.7)
|
||||
chunky_png (~> 1.2)
|
||||
fssm (>= 0.2.7)
|
||||
sass (~> 3.2.19)
|
||||
execjs (2.7.0)
|
||||
ffi (1.9.14)
|
||||
ffi (1.9.18)
|
||||
forwardable-extended (2.6.0)
|
||||
fssm (0.2.10)
|
||||
haml (4.0.7)
|
||||
tilt
|
||||
jekyll (3.2.1)
|
||||
jekyll (3.5.2)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
jekyll-sass-converter (~> 1.0)
|
||||
jekyll-watch (~> 1.1)
|
||||
kramdown (~> 1.3)
|
||||
liquid (~> 3.0)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.3.3)
|
||||
pathutil (~> 0.9)
|
||||
rouge (~> 1.7)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-redirect-from (0.11.0)
|
||||
jekyll (>= 2.0)
|
||||
jekyll-redirect-from (0.12.1)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-sass-converter (1.3.0)
|
||||
sass (~> 3.2)
|
||||
jekyll-sitemap (0.11.0)
|
||||
addressable (~> 2.4.0)
|
||||
jekyll-sitemap (1.1.1)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-time-to-read (0.1.2)
|
||||
jekyll
|
||||
jekyll-watch (1.5.0)
|
||||
listen (~> 3.0, < 3.1)
|
||||
kramdown (1.12.0)
|
||||
libv8 (3.16.14.15)
|
||||
liquid (3.0.6)
|
||||
kramdown (1.14.0)
|
||||
liquid (4.0.0)
|
||||
listen (3.0.8)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
@ -57,12 +54,7 @@ GEM
|
||||
colorator
|
||||
octopress-escape-code (2.1.1)
|
||||
jekyll (~> 3.0)
|
||||
octopress-filters (1.4.0)
|
||||
jekyll
|
||||
octopress-hooks (~> 2.0)
|
||||
rubypants-unicode
|
||||
titlecase
|
||||
octopress-hooks (2.6.1)
|
||||
octopress-hooks (2.6.2)
|
||||
jekyll (>= 2.0)
|
||||
octopress-include-tag (1.1.3)
|
||||
jekyll (>= 2.0)
|
||||
@ -71,71 +63,50 @@ GEM
|
||||
jekyll (>= 2.0)
|
||||
pathutil (0.14.0)
|
||||
forwardable-extended (~> 2.6)
|
||||
posix-spawn (0.3.11)
|
||||
pry (0.10.4)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
pygments.rb (0.6.3)
|
||||
posix-spawn (~> 0.3.6)
|
||||
yajl-ruby (~> 1.2.0)
|
||||
rack (1.6.4)
|
||||
public_suffix (3.0.0)
|
||||
rack (1.6.8)
|
||||
rack-protection (1.5.3)
|
||||
rack
|
||||
rake (10.5.0)
|
||||
rb-fsevent (0.9.7)
|
||||
rb-inotify (0.9.7)
|
||||
ffi (>= 0.5.0)
|
||||
rdiscount (2.2.0.1)
|
||||
redcarpet (3.3.4)
|
||||
ref (2.0.0)
|
||||
rb-fsevent (0.10.2)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
redcarpet (3.4.0)
|
||||
rouge (1.11.1)
|
||||
rubypants (0.5.0)
|
||||
rubypants-unicode (0.2.5)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.2.19)
|
||||
sass-globbing (1.1.5)
|
||||
sass (>= 3.1)
|
||||
sinatra (1.4.7)
|
||||
sinatra (1.4.8)
|
||||
rack (~> 1.5)
|
||||
rack-protection (~> 1.4)
|
||||
tilt (>= 1.3, < 3)
|
||||
slop (3.6.0)
|
||||
stringex (1.5.1)
|
||||
therubyracer (0.12.2)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
tilt (2.0.5)
|
||||
tilt (2.0.8)
|
||||
titlecase (0.1.1)
|
||||
yajl-ruby (1.2.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
RedCloth (~> 4.2)
|
||||
coderay
|
||||
compass (~> 0.12)
|
||||
execjs
|
||||
haml (~> 4.0)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-paginate
|
||||
jekyll-redirect-from
|
||||
jekyll-sitemap
|
||||
jekyll-time-to-read
|
||||
octopress (~> 3.0)
|
||||
octopress-filters
|
||||
octopress-include-tag
|
||||
pry
|
||||
pygments.rb (~> 0.6.3)
|
||||
rake (~> 10.0)
|
||||
rb-fsevent (~> 0.9)
|
||||
rdiscount (~> 2.0)
|
||||
rubypants (~> 0.2)
|
||||
sass-globbing (~> 1.0)
|
||||
sinatra (~> 1.4.2)
|
||||
stringex (~> 1.4)
|
||||
therubyracer
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.6
|
||||
1.15.4
|
||||
|
@ -1,20 +1,34 @@
|
||||
[](https://gitter.im/home-assistant/website)
|
||||
[](https://discord.gg/CxqDrfU)
|
||||
[](https://travis-ci.org/home-assistant/home-assistant.github.io)
|
||||
[](http://www.krihelinator.xyz)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
# Home Assistant website
|
||||
# Home Assistant website
|
||||
|
||||
This is the source for the [Home-Assistant.io website](https://home-assistant.io).
|
||||
|
||||
## Setup
|
||||
|
||||
Setting up to contribute to documentation and the process for submitting pull requests is [explained here](https://home-assistant.io/developers/website/).
|
||||
Setting up to contribute to documentation and the process for submitting pull requests is [explained here](https://home-assistant.io/developers/documentation/).
|
||||
|
||||
## Site preview
|
||||
|
||||
In order to make the preview available on [http://127.0.0.1:4000](http://127.0.0.1:4000), use the command as follows:
|
||||
|
||||
```bash
|
||||
$ rake preview
|
||||
bundle exec rake preview
|
||||
```
|
||||
|
||||
## Speeding up site generation
|
||||
|
||||
Every release we post long changelogs to the website. This slows down generation of the website significantly! We include some tools to temporarily exclude the blog posts that you're not working on out of the way.
|
||||
|
||||
```bash
|
||||
bundle exec rake isolate[filename-of-blogpost]
|
||||
```
|
||||
|
||||
When you're done working on the site, run the following command to move the posts back again:
|
||||
|
||||
```bash
|
||||
bundle exec rake integrate
|
||||
```
|
||||
|
16
_config.yml
16
_config.yml
@ -35,8 +35,6 @@ category_dir: blog/categories
|
||||
markdown: kramdown
|
||||
timezone: UTC
|
||||
|
||||
# highlighter: coderay
|
||||
|
||||
kramdown:
|
||||
input: GFM
|
||||
auto_ids: false
|
||||
@ -48,10 +46,9 @@ kramdown:
|
||||
|
||||
highlighter: rouge
|
||||
|
||||
gems:
|
||||
plugins:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-time-to-read
|
||||
- octopress-filters
|
||||
- octopress-include-tag
|
||||
|
||||
paginate: 10 # Posts per page on the blog index
|
||||
@ -77,6 +74,8 @@ collections:
|
||||
output: true
|
||||
addons:
|
||||
output: true
|
||||
faq:
|
||||
output: true
|
||||
|
||||
# ----------------------- #
|
||||
# 3rd Party Settings #
|
||||
@ -140,13 +139,12 @@ social:
|
||||
|
||||
# Home Assistant release details
|
||||
current_major_version: 0
|
||||
current_minor_version: 46
|
||||
current_patch_version: 1
|
||||
date_released: 2017-06-09
|
||||
current_minor_version: 57
|
||||
current_patch_version: 0
|
||||
date_released: 2017-11-04
|
||||
|
||||
# Either # or the anchor link to latest release notes in the blog post.
|
||||
# Must be prefixed with a # and have double quotes around it.
|
||||
# Major release:
|
||||
patch_version_notes: "#release-0461---june-9"
|
||||
patch_version_notes: ""
|
||||
# Minor release (Example #release-0431---april-25):
|
||||
|
||||
|
114
plugins/configuration.rb
Normal file
114
plugins/configuration.rb
Normal file
@ -0,0 +1,114 @@
|
||||
module Jekyll
|
||||
class ConfigurationBlock < Liquid::Block
|
||||
TYPE_LINKS = {
|
||||
'action' => '/docs/scripts/',
|
||||
'device_class' => '/components/%{component}/#device_class',
|
||||
'template' => '/docs/configuration/templating/',
|
||||
}
|
||||
|
||||
def initialize(tag_name, text, tokens)
|
||||
super
|
||||
@component, @platform = text.strip.split('.', 2)
|
||||
end
|
||||
|
||||
def slug(key)
|
||||
key.downcase.strip.gsub(' ', '-').gsub(/[^\w\-]/, '')
|
||||
end
|
||||
|
||||
def type_class(type)
|
||||
((type.is_a? Array) ? type.join(' ') : type).downcase
|
||||
end
|
||||
|
||||
def type_link(type, component: nil)
|
||||
if type.include? ','
|
||||
type = type.split(',')
|
||||
end
|
||||
|
||||
if type.is_a? Array
|
||||
return (type.map { |t| type_link(t, component: component) }).join(' | ')
|
||||
end
|
||||
|
||||
type.strip!
|
||||
if TYPE_LINKS.include? type.downcase
|
||||
url = TYPE_LINKS[type.downcase] % {component: component}
|
||||
"[%s](%s)" % [type, url]
|
||||
else
|
||||
type
|
||||
end
|
||||
end
|
||||
|
||||
def required_value(value)
|
||||
if value === true
|
||||
"Required"
|
||||
elsif value === false
|
||||
"Optional"
|
||||
else
|
||||
value.strip.titlecase
|
||||
end
|
||||
end
|
||||
|
||||
def render_config_vars(vars:, component:, platform:, classes: nil)
|
||||
result = Array.new
|
||||
result << "<dl class='#{classes}'>"
|
||||
|
||||
result << vars.map do |key, attr|
|
||||
markup = Array.new
|
||||
markup << "<dt><a class='title-link' name='#{slug(key)}' href='\##{slug(key)}'></a> #{key}</dt>"
|
||||
markup << "<dd>"
|
||||
markup << "<p class='desc'>"
|
||||
if attr.key? 'type'
|
||||
markup << "<span class='type'>(<span class='#{type_class(attr['type'])}'>"
|
||||
markup << "#{type_link(attr['type'], component: component)}</span>)</span>"
|
||||
end
|
||||
if attr.key? 'required'
|
||||
markup << "<span class='required'>(#{required_value(attr['required'])})</span>"
|
||||
end
|
||||
if attr.key? 'description'
|
||||
markup << "<span class='description'>#{attr['description']}</span>"
|
||||
end
|
||||
markup << "</p>"
|
||||
if attr.key? 'default'
|
||||
markup << "<p class='default'>Default value: #{attr['default']}</p>"
|
||||
end
|
||||
markup << "</dd>"
|
||||
|
||||
# Check for nested configuration variables
|
||||
if attr.key? 'keys'
|
||||
markup << "<dd>"
|
||||
markup << render_config_vars(
|
||||
vars: attr['keys'], component: component,
|
||||
platform: platform, classes: 'nested')
|
||||
markup << "</dd>"
|
||||
end
|
||||
|
||||
markup
|
||||
end
|
||||
|
||||
result << "</dl>"
|
||||
result.join
|
||||
end
|
||||
|
||||
def render(context)
|
||||
if @component.nil? and @platform.nil?
|
||||
page = context.environments.first['page']
|
||||
@component, @platform = page['slug'].split('.', 2)
|
||||
end
|
||||
|
||||
contents = super(context)
|
||||
|
||||
component = Liquid::Template.parse(@component).render context
|
||||
platform = Liquid::Template.parse(@platform).render context
|
||||
|
||||
vars = SafeYAML.load(contents)
|
||||
|
||||
<<~MARKUP
|
||||
<div class="config-vars">
|
||||
<h3><a class="title-link" name="configuration-variables" href="#configuration-variables"></a> Configuration Variables</h3>
|
||||
#{render_config_vars(vars: vars, component: component, platform: platform)}
|
||||
</div>
|
||||
MARKUP
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('configuration', Jekyll::ConfigurationBlock)
|
76
plugins/filters.rb
Normal file
76
plugins/filters.rb
Normal file
@ -0,0 +1,76 @@
|
||||
module Jekyll
|
||||
module AssetFilter
|
||||
# Octopress filters
|
||||
# Copyright (c) 2014 Brandon Mathis
|
||||
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
|
||||
def site_url
|
||||
'https://home-assistant.io'
|
||||
end
|
||||
|
||||
# Prepend a url with the full site url
|
||||
#
|
||||
# input - a url
|
||||
#
|
||||
# Returns input with all urls expanded to include the full site url
|
||||
# e.g. /images/awesome.gif => http://example.com/images/awesome.gif
|
||||
#
|
||||
def full_url(input)
|
||||
expand_url(input, site_url)
|
||||
end
|
||||
|
||||
# Prepends input with a url fragment
|
||||
#
|
||||
# input - An absolute url, e.g. /images/awesome.gif
|
||||
# url - The fragment to prepend the input, e.g. /blog
|
||||
#
|
||||
# Returns the modified url, e.g /blog
|
||||
#
|
||||
def expand_url(input, url=nil)
|
||||
url ||= root
|
||||
|
||||
url = if input.start_with?("http", url)
|
||||
input
|
||||
else
|
||||
File.join(url, input)
|
||||
end
|
||||
|
||||
smart_slash(url)
|
||||
end
|
||||
|
||||
# Ensure a trailing slash if a url ends with a directory
|
||||
def smart_slash(input)
|
||||
if !(input =~ /\.\w+$/)
|
||||
input = File.join(input, '/')
|
||||
end
|
||||
input
|
||||
end
|
||||
|
||||
# Convert url input into a standard canonical url by expanding urls and
|
||||
# removing url fragments ending with `index.[ext]`
|
||||
def canonical_url(input)
|
||||
full_url(input).sub(/index\.\w+$/i, '')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_filter(Jekyll::AssetFilter)
|
@ -14,6 +14,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: $palm-end) {
|
||||
#components-page {
|
||||
.hass-option-cards {
|
||||
.option-card {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: $lap-end) {
|
||||
#components-page {
|
||||
.filter-button-group {
|
||||
@ -246,4 +256,4 @@
|
||||
transform:scale(0);
|
||||
opacity:0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,48 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
$primary-color: #049cdb;
|
||||
|
||||
.site-header {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: white;
|
||||
padding-top: 19px;
|
||||
padding-right: 15%;
|
||||
|
||||
.search {
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
border-bottom: 2px solid $primary-color;
|
||||
float: right;
|
||||
|
||||
.algolia-autocomplete {
|
||||
width: calc(100% - 64px);
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 0;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: $menu-collapse) {
|
||||
.search-container {
|
||||
z-index: 20;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.hero {
|
||||
background-color: #038FC7;
|
||||
padding-bottom: 0;
|
||||
@ -58,24 +101,42 @@
|
||||
}
|
||||
|
||||
.frontpage {
|
||||
.material-card {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.current-version {
|
||||
margin-bottom: 16px;
|
||||
|
||||
.release-date {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.recent-posts {
|
||||
margin-bottom: 16px;
|
||||
|
||||
.blog-date {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight-blog-post {
|
||||
font-size: 2.0rem;
|
||||
line-height: 1.15;
|
||||
padding: 15px;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
transition: background-color .5s;
|
||||
background-color: #038FC7;
|
||||
|
||||
&.large {
|
||||
font-size: 2.25rem;
|
||||
line-height: 1.33333;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: lighten(#038FC7, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.shirt-promo {
|
||||
display: block;
|
||||
padding-top: 30%;
|
||||
@ -120,6 +181,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
.seen-press {
|
||||
margin-top: 24px;
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
margin: 15px;
|
||||
width: 200px;
|
||||
max-width: 40%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://fortawesome.github.io/Font-Awesome/3.2.1/icons/
|
||||
@ -129,7 +201,8 @@ h2:hover a.title-link,
|
||||
h3:hover a.title-link,
|
||||
h4:hover a.title-link,
|
||||
h5:hover a.title-link,
|
||||
h6:hover a.title-link {
|
||||
h6:hover a.title-link,
|
||||
dt:hover a.title-link {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
@ -164,7 +237,7 @@ h6:hover a.title-link {
|
||||
}
|
||||
|
||||
.icon i {
|
||||
border: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,7 +286,7 @@ article.post, article.page, article.listing {
|
||||
li {
|
||||
margin-bottom: 10px;
|
||||
|
||||
& > p {
|
||||
& > p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@ -237,6 +310,13 @@ article.post, article.page, article.listing {
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
margin-top: 2em;
|
||||
|
||||
// Future re-design
|
||||
// margin: 1.5em 0 1rem;
|
||||
//
|
||||
// border: 0;
|
||||
// border-top: 1px solid $primary-color;
|
||||
// padding-top: 1.4rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@ -244,11 +324,17 @@ article.post, article.page, article.listing {
|
||||
letter-spacing: 0.125rem;
|
||||
font-size: 1.2rem;
|
||||
margin-top: 2em;
|
||||
|
||||
// Future re-design
|
||||
// margin: 2em 0 1rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.1rem;
|
||||
margin-top: 2em;
|
||||
|
||||
// Future re-design
|
||||
// margin: 1.5em 0 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@ -340,7 +426,8 @@ p.note {
|
||||
}
|
||||
|
||||
.edit-github {
|
||||
text-align: right;
|
||||
float: right;
|
||||
margin-left: 8px;
|
||||
margin-bottom: 8px;
|
||||
font-size: .8em;
|
||||
}
|
||||
@ -357,7 +444,7 @@ ul.sidebar-menu {
|
||||
}
|
||||
|
||||
a code {
|
||||
color: #049cdb;
|
||||
color: $primary-color;
|
||||
}
|
||||
|
||||
twitterwidget {
|
||||
@ -373,3 +460,48 @@ twitterwidget {
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// Configuration variables
|
||||
div.config-vars {
|
||||
// Future re-design
|
||||
// h3 {
|
||||
// border: 0;
|
||||
// border-top: 1px solid $primary-color;
|
||||
// padding-top: 1.4rem;
|
||||
// }
|
||||
|
||||
dl {
|
||||
margin-bottom: 1.5em;
|
||||
|
||||
&.nested {
|
||||
border-left: 1px dotted $primary-color;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0 0 0.5em 1em;
|
||||
|
||||
p.desc {
|
||||
margin: 0;
|
||||
|
||||
span.type,
|
||||
span.required {
|
||||
font-style: italic;
|
||||
|
||||
&::after {
|
||||
content: " "
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p.default {
|
||||
font-style: italic;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
39
sass/custom/_print.scss
Normal file
39
sass/custom/_print.scss
Normal file
@ -0,0 +1,39 @@
|
||||
@media print {
|
||||
|
||||
/* General Overrides */
|
||||
header div.grid__item nav {
|
||||
display: none;
|
||||
}
|
||||
aside#sidebar {
|
||||
display: none;
|
||||
}
|
||||
.grid__item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Components List */
|
||||
div.filter-button-group {
|
||||
display: none;
|
||||
}
|
||||
.hass-option-cards.show-items {
|
||||
display: block;
|
||||
}
|
||||
.hass-option-cards.show-items a.option-card {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
min-height: 80px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.hass-option-cards.show-items a.option-card .img-container {
|
||||
float: left;
|
||||
width: 33%;
|
||||
text-align: center;
|
||||
}
|
||||
.hass-option-cards.show-items a.option-card div.title {
|
||||
height: 1.5em;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
@ -180,7 +180,7 @@ stone, and you are encouranged to override and experiment with them.
|
||||
It is tempting to modify their vaules in the inuit.css submodule but this is
|
||||
**not** the correct method for modifying inuit.css, and in doing so you will
|
||||
prevent yourself from being able to update inuit.css’ core library. The correct
|
||||
proceedure is to redefine that variable in `_vars.scss` found in the inuit.css
|
||||
procedure is to redefine that variable in `_vars.scss` found in the inuit.css
|
||||
web template. Let’s take an example…
|
||||
|
||||
In inuit.css’ `_defaults.scss` we find the following:
|
||||
|
@ -81,17 +81,23 @@ header .grid {
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
|
||||
&.show-search {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.menu > li > a:hover, .menu > li > a:focus{
|
||||
background: $site-background;
|
||||
box-shadow: inset 0px 5px $navigation-color;
|
||||
color: $navigation-color;
|
||||
padding: 40px 12px 24px;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
.toggle{
|
||||
z-index: 20;
|
||||
.toggle{
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: $menu-collapse){
|
||||
|
@ -2,3 +2,4 @@
|
||||
@import 'custom/paulus';
|
||||
@import 'custom/component_page';
|
||||
@import 'custom/syntax';
|
||||
@import 'custom/print';
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Bluetooth BCM43xx"
|
||||
description: "Activate bluetooth for bcm43xx"
|
||||
description: "Activate the BCM43xx Bluetooth chipset on a Raspberry Pi 3."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -9,4 +9,6 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Start Bluetooth for BCM43xx chipset on startup. Like Raspberry Pi3
|
||||
Start this add-on to activate the BCM43xx Bluetooth chipset.
|
||||
|
||||
Supported platforms: Raspberry Pi 3.
|
||||
|
12
source/_addons/cec_scan.markdown
Normal file
12
source/_addons/cec_scan.markdown
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
layout: page
|
||||
title: "CEC Scanner"
|
||||
description: "Scan HDMI CEC devices."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Help you to discover the HDMI CEC address. Start the add-on and look into log to see all connected device on HDMI.
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Check Home Assistant configuration"
|
||||
description: "Check Home Assistant configuration against a new version"
|
||||
description: "Check your current Home Assistant configuration against a new version."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -9,7 +9,7 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
You can use this addon to check whether your configuration files are valid against the new version of Home Assistant before you actually update your Home Assistant. This will help you avoid errors due to breaking changes, resulting in smooth update.
|
||||
You can use this addon to check whether your configuration files are valid against the new version of Home Assistant before you actually update your Home Assistant installation. This will help you avoid errors due to breaking changes, resulting in an smooth update.
|
||||
|
||||
```json
|
||||
{
|
||||
|
76
source/_addons/configurator.markdown
Normal file
76
source/_addons/configurator.markdown
Normal file
@ -0,0 +1,76 @@
|
||||
---
|
||||
layout: page
|
||||
title: "HASS Configurator"
|
||||
description: "Browser-based configuration file editor for Home Assistant."
|
||||
date: 2017-09-25 14:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
featured: true
|
||||
og_image: /images/hassio/screenshots/addon-hass-configurator.png
|
||||
---
|
||||
|
||||
As long as a fully featured configuration GUI for Home Assistant is still under development, you can use this add-on to add a browser based file-editor to your Hass.IO installation. By default it will listen on port `3218` of the host Hass.IO is running on.
|
||||
|
||||
More information and a standalone version for regular Home Assistant installations can be found in the [GitHub repository][code].
|
||||
|
||||
[code]: https://github.com/danielperna84/hass-configurator
|
||||
|
||||
<p class='img'>
|
||||
<img src='/images/hassio/screenshots/addon-hass-configurator.png'>
|
||||
Screenshot of the HASS Configurator.
|
||||
</p>
|
||||
|
||||
### {% linkable_title Feature list %}
|
||||
|
||||
- Web-Based editor to modify your files with syntax highlighting.
|
||||
- Upload and download files.
|
||||
- Stage and commit changes in Git repositories, create and switch between branches, push to remotes.
|
||||
- Lists of available triggers, events, entities, conditions and services. Selected element gets inserted into the editor at the last cursor position.
|
||||
- Restart Home Assistant directly with the click of a button. Reloading groups, automations etc. can be done as well. An API-password is required.
|
||||
- SSL support.
|
||||
- Optional authentication and IP filtering for added security.
|
||||
- Direct links to Home Assistant documentation and icons.
|
||||
- Execute shell commands within the add-on container.
|
||||
- Editor settings are saved in your browser.
|
||||
|
||||
### {% linkable_title Add-on Configuration %}
|
||||
|
||||
```json
|
||||
{
|
||||
"username": "admin",
|
||||
"password": "secret",
|
||||
"certfile": "fullchain.pem",
|
||||
"keyfile": "privkey.pem",
|
||||
"ssl": false,
|
||||
"allowed_networks": ["192.168.0.0/16"],
|
||||
"banned_ips": ["8.8.8.8"],
|
||||
"ignore_pattern": ["__pycache__"]
|
||||
}
|
||||
```
|
||||
|
||||
- **username** (*Optional*): Set a username to access your configuration is protected.
|
||||
- **password** (*Required*): Set a password for access.
|
||||
- **ssl** (*Optional*): Enable or Disable SSL for the editor.
|
||||
- **allowed_networks** (*Optional*): Limit access to the configurator by adding allowed IP addresses / networks to the list.
|
||||
- **banned_ips** (*Optional*): List of statically banned IP addresses.
|
||||
- **ignore_pattern** (*Optional*): Files and folders to ignore in the UI.
|
||||
|
||||
### {% linkable_title Embedding into Home-Assistant %}
|
||||
|
||||
Using the Home Assistant component [panel_iframe](https://home-assistant.io/components/panel_iframe/) it is possible to embed the configurator directly into Home Assistant, allowing you to modify your configuration within the Home Assistant frontend.
|
||||
|
||||
An example configuration would look like this:
|
||||
|
||||
```yaml
|
||||
panel_iframe:
|
||||
configurator:
|
||||
title: Configurator
|
||||
icon: mdi:wrench
|
||||
url: http://hassio.local:3218
|
||||
```
|
||||
|
||||
<p class='note warning'>
|
||||
Be careful when setting up port forwarding to the configurator while embedding into Home Assistant. If you don't restrict access by requiring authentication and / or blocking based on client IP addresses, your configuration will be exposed to the internet!
|
||||
</p>
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "DHCP server"
|
||||
description: "A simple dhcp server"
|
||||
description: "A simple DHCP server."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -9,7 +9,7 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Create a simple DHCP server for your network and allow set fix ip for some devices.
|
||||
Create a simple DHCP server for your network and allow setting fixed IPs for devices.
|
||||
|
||||
```json
|
||||
{
|
||||
@ -47,7 +47,7 @@ Configuration variables:
|
||||
- **range_end** (*Required*): End address for dhcp leases.
|
||||
- **broadcast** (*Required*): Network broadcast address.
|
||||
- **gateway** (*Required*): A List of gateways.
|
||||
- **interface** (*Required*): Inteface on that will be listen.
|
||||
- **interface** (*Required*): Inteface on that will be listen. Normally is `eth0` for ethernet wired connection and `wlan0` for wireless connection.
|
||||
- **hosts** (*Optional*): A list of fixed IPs for devices.
|
||||
- **name** (*Required*): Name/hostname of your device.
|
||||
- **mac** (*Required*): Mac address of your device.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Dnsmasq"
|
||||
description: "A simple dns server with benefits."
|
||||
description: "A simple DNS server."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -9,10 +9,10 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Setup and manage a [Dnsmasq](http://thekelleys.org.uk/dnsmasq/doc.html) dns server. This allow your to manipulate some dns requests. I.e. that inside your network, your homeassistant domain will resolve with a internal address.
|
||||
Setup and manage a [Dnsmasq](http://thekelleys.org.uk/dnsmasq/doc.html) DNS server. This allows you to manipulate DNS requests. For example, you can have your Home Assistant domain resolve with an internal address inside your network.
|
||||
|
||||
<p class='note warning'>
|
||||
At the moment, it will not work with resinos!
|
||||
<p class='note info'>
|
||||
`interface` options are for resinos based installation. On other system you can set it to `""`, for listen on every interface.
|
||||
</p>
|
||||
|
||||
```json
|
||||
@ -24,6 +24,7 @@ At the moment, it will not work with resinos!
|
||||
"hosts": [
|
||||
{"host": "home.mydomain.io", "ip": "192.168.1.10"}
|
||||
],
|
||||
"interface": "eth1"
|
||||
}
|
||||
```
|
||||
|
||||
@ -32,3 +33,4 @@ Configuration variables:
|
||||
- **defaults** (*Required*): A list of dns server to forward default requests.
|
||||
- **forwards** (*Optional*): A list of domains that will forward to a specific server.
|
||||
- **hosts** (*Optional*): A list of hosts to resolve it static.
|
||||
- **interface** (*Optional*): If a interface is set, it listen only on this interface. Need to set for resinos. Normally is `eth0` for ethernet wired connection and `wlan0` for wireless connection.
|
||||
|
@ -1,20 +1,24 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Duck DNS"
|
||||
description: "Automatically update your Duck DNS IP address."
|
||||
title: "DuckDNS"
|
||||
description: "Automatically update your Duck DNS IP address with integrated HTTPS support via Let's Encrypt."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
featured: true
|
||||
---
|
||||
|
||||
[Duck DNS](https://duckdns.org/) is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice.
|
||||
[Duck DNS](https://duckdns.org/) is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice. This add-on includes support for Let's Encrypt and will automatically create and renew your certificates.
|
||||
|
||||
```json
|
||||
{
|
||||
"lets_encrypt": {
|
||||
"accept_terms": true
|
||||
},
|
||||
"token": "sdfj-2131023-dslfjsd-12321",
|
||||
"domains": ["my-first-accound.duckdns.org", "my-second-account.duckdns.org"]
|
||||
"domains": ["my-domain.duckdns.org"]
|
||||
}
|
||||
```
|
||||
|
||||
@ -23,3 +27,23 @@ Configuration variables:
|
||||
- **token** (*Required*): Your Duck DNS API key.
|
||||
- **domains** (*Required*): A list of domains to update DNS.
|
||||
- **seconds** (*Optional*): Seconds between updates to Duck DNS.
|
||||
- **lets_encrypt.accept_terms** (*Optional*): If you accept the [Let's Encrypt Subscriber Agreement][le], it will generate & update Let's Enrypt certificates for your DuckDNS domain.
|
||||
|
||||
[le]: https://letsencrypt.org/repository/
|
||||
|
||||
## {% linkable_title Home Assistant configuration %}
|
||||
|
||||
Use the following configuration in Home Assistant to use the generated certificate:
|
||||
|
||||
```yaml
|
||||
http:
|
||||
base_url: https://my-domain.duckdns.org:8123
|
||||
ssl_certificate: /ssl/fullchain.pem
|
||||
ssl_key: /ssl/privkey.pem
|
||||
```
|
||||
|
||||
If you use a other port as `8123` or a SSL proxy, change the port number.
|
||||
|
||||
## {% linkable_title Router configuration %}
|
||||
|
||||
You'll need to forward the port you listed in your configuration (8123 in the example above) on your router to your Home Assistant system. You can find guides on how to do this on [Port Forward](https://portforward.com/) - noting that you'll only need to forward the TCP port.
|
||||
|
47
source/_addons/git_pull.markdown
Normal file
47
source/_addons/git_pull.markdown
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: page
|
||||
title: "GIT pull"
|
||||
description: "Load and update configuration files for Home Assistant from a GIT repository."
|
||||
date: 2017-09-25 14:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Load and update configuration files for Home Assistant from a GIT repository.
|
||||
|
||||
```json
|
||||
{
|
||||
"repository": "https://example.com/my_configs",
|
||||
"auto_restart": false,
|
||||
"repeat": {
|
||||
"active": false,
|
||||
"interval": 300
|
||||
},
|
||||
"deployment_key": [
|
||||
"-----BEGIN RSA PRIVATE KEY-----",
|
||||
"MIIEowIBAAKCAQEAv3hUrCvqGZKpXQ5ofxTOuH6pYSOZDsCqPqmaGBdUzBFgauQM",
|
||||
"xDEcoODGHIsWd7t9meAFqUtKXndeiKjfP0MMKsttnDohL1kb9mRvHre4VUqMsT5F",
|
||||
"...",
|
||||
"i3RUtnIHxGi1NqknIY56Hwa3id2yk7cEzvQGAAko/t6PCbe20AfmSQczs7wDNtBD",
|
||||
"HgXRyIqIXHYk2+5w+N2eunURIBqCI9uWYK/r81TMR6V84R+XhtvM",
|
||||
"-----END RSA PRIVATE KEY-----"
|
||||
],
|
||||
"deployment_key_protocol": "rsa"
|
||||
}
|
||||
```
|
||||
|
||||
- **repository** (*Required*): GIT url to your repository.
|
||||
- **auto_restart** (*Optional*): Make a restart of Home-Assistant if the config have change and is valid.
|
||||
- **repeat/active** (*Optional*): Pull periodic for GIT updates.
|
||||
- **repeat/interval** (*Optional*): Pull all x seconds and look for changes.
|
||||
- **deployment_key** (*Optional*): A private SSH key that will be used for communication during git operations. This key is mandatory for ssh-accessed repositories, which are the ones with the following pattern: `<user>@<host>:<repository path>`.
|
||||
- **deployment_key_protocol** (*Optional*): The key protocol. Default is "rsa". Valid protocols are:
|
||||
|
||||
* **dsa**
|
||||
* **ecdsa**
|
||||
* **ed25519**
|
||||
* **rsa**
|
||||
|
||||
The protocol is typically known by the suffix of the private key --e.g., a key file named `id_rsa` will be a private key using "rsa" protocol.
|
80
source/_addons/google_assistant.markdown
Normal file
80
source/_addons/google_assistant.markdown
Normal file
@ -0,0 +1,80 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Google Assistant"
|
||||
description: "Enhance your Hass.io installation with Google Assistant."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
featured: true
|
||||
---
|
||||
|
||||
[Google Assistant][GoogleAssistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interact over [api.ai] with Home-Assistant. You can also use [Google Actions][GoogleActions] to extend its functionality.
|
||||
|
||||
To enable access to the Google Assistant API, do the following:
|
||||
|
||||
1. In the [Cloud Platform Console][project], go to the Projects page. Select an existing project or create a new project
|
||||
2. Open the project. In the top of the page search for Google Assistant API or use [this link][API] and enable it.
|
||||
3. Create an [OAuth Client ID][oauthclient], pick type "Other", click "Create" and download the JSON file by clicking the Download JSON button on the right side.
|
||||
|
||||
Now install and activate the [Samba] add-on so you can upload your credential file. Connect to the "share" Samba share and copy your credentials over. Name the file `google_assistant.json`.
|
||||
|
||||
Now it's time to start Google Assistant for the first time. When the Google Assistant add-on starts, it will output your audio devices in the "Logs" card. You might have to hit "refresh" to get the latest logs:
|
||||
|
||||
```text
|
||||
**** List of PLAYBACK Hardware Devices ****
|
||||
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
|
||||
Subdevices: 8/8
|
||||
Subdevice #0: subdevice #0
|
||||
Subdevice #1: subdevice #1
|
||||
Subdevice #2: subdevice #2
|
||||
Subdevice #3: subdevice #3
|
||||
Subdevice #4: subdevice #4
|
||||
Subdevice #5: subdevice #5
|
||||
Subdevice #6: subdevice #6
|
||||
Subdevice #7: subdevice #7
|
||||
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
|
||||
Subdevices: 1/1
|
||||
Subdevice #0: subdevice #0
|
||||
card 1: Microphone [Yeti Stereo Microphone], device 0: USB Audio [USB Audio]
|
||||
Subdevices: 1/1
|
||||
Subdevice #0: subdevice #0
|
||||
```
|
||||
|
||||
You need to use this information to point the add-on at the right speakers and microphone. The information describes different cards and devices. On a Raspberry Pi 3, card 0 - device 0 is the built-in headset port, card 0 - device 1 is the HDMI port. In the example above, the USB microphone showed up as card 1 - device 0.
|
||||
|
||||
Find the microphone and speakers that you want to use and note down their device and card number. We will need that to configure the add-on options `mic` (microphone to use) and `speaker` (speaker to use). The format for these options is `<card #>,<device #>`. Change the configuration options and click save.
|
||||
|
||||
The next step is to authenticate your Google account with Google Assistant. Start the add-on and click on the "OPEN WEB UI" button to start authentication.
|
||||
|
||||
### Add-On configuration
|
||||
|
||||
Configuration example that uses the USB microphone and use the built-in headset audio output on the Raspberry Pi. Note that card and device numbers can differ on your device.
|
||||
|
||||
```json
|
||||
{
|
||||
"mic": "1,0",
|
||||
"speaker": "0,0",
|
||||
"client_secrets": "google_assistant.json"
|
||||
}
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **mic**: This is the hardware address of your microphone. Look at the add-on output
|
||||
- **speaker**: This is the hardware address of your speakers. Look at the add-on output
|
||||
|
||||
### {% linkable_title Home Assistant configuration %}
|
||||
|
||||
Use the Home Assistant [api.ai component][comp] to integrate the add-on into Home Assistant.
|
||||
|
||||
|
||||
[GoogleAssistant]: https://assistant.google.com/
|
||||
[GoogleActions]: https://actions.google.com/
|
||||
[api.ai]: https://api.ai/
|
||||
[Samba]: /addons/samba/
|
||||
[comp]: /components/apiai/
|
||||
[project]: https://console.cloud.google.com/project
|
||||
[API]: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
|
||||
[oauthclient]: https://console.developers.google.com/apis/credentials/oauthclient
|
@ -7,16 +7,22 @@ sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
featured: false
|
||||
---
|
||||
|
||||
Setup and manage a [Let's Encrypt](https://letsencrypt.org/) certificate. This will create a certificate on the first run and renew it if the certificate is expiring in the next 30 days.
|
||||
<p class='note'>
|
||||
You should not use this if you are also using the [DuckDNS add-on]. The DuckDNS add-on has integrated Let's Encrypt support.
|
||||
</p>
|
||||
|
||||
Setup and manage a [Let's Encrypt](https://letsencrypt.org/) certificate. This will create a certificate on the first run and will auto-renew if the certificate is within 30 days of expiration.
|
||||
|
||||
<p class='note warning'>
|
||||
This add-on need port 80/443 to verify the certificate request, please stop all add-ons they use also this ports, otherwise you can not start this add-on.
|
||||
This add-on uses ports 80/443 to verify the certificate request. You will need to stop all other add-ons that also use these ports. If you don't need a port (like with https you don't need port 80) you can remove this from network config.
|
||||
</p>
|
||||
|
||||
```json
|
||||
{
|
||||
"challenge": "https",
|
||||
"email": "example@example.com",
|
||||
"domains": ["example.com", "mqtt.example.com", "hass.example.com"]
|
||||
}
|
||||
@ -24,6 +30,7 @@ This add-on need port 80/443 to verify the certificate request, please stop all
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **challenge** (*Optional*): Default it use 443 ('https') you can change it to 'http' for use port 80.
|
||||
- **email** (*Required*): Your email address for registration on Let's Encrypt.
|
||||
- **domains** (*Required*): A list of domains to create/renew the certificate.
|
||||
|
||||
@ -33,6 +40,11 @@ Use the following configuration in Home Assistant to use the generated certifica
|
||||
|
||||
```yaml
|
||||
http:
|
||||
base_url: https://my-domain.tld:8123
|
||||
ssl_certificate: /ssl/fullchain.pem
|
||||
ssl_key: /ssl/privkey.pem
|
||||
```
|
||||
|
||||
If you use a other port as `8123` or a SSL proxy, change the port number.
|
||||
|
||||
[DuckDNS add-on]: /addons/duckdns/
|
||||
|
55
source/_addons/mariadb.markdown
Normal file
55
source/_addons/mariadb.markdown
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
layout: page
|
||||
title: "MariaDB"
|
||||
description: "MariaDB Server is one of the most popular database servers in the world."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Set up a [mariadb](https://mariadb.org/) SQL server. It supports multiple databases, users and permission settings. If you want to only connect from inside home assistant use `core-mariadb` as the host address.
|
||||
|
||||
```json
|
||||
{
|
||||
"databases": ["homeassistant"],
|
||||
"logins": [
|
||||
{
|
||||
"username": "hass",
|
||||
"host": "homeassistant",
|
||||
"password": "securePassword"
|
||||
}
|
||||
],
|
||||
"rights": [
|
||||
{
|
||||
"username": "hass",
|
||||
"host": "homeassistant",
|
||||
"database": "homeassistant",
|
||||
"grant": "ALL PRIVILEGES ON"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **databases** (*Require*): Listen of databases.
|
||||
- **logins** (*Require*): Listen of logindata they will create or update.
|
||||
- **username** (*Require*): Username for login.
|
||||
- **host** (*Require*): Host for login, if you need a login with multibe hosts, use '%'.
|
||||
- **password** (*Require*): Password for login.
|
||||
- **rights** (*Require*): Listen of rights to be handle.
|
||||
- **username** (*Require*): Username for grant rights.
|
||||
- **host** (*Require*): Host is a part of username like above.
|
||||
- **database** (*Require*): Database name to grant this user rights to.
|
||||
- **grant** (*Require*): SQL grant part for access too.
|
||||
|
||||
## {% linkable_title Home Assistant configuration %}
|
||||
|
||||
Use the following configuration in Home Assistant to use the database above:
|
||||
|
||||
```yaml
|
||||
recorder:
|
||||
db_url: mysql://hass:securePassword@core-mariadb/homeassistant
|
||||
```
|
@ -7,9 +7,10 @@ sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
featured: true
|
||||
---
|
||||
|
||||
Set up a [mosquitto](https://mosquitto.org/) MQTT broker.
|
||||
Set up [Mosquitto](https://mosquitto.org/) as MQTT broker.
|
||||
|
||||
```json
|
||||
{
|
||||
@ -18,13 +19,32 @@ Set up a [mosquitto](https://mosquitto.org/) MQTT broker.
|
||||
"anonymous": true,
|
||||
"logins": [
|
||||
{"username": "testuser", "password": "mypw"}
|
||||
]
|
||||
],
|
||||
"customize": {
|
||||
"active": false,
|
||||
"folder": "mosquitto"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<p class='note'>
|
||||
Make sure you use logins and disable anonymous access if you want to secure the system.
|
||||
</p>
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **plain** (*Optional*): Listen to broker on port 1883 without SSL/TLS. Defaults to `true`.
|
||||
- **ssl** (*Optional*): Listen to broker on port 8883 with SSL/TLS. This requires certificates. Defaults to `false`.
|
||||
- **anonymous** (*Optional*): Allow anonymous connection. If *logins* is set, anonymous user can only read data. Defaults to `true`.
|
||||
- **logins** (*Optional*): A list of user that will be created with *username* and *password*.
|
||||
- **customize** (*Optional*): If you enable it, it reads additional configuration files (`*.conf`) from `/share/mosquitto`.
|
||||
|
||||
### {% linkable_title Home Assistant configuration %}
|
||||
|
||||
To use the Mosquitto as [broker](/docs/mqtt/broker/#run-your-own) add the following entry to the `configuration.yaml` file.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
mqtt:
|
||||
broker: core-mosquitto
|
||||
```
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Nginx SSL proxy"
|
||||
description: "Nginx HomeAssistant SSL proxy"
|
||||
title: "NGINX SSL proxy"
|
||||
description: "NGINX Home Assistant SSL proxy."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -9,8 +9,9 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Setup a SSL proxy with nginx and redirect port 80 to 443. Make sure you have generate certificate before you start this add-on.
|
||||
Setup a SSL proxy with NGINX and redirect port 80 to 443. Make sure you have generated a certificate before you start this add-on.
|
||||
|
||||
In the `http` section of the `configuration.yaml` file remove `ssl_certificate` and `ssl_key` and don't enter the port in the `base_url` to avoid a HTTP 502 error.
|
||||
|
||||
|
||||
```json
|
||||
@ -23,3 +24,6 @@ Configuration variables:
|
||||
|
||||
- **domain** (*Required*): Domain they will proxy run with it.
|
||||
|
||||
<p class='note'>
|
||||
It is possible to deactive port 80 if you need this for things like `emulate_hue`. Remove the host port from Network option of this add-on.
|
||||
</p>
|
||||
|
40
source/_addons/rpc_shutdown.markdown
Normal file
40
source/_addons/rpc_shutdown.markdown
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
layout: page
|
||||
title: "RPC Shutdown"
|
||||
description: "Simple way for remote windows shutdowns."
|
||||
date: 2017-09-25 14:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Allow to shutdown a Windows computer with a service call from Home Assistant.
|
||||
|
||||
```json
|
||||
{
|
||||
"computers": [
|
||||
{
|
||||
"alias": "test-pc",
|
||||
"address": "192.168.0.1",
|
||||
"credentials": "user%password"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- **computers** (*Required*): A list of computer object to shutdown from Home-Assistant.
|
||||
- **computers/alias** (*Required*): Set a alias for this record and that is the name for the input.
|
||||
- **computers/address** (*Required*): IP address or netbios name of the computer for shutdown.
|
||||
- **computers/credentials** (*Required*): Credentials for logging into computer. Use a `%` as delimiter of username and password.
|
||||
|
||||
## {% linkable_title Home Assistant %}
|
||||
|
||||
Use the following inside Home Assistant service call to use it:
|
||||
|
||||
```yaml
|
||||
service: hassio.addon_stdin
|
||||
data:
|
||||
addon: core_rpc_shutdown
|
||||
input: test-pc
|
||||
```
|
@ -7,28 +7,35 @@ sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
featured: true
|
||||
---
|
||||
|
||||
This allows you to set up a [Samba](https://samba.org/) server to access hass.io folders using Windows network shares.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "hassio",
|
||||
"workgroup": "WORKGROUP",
|
||||
"guest": true,
|
||||
"map_config": true,
|
||||
"map_addons": true,
|
||||
"map_ssl": false,
|
||||
"map": {
|
||||
"config": true,
|
||||
"addons": true,
|
||||
"share": true,
|
||||
"backup": true,
|
||||
"ssl": false,
|
||||
},
|
||||
"username": "",
|
||||
"password": ""
|
||||
"password": "",
|
||||
"interface": "eth0"
|
||||
}
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Optional*): default `hassio`. Set netbios name of hassio device.
|
||||
- **workgroup** (*Optional*): default `WORKGROUP`. Set network workgroup.
|
||||
- **guest** (*Optional*): Allow login without a username or password. Defaults to `true`.
|
||||
- **map_config** (*Optional*): Expose Home Assistant configuration folder. Defaults to `true`.
|
||||
- **map_addons** (*Optional*): Expose local custom addons folder. Defaults to `true`.
|
||||
- **map_ssl** (*Optional*): Expose SSL folder. Be careful with this option! Defaults to `false`.
|
||||
- **map** (*Optional*): Control which folder will be expose. `config` is for Home Assistant configuration folder. `addons` for local custom repositiory. `share` is a folder that can access from add-ons and Home Assistant too. `backup` for access to snapshot files. `ssl` for certificate storage, be careful with this option! Defaults all to `true`, except for `ssl`.
|
||||
- **username** (*Optional*): The username for logging in if guest login is not used.
|
||||
- **password** (*Optional*): Password for `username`. An empty password is not supported.
|
||||
- **interface** (*Optional*): Interface on that will start the share. Normally is `eth0` for ethernet wired connection and `wlan0` for wireless connection.
|
||||
|
76
source/_addons/snips.markdown
Normal file
76
source/_addons/snips.markdown
Normal file
@ -0,0 +1,76 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Snips.ai"
|
||||
description: "Enhance your Hass.io installation with a local voice assistant."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
[Snips.ai] is an AI-powered voice assistant that runs on the Raspberry Pi 3 and x86 platforms. It runs on-device and is Private by Design.
|
||||
|
||||
To get started, follow [their tutorial] to create an assistant and download the training data.
|
||||
|
||||
Now install and activate the [Samba] add-on so you can upload your training data. Connect to the "share" Samba share and copy your training data over. Name the file `assistant.zip`.
|
||||
|
||||
Now it's time to start Snips for the first time. When the Snips add-on starts, it will output your audio devices:
|
||||
|
||||
```text
|
||||
**** List of PLAYBACK Hardware Devices ****
|
||||
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
|
||||
Subdevices: 8/8
|
||||
Subdevice #0: subdevice #0
|
||||
Subdevice #1: subdevice #1
|
||||
Subdevice #2: subdevice #2
|
||||
Subdevice #3: subdevice #3
|
||||
Subdevice #4: subdevice #4
|
||||
Subdevice #5: subdevice #5
|
||||
Subdevice #6: subdevice #6
|
||||
Subdevice #7: subdevice #7
|
||||
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
|
||||
Subdevices: 1/1
|
||||
Subdevice #0: subdevice #0
|
||||
```
|
||||
|
||||
You need to use this information to point the add-on at the right speakers and microphone. The information describes different cards and devices. On a Raspberry Pi 3, card 0 - device 0 is the built-in headset port, card 0 - device 1 is the HDMI port. In the example above, the USB microphone showed up as card 1 - device 0.
|
||||
|
||||
Find the microphone and speakers that you want to use and note down their device and card number. We will need that to configure the add-on options `mic` (microphone to use) and `speaker` (speaker to use). The format for these options is `<card #>,<device #>`. Change the configuration options and click save.
|
||||
|
||||
Now start the add-on.
|
||||
|
||||
### Add-On configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"mic": "1,0",
|
||||
"speaker": "1,0",
|
||||
"assistant": "assistant.zip",
|
||||
"mqtt_bridge": {
|
||||
"active": true,
|
||||
"host": "172.17.0.1",
|
||||
"port": 1883,
|
||||
"user": "",
|
||||
"password": ""
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **mqtt_bridge** (*Optional*): Snips uses MQTT to communicate and defaults to their own broker. Use this config option to bridge their broker to your own.
|
||||
- **mic**: This is the hardware address of your microphone. Look at the Snips
|
||||
|
||||
### {% linkable_title Home Assistant configuration %}
|
||||
|
||||
Use the Home Assistant [Snips.ai component][comp] to integrate the add-on into Home Assistant.
|
||||
|
||||
```yaml
|
||||
snips:
|
||||
```
|
||||
|
||||
[Snips.ai]: https://snips.ai/
|
||||
[their tutorial]: https://github.com/snipsco/snips-platform-documentation/wiki/2.-Running-your-first-end-to-end-assistant
|
||||
[Samba]: /addons/samba/
|
||||
[comp]: /components/snips/
|
@ -1,37 +1,53 @@
|
||||
---
|
||||
layout: page
|
||||
title: "SSH Server"
|
||||
description: "Allow logging in remotely to your server using SSH."
|
||||
date: 2017-04-30 13:28
|
||||
description: "Allow logging in remotely to Hass.io using SSH."
|
||||
date: 2017-11-03 22:25
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
featured: true
|
||||
---
|
||||
|
||||
Setting up an [SSH](https://openssh.org/) server allows access to your Hass.io folders with any SSH client. To use this add-on, you must have a private/public key to log in. To generate them, follow the [instructions for Windows][win] and [these for other platforms][other].
|
||||
Setting up an [SSH](https://openssh.org/) server allows access to your Hass.io folders with any SSH client. It also includes a command-line tool to access the [Hass.io API](https://github.com/home-assistant/hassio/blob/dev/API.md). Try it out:
|
||||
|
||||
```bash
|
||||
$ hassio help
|
||||
```
|
||||
|
||||
<p class='note'>
|
||||
This add-on will not enable you to install packages or do anything as root. This is not allowed with Hass.io.
|
||||
</p>
|
||||
|
||||
To use this add-on, you must have a private/public key to log in. To generate them, follow the [instructions for Windows][win] and [these for other platforms][other]. It is possible to set a password for login since version 2.0 but for high security use private/public keys. You can not run both variant at same time.
|
||||
|
||||
In order to start this add-on for the first time, you either need to include an ssh key (enclosed in quotation marks, on a single line without line breaks) or set a password in the options section.
|
||||
|
||||
```json
|
||||
{
|
||||
"authorized_keys": [
|
||||
"ssh-rsa AKDJD3839...== my-key"
|
||||
]
|
||||
],
|
||||
"password": ""
|
||||
}
|
||||
```
|
||||
|
||||
The username for login over ssh is `root`. The complete login command is `ssh root@hassio.local`.
|
||||
|
||||
After logging in, you will find yourself in this add-ons container. The Home Assistant configuration directory is mounted on the path `/config`.
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **authorized_keys** (*Required*): Your public-keys for authorized keyfile. Every element will be a line inside that file.
|
||||
- **authorized_keys** (*Optional*): Your public keys for authorized keyfile. Every element will be a line inside that file.
|
||||
- **password** (*Optional*): Set a password for login. We do not recommend this variant.
|
||||
|
||||
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/L7PCPQYwspo" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
[win]: https://www.digitalocean.com/community/tutorials/how-to-create-ssh-keys-with-putty-to-connect-to-a-vps
|
||||
[other]: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
|
||||
|
||||
<p class='note'>
|
||||
This add-on is not compatible when you installed Hass.io via the generic Linux installer.
|
||||
|
||||
If you're coming from Rasbian or similar, use `root` rather than `pi` when connecting via ssh or else you will get this error.
|
||||
|
||||
```bash
|
||||
Permission denied (publickey,keyboard-interactive)
|
||||
```
|
||||
</p>
|
||||
<p class='note'>This add-on is not compatible if Hass.io was installed via the generic Linux installer.</p>
|
||||
|
110
source/_components/abode.markdown
Normal file
110
source/_components/abode.markdown
Normal file
@ -0,0 +1,110 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Abode Home Security"
|
||||
description: "Instructions on integrating Abode home security with Home Assistant."
|
||||
date: 2017-08-26 0:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: abode.jpg
|
||||
ha_category: Hub
|
||||
ha_release: 0.52
|
||||
ha_iot_class: "Cloud Push"
|
||||
---
|
||||
|
||||
The `abode` component will allow users to integrate their Abode Home Security systems into Home Assistant and use its alarm system and sensors to automate their homes.
|
||||
|
||||
Please visit the [Abode website](https://goabode.com/) for further information about Abode Security.
|
||||
|
||||
There is currently support for the following device types within Home Assistant:
|
||||
|
||||
- [Alarm Control Panel](/components/alarm_control_panel.abode/): Reports on the current alarm status and can be used to arm and disarm the system.
|
||||
- [Binary Sensor](/components/binary_sensor.abode/): Reports on `Quick Actions`, `Door Contacts`, `Connectivity` sensors (remotes, keypads, and status indicators), `Moisture` sensors, and `Motion` or `Occupancy` sensors.
|
||||
- [Camera](/components/camera.abode/): Reports on `Camera` devices and will download and show the latest captured still image.
|
||||
- [Cover](/components/cover.abode/): Reports on `Secure Barriers` and can be used to open and close the cover.
|
||||
- [Lock](/components/cover.abode/): Reports on `Door Locks` and can be used to lock and unlock the door.
|
||||
- [Light](/components/light.abode/): Reports on `Dimmer` lights and can be used to dim, change color, or turn the light on and off.
|
||||
- [Switch](/components/switch.abode/): Reports on `Power Switch` devices and can be used to turn the power switch on and off. Also reports on `Automations` set up in the Abode system and allows you to activate or deactivate them.
|
||||
- [Sensor](/components/sensor.abode/): Reports on `Temperature`, `Humidity`, and `Light` sensors.
|
||||
|
||||
## {% linkable_title Configuration %}
|
||||
|
||||
To use Abode devices in your installation, add the following `abode` section to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
abode:
|
||||
username: abode_username
|
||||
password: abode_password
|
||||
name: Abode Alarm System
|
||||
polling: False
|
||||
exclude:
|
||||
- 'ZW:0000000034'
|
||||
- 'RF:00000011'
|
||||
lights:
|
||||
- 'ZW:0000000022'
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **username** (*Required*): Username for your Abode account.
|
||||
- **password** (*Required*): Password for your Abode account.
|
||||
- **name** (*Optional*): The name for your alarm controller.
|
||||
- **polling** (*Optional*): Enable polling if cloud push updating is less reliable. Will update the devices once every 30 seconds. Defaults to False.
|
||||
- **exclude** (*Optional*): A list of devices to exclude from Home Assistant by their Abode `device_id` or `automation_id`, found within the component attributes.
|
||||
- **lights** (*Optional*): A list of switch devices that Home Assistant should treat as lights by the switches Abode `device_id`, found within the component attributes.
|
||||
|
||||
## {% linkable_title Events %}
|
||||
|
||||
There are a number of events that can be triggered from Abode. They are grouped into the below events:
|
||||
|
||||
- **abode_alarm**: Fired when an alarm event is triggered from Abode. This includes Smoke, CO, Panic, and Burglar alarms.
|
||||
- **abode_alarm_end**: Fired when an alarm end event is triggered from Abode.
|
||||
- **abode_automation**: Fired when an Automation is triggered from Abode.
|
||||
- **abode_panel_fault**: Fired when there is a fault with the Abode hub. This includes events like loss of power, low battery, tamper switches, polling failures, and signal interference.
|
||||
- **abode_panel_restore**: Fired when the panel fault is restored.
|
||||
|
||||
All events have the fields:
|
||||
|
||||
Field | Description
|
||||
----- | -----------
|
||||
`device_id` | The Abode device ID of the event.
|
||||
`device_name` | The Abode device name of the event.
|
||||
`device_type` | The Abode device type of the event.
|
||||
`event_code` | The event code of the event.
|
||||
`event_name` | The name of the event.
|
||||
`event_type` | The type of the event.
|
||||
`event_utc` | The UTC timestamp of the event.
|
||||
`user_name` | The Abode user that triggered the event, if applicable.
|
||||
`date` | The date of the event in the format `MM/DD/YYYY`.
|
||||
`time` | The time of the event in the format `HH:MM AM`.
|
||||
|
||||
There is a unique list of known event_codes that can be found [here](https://github.com/MisterWil/abodepy/files/1262019/timeline_events.txt).
|
||||
|
||||
## {% linkable_title Services %}
|
||||
|
||||
### {% linkable_title Service `change_setting` %}
|
||||
|
||||
Change settings on your Abode system. For a full list of settings and valid values, consult the [AbodePy settings section](https://github.com/MisterWil/abodepy/blob/master/README.rst#settings).
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `setting` | No | The setting you wish to change.
|
||||
| `value` | No | The value you wish to change the setting to.
|
||||
|
||||
### {% linkable_title Service `capture_image` %}
|
||||
|
||||
Request a new still image from your Abode IR camera.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | No | String or list of strings that point at `entity_id`s of Abode cameras.
|
||||
|
||||
### {% linkable_title Service `trigger_quick_action` %}
|
||||
|
||||
Trigger a quick action automation on your Abode system.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | No | String or list of strings that point at `entity_id`s of binary_sensors that represent your Abode quick actions.
|
19
source/_components/alarm_control_panel.abode.markdown
Normal file
19
source/_components/alarm_control_panel.abode.markdown
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Abode Alarm Control Panel"
|
||||
description: "Instructions how to setup the Abode Alarm control panel within Home Assistant."
|
||||
date: 2017-08-26 0:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: abode.jpg
|
||||
ha_category: Alarm
|
||||
ha_release: 0.52
|
||||
ha_iot_class: "Cloud Push"
|
||||
---
|
||||
|
||||
|
||||
The `abode` security control panel platform allows you to control your [Abode](https://goabode.com/) alarms.
|
||||
|
||||
The requirement is that you have setup your [Abode hub](/components/abode/).
|
@ -12,7 +12,7 @@ ha_category: Alarm
|
||||
ha_release: 0.11
|
||||
---
|
||||
|
||||
The `alarmdotcom` platform is consuming the information provided by a [Alarm.com](https://www.alarm.com/).
|
||||
The `alarmdotcom` platform is consuming the information provided by [Alarm.com](https://www.alarm.com/).
|
||||
|
||||
To enable this, add the following lines to your `configuration.yaml`:
|
||||
|
||||
|
32
source/_components/alarm_control_panel.arlo.markdown
Normal file
32
source/_components/alarm_control_panel.arlo.markdown
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Arlo Control Panel"
|
||||
description: "Instructions how to setup the Netgear Arlo Base Stations as a control panel within Home Assistant."
|
||||
date: 2017-10-05 17:45
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: arlo.png
|
||||
ha_category: Alarm
|
||||
ha_release: 0.56
|
||||
ha_iot_class: "Cloud Polling"
|
||||
---
|
||||
|
||||
|
||||
The `arlo` control panel platform allows you to control your [Arlo](https://arlo.netgear.com/) base stations.
|
||||
|
||||
To get your [Arlo](https://arlo.netgear.com/) base stations working within Home Assistant, please follow the instructions for the general [Arlo component](/components/arlo).
|
||||
|
||||
Once you have enabled the [Arlo component](/components/arlo), add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
alarm_control_panel:
|
||||
- platform: arlo
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **home_mode_name**: (*Optional*): Arlo base station does not have a built-in home mode. You can map one of your custom modes to home assistant's home mode by setting the name of the custom mode in this configuration variable. The name of the custom mode should match exactly as you set it up in the Arlo app.
|
||||
- **away_mode_name**: (*Optional*): Like the home mode, the Arlo base station does not have a built-in away mode, however, you can map a custom mode from the Arlo app to Home Assistant with this variable, just make sure the name matches exactly what you have set up in the Arlo app.
|
90
source/_components/alarm_control_panel.egardia.markdown
Normal file
90
source/_components/alarm_control_panel.egardia.markdown
Normal file
@ -0,0 +1,90 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Egardia / Woonveilig Alarm Control Panel"
|
||||
description: "Instructions how to integrate Egardia / Woonveilig into Home Assistant."
|
||||
date: 2016-07-02 22:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: egardia.png
|
||||
ha_release: 0.51
|
||||
ha_category: Alarm
|
||||
---
|
||||
|
||||
The `egardia` platform enables the ability to control an [Egardia](http://egardia.com/)/Woonveilig control panel. These alarm panels are known under different brand names across the world, including Woonveilig in the Netherlands. This was tested on a Gate01 version of the Egardia/Woonveilig platform.
|
||||
|
||||
You will need to know the IP of your alarm panel on your local network. Test if you can login to the panel by browsing to the IP address and log in using your Egardia/Woonveilig account.
|
||||
|
||||
To enable this, add the following lines to your `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
alarm_control_panel:
|
||||
- platform: egardia
|
||||
host: YOUR_HOST
|
||||
username: YOUR_USERNAME
|
||||
password: YOUR_PASSWORD
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): The local IP address of the Egardia/Woonveilig alarm panel.
|
||||
- **username** (*Required*): Username for the Egardia/Woonveilig account.
|
||||
- **password** (*Required*): Password for Egardia/Woonveilig account.
|
||||
- **port** (*Optional*): The port of the alarm panel. Defaults to 80.
|
||||
- **name** (*Optional*): Name to use for the alarm panel. Defaults to `Egardia`.
|
||||
- **report_server_enabled** (*Optional*): Enable reporting by server. Defaults to `False`.
|
||||
- **report_server_port** (*Optional*): Port of the Egardia server. Defaults to 85.
|
||||
- **report_server_codes** list (*Optional*): List of codes for the different states.
|
||||
|
||||
Note that this basic configuration will only enable you to read the armed/armed away/disarmed status of your alarm and will **not** update the status if the alarm is triggered. This is because of how Egardia built their system. The alarm triggers normally go through their servers.
|
||||
You can change this, however, using the following procedure. This is a more advanced configuration.
|
||||
|
||||
1. Log in into your alarm system's control panel. You will need to access http://[IP of your control panel]. You know this already since you need it in the basic configuration from above. Log in to the control panel with your Egardia/Woonveilig username and password.
|
||||
2. Once logged in, go to *System Settings*, *Report* and change the Server Address for your primary server to the IP or hostname of your Home Assistant machine. Also, update the port number 85 or to anything you like. The provided software that you will set up in the next steps runs on port 85 by default. **Make sure to change the settings of the primary server otherwise the messages will not come through. Note that this will limit (or fully stop) the number of alarm messages you will get through Egardia's / Woonveilig services.** Maybe, that is just what you want. Make sure to save your settings by selecting 'OK'.
|
||||
3. On your Home Assistant machine run `$ sudo python3 egardiaserver.py`. Refer to the [python-egardia repository](https://github.com/jeroenterheerdt/python-egardia) for detailed documentation on parameters. This will receive status codes from your alarm control panel and display them. You will need the codes to include in your configuration.yaml. Make sure to change the status of your alarm to all states (disarm, arm, home) by all means possible (all users, remotes, web login, app) as well as trigger the alarm in all ways possible to get 100% coverage. **Before triggering the alarm it might be good to disable the siren temporarily (can be done in Panel Settings).**
|
||||
4. Once you have the codes, update your `configuration.yaml`:
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
alarm_control_panel:
|
||||
- platform: egardia
|
||||
host: YOUR_HOST
|
||||
username: YOUR_USERNAME
|
||||
password: YOUR_PASSWORD
|
||||
report_server_enabled: True
|
||||
report_server_port: PORT_OF_EGARDIASERVER (85 as per the instructions above)
|
||||
report_server_codes:
|
||||
arm: XXXXXXXXXXXXXXXX, XXXXXXXXXXXXXXXX
|
||||
disarm: XXXXXXXXXXXXXXXX, XXXXXXXXXXXXXXXX
|
||||
home: XXXXXXXXXXXXXXXX
|
||||
triggered: XXXXXXXXXXXXXXXX, XXXXXXXXXXXXXXXX, XXXXXXXXXXXXXXXX
|
||||
ignore: XXXXXXXXXXXXXXXX
|
||||
```
|
||||
|
||||
Note that for triggered, arm and disarm multiple codes can be entered since each sensor triggers with a different code and each user of the system has its own arm and disarm codes. Also note that your system will do regular system checks which will be reported as well. Since Home Assistant provides no way of handling them properly, you can enter those codes as ignore (again, multiple codes can be used here). The egardia component will ignore these codes and continue returning the old status if it receives any of the codes that are listed as ignore. This is useful for example when you have armed your alarm at night: normally a system check will occur at least once during the night and if that code is not specified anywhere Home Assistant will set the status of the alarm to its default, which is unarmed. This is in fact wrong. Listing the code as ignore changes this behavior and Home Assistant will continue to show the status the alarm is in (disarm, arm, home, triggered) even when system checks occur.
|
||||
|
||||
5. Start the `egardiaserver.py` script on boot of your Home Assistant machine, for example by using `systemctl` by `systemd`. To use this method, create a shell script named `egardiaserver.sh` that contains something like the following:
|
||||
|
||||
```bash
|
||||
$ source /srv/homeassistant/bin/activate
|
||||
$ python3 /srv/homeassistant/lib/python3.5/site-packages/pythonegardia/egardiaserver.py -host [YOURHOST] -password '[YOURPASSWORD]' -ssl True > /tmp/egardiaserver.log 2>&1
|
||||
```
|
||||
|
||||
Mark it as executable (`$ chmod +x`) and run `sudo nano /lib/systemd/system/egardiaserver.service`. Enter the following into the `egardiaserver.service` file:
|
||||
|
||||
```bash
|
||||
[Unit]
|
||||
Description=Egardia Server Service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash /srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/pythonegardia/egardiaserver.sh
|
||||
StandardOutput=journal+console
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=egardiaserver.service
|
||||
```
|
||||
|
||||
Save and then run `sudo systemctl enable egardiaserver.service` and `sudo systemctl start egardiaserver.service`.
|
||||
6. Test your setup and enjoy. The component will update if the alarm status changes, including triggers. You can use this to build your own automations and send notifications as you wish.
|
@ -28,10 +28,28 @@ Configuration variables:
|
||||
- **pending_time** (*Optional*): The time in seconds of the pending time before arming the alarm. Default is 60 seconds.
|
||||
- **trigger_time** (*Optional*): The time in seconds of the trigger time in which the alarm is firing. Default is 120 seconds.
|
||||
- **disarm_after_trigger** (*Optional*): If true, the alarm will automatically disarm after it has been triggered instead of returning to the previous state.
|
||||
- **armed_home/armed_away/armed_night/triggered** (*Optional*): State specific settings
|
||||
- **pending_time**: State specific pending time override.
|
||||
|
||||
In the config example below, armed_home state will have no pending time and triggered state will have pending time of 20 second whereas armed_away state will have a default pending time of 30 seconds.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
alarm_control_panel:
|
||||
- platform: manual
|
||||
name: Home Alarm
|
||||
code: 1234
|
||||
pending_time: 30
|
||||
armed_home:
|
||||
pending_time: 0
|
||||
triggered:
|
||||
pending_time: 20
|
||||
trigger_time: 4
|
||||
```
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
In this section you find some real life examples of how to use this panel.
|
||||
In this section, you find some real-life examples of how to use this panel.
|
||||
|
||||
### {% linkable_title Sensors %}
|
||||
|
||||
@ -61,3 +79,33 @@ automation:
|
||||
service: alarm_control_panel.alarm_trigger
|
||||
entity_id: alarm_control_panel.ha_alarm
|
||||
```
|
||||
|
||||
Sending a notification when the alarm is triggered.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Send notification when alarm triggered'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: alarm_control_panel.ha_alarm
|
||||
to: 'triggered'
|
||||
action:
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: "ALARM! The alarm has been triggered"
|
||||
```
|
||||
|
||||
Disarming the alarm when the door is properly unlocked.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Disarm alarm when door unlocked by keypad'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.front_door_lock_alarm_type
|
||||
to: '19'
|
||||
# many z-wave locks use Alarm Type 19 for 'Unlocked by Keypad'
|
||||
action:
|
||||
- service: alarm_control_panel.alarm_disarm
|
||||
entity_id: alarm_control_panel.house_alarm
|
||||
```
|
||||
|
103
source/_components/alarm_control_panel.manual_mqtt.markdown
Normal file
103
source/_components/alarm_control_panel.manual_mqtt.markdown
Normal file
@ -0,0 +1,103 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Manual Alarm Control Panel with MQTT Support"
|
||||
description: "Instructions how to integrate manual alarms into Home Assistant with MQTT support."
|
||||
date: 2017-07-02 9:10
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Alarm
|
||||
ha_release: 0.50
|
||||
---
|
||||
|
||||
This platform extends the [manual alarm](/components/alarm_control_panel.manual/) by adding support for MQTT control of the alarm by a remote device. It can be used to create external keypads which simply change the state of the manual alarm in Home Assistant.
|
||||
|
||||
It's essentially the opposite of the [MQTT Alarm Panel](/components/alarm_control_panel.mqtt/) which allows Home Assistant to observe an existing, fully-featured alarm where all of the alarm logic is embedded in that physical device.
|
||||
|
||||
The component will accept the following commands from your Alarm Panel via the `command_topic`:
|
||||
|
||||
- `DISARM`
|
||||
- `ARM_HOME`
|
||||
- `ARM_AWAY`
|
||||
- `ARM_NIGHT`
|
||||
|
||||
When the state of the manual alarm changes, Home Assistant will publish one of the following states to the `state_topic`:
|
||||
|
||||
- 'disarmed'
|
||||
- 'armed_home'
|
||||
- 'armed_away'
|
||||
- 'armed_night'
|
||||
- 'pending'
|
||||
- 'triggered'
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
alarm_control_panel:
|
||||
- platform: manual_mqtt
|
||||
state_topic: home/alarm
|
||||
command_topic: home/alarm/set
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
All configuration variables from the base manual alarm platform are available:
|
||||
|
||||
- **name** (*Optional*): The name of the alarm. Default is "HA Alarm".
|
||||
- **code** (*Optional*): If defined, specifies a code to enable or disable the alarm in the frontend. This code is not required for MQTT interactions.
|
||||
- **pending_time** (*Optional*): The time in seconds of the pending time before arming the alarm. Default is 60 seconds.
|
||||
- **trigger_time** (*Optional*): The time in seconds of the trigger time in which the alarm is firing. Default is 120 seconds.
|
||||
- **disarm_after_trigger** (*Optional*): If true, the alarm will automatically disarm after it has been triggered instead of returning to the previous state.
|
||||
- **armed_home|armed_away|armed_night|triggered** (*Optional*): State specific settings
|
||||
- **pending_time**: State specific pending time override.
|
||||
|
||||
Additionally, the following MQTT configuration variables are also available:
|
||||
|
||||
- **state_topic** (*Required*): The MQTT topic HA will publish state updates to.
|
||||
- **command_topic** (*Required*): The MQTT topic HA will subscribe to, to receive commands from a remote device to change the alarm state.
|
||||
- **qos** (*Optional*): The maximum QoS level for subscribing and publishing to MQTT messages. Default is 0.
|
||||
- **payload_disarm** (*Optional*): The payload to disarm this Alarm Panel. Default is "DISARM".
|
||||
- **payload_arm_home** (*Optional*): The payload to set armed-home mode on this Alarm Panel. Default is "ARM_HOME".
|
||||
- **payload_arm_away** (*Optional*): The payload to set armed-away mode on this Alarm Panel. Default is "ARM_AWAY".
|
||||
- **payload_arm_night** (*Optional*): The payload to set armed-night mode on this Alarm Panel. Default is "ARM_NIGHT".
|
||||
|
||||
In the config example below, armed_home state will have no pending time and triggered state will have a pending time of 20 seconds whereas armed_away state will have a default pending time of 30 seconds.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
alarm_control_panel:
|
||||
- platform: manual_mqtt
|
||||
state_topic: home/alarm
|
||||
command_topic: home/alarm/set
|
||||
pending_time: 30
|
||||
armed_home:
|
||||
pending_time: 0
|
||||
triggered:
|
||||
pending_time: 20
|
||||
trigger_time: 4
|
||||
```
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
Refer to the [Manual Alarm Control page](/components/alarm_control_panel.manual/#examples) for some real life examples of how to use this panel.
|
||||
|
||||
## {% linkable_title MQTT Control %}
|
||||
|
||||
The state of this alarm can be controlled using [MQTT](/components/mqtt/). Ensure you've configured that before adding this component.
|
||||
|
||||
To change the state of the alarm, publish one of the following messages to the `command_topic`:
|
||||
|
||||
- `DISARM`
|
||||
- `ARM_HOME`
|
||||
- `ARM_AWAY`
|
||||
- `ARM_NIGHT`
|
||||
|
||||
To receive state updates from HA, subscribe to the `state_topic`. Home Assistant will publish a new message whenever the state changes:
|
||||
|
||||
- `disarmed`
|
||||
- `armed_home`
|
||||
- `armed_away`
|
||||
- `armed_night`
|
||||
- `pending`
|
||||
- `triggered`
|
@ -23,7 +23,7 @@ The component will accept the following states from your Alarm Panel (in lower c
|
||||
- 'pending'
|
||||
- 'triggered'
|
||||
|
||||
The component is able to control your Alarm Panel by publishing to the `command_topic` when a user interacts with the Home Assistant frontend.
|
||||
The component can control your Alarm Panel by publishing to the `command_topic` when a user interacts with the Home Assistant frontend.
|
||||
|
||||
To enable this platform, add the following lines to your `configuration.yaml`:
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Satel Integra Alarm Control Panel"
|
||||
description: "Instructions how to setup the Satel Integra control panel within Home Assistant."
|
||||
date: 2017-09-07 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: satel.jpg
|
||||
ha_category: Alarm
|
||||
ha_release: 0.54
|
||||
ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
|
||||
The `satel_integra` alarm control panel platform allows you to control your [SatelIntegra](http://www.satel.pl/en/) alarms.
|
||||
|
||||
The requirement is that you have setup your [SatelIntegra hub](/components/satel_integra/).
|
||||
|
@ -14,7 +14,9 @@ ha_release: 0.42
|
||||
|
||||
The `totalconnect` platform provides connectivity with the Honeywell TotalConnect alarm systems used by many alarm companies.
|
||||
|
||||
If you have issues running this component, you may require "libxml2-dev" and "libxmlsec1-dev". To install these on Hassbian, run the command `apt install libxml2-dev libxmlsec1-dev` with sudo
|
||||
This platform supports the following services: `alarm_arm_away`, `alarm_arm_home`, `alarm_arm_night` and `alarm_disarm`.
|
||||
|
||||
If you have issues running this component, you may require `libxml2-dev` and `libxmlsec1-dev` packages. To install these on Hassbian, run the command `apt install libxml2-dev libxmlsec1-dev` with sudo.
|
||||
|
||||
To enable this, add the following lines to your `configuration.yaml`:
|
||||
|
||||
|
@ -26,6 +26,6 @@ The requirement is that you have setup [Wink](/components/wink/).
|
||||
|
||||
|
||||
<p class='note'>
|
||||
The above devices are confimed to work, but others may work as well.
|
||||
The above devices are confirmed to work, but others may work as well.
|
||||
</p>
|
||||
|
||||
|
@ -13,7 +13,7 @@ ha_release: 0.43
|
||||
ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
The `alarmdecoder` component will allow Home Assistant users who own either a DSC or Honeywell alarm panel to leverage their alarm system and it's sensors to provide Home Assistant with rich information about their homes. Connectivity between Home Assistant and the alarm panel is accomplished through a device produced by Nu Tech Software Solutions, known as the AlarmDecoder. The AlarmDecoder devices provide a serial, TCP/IP socket or USB interface to the alarm panel, where it emulates an alarm keypad.
|
||||
The `alarmdecoder` component will allow Home Assistant users who own either a DSC or Honeywell alarm panel to leverage their alarm system and its sensors to provide Home Assistant with rich information about their homes. Connectivity between Home Assistant and the alarm panel is accomplished through a device produced by Nu Tech Software Solutions, known as the AlarmDecoder. The AlarmDecoder devices provide a serial, TCP/IP socket or USB interface to the alarm panel, where it emulates an alarm keypad.
|
||||
|
||||
Please visit the [AlarmDecoder website](https://www.alarmdecoder.com/) for further information about the AlarmDecoder devices.
|
||||
|
||||
@ -46,10 +46,10 @@ alarmdecoder:
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **type** (*Required*): The type of AlarmDecoder device: socket, serial or usb
|
||||
- **type** (*Required*): The type of AlarmDecoder device: socket, serial or USB
|
||||
- **host** (*Optional*): The IP address of the AlarmDecoder device on your home network, if using socket type. Default: `localhost`
|
||||
- **port** (*Optional*): The port of the AlarmDecoder device on your home network, if using socket type. Default: `10000`
|
||||
- **path** (*Optional*): The path of the AlarmDecoder device, if using socket type. Default: `/dev/ttyUSB0`
|
||||
- **baud** (*Optional*): The baud rate of the AlarmDecoder device, if using serial type. Default: `115200`
|
||||
- **panel_display** (*Optional*): Create a sensor called sensor.alarm_display to match the Alarm Keypad dispaly. Default: `off`
|
||||
- **baudrate** (*Optional*): The baud rate of the AlarmDecoder device, if using serial type. Default: `115200`
|
||||
- **panel_display** (*Optional*): Create a sensor called sensor.alarm_display to match the Alarm Keypad display. Default: `off`
|
||||
- **zones** (*Optional*): AlarmDecoder has no way to tell us which zones are actually in use, so each zone must be configured in Home Assistant. For each zone, at least a name must be given. For more information on the available zone types, take a look at the [Binary Sensor](/components/binary_sensor.alarmdecoder/) docs. *Note: If no zones are specified, Home Assistant will not load any binary_sensor components.*
|
||||
|
@ -12,11 +12,11 @@ ha_category: Automation
|
||||
ha_release: 0.38
|
||||
---
|
||||
|
||||
The `alert` component is designed to notify you when problematic issues arise. For example, if the garage door is left open, the `alert` component can be used remind you of this by sending you repeating notifications at customizable intervals. This is also useful for low battery sensors, water leak sensors, or any condition that may need your attention.
|
||||
The `alert` component is designed to notify you when problematic issues arise. For example, if the garage door is left open, the `alert` component can be used remind you of this by sending you repeating notifications at customizable intervals. This is also used for low battery sensors, water leak sensors, or any condition that may need your attention.
|
||||
|
||||
Alerts will add an entity to the front end only when they are firing. This entity allows you to silence an alert until it is resolved.
|
||||
|
||||
When using the `alert` component it is important that the timezone used for Home Assistant and the underlying operating system match. Failing to do so may result in multiple alerts being sent at the same time (such as when Home Assistant is set to the `America/Detroit` timezone but the operating system uses `UTC`).
|
||||
When using the `alert` component, it is important that the time zone used for Home Assistant and the underlying operating system match. Failing to do so may result in multiple alerts being sent at the same time (such as when Home Assistant is set to the `America/Detroit` time zone but the operating system uses `UTC`).
|
||||
|
||||
### {% linkable_title Basic Example %}
|
||||
|
||||
@ -27,6 +27,7 @@ The `alert` component makes use of any of the `notifications` components. To set
|
||||
alert:
|
||||
garage_door:
|
||||
name: Garage is open
|
||||
done_message: Garage is closed
|
||||
entity_id: input_boolean.garage_door
|
||||
state: 'on'
|
||||
repeat: 30
|
||||
@ -39,10 +40,11 @@ alert:
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Required*): The friendly name of the alert.
|
||||
- **done_message** (*Optional*): A message sent after an alert transitions from `on` to `off`. Is only sent if an alert notification was sent for transitioning from `off` to `on`.
|
||||
- **entity_id** (*Required*): The ID of the entity to watch.
|
||||
- **state** (*Optional*): The problem condition for the entity. Defaults to `on`.
|
||||
- **repeat** (*Required*): Number of minutes before the notification should be repeated. Can be either a number or a list of numbers.
|
||||
- **can_acknowledge** (*Optional*): Allows the alert to be unacknowledgable. Defaults to `true`.
|
||||
- **can_acknowledge** (*Optional*): Allows the alert to be unacknowledgeable. Defaults to `true`.
|
||||
- **skip_first** (*Optional*): Controls whether the notification should be sent immediately or after the first delay. Defaults to `false`.
|
||||
- **notifiers** (*Required*): List of `notification` components to use for alerts.
|
||||
|
||||
@ -73,7 +75,7 @@ freshwater_temp_alert:
|
||||
|
||||
### {% linkable_title Complex Alert Criteria %}
|
||||
|
||||
By design, the `alert` component only handles very simple criteria for firing. That is, is only checks if a single entity's state is equal to a value. At some point, it may be desireable to have an alert with a more complex criteria. Possibly, when a battery percentage falls below a threshold. Maybe you want to disable the alert on certain days. Maybe the alert firing should depend on more than one input. For all of these situations, it is best to use the alert in conjunction with a `Template Binary Sensor`. The following example does that.
|
||||
By design, the `alert` component only handles very simple criteria for firing. That is, it only checks if a single entity's state is equal to a value. At some point, it may be desirable to have an alert with a more complex criteria. Possibly, when a battery percentage falls below a threshold. Maybe you want to disable the alert on certain days. Maybe the alert firing should depend on more than one input. For all of these situations, it is best to use the alert in conjunction with a `Template Binary Sensor`. The following example does that.
|
||||
|
||||
```yaml
|
||||
binary_sensor:
|
||||
@ -97,7 +99,7 @@ This example will begin firing as soon as the entity `sensor.motion`'s `battery`
|
||||
|
||||
### {% linkable_title Dynamic Notification Delay Times %}
|
||||
|
||||
It may be desireable to have the delays between alert notifications dynamically change as the alert continues to fire. This can be done by setting the `repeat` configuration key to a list of numbers rather than a single number. Altering the first example would look like the following.
|
||||
It may be desirable to have the delays between alert notifications dynamically change as the alert continues to fire. This can be done by setting the `repeat` configuration key to a list of numbers rather than a single number. Altering the first example would look like the following.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
|
@ -15,42 +15,14 @@ ha_release: 0.10
|
||||
|
||||
There are a few ways that you can use Amazon Echo and Home Assistant together.
|
||||
|
||||
- [Turning devices on and off](#i-just-want-to-turn-devices-on-and-off-using-echo)
|
||||
- [Build custom commands to use](#i-want-to-build-custom-commands-to-use-with-echo)
|
||||
- [Create a new Flash Briefing source](#flash-briefing-skills)
|
||||
|
||||
No matter which method(s) you decide to use, please remember that Amazon Echo requires an active Internet connection to function. If your Internet is down or experiencing issues (or Amazon's infrastructure is having issues), none of these methods will work.
|
||||
- Alternative: use the [Emulated Hue component][emulated-hue-component] to trick Alexa to thinking Home Assistant is a Philips Hue hub.
|
||||
|
||||
Amazon has released [Echosim], a website that simulates the Alexa service in your browser. That way it is easy to test your skills without having access to a physical Amazon Echo.
|
||||
|
||||
[Echosim]: https://echosim.io/
|
||||
|
||||
## {% linkable_title I just want to turn devices on and off using Echo %}
|
||||
|
||||
If you just want to be able to turn anything with a switch (like lights, switches, media players, etc) on and off, you should enable the [Emulated Hue][emulated-hue-component] component. It makes your Home Assistant appear as if it were a Phillips Hue bridge, which Echo works with natively.
|
||||
|
||||
[emulated-hue-component]: https://home-assistant.io/components/emulated_hue/
|
||||
|
||||
Enabling the Emulated Hue component means you can turn things on and off by simply saying
|
||||
|
||||
> Alexa, turn the living room lights on.
|
||||
|
||||
or
|
||||
|
||||
> Alexa, set the living room lights to twenty percent.
|
||||
|
||||
instead of
|
||||
|
||||
> Alexa, tell Home Assistant to turn the living room lights on.
|
||||
|
||||
or
|
||||
|
||||
> Alexa, tell Home Assistant to set the living room lights to twenty percent.
|
||||
|
||||
In addition, you would need to build custom intents for each device and on/off combination using the below method, whereas everything just works without any extra work by using Emulated Hue.
|
||||
|
||||
Please note that you can use Emulated Hue and the built-in Alexa component side-by-side without issue if you wish.
|
||||
|
||||
## {% linkable_title I want to build custom commands to use with Echo %}
|
||||
|
||||
The built-in Alexa component allows you to integrate Home Assistant into Alexa/Amazon Echo. This component will allow you to query information and call services within Home Assistant by using your voice. Home Assistant offers no built-in sentences but offers a framework for you to define your own.
|
||||
@ -61,7 +33,13 @@ The built-in Alexa component allows you to integrate Home Assistant into Alexa/A
|
||||
|
||||
### {% linkable_title Requirements %}
|
||||
|
||||
Amazon requires the endpoint of a skill to be hosted via SSL. Self-signed certificates are ok because our skills will only run in development mode. Read more on [our blog][blog-lets-encrypt] about how to set up encryption for Home Assistant. If you are unable to get HTTPS up and running, consider using [this AWS Lambda proxy for Alexa skills](https://community.home-assistant.io/t/aws-lambda-proxy-custom-alexa-skill-when-you-dont-have-https/5230).
|
||||
Amazon requires the endpoint of a skill to be hosted via SSL. Self-signed certificates are OK because our skills will only run in development mode. Read more on [our blog][blog-lets-encrypt] about how to set up encryption for Home Assistant. When running Hass.io, using the [Let's Encrypt](/addons/lets_encrypt/) and [Duck DNS](/addons/duckdns/) add-ons is the easiest method. If you are unable to get HTTPS up and running, consider using [this AWS Lambda proxy for Alexa skills](https://community.home-assistant.io/t/aws-lambda-proxy-custom-alexa-skill-when-you-dont-have-https/5230).
|
||||
|
||||
Additionally, note that at the time of this writing, your Alexa skill endpoint *must* accept requests over port 443 (Home Assistant default to 8123). There are two ways you can handle this:
|
||||
|
||||
1. In your router, forward external 443 to your Home Assistant serving port (defaults to 8123)
|
||||
OR
|
||||
2. Change your Home Assistant serving port to 443 this is done in the [`http`](/components/http/) section with the `server_port` entry in your `configuration.yaml` file
|
||||
|
||||
[blog-lets-encrypt]: https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/
|
||||
|
||||
@ -76,7 +54,7 @@ To get started with Alexa skills:
|
||||
- Version: 1.0
|
||||
- Endpoint:
|
||||
- https
|
||||
- https://YOUR_HOST/api/alexa?api_password=YOUR_API_PASSWORD
|
||||
- `https://YOUR_HOST/api/alexa?api_password=YOUR_API_PASSWORD`
|
||||
|
||||
You can use this [specially sized Home Assistant logo][large-icon] as the large icon and [this one][small-icon] as the small one.
|
||||
|
||||
@ -121,60 +99,19 @@ This means that we can now ask Alexa things like:
|
||||
|
||||
## {% linkable_title Configuring Home Assistant %}
|
||||
|
||||
Out of the box, the component will do nothing. You have to teach it about all intents you want it to answer to. The way it works is that the answer for each intent is based on [templates] that you define. Each template will have access to the existing states via the `states` variable but will also have access to all variables defined in the intent.
|
||||
When activated, the Alexa component will have Home Assistant's native intent support handle the incoming intents. If you want to run actions based on intents, use the [`intent_script`](/components/intent_script) component.
|
||||
|
||||
You can use [templates] for the values of `speech/text`, `card/title` and `card/content`.
|
||||
|
||||
Actions are using the [Home Assistant Script Syntax] and also have access to the variables from the intent.
|
||||
|
||||
[Home Assistant Script Syntax]: /getting-started/scripts/
|
||||
|
||||
Configuring the Alexa component for the above intents would look like this:
|
||||
To enable Alexa add the following entry to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
{% raw %}# Example configuration.yaml entry
|
||||
alexa:
|
||||
intents:
|
||||
WhereAreWeIntent:
|
||||
speech:
|
||||
type: plaintext
|
||||
text: >
|
||||
{%- if is_state('device_tracker.paulus', 'home') and
|
||||
is_state('device_tracker.anne_therese', 'home') -%}
|
||||
You are both home, you silly
|
||||
{%- else -%}
|
||||
Anne Therese is at {{ states("device_tracker.anne_therese") }}
|
||||
and Paulus is at {{ states("device_tracker.paulus") }}
|
||||
{% endif %}
|
||||
|
||||
LocateIntent:
|
||||
action:
|
||||
service: notify.notify
|
||||
data_template:
|
||||
message: The location of {{ User }} has been queried via Alexa.
|
||||
speech:
|
||||
type: plaintext
|
||||
text: >
|
||||
{%- for state in states.device_tracker -%}
|
||||
{%- if state.name.lower() == User.lower() -%}
|
||||
{{ state.name }} is at {{ state.state }}
|
||||
{%- elif loop.last -%}
|
||||
I am sorry, I do not know where {{ User }} is.
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
Sorry, I don't have any trackers registered.
|
||||
{%- endfor -%}
|
||||
card:
|
||||
type: simple
|
||||
title: Sample title
|
||||
content: Some more content{% endraw %}
|
||||
```
|
||||
|
||||
### {% linkable_title Working With Scenes %}
|
||||
|
||||
One of the most useful applications of Alexa integrations is to call scenes directly. This is easily achieved with some simple setup on the Home Assistant side and by letting Alexa know which scenes you want to run.
|
||||
|
||||
First we will configure Alexa. In the Amazon Interaction module add this to the intent schema:
|
||||
First, we will configure Alexa. In the Amazon Interaction module add this to the intent schema:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -195,6 +132,7 @@ Then create a custom slot type called `Scenes` listing every scene you want to c
|
||||
<img src='/images/components/alexa/scene_slot.png' />
|
||||
Custom slot type for scene support.
|
||||
</p>
|
||||
|
||||
The names must exactly match the scene names (minus underscores - amazon discards them anyway and we later map them back in with the template).
|
||||
|
||||
Add a sample utterance:
|
||||
@ -203,22 +141,23 @@ Add a sample utterance:
|
||||
ActivateSceneIntent activate {Scene}
|
||||
```
|
||||
|
||||
Then add the intent to your Alexa Section in your HA config file:
|
||||
Then add the intent to your intent_script section in your HA config file:
|
||||
|
||||
```yaml
|
||||
ActivateSceneIntent:
|
||||
action:
|
||||
service: scene.turn_on
|
||||
data_template:
|
||||
entity_id: scene.{% raw %}{{ Scene | replace(" ", "_") }}{% endraw %}
|
||||
speech:
|
||||
type: plaintext
|
||||
text: OK
|
||||
intent_script:
|
||||
ActivateSceneIntent:
|
||||
action:
|
||||
service: scene.turn_on
|
||||
data_template:
|
||||
entity_id: scene.{% raw %}{{ Scene | replace(" ", "_") }}{% endraw %}
|
||||
speech:
|
||||
type: plain
|
||||
text: OK
|
||||
```
|
||||
|
||||
Here we are using [templates] to take the name we gave to Alexa e.g. `downstairs on` and replace the space with an underscore so it becomes `downstairs_on` as Home Assistant expects.
|
||||
|
||||
Now say `Alexa ask homeassistant to activate <some scene>` and Alexa will activate that scene for you.
|
||||
Now say `Alexa ask Home Assistant to activate <some scene>` and Alexa will activate that scene for you.
|
||||
|
||||
### {% linkable_title Adding Scripts %}
|
||||
|
||||
@ -250,20 +189,44 @@ Add a sample utterance:
|
||||
RunScriptIntent run {Script}
|
||||
```
|
||||
|
||||
Then add the intent to your Alexa Section in your HA config file:
|
||||
Then add the intent to your intent_script section in your HA config file:
|
||||
|
||||
```yaml
|
||||
RunScriptIntent:
|
||||
action:
|
||||
service: script.turn_on
|
||||
data_template:
|
||||
entity_id: script.{% raw %}{{ Script | replace(" ", "_") }}{% endraw %}
|
||||
speech:
|
||||
type: plaintext
|
||||
text: OK
|
||||
intent_script:
|
||||
RunScriptIntent:
|
||||
action:
|
||||
service: script.turn_on
|
||||
data_template:
|
||||
entity_id: script.{% raw %}{{ Script | replace(" ", "_") }}{% endraw %}
|
||||
speech:
|
||||
type: plain
|
||||
text: OK
|
||||
```
|
||||
|
||||
Now say `Alexa ask homeassistant to run <some script>` and Alexa will run that script for you.
|
||||
Now say `Alexa ask Home Assistant to run <some script>` and Alexa will run that script for you.
|
||||
|
||||
### {% linkable_title Support for Launch Requests %}
|
||||
There may be times when you want to respond to a launch request initiated from a command such as "Alexa, Red Alert!".
|
||||
|
||||
To start, you need to get the skill id:
|
||||
|
||||
- Log into [Amazon developer console][amazon-dev-console]
|
||||
- Click the Alexa button at the top of the console
|
||||
- Click the Alexa Skills Kit Get Started button
|
||||
- Locate the skill for which you would like Launch Request support
|
||||
- Click the "View Skill ID" link and copy the ID
|
||||
|
||||
The configuration is the same as an intent with the exception being you will use your skill ID instead of the intent name.
|
||||
```yaml
|
||||
intent_script:
|
||||
amzn1.ask.skill.08888888-7777-6666-5555-444444444444:
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.red_alert
|
||||
speech:
|
||||
type: plain
|
||||
text: OK
|
||||
```
|
||||
|
||||
## {% linkable_title Giving Alexa Some Personality %}
|
||||
|
||||
@ -306,35 +269,6 @@ text: !include alexa_confirm.yaml
|
||||
|
||||
Alexa will now respond with a random phrase each time. You can use the include for as many different intents as you like so you only need to create the list once.
|
||||
|
||||
<p class='note'>
|
||||
As of April 2017, the random filter has been somewhat broken. You'll get a random response the first time this runs, but subsequent commands will reply with the same randomly-chosen phrase. On reboot, Home Assistant will pick a new random choice, but you're stuck with that choice till you reboot. To get around that, use the following code in alexa_confirm.yaml:
|
||||
</p>
|
||||
|
||||
```text
|
||||
{% raw %} >
|
||||
{% set responses = [
|
||||
"OK",
|
||||
"Sure",
|
||||
"If you insist",
|
||||
"Done",
|
||||
"No worries",
|
||||
"I can do that",
|
||||
"Leave it to me",
|
||||
"Consider it done",
|
||||
"As you wish",
|
||||
"By your command",
|
||||
"Affirmative",
|
||||
"Yes oh revered one",
|
||||
"I will",
|
||||
"As you decree, so shall it be",
|
||||
"No Problem"
|
||||
] %}
|
||||
{% set rindex = (range(0, (responses | length - 1) )|random) -%}
|
||||
{{responses[rindex]}}
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
|
||||
## {% linkable_title Flash Briefing Skills %}
|
||||
|
||||
As of version [0.31][zero-three-one] Home Assistant supports the new [Alexa Flash Briefing Skills API][flash-briefing-api]. A Flash Briefing Skill adds a new Flash Briefing source that is generated by Home Assistant.
|
||||
@ -361,7 +295,7 @@ alexa:
|
||||
{% endif %}{% endraw %}
|
||||
```
|
||||
|
||||
You can add multiple items for a feed if you want. The Amazon required uid and timestamp will be randomly generated at startup and change at every restart of Home Assistant.
|
||||
You can add multiple items for a feed if you want. The Amazon required UID and timestamp will be randomly generated at startup and change at every restart of Home Assistant.
|
||||
|
||||
Please refer to the [Amazon documentation][flash-briefing-api-docs] for more information about allowed configuration parameters and formats.
|
||||
|
||||
@ -384,7 +318,7 @@ Please refer to the [Amazon documentation][flash-briefing-api-docs] for more inf
|
||||
- All other settings are up to you
|
||||
- Hit "Next"
|
||||
- Test
|
||||
- Having passed all validations to reach this screen you can now click on "< Back to All Skills" as your flash briefing is now available as in "Development" service.
|
||||
- Having passed all validations to reach this screen, you can now click on "< Back to All Skills" as your flash briefing is now available as in "Development" service.
|
||||
- To invoke your flash briefing, open the Alexa app on your phone or go to the [Alexa Settings Site][alexa-settings-site], open the "Skills" configuration section, select "Your Skills", scroll to the bottom, tap on the Flash Briefing Skill you just created, enable it, then manage Flash Briefing and adjust ordering as necessary. Finally ask your Echo for your "news","flash briefing", or "briefing".
|
||||
|
||||
[amazon-dev-console]: https://developer.amazon.com
|
||||
@ -395,3 +329,4 @@ Please refer to the [Amazon documentation][flash-briefing-api-docs] for more inf
|
||||
[templates]: /topics/templating/
|
||||
[zero-three-one]: /blog/2016/10/22/flash-briefing-updater-hacktoberfest/
|
||||
[alexa-settings-site]: http://alexa.amazon.com/
|
||||
[emulated-hue-component]: /components/emulated_hue/
|
||||
|
63
source/_components/amcrest.markdown
Normal file
63
source/_components/amcrest.markdown
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Amcrest IP Camera"
|
||||
description: "Instructions how to integrate Amcrest IP cameras within Home Assistant."
|
||||
date: 2017-06-24 10:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: amcrest.png
|
||||
ha_category: Hub
|
||||
ha_iot_class: "Local Polling"
|
||||
ha_release: 0.49
|
||||
---
|
||||
|
||||
The `amcrest` platform allows you to integrate your [Amcrest](https://amcrest.com/) IP camera in Home Assistant.
|
||||
|
||||
To enable your camera in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
amcrest:
|
||||
- host: IP_ADDRESS
|
||||
username: USERNAME
|
||||
password: PASSWORD
|
||||
sensors:
|
||||
- motion_detector
|
||||
- sdcard
|
||||
|
||||
- host: IP_ADDRESS
|
||||
username: USERNAME
|
||||
password: PASSWORD
|
||||
resolution: low
|
||||
stream_source: snapshot
|
||||
sensors:
|
||||
- ptz_preset
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): The IP address or hostname of your camera. If using a hostname, make sure the DNS works as expected.
|
||||
- **username** (*Required*): The username for accessing your camera.
|
||||
- **password** (*Required*): The password for accessing your camera.
|
||||
- **name** (*Optional*): This parameter allows you to override the name of your camera. The default is "Amcrest Camera".
|
||||
- **port** (*Optional*): The port that the camera is running on. The default is 80.
|
||||
- **resolution** (*Optional*): This parameter allows you to specify the camera resolution. For a high resolution (1080/720p), specify the option `high`. For VGA resolution (640x480p), specify the option `low`. If omitted, it defaults to *high*.
|
||||
- **stream_source** (*Optional*): The data source for the live stream. `mjpeg` will use the camera's native MJPEG stream, whereas `snapshot` will use the camera's snapshot API to create a stream from still images. You can also set the `rtsp` option to generate the streaming via RTSP protocol. If omitted, it defaults to *snapshot*.
|
||||
- **ffmpeg_arguments**: (*Optional*): Extra options to pass to ffmpeg, e.g. image quality or video filter options.
|
||||
- **authentication**: (*Optional*): Defines which authentication method to use only when **stream_source** is **mjpeg**. Currently, *aiohttp* only support *basic*. It defaults to *basic*.
|
||||
- **scan_interval** (*Optional*): Defines the update interval of the sensor in seconds. The default is 10 seconds.
|
||||
- **sensors** array (*Optional*): Conditions to display in the frontend. By default, *none* of the conditions are enabled. The following conditions can be monitored.
|
||||
- **motion_detector**: Return True/False when a motion is detected
|
||||
- **sdcard**: Return the SD card usage by reporting the total and used space
|
||||
- **ptz_preset**: Return the number of PTZ preset positions configured for the given camera
|
||||
|
||||
**Note:** Amcrest cameras with newer firmware no longer have the ability to stream `high` definition video with MJPEG encoding. You may need to use `low` resolution stream or the `snapshot` stream source instead. If the quality seems too poor, lower the `Frame Rate (FPS)` and max out the `Bit Rate` settings in your camera's configuration manager. If you defined the *stream_source* to **mjpeg**, make sure your camera supports *Basic* HTTP authentication. Newer Amcrest firmware may not work, then **rtsp** is recommended instead.
|
||||
|
||||
**Note:** If you set the `stream_source` option to `rtsp`, make sure to follow the steps mentioned at
|
||||
[FFMPEG](https://home-assistant.io/components/ffmpeg/) documentation to install the `ffmpeg`.
|
||||
|
||||
Finish its configuration by visiting the [Amcrest sensor page](/components/sensor.amcrest/) or [Amcrest camera page](/components/camera.amcrest/).
|
||||
|
||||
To check if your Amcrest camera is supported/tested, visit the [supportability matrix](https://github.com/tchellomello/python-amcrest#supportability-matrix) link from the `python-amcrest` project.
|
@ -15,7 +15,7 @@ ha_iot_class: "Local Polling"
|
||||
|
||||
The `android_ip_webcam` component turns an Android phone into a network camera with multiple viewing options.
|
||||
|
||||
It's setup as a mjpeg camera and all settings as switches inside of Home Assistant. You can also expose the sensors. If you have multiple phones, you can use all options inside a list.
|
||||
It's setup as an MJPEG camera and all settings as switches inside of Home Assistant. You can also expose the sensors. If you have multiple phones, you can use all options inside a list.
|
||||
|
||||
To set it up, download [the IP Webcam app][app], and add the following information to your `configuration.yaml` file:
|
||||
|
||||
@ -33,8 +33,8 @@ Configuration variables:
|
||||
- **username** (*Optional*): The username to access the phone.
|
||||
- **password** (*Optional*): The password to access the phone.
|
||||
- **scan_interval** (*Optional*): Default is 10 seconds. Defines the update interval of the phone.
|
||||
- **sensors** array (*Optional*): Conditions to display sensor in the frontend. See list of supported sensors.
|
||||
- **switches** array (*Optional*): Conditions to display settings in the frontend. See list of supported settings.
|
||||
- **sensors** array (*Optional*): Conditions to display sensor in the frontend. See the list of supported sensors.
|
||||
- **switches** array (*Optional*): Conditions to display settings in the frontend. See the list of supported settings.
|
||||
- **motion_sensor** (*Optional*): Activate motion sensor if auto_discovery is disabled.
|
||||
|
||||
### {% linkable_title Supported features %}
|
||||
@ -49,7 +49,7 @@ Sensors:
|
||||
- motion
|
||||
- pressure
|
||||
|
||||
Settings:
|
||||
Settings (Switches):
|
||||
|
||||
- exposure_lock
|
||||
- ffc
|
||||
@ -61,4 +61,37 @@ Settings:
|
||||
- whitebalance_lock
|
||||
- video_recording
|
||||
|
||||
## {% linkable_title Full example %}
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
android_ip_webcam:
|
||||
- host: 192.168.1.202
|
||||
port: 8000
|
||||
sensors:
|
||||
- audio_connections
|
||||
- battery_level
|
||||
- battery_temp
|
||||
- battery_voltage
|
||||
- light
|
||||
- motion
|
||||
- pressure
|
||||
switches:
|
||||
- exposure_lock
|
||||
- ffc
|
||||
- focus
|
||||
- gps_active
|
||||
- night_vision
|
||||
- overlay
|
||||
- torch
|
||||
- whitebalance_lock
|
||||
- video_recording
|
||||
- host: 192.168.1.203
|
||||
port: 8000
|
||||
sensors:
|
||||
- light
|
||||
switches:
|
||||
- torch
|
||||
```
|
||||
|
||||
[app]: https://play.google.com/store/apps/details?id=com.pas.webcam
|
||||
|
@ -1,139 +0,0 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Api.AI"
|
||||
description: "Instructions how integrate api.ai with Home Assistant."
|
||||
date: 2017-01-27 11:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: apiai.png
|
||||
ha_category: Voice
|
||||
featured: false
|
||||
ha_release: 0.38
|
||||
---
|
||||
|
||||
This component is designed to be used with the "webhook" integration in [api.ai][apiai-web]. When a conversation ends with an user, api.ai sends an action and parameters to the webhook.
|
||||
|
||||
api.ai requires a public endpoint (HTTPS recommended), so your Home Assistant should be exposed to Internet. api.ai will return fallback answers if your server do not answer, or takes too long (more than 5 seconds).
|
||||
|
||||
api.ai could be integrated with many popular messaging, virtual assistant and IoT platforms, eg.: Google Assistant (Google Actions), Skype, Messenger. [See here](https://docs.api.ai/docs/integrations) the complete list.
|
||||
|
||||
Using Api.ai will be easy to create conversations like:
|
||||
|
||||
> User: Which is the temperature at home?
|
||||
>
|
||||
> Bot: The temperature is 34 degrees
|
||||
|
||||
> User: Turn on the light
|
||||
>
|
||||
> Bot: In which room?
|
||||
>
|
||||
> User: In the kitchen
|
||||
>
|
||||
> Bot: Turning on kitchen light
|
||||
|
||||
To use this integration you should define a conversation (intent) in Api.ai, configure Home Assistant with the speech to return and, optionally, the action to execute.
|
||||
|
||||
### {% linkable_title Configuring your api.ai account %}
|
||||
|
||||
- [Login][apiai-web] with your Google account.
|
||||
- Click on "Create Agent"
|
||||
- Select name, language (if you are planning to use it with Google Actions check [here](https://support.google.com/assistant/answer/7108196?hl=en) supported languages) and time zone
|
||||
- Click "Save"
|
||||
- Go to "Fullfiment" (in the left menu)
|
||||
- Enable Webhook and set your Home Assistant URL with the Api.ai endpoint. Eg.: ``https://myhome.duckdns.org/api/apiai?api_password=HA_PASSWORD``
|
||||
- Click "Save"
|
||||
- Create a new intent
|
||||
- Below "User says" write one phrase that you, the user, will tell Api.ai. Eg.: Which is the temperature at home?
|
||||
- In "Action" set some key (this will be the bind with Home Assistant configuration), eg.: GetTemperature
|
||||
- In "Response" set "Cannot connect to Home Assistant or it is taking to long" (fall back response)
|
||||
- At the end of the page, click on "Fulfillment" and check "Use webhook"
|
||||
- Click "Save"
|
||||
- On the top right, where is written "Try it now...", write, or say, the phrase you have previously defined and hit enter
|
||||
- Api.ai has send a request to your Home Assistant server
|
||||
|
||||
Take a look to "Integrations", in the left menu, to configure third parties.
|
||||
|
||||
|
||||
### {% linkable_title Configuring Home Assistant %}
|
||||
|
||||
Out of the box, the component will do nothing. You have to teach it about all intents you want it to answer to. The way it works is that the answer for each intent is based on [templates] that you define. Each template will have access to the existing states via the `states` variable but will also have access to all variables defined in the intent.
|
||||
|
||||
You can use [templates] for setting `speech`.
|
||||
|
||||
Actions are using the [Home Assistant Script Syntax] and also have access to the variables from the intent.
|
||||
|
||||
[Home Assistant Script Syntax]: /getting-started/scripts/
|
||||
|
||||
Example of an Api.ai for the above configuration:
|
||||
|
||||
```yaml
|
||||
{% raw %}# Example configuration.yaml entry
|
||||
apiai:
|
||||
intents:
|
||||
GetTemperature:
|
||||
speech: We have {{ states.sensor.temperature }} degrees
|
||||
async_action: False
|
||||
action:
|
||||
service: notify.notify
|
||||
data_template:
|
||||
message: Api.ai has send a request
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
Inside an intent we can define this variables:
|
||||
- **speech** (*Optional*): Text or template to return to Api.ai
|
||||
- **action** (*Optional*): Script definition
|
||||
- **async_action** (*Optional*): If Home Assistant should execute the action asynchronously (returning response to Api.ai without waiting the action to finish). Should be set to `True` if Api.ai is returning the "Cannot connect to Home Assistant or it is taking to long" message, but then you will not be able to use values based on the result of the action. Defaults to `False`.
|
||||
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
Download [this zip](https://github.com/home-assistant/home-assistant.github.io/blob/next/source/assets/HomeAssistant_APIAI.zip) and load it in your Api.ai agent (Settings -> Export and Import) for examples intents to use with this configuration:
|
||||
|
||||
```yaml
|
||||
{% raw %}# Example configuration.yaml entry
|
||||
apiai:
|
||||
intents:
|
||||
Temperature:
|
||||
speech: The temperature at home is {{ states('sensor.home_temp') }} degrees
|
||||
LocateIntent:
|
||||
speech: >
|
||||
{%- for state in states.device_tracker -%}
|
||||
{%- if state.name.lower() == User.lower() -%}
|
||||
{{ state.name }} is at {{ state.state }}
|
||||
{%- elif loop.last -%}
|
||||
I am sorry, I do not know where {{ User }} is.
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
Sorry, I don't have any trackers registered.
|
||||
{%- endfor -%}
|
||||
WhereAreWeIntent:
|
||||
speech: >
|
||||
{%- if is_state('device_tracker.adri', 'home') and
|
||||
is_state('device_tracker.bea', 'home') -%}
|
||||
You are both home, you silly
|
||||
{%- else -%}
|
||||
Bea is at {{ states("device_tracker.bea") }}
|
||||
and Adri is at {{ states("device_tracker.adri") }}
|
||||
{% endif %}
|
||||
TurnLights:
|
||||
speech: Turning {{ Room }} lights {{ OnOff }}
|
||||
action:
|
||||
- service: notify.pushbullet
|
||||
data_template:
|
||||
message: Someone asked via apiai to turn {{ Room }} lights {{ OnOff }}
|
||||
- service_template: >
|
||||
{%- if OnOff == "on" -%}
|
||||
switch.turn_on
|
||||
{%- else -%}
|
||||
switch.turn_off
|
||||
{%- endif -%}
|
||||
data_template:
|
||||
entity_id: "switch.light_{{ Room | replace(' ', '_') }}"
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
[apiai-web]: https://api.ai/
|
||||
[templates]: /topics/templating/
|
145
source/_components/apple_tv.markdown
Normal file
145
source/_components/apple_tv.markdown
Normal file
@ -0,0 +1,145 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Apple TV"
|
||||
description: "Instructions how to integrate Apple TV devices into Home Assistant."
|
||||
date: 2017-06-26 20:47
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: apple.png
|
||||
ha_category: Hub
|
||||
ha_iot_class: "Local Push"
|
||||
ha_release: 0.49
|
||||
---
|
||||
|
||||
The `apple_tv` platform allows you to control an Apple TV (3rd and 4th generation). See the [remote platform](/components/remote.apple_tv/) if you want to send remote control buttons, e.g. arrow keys.
|
||||
|
||||
<p class='note'>
|
||||
Currently, you must have Home Sharing enabled for this to work. Support for pairing Home Assistant with your device will be supported in a later release.
|
||||
</p>
|
||||
|
||||
To use this component, you must first install some system libraries and a compiler. For Debian or a similar system, this should be enough:
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install build-essential libssl-dev libffi-dev python-dev
|
||||
```
|
||||
|
||||
If you want to discover new devices automatically, just make sure you have `discovery:` in your `configuration.yaml` file. To manually add one or more Apple TVs to your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
apple_tv:
|
||||
- host: IP_1
|
||||
login_id: LOGIN_ID_1
|
||||
name: NAME_1
|
||||
start_off: START_OFF_1
|
||||
credentials: CREDENTIALS_1
|
||||
- host: IP_2
|
||||
login_id: LOGIN_ID_2
|
||||
name: NAME_2
|
||||
start_off: START_OFF_2
|
||||
credentials: CREDENTIALS_2
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): The IP-address of the device.
|
||||
- **login_id** (*Required*): An identifier used to login to the device, see below.
|
||||
- **name** (*Optional*): The name of the device used in the frontend.
|
||||
- **start_off** (*Optional*): Set to true if the device should start in fake standby.
|
||||
- **credentials** (*Optional*): Credentials used for AirPlay playback.
|
||||
|
||||
In order to connect to the device, you need a *login id*. The easiest way to obtain this identifier is to use the `apple_tv_scan` service (described below). Additional information about `start_off` and `credentials` can also be found under the guides section.
|
||||
|
||||
## {% linkable_title Guides %}
|
||||
|
||||
### {% linkable_title Scanning for devices %}
|
||||
|
||||
To scan for devices, press the icon in the upper left corner and select the leftmost icon according to the image:
|
||||
|
||||
<img src='/images/screenshots/developer-tools.png' />
|
||||
|
||||
Select `apple_tv` as domain and `apple_tv_scan` as service then press the button:
|
||||
|
||||
<img src='/images/components/apple_tv/scan_start.jpg' />
|
||||
|
||||
Scanning will be done for three seconds and notification will be shown in the state view with all found devices:
|
||||
|
||||
<img src='/images/components/apple_tv/scan_result.jpg' />
|
||||
|
||||
Alternatively, you may use the application ``atvremote``. Install it with ``pip3 install --upgrade pyatv`` in your Home Assistant environment (note: do *not* use sudo). Then run ``atvremote scan`` to scan for all devices (try again if a device is missing):
|
||||
|
||||
```bash
|
||||
$ atvremote scan
|
||||
Found Apple TVs:
|
||||
- Apple TV at 10.0.10.22 (login id: 00000000-1234-5678-9012-345678901234)
|
||||
|
||||
Note: You must use 'pair' with devices that have home sharing disabled
|
||||
```
|
||||
|
||||
Just copy and paste the login id from the device you want to add. For more details about `atvremote`, see: [this page](http://pyatv.readthedocs.io/en/master/atvremote.html).
|
||||
|
||||
### {% linkable_title My Apple TV turns on when I restart Home Assistant %}
|
||||
|
||||
The Apple TV will automatically turn on if a request is sent to it, e.g., if a button is pressed, something is streamed to it via AirPlay or if current state (currently playing) is accessed. This is how Apple has designed it, and it will cause problems if you are using HDMI CEC. Every time Home Assistant is started, a new request is sent to the device to figure out what is currently playing. When using CEC, this will wake up your TV and other devices you have configured.
|
||||
|
||||
So, if your TV is randomly turning on, this is probably the reason. As stated, this is by design, and there is no real fix for it. There's also no known way to turn off the Apple TV via the protocol used for communication. You have the following options:
|
||||
|
||||
- Do not use this platform
|
||||
- Disable HDMI CEC on your Apple TV
|
||||
- Use "fake standby"
|
||||
|
||||
The first two points are quite obvious. Fake standby is a concept implemented in this platform that disables all requests to the device and makes it appear as being "off" in the web interface. This will make sure that the device is not woken up, but it will of course not show any information or allow you to control it. It is however easy to turn it on (or off) in the web interface or to use an automation with `turn_on`. To make it more useful, you can write automations that turn it on or off depending on some other device, like the input source on your receiver.
|
||||
|
||||
To put a device into fake standby when starting Home Assistant, add `start_off: true` to your configuration.
|
||||
|
||||
<p class='note warning'>
|
||||
Turning the device on/off in the user interface will *not* turn the physical device on/off according to the description above.
|
||||
</p>
|
||||
|
||||
|
||||
### {% linkable_title Setting up device authentication %}
|
||||
|
||||
If you, when playing media with `play_url`, get the following error message:
|
||||
|
||||
*“This AirPlay connection requires iOS 7.1 or later, OS X 10.10 or later, or iTunes 11.2 or later.”*
|
||||
|
||||
then device authentication is required. Press the icon in the upper left corner and select the leftmost icon according to the image below:
|
||||
|
||||
<img src='/images/screenshots/developer-tools.png' />
|
||||
|
||||
Select `apple_tv` as domain, `apple_tv_authenticate` as service and enter `{"entity_id": "XXX"}` into "Service Data", but replace XXX with the entity id of your device (e.g. `media_player.apple_tv`). Press the button and hopefully you are presented with an input dialog asking for a pin code:
|
||||
|
||||
<img src='/images/components/apple_tv/auth_start.jpg' />
|
||||
|
||||
If no dialog appears, go back to the states view and display it from there (press `CONFIGURE` as displayed in the image):
|
||||
|
||||
<img src='/images/components/apple_tv/auth_pin.jpg' />
|
||||
|
||||
A PIN code should now be visible on your TV, just enter it into the dialog and press "Confirm". You should see if it succeeded in the state view. Copy the credentials and insert it into your configuration (make sure you copy everything, it should be 81 characters) after ``credentials:`` with no line-break:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
apple_tv:
|
||||
- host: 10.0.0.20
|
||||
login_id: 00000000-1234-5678-9012-345678901234
|
||||
credentials: 1B8C387DDB59BDF6:CF5ABB6A2C070688F5926ADB7C010F6DF847252C15F9BDB6DA3E09D6591E90E5
|
||||
```
|
||||
|
||||
Restart Home Assistant, and you should now be able to use `play_url` as before.
|
||||
|
||||
## {% linkable_title Services %}
|
||||
|
||||
### {% linkable_title Service `apple_tv_authenticate` %}
|
||||
|
||||
To play media on an Apple TV with device authentication enabled (e.g., ATV4 with tvOS 10.2+), Home Assistant must be properly authenticated. This method starts the process and presents the credentials needed for playback as a persistent notification. Please see guide above for usage.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | yes | String or list of strings that point at `entity_id`s of Apple TVs.
|
||||
|
||||
### {% linkable_title Service `apple_tv_scan` %}
|
||||
|
||||
Scans the local network for Apple TVs. All found devices are presented as a persistent notification.
|
||||
|
@ -14,13 +14,13 @@ ha_release: pre 0.7
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
The [Arduino](https://www.arduino.cc/) device family are microcontroller boards that are often based on the ATmega328 chip. They come with digital input/output pins (some can be used as PWM outputs), analog inputs, and a USB connection. The equipment depends on the [type](https://www.arduino.cc/en/Main/Products) of board. The most common ones are the Arduino Uno and the Arduino Leonardo with 14 digital input/output pins and 6 analog input pins.
|
||||
The [Arduino](https://www.arduino.cc/) device family are microcontroller boards that are often based on the ATmega328 chip. They come with digital input/output pins (some can be used as PWM outputs), analog inputs, and a USB connection. The equipment depends on the [type](https://www.arduino.cc/en/Main/Products) of the board. The most common ones are the Arduino Uno and the Arduino Leonardo with 14 digital input/output pins and 6 analog input pins.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
To integrate an Arduino boards with Home Assistant, add the following section to your `configuration.yaml` file:
|
||||
|
||||
@ -32,7 +32,7 @@ arduino:
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **port** (*Required*): The port where your board is connected to your Home Assistant host. If you are using an original Arduino the port will be named `ttyACM*` otherwise `ttyUSB*`.
|
||||
- **port** (*Required*): The port where your board is connected to your Home Assistant host. If you are using an original Arduino, the port will be named `ttyACM*` otherwise `ttyUSB*`.
|
||||
|
||||
The exact number can be determined with the command shown below.
|
||||
|
||||
@ -40,7 +40,7 @@ The exact number can be determined with the command shown below.
|
||||
$ ls /dev/ttyACM*
|
||||
```
|
||||
|
||||
If that's not working, check your `dmesg` or `journalctl -f` output. Keep in mind that Arduino clones are often using a different name for the port (eg. `/dev/ttyUSB*`).
|
||||
If that's not working, check your `dmesg` or `journalctl -f` output. Keep in mind that Arduino clones are often using a different name for the port (e.g. `/dev/ttyUSB*`).
|
||||
|
||||
<p class='note warning'>
|
||||
A word of caution: The Arduino boards are not storing states. This means that with every initialization the pins are set to off/low.
|
||||
|
@ -31,4 +31,18 @@ Configuration variables:
|
||||
|
||||
It is recommended to create a dedicated user on Arlo website to be used within Home Assistant and then share your Arlo cameras.
|
||||
|
||||
Finish its configuration by visiting the [Arlo sensor page](/components/sensor.arlo/) or [Arlo camera page](/components/camera.arlo/).
|
||||
Finish its configuration by visiting the [Arlo sensor page](/components/sensor.arlo/) or [Arlo camera page](/components/camera.arlo/) or [Arlo control panel page](/components/alarm_control_panel.arlo/).
|
||||
|
||||
The Arlo component also provides a service to enable/disable the motion detection sensor. The example below enables the motion detection every time the Home Assistant service starts.
|
||||
|
||||
```yaml
|
||||
#automation.yaml
|
||||
- alias: Enable Arlo upton HA start'
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
service: camera.enable_motion_detection
|
||||
entity_id: camera.arlo_frontdoor
|
||||
```
|
||||
|
42
source/_components/asterisk_mbox.markdown
Normal file
42
source/_components/asterisk_mbox.markdown
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Asterisk Voicemail"
|
||||
description: "Instructions how to integrate your existing Asterisk voicemail within Home Assistant."
|
||||
date: 2017-06-30 18:30
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
ha_category: Other
|
||||
ha_version: 0.51
|
||||
ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
The Asterisk Voicemail integration for Home Assistant allows you to view, listen to, and delete voicemails from an Asterisk voicemail mailbox. The component includes a panel on the frontend that provides caller-id and speech-to-text transcription (using Google's API) of messages in addition to playback and message deletion. There is also an included sensor that indicates of the number of available messages. There is no requirement that the Asterisk PBX and Home Assistant are running on the same machine.
|
||||
|
||||
To enable the component, a configuration is required in both Home Assistant as well as on the Asterisk server.
|
||||
|
||||
First follow the [Asterisk PBX configuration guide](/docs/asterisk_mbox) to setup the necessary server on the Asterisk PBX server (this is needed even if Asterisk and Home Assistant are running on the same server)
|
||||
|
||||
Once that is complete, add the following entry `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
asterisk_mbox:
|
||||
password: ASTERISK_PBX_PASSWORD
|
||||
host: ASTERISK_PBX_SERVER_IP_ADDRESS
|
||||
port: ASTERISK_PBX_SERVER_PORT
|
||||
```
|
||||
|
||||
This will add a new 'Mailbox' side-panel, as well as a sensor to indicate # of messages available.
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **password** (*Required*): The password that was set during Asterisk PBX configuration
|
||||
- **host** (*Required*): The ip-address of the server that is running the Asterisk PBX
|
||||
- **port** (*Required*): The port on the Asterisk PBX server that was configured during Asterisk PBX configuration
|
||||
|
||||
<p class='note warning'>
|
||||
Communication between the Asterisk PBX server and the Home Assistant server is password-protected, but the data transmission is not encrypted. It is recommended to only use this component when communication is contained within a local area network.
|
||||
</p>
|
||||
|
@ -13,30 +13,10 @@ ha_release: "0.45"
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
[Axis Communications](https://www.axis.com/) devices are surveillance cameras and other security related network connected hardware. Sensor API works with firmware 5.50 and newer.
|
||||
[Axis Communications](https://www.axis.com/) devices are surveillance cameras and other security-related network connected hardware. Sensor API works with firmware 5.50 and newer.
|
||||
|
||||
Home Assistant will automatically discover their presence on your network.
|
||||
|
||||
## {% linkable_title Dependencies %}
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install python3-gi gir1.2-gstreamer-1.0
|
||||
```
|
||||
|
||||
Depending on how you run Home Assistant you might be needed to symlink the `gi` module into your environment.
|
||||
|
||||
Hassbian:
|
||||
|
||||
```bash
|
||||
$ ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/lib/python3.4/site-packages
|
||||
```
|
||||
|
||||
Raspberry Pi All-In-One Installer:
|
||||
|
||||
```bash
|
||||
$ ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages
|
||||
```
|
||||
|
||||
You can also manually configure your devices by adding the following lines to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
@ -50,21 +30,24 @@ axis:
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **device** (*Required*): Unique name for the Axis device.
|
||||
- **host** (*Required*): The IP address to your Axis device.
|
||||
- **username** (*Optional*): The username to your Axis device. Defaults to `root`.
|
||||
- **password** (*Optional*): The password to your Axis device. Defaults to `pass`.
|
||||
- **trigger_time** (*Optional*): Minimum time (in seconds) a sensor should keep its positive value. Defaults to 0.
|
||||
- **location** (*Optional*): Physical location of your Axis device. Default not set.
|
||||
- **include** (*Required*): This cannot be empty else there would be no use adding the device at all.
|
||||
- **camera**: Stream MJPEG video to Home Assistant.
|
||||
- **motion**: The built-in motion detection in Axis cameras.
|
||||
- **vmd3**: ACAP Motion Detection app which has better algorithms for motion detection.
|
||||
- **pir**: PIR sensor that can trigger on motion.
|
||||
- **sound**: Sound detector.
|
||||
- **daynight**: Certain cameras have day/night mode if they have built-in IR lights.
|
||||
- **tampering**: Signals when camera believes that it has been tampered with.
|
||||
- **input**: Trigger on whatever you have connected to device input port.
|
||||
## {% linkable_title Configuration variables %}
|
||||
|
||||
- **device** (*Required*): Unique name
|
||||
- **host** (*Required*): The IP address to your Axis device.
|
||||
- **username** (*Optional*): The username to your Axis device. Default 'root'.
|
||||
- **password** (*Optional*): The password to your Axis device. Default 'pass'.
|
||||
- **trigger_time** (*Optional*): Minimum time (in seconds) a sensor should keep its positive value. Default 0.
|
||||
- **port** (*Optional*): Configure port web server of device is accessible from. Default 80.
|
||||
- **location** (*Optional*): Physical location of your Axis device. Default not set.
|
||||
- **include** (*Required*): This cannot be empty else there would be no use adding the device at all.
|
||||
- **camera**: Stream MJPEG video to Home Assistant.
|
||||
- **motion**: The built-in motion detection in Axis cameras.
|
||||
- **vmd3**: ACAP Motion Detection app which has better algorithms for motion detection.
|
||||
- **pir**: PIR sensor that can trigger on a motion.
|
||||
- **sound**: Sound detector.
|
||||
- **daynight**: Certain cameras have day/night mode if they have built-in IR lights.
|
||||
- **tampering**: Signals when camera believes that it has been tampered with.
|
||||
- **input**: Trigger on whatever you have connected to device input port.
|
||||
|
||||
A full configuration example could look like this:
|
||||
|
||||
@ -85,10 +68,29 @@ axis:
|
||||
location: köket
|
||||
```
|
||||
|
||||
<p class='note'>
|
||||
If you are using Python 3.6, you might need to replace the 34m with 36m in the _gi.*.so filename in the gi folder.
|
||||
</p>
|
||||
|
||||
<p class='note'>
|
||||
Any specific levels for triggers needs to be configured on the device.
|
||||
</p>
|
||||
|
||||
<p class='note'>
|
||||
It is recommended that you create a user on your Axis device specifically for Home Assistant. For all current functionality it is enough to create a user belonging to user group viewer.
|
||||
It is recommended that you create a user on your Axis device specifically for Home Assistant. For all current functionality, it is enough to create a user belonging to user group viewer.
|
||||
</p>
|
||||
|
||||
## {% linkable_title Device services %}
|
||||
Available services: `vapix_call`.
|
||||
|
||||
#### {% linkable_title Service `axis/vapix_call` %}
|
||||
Send a command using [Vapix](https://www.axis.com/support/developer-support/vapix). For details please read the API specifications.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|--------------------------------------------------|
|
||||
| `name` | no | Name of device to communicate with. |
|
||||
| `param` | no | What parameter to operate on. |
|
||||
| `cgi` | yes | Which cgi to call on the device. Default is `param.cgi`. |
|
||||
| `action` | yes | What type of call. Default is `update`. |
|
||||
|
||||
Response to call can be subscribed to on event `vapix_call_response`
|
||||
|
22
source/_components/binary_sensor.abode.markdown
Normal file
22
source/_components/binary_sensor.abode.markdown
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Abode Binary Sensor"
|
||||
description: "Instructions how to integrate Abode binary sensors into Home Assistant."
|
||||
date: 2017-08-26 0:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: abode.jpg
|
||||
ha_release: 0.52
|
||||
ha_category: Binary Sensor
|
||||
ha_iot_class: "Cloud Push"
|
||||
---
|
||||
|
||||
The `abode` security control panel platform allows you to control your [Abode](https://goabode.com/) alarms.
|
||||
|
||||
This component will add `Door Contacts`, `Connectivity` sensors (remotes, keypads, and status indicators), `Moisture` sensors, and `Motion` or `Occupancy` sensors.
|
||||
|
||||
This component will also list all Abode `Quick Actions` that are set up. You can trigger these quick actions by passing the `entity_id` of your quick action binary sensor to the [trigger_quick_action service](/components/abode/#trigger_quick_action).
|
||||
|
||||
The requirement is that you have setup your [Abode hub](/components/abode/).
|
@ -17,3 +17,18 @@ ha_iot_class: "Local Polling"
|
||||
The `android_ip_webcam` binary sensor platform lets you observe the motion state of [Android IP webcam](https://play.google.com/store/apps/details?id=com.pas.webcam) sensors through Home Assistant.
|
||||
|
||||
Devices will be configured automatically. Please refer to the [component](/components/android_ip_webcam/) configuration on how to setup.
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
You can also setup the binary motion sensor with the following script:
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: rest
|
||||
name: Kitchen Motion
|
||||
sensor_class: motion
|
||||
resource: http://IP:8080/sensors.json?sense=motion_active
|
||||
value_template: '{{ value_json.motion_active.data[0][1][0] | round(0) }}'
|
||||
```
|
||||
{% endraw %}
|
||||
|
@ -30,7 +30,7 @@ Configuration variables:
|
||||
|
||||
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
|
||||
- **pin** (*Required*): Number of the pin to monitor.
|
||||
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
|
||||
- **name** (*Optional*): Let you overwrite the name of the device. By default *name* from the device is used.
|
||||
|
||||
Accessing the URL http://IP_ADDRESS/digital/PIN_NUMBER should give you the state of the pin inside a JSON response as `return_value`.
|
||||
|
||||
|
91
source/_components/binary_sensor.bayesian.markdown
Normal file
91
source/_components/binary_sensor.bayesian.markdown
Normal file
@ -0,0 +1,91 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Bayesian Binary Sensor"
|
||||
description: "Instructions how to integrate threshold Bayesian sensors into Home Assistant."
|
||||
date: 2017-08-27 20:05
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Binary Sensor
|
||||
ha_iot_class: "Local Polling"
|
||||
ha_release: 0.53
|
||||
---
|
||||
|
||||
|
||||
The `bayesian` binary sensor platform observes the state from multiple sensors and uses [Bayes' rule](https://en.wikipedia.org/wiki/Bayes%27_theorem) to estimate the probability that an event has occurred given the state of the observed sensors. If the estimated posterior probability is above the `probability_threshold`, the sensor is `on` otherwise it is `off`.
|
||||
|
||||
This allows for the detection of complex events that may not be readily observable, e.g., cooking, showering, in bed, the start of a morning routine, etc. It can also be used to gain greater confidence about events that _are_ directly observable, but for which the sensors can be unreliable, e.g., presence.
|
||||
|
||||
To enable the Bayesian sensor, add the following lines to your `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: bayesian
|
||||
prior: 0.1
|
||||
observations:
|
||||
- entity_id: 'switch.kitchen_lights'
|
||||
prob_given_true: 0.6
|
||||
prob_given_false: 0.2
|
||||
platform: 'state'
|
||||
to_state: 'on'
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **prior** (*Required*): The prior probability of the event. At any point in time (ignoring all external influences) how likely is this event to occur?
|
||||
- **probability_threshold** (*Optional*): The probability at which the sensor should trigger to `on`.
|
||||
- **name** (*Optional*): Name of the sensor to use in the frontend. Defaults to `Bayesian Binary sensor`.
|
||||
- **observations** array (*Required*): The observations which should influence the likelihood that the given event has occurred.
|
||||
- **entity_id** (*Required*): Name of the entity to monitor.
|
||||
- **prob_given_true** (*Required*): The probability of the observation occurring, given the event is `true`.
|
||||
- **prob_given_false** (*Optional*): The probability of the observation occurring, given the event is `false` can be set as well. If `prob_given_false` is not set, it will default to `1 - prob_given_true`.
|
||||
- **platform** (*Required*): The only supported observation platforms are `state` and `numeric_state`, which are modeled after their corresponding triggers for automations, requiring `below` and/or `above` instead of `to_state`.
|
||||
- **to_state** (*Required*): The target state.
|
||||
|
||||
## {% linkable_title Full examples %}
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
name: 'in_bed'
|
||||
platform: 'bayesian'
|
||||
prior: 0.25
|
||||
probability_threshold: 0.95
|
||||
observations:
|
||||
- entity_id: 'sensor.living_room_motion'
|
||||
prob_given_true: 0.4
|
||||
prob_given_false: 0.2
|
||||
platform: 'state'
|
||||
to_state: 'off'
|
||||
- entity_id: 'sensor.basement_motion'
|
||||
prob_given_true: 0.5
|
||||
prob_given_false: 0.4
|
||||
platform: 'state'
|
||||
to_state: 'off'
|
||||
- entity_id: 'sensor.bedroom_motion'
|
||||
prob_given_true: 0.5
|
||||
platform: 'state'
|
||||
to_state: 'on'
|
||||
- entity_id: 'sun.sun'
|
||||
prob_given_true: 0.7
|
||||
platform: 'state'
|
||||
to_state: 'below_horizon'
|
||||
```
|
||||
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
name: 'Heat On'
|
||||
platform: 'bayesian'
|
||||
prior: 0.2
|
||||
probability_threshold: 0.9
|
||||
observations:
|
||||
- entity_id: 'sensor.outside_air_temperature_fahrenheit'
|
||||
prob_given_true: 0.95
|
||||
platform: 'numeric_state'
|
||||
below: 50
|
||||
```
|
@ -28,11 +28,12 @@ binary_sensor:
|
||||
Configuration variables:
|
||||
|
||||
- **command** (*Required*): The action to take to get the value.
|
||||
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
|
||||
- **name** (*Optional*): Let you overwrite the name of the device. By default *name* from the device is used.
|
||||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **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](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload.
|
||||
- **scan_interval** (*Optional*): Defines number of seconds for polling interval (defaults to 60 seconds).
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
|
28
source/_components/binary_sensor.doorbird.markdown
Normal file
28
source/_components/binary_sensor.doorbird.markdown
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
layout: page
|
||||
title: "DoorBird Binary Sensor"
|
||||
description: "Instructions how to integrate DoorBird video doorbell state into Home Assistant."
|
||||
date: 2017-08-06 11:30
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: doorbird.png
|
||||
ha_category: Binary Sensor
|
||||
ha_release: "0.54"
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
The `doorbird` binary sensor platform allows Home Assistant to monitor when your [DoorBird](http://www.doorbird.com/) doorbell rings.
|
||||
|
||||
<p class='note'>
|
||||
You must have the [DoorBird component](/components/doorbird/) configured to use this binary sensor.
|
||||
</p>
|
||||
|
||||
To enable the binary sensor, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: doorbird
|
||||
```
|
@ -30,7 +30,7 @@ Configuration variables:
|
||||
- **name** (*Optional*): An identifier for the switch in the frontend.
|
||||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
|
||||
EnOcean binary sensors only generate 'button_pressed' events. The event data has follwing four fields:
|
||||
EnOcean binary sensors only generate 'button_pressed' events. The event data has following four fields:
|
||||
|
||||
- **id**: The ID of the device (see configuration).
|
||||
- **pushed**: `1` for a button press, `0` for a button release.
|
||||
|
@ -52,9 +52,9 @@ $ ffmpeg -i YOUR_INPUT -an -filter:v select=gt(scene\,0.1) -f framemd5 -
|
||||
|
||||
If you are running into trouble with this sensor, please refer to the [troubleshooting section](/components/ffmpeg/#troubleshooting).
|
||||
|
||||
#### {% linkable_title Tipps %}
|
||||
#### {% linkable_title Tips %}
|
||||
|
||||
- Use motion only in a customer area with [crop filter](https://ffmpeg.org/ffmpeg-filters.html#crop):
|
||||
- Use motion only in a custom area with [crop filter](https://ffmpeg.org/ffmpeg-filters.html#crop):
|
||||
|
||||
```yaml
|
||||
extra_arguments: -filter:v "crop=100:100:12:34"
|
||||
|
@ -15,7 +15,7 @@ ha_release: 0.35
|
||||
|
||||
The `flic` platform allows you to connect with multiple [flic](https://flic.io) smart buttons.
|
||||
|
||||
The platform does not directly interact with the buttons, but communicates with the flic service that manages the buttons. The service can run on the same instance as home assistant or any other reachable machine. For setup instructions visit the GitHub repository of the service for [Linux](https://github.com/50ButtonsEach/fliclib-linux-hci), [OS X](https://github.com/50ButtonsEach/flic-service-osx) or [Windows](https://github.com/50ButtonsEach/fliclib-windows).
|
||||
The platform does not directly interact with the buttons, but communicates with the flic service that manages the buttons. The service can run on the same instance as Home Assistant or any other reachable machine. For setup instructions visit the GitHub repository of the service for [Linux](https://github.com/50ButtonsEach/fliclib-linux-hci), [OS X](https://github.com/50ButtonsEach/flic-service-osx) or [Windows](https://github.com/50ButtonsEach/fliclib-windows).
|
||||
|
||||
To use your flic buttons in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
@ -30,7 +30,7 @@ Configuration variables:
|
||||
- **host** (*Optional*): The IP or hostname of the flic service server. Defaults to `localhost`.
|
||||
- **port** (*Optional*): The port of the flic service. Defaults to `5551`.
|
||||
- **discovery** (*Optional*): If `true` then the component is configured to constantly scan for new buttons. Defaults to `true`.
|
||||
- **ignored_click_types**: List of click types whose occurrence should not trigger and `flic_click` event.
|
||||
- **ignored_click_types**: List of click types whose occurrence should not trigger a `flic_click` event. Click types are `single`, `double`, and `hold`.
|
||||
- **timeout** (*Optional*): Maximum time in seconds an event can be queued locally on a button before discarding the event. Defaults to 3.
|
||||
|
||||
#### {% linkable_title Discovery %}
|
||||
@ -38,7 +38,7 @@ Configuration variables:
|
||||
If discovery is enabled, you can add a new button by pressing it for at least 7 seconds. The button will be paired with the flic service and added to Home Assistant. Otherwise, you have to manually pair it with the flic service. The Home Assistant platform will not scan for new buttons and will only connect to buttons already paired.
|
||||
|
||||
#### {% linkable_title Timeout %}
|
||||
+When the flic button is triggered while disconnected from flic service, it will queue all events and try to connect and transmit them as soon as possible. The timeout variable can be used to stop events from triggering if too much time passed between the action and the notification in Home Assistant.
|
||||
When the flic button is triggered while disconnected from flic service, it will queue all events and try to connect and transmit them as soon as possible. The timeout variable can be used to stop events from triggering if too much time passed between the action and the notification in Home Assistant.
|
||||
|
||||
#### {% linkable_title Events %}
|
||||
|
||||
@ -62,7 +62,7 @@ automation:
|
||||
Event data:
|
||||
|
||||
- **button_name**: The name of the button, that triggered the event.
|
||||
- **button_address**: The bluetooth address of the button, that triggered the event.
|
||||
- **button_address**: The Bluetooth address of the button, that triggered the event.
|
||||
- **click_type**: The type of click. Possible values are `single`, `double` and `hold`.
|
||||
- **queued_time**: The amount of time this event was queued on the button, in seconds.
|
||||
|
||||
|
29
source/_components/binary_sensor.gc100.markdown
Normal file
29
source/_components/binary_sensor.gc100.markdown
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
layout: page
|
||||
title: gc100 Binary Sensor
|
||||
description: "Instructions on how to set up an gc100 binary sensor within Home Assistant."
|
||||
date: 2017-10-27 17:26
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
ha_category: Binary Sensor
|
||||
ha_release: 0.57
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
To enable this sensor, you first have to set up [gc100](/components/gc100/), and add the following lines to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: gc100
|
||||
ports:
|
||||
- '3:1': Doorchime
|
||||
- '3:2': Garage Obstruction
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **ports** (*Required*): A list of module-address to name mappings in the format 'x:y': name, where x is module #, y is address.
|
||||
|
@ -24,7 +24,7 @@ binary_sensor.front_porch_motion
|
||||
binary_sensor.front_port_line_crossing
|
||||
```
|
||||
|
||||
When used with a NVR device the sensors will be appeneded with the channel number they represent. For example, if you configure an NVR with the name "Home" that supports 2 cameras with motion detection and line crossing events enabled to notify the surveillance center the following binary sensors will be added to Home Assistant:
|
||||
When used with a NVR device the sensors will be appended with the channel number they represent. For example, if you configure an NVR with the name "Home" that supports 2 cameras with motion detection and line crossing events enabled to notify the surveillance center the following binary sensors will be added to Home Assistant:
|
||||
|
||||
```
|
||||
binary_sensor.home_motion_1
|
||||
|
@ -12,6 +12,10 @@ ha_category: Binary Sensor
|
||||
ha_release: pre 0.7
|
||||
---
|
||||
|
||||
The HTTP binary sensor is dynamically created with the first request that is made to its URL. You don't have to define it in the configuration first.
|
||||
|
||||
The sensor will then exist as long as Home Assistant is running. After a restart of Home Assistant the sensor will be gone until it is triggered again.
|
||||
|
||||
The URL for a binary sensor looks like the example below:
|
||||
|
||||
```bash
|
||||
|
@ -13,4 +13,54 @@ ha_release: 0.24
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
To get your KNX binary sensors working with Home Assistant, follow the instructions for the [KNX component](/components/knx/).
|
||||
The `knx` sensor platform allows you to monitor [KNX](http://www.knx.org) binary sensors.
|
||||
|
||||
The `knx` component must be configured correctly, see [KNX Component](/components/knx).
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: knx
|
||||
name: "Entrance.Motion.Sensor"
|
||||
address: '6/0/2'
|
||||
device_class: 'motion'
|
||||
#significant_bit: 2
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Optional*): A name for this device used within Home Assistant.
|
||||
- **address**: KNX group address of the binary sensor.
|
||||
- **device_class** (Optional): HASS device class e.g. "motion".
|
||||
- **significant_bit** (Optional): Specify which significant bit of the KNX value should be used. Default is 1.
|
||||
|
||||
You can also attach actions to binary sensors (e.g., to switch on a light when a switch was pressed). In this example, one light is switched on when the button was pressed once and two others when the button was pressed a second time.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: knx
|
||||
name: Livingroom.3Switch3
|
||||
address: '5/0/26'
|
||||
automation:
|
||||
- counter: 1
|
||||
hook: 'on'
|
||||
action:
|
||||
- entity_id: light.hue_color_lamp_1
|
||||
service: homeassistant.turn_on
|
||||
- counter: 2
|
||||
hook: 'on'
|
||||
action:
|
||||
- entity_id: light.hue_bloom_1
|
||||
service: homeassistant.turn_on
|
||||
- entity_id: light.hue_bloom_2
|
||||
service: homeassistant.turn_on
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Optional*): A name for this device used within Home Assistant.
|
||||
- **counter** (*Optional*): Set to 2 if your only want the action to be executed if the button was pressed twice. To 3 for three times button pressed. Defaults to 1.
|
||||
- **hook** (Optional): Indicates if the automation should be executed on what state of the binary sensor. Values: "on" or "off". Defaults to "on".
|
||||
- **action**: Specify a list of actions analog to the [automation rules](/docs/automation/action/).
|
||||
|
||||
|
34
source/_components/binary_sensor.linode.markdown
Normal file
34
source/_components/binary_sensor.linode.markdown
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Linode Binary Sensor"
|
||||
description: "Instructions on how to set up Linode binary sensors within Home Assistant."
|
||||
date: 2017-10-20 08:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
ha_category: System Monitor
|
||||
logo: linode.png
|
||||
ha_release: 0.57
|
||||
ha_iot_class: "Cloud Polling"
|
||||
---
|
||||
|
||||
The `linode` binary sensor platform allows you to monitor your Linode nodes.
|
||||
|
||||
Add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: linode
|
||||
nodes:
|
||||
- 'myvpsname'
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
nodes:
|
||||
description: List of VPSs you want to control.
|
||||
required: true
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Binary Sensor"
|
||||
description: "Instructions how to setup your binary sensors with Home Assistant."
|
||||
description: "Instructions on how-to setup binary sensors with Home Assistant."
|
||||
date: 2015-11-20 14:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -9,27 +9,26 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Binary sensors are gathering information about state of switches, contacts, pins, and alike. The return value of those sensors is usually digital (1/0). This means that those sensors knows only two states: **0/off/low/closed/false** and **1/on/high/open/true**.
|
||||
Binary sensors gather information about the state of devices which have a "digital" return value (either 1 or 0). These can be switches, contacts, pins, etc. These sensors only have two states: **0/off/low/closed/false** and **1/on/high/open/true**. Knowing that there are only two states allows Home Assistant to represent these sensors in a better way in the frontend according to their functionality.
|
||||
|
||||
Knowing that there are only two states allows Home Assistant to represent the sensor better in the frontend.
|
||||
The way these sensors are displayed in the frontend can be modified in the [customize section](/getting-started/customizing-devices/). The following device classes are supported for binary sensors:
|
||||
|
||||
The display style of each entity can be modified in the [customize section](/getting-started/customizing-devices/). The following device classes are supported for binary sensors:
|
||||
|
||||
- **None**: Generic on/off
|
||||
- **cold**: On means cold (or too cold)
|
||||
- **connectivity**: On means connection present, Off means no connection
|
||||
- **gas**: CO, CO2, etc
|
||||
- **heat**: On means hot (or too hot)
|
||||
- **None**: Generic on/off. This is the default and doesn't need to be set.
|
||||
- **cold**: `On` means cold
|
||||
- **connectivity**: `On` means connection present, `Off` means no connection
|
||||
- **gas**: `On` means gas detected
|
||||
- **heat**: `On` means hot
|
||||
- **light**: Lightness threshold
|
||||
- **moisture**: Specifically a wetness sensor
|
||||
- **motion**: Motion sensor
|
||||
- **moving**: On means moving, Off means stopped
|
||||
- **occupancy**: On means occupied, Off means not occupied
|
||||
- **opening**: Door, window, etc. On means open, Off means closed
|
||||
- **power**: Power, over-current, etc
|
||||
- **safety**: On means unsafe, Off means safe
|
||||
- **smoke**: Smoke detector
|
||||
- **sound**: On means sound detected, Off means no sound
|
||||
- **vibration**: On means vibration detected, Off means no vibration
|
||||
- **moisture**: `On` means wet
|
||||
- **motion**: `On` means motion detected
|
||||
- **moving**: `On` means moving, `Off` means stopped
|
||||
- **occupancy**: `On` means occupied, `Off` means not occupied
|
||||
- **opening**: `On` means open, `Off` means closed
|
||||
- **plug**: `On` means device is plugged in, `Off` means device is unplugged
|
||||
- **power**: Power, over-current, etc.
|
||||
- **safety**: `On` means unsafe, `Off` means safe
|
||||
- **smoke**: `On` means smoke detected
|
||||
- **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).
|
||||
|
@ -36,3 +36,22 @@ Configuration variables:
|
||||
- **name** (*Required*): Name of the sensor.
|
||||
- **slave** (*Required*): The number of the slave (Optional for TCP and UDP Modbus).
|
||||
- **coil** (*Required*): Coil number.
|
||||
|
||||
It's possible to change the default 30 seconds scan interval for the sensor updates as shown in the [Platform options](/docs/configuration/platform_options/#scan-interval) documentation.
|
||||
|
||||
### {% linkable_title Full example %}
|
||||
|
||||
Example a sensor with a 10 seconds scan interval:
|
||||
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: modbus
|
||||
scan_interval: 10
|
||||
coils:
|
||||
- name: Sensor1
|
||||
slave: 1
|
||||
coil: 100
|
||||
- name: Sensor2
|
||||
slave: 1
|
||||
coil: 110
|
||||
```
|
||||
|
@ -14,9 +14,13 @@ ha_iot_class: "depends"
|
||||
---
|
||||
|
||||
|
||||
The `mqtt` binary sensor platform uses the MQTT message payload as the sensor value. If messages in this `state_topic` are published with *RETAIN* flag, the sensor will receive an instant update with the last known value. Otherwise, the initial state will be off.
|
||||
The `mqtt` binary sensor platform uses an MQTT message payload to set the binary sensor to one of two states: `on` or `off`.
|
||||
|
||||
To use your MQTT binary sensor in your installation, add the following to your `configuration.yaml` file:
|
||||
The binary sensor state will be updated only after a new message is published on `state_topic` matching `payload_on` or `payload_off`. If these messages are published with the `retain` flag set, the binary sensor will receive an instant state update after subscription and Home Assistant will display the correct state on startup. Otherwise, the initial state displayed in Home Assistant will be `unknown`.
|
||||
|
||||
The `mqtt` binary sensor platform optionally supports an `availability_topic` to receive online and offline messages (birth and LWT messages) from the MQTT device. During normal operation, if the MQTT cover device goes offline (i.e. publishes `payload_not_available` to `availability_topic`), Home Assistant will display the binary sensor as `unavailable`. If these messages are published with the `retain` flag set, the binary sensor will receive an instant update after subscription and Home Assistant will display the correct availability state of the binary sensor when Home Assistant starts up. If the `retain` flag is not set, Home Assistant will display the binary sensor as `unavailable` when Home Assistant starts up. If no `availability_topic` is defined, Home Assistant will consider the MQTT device to be available.
|
||||
|
||||
To use an MQTT binary sensor in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
@ -27,32 +31,37 @@ binary_sensor:
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Optional*): The name of the binary sensor. Default is `MQTT Binary Sensor`.
|
||||
- **state_topic** (*Required*): The MQTT topic subscribed to receive sensor values.
|
||||
- **name** (*Optional*): The name of the sensor. Default is 'MQTT Sensor'.
|
||||
- **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".
|
||||
- **payload_on** (*Optional*): The payload that represents the on state. Default is `ON`.
|
||||
- **payload_off** (*Optional*): The payload that represents the off state. Default is `OFF`.
|
||||
- **availability_topic** (*Optional*): The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. If `availability_topic` is not defined, the binary sensor availability state will always be `available`. If `availability_topic` is defined, the binary sensor availability state will be `unavailable` by default.
|
||||
- **payload_available** (*Optional*): The payload that represents the online state. Default is `online`.
|
||||
- **payload_not_available** (*Optional*): The payload that represents the offline state. Default is `offline`.
|
||||
- **qos** (*Optional*): The maximum QoS level to be used when receiving messages. Default is `0`.
|
||||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) 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 a sensor manually:
|
||||
To test, you can use the command line tool `mosquitto_pub` shipped with `mosquitto` or the `mosquitto-clients` package to send MQTT messages. To set the state of the binary sensor manually:
|
||||
|
||||
```bash
|
||||
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/window/contact -m "OFF"
|
||||
```
|
||||
|
||||
An extended configuration for the same sensor could look like this if you want/need to be more specific.
|
||||
The example below shows a full configuration for a binary sensor:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: mqtt
|
||||
name: "Window Contact Sensor"
|
||||
state_topic: "home-assistant/window/contact"
|
||||
name: "Windows contact"
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
availability_topic: "home-assistant/window/availability"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
qos: 0
|
||||
payload_on: "1"
|
||||
payload_off: "0"
|
||||
device_class: opening
|
||||
value_template: '{% raw %}{{ value.x }}{% endraw %}'
|
||||
```
|
||||
|
||||
|
@ -38,9 +38,9 @@ binary_sensor:
|
||||
|
||||
### {% linkable_title Setup of the myStrom Buttons %}
|
||||
|
||||
You need to configure every button to make it work with Home Assistant. First connect the Wifi Buttons to your wireless network. Keep in mind that they only support WPS (Wi-FI Protected Setup). Once a button is connected you have three minutes to set the actions for the push patterns. The fastest way is to use `curl`. Check the [documentation](https://mystrom.ch/wp-content/uploads/REST_API_WBP.txt) of the WiFi Button for further details about the implementation (`http://` is replaced by `get://` or `post://`). `action` is the name of the corresponding push pattern (see above).
|
||||
You need to configure every button to make it work with Home Assistant. First connect the Wifi Buttons to your wireless network. Once a button is connected you have three minutes to set the actions for the push patterns. The fastest way is to use `curl`. Check the [documentation](https://mystrom.ch/wp-content/uploads/REST_API_WBP.txt) of the WiFi Button for further details about the implementation (`http://` is replaced by `get://` or `post://`). `action` is the name of the corresponding push pattern (see above).
|
||||
|
||||
The endpoint that is recieving the data is `[IP address Home Assistant]:8123/api/mystrom`.
|
||||
The endpoint that is receiving the data is `[IP address Home Assistant]:8123/api/mystrom`.
|
||||
|
||||
```bash
|
||||
$ curl -d "[action]=get://[IP address Home Assistant]:8123/api/mystrom?[action]%3D[ID of the button]" http://[IP address of the button]/api/v1/device/[MAC address of the button]
|
||||
|
@ -27,8 +27,7 @@ If you want to select a specific sensor, set discovery to False for [netatmo](/c
|
||||
binary_sensor:
|
||||
platform: netatmo
|
||||
home: home_name
|
||||
timeout: 15
|
||||
offset: 90
|
||||
timeout: 90
|
||||
cameras:
|
||||
- camera_name1
|
||||
welcome_sensors:
|
||||
@ -45,8 +44,7 @@ binary_sensor:
|
||||
Configuration variables:
|
||||
|
||||
- **home** (*Optional*): Will use the cameras of this home only.
|
||||
- **timeout** (*Optional*): The Welcome binary sensors will reflect the events from the last X minutes. (default: 15)
|
||||
- **offset** (*Optional*): The Presence binary sensors will stay on for X seconds after detection. (default: 90)
|
||||
- **timeout** (*Optional*): The Welcome/Presence binary sensors will stay on for X seconds after detection. (default: 90)
|
||||
- **cameras** array (*Optional*): Cameras to use. Multiple entities allowed.
|
||||
- 'camera_name': Name of the camera to display.
|
||||
- **welcome_sensors** array (*Optional*): List of monitored conditions.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Pilight Binary Sensor"
|
||||
description: "Instructions how to integrate pilight binary sensors within Home Assistant."
|
||||
description: "Instructions how to integrate Pilight binary sensors within Home Assistant."
|
||||
date: 2017-03-24 20:41
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -13,8 +13,28 @@ ha_release: 0.44
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
This component implement the [pilight hub](https://github.com/home-assistant/home-assistant.github.io/source/_components/pilight.markdown) binary sensor functionality.
|
||||
Two type of pilight binary sensor configuration available. A normal sensor which send the on and off state cyclical and a trigger sensor which send only a trigger when an event happend (for example lots of cheap PIR motion detector) (see example configuration below).
|
||||
The `pilight` binary sensor platform implement the [pilight hub](/components/pilight/) binary sensor functionality. Two type of Pilight binary sensor configuration available. A normal sensor which send the on and off state cyclical and a trigger sensor which send only a trigger when an event happened (for example lots of cheap PIR motion detector).
|
||||
|
||||
To enable a Pilight binary sensor in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yml entry
|
||||
binary_sensor:
|
||||
- platform: pilight
|
||||
variable: 'state'
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **variable** (*Required*): The variable name in the data stream that defines the sensor value.
|
||||
- **payload** (*Required*): Message payload identifiers. Only if all identifiers are matched the sensor value is set.
|
||||
- **name** (*Optional*): Name of the sensor.
|
||||
- **payload_on** (*Optional*): Variable `on` value. The component will recognize this as logical '1'.
|
||||
- **payload_off** (*Optional*): Variable `off` value. The component will recognize this as logical '0'.
|
||||
- **disarm_after_trigger:** (*Optional*): Configure sensor as trigger type.
|
||||
- **reset_delay_sec** (*Optional*): Seconds before the sensor is disarmed if `disarm_after_trigger` is set to true. Default is 30 seconds.
|
||||
|
||||
A full configuration example could look like this:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yml entry
|
||||
@ -25,13 +45,6 @@ binary_sensor:
|
||||
payload:
|
||||
unitcode: 371399
|
||||
payload_on: 'closed'
|
||||
disarm_after_trigger: True <-- use this if you want trigger type behavior
|
||||
disarm_after_trigger: True
|
||||
reset_delay_sec: 30
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
- **variable** (*Required*): The variable name in the data stream that defines the sensor value.
|
||||
- **payload** (*Required*): Message payload identifiers. Only if all identifiers are matched the sensor value is set.
|
||||
- **name** (*Optional*): Name of the sensor.
|
||||
- **payload_on** (*Optional*): Variable `on` value. The component will recognize this as logical '1'.
|
||||
- **payload_off** (*Optional*): Variable `off` value. The component will recognize this as logical '0'.
|
||||
- **disarm_after_trigger:** (*Optional*): Configure sensor as trigger type.
|
||||
|
30
source/_components/binary_sensor.raincloud.markdown
Normal file
30
source/_components/binary_sensor.raincloud.markdown
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Melnor Raincloud Binary Sensor"
|
||||
description: "Instructions on how to integrate your Melnor Raincloud sprinkler system within Home Assistant."
|
||||
date: 2017-09-04 10:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: raincloud.jpg
|
||||
ha_category: Binary Sensor
|
||||
ha_release: "0.55"
|
||||
ha_iot_class: "Cloud Polling"
|
||||
---
|
||||
|
||||
To get your [Melnor RainCloud](https://wifiaquatimer.com) binary sensors working within Home Assistant, please follow the instructions for the general [Raincloud component](/components/raincloud).
|
||||
|
||||
Once you have enabled the [Raincloud component](/components/raincloud), add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: raincloud
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **monitored_conditions** array (*Optional*): Conditions to display in the frontend. If not specified, all conditions below will be enabled by default. The following conditions can be monitored.
|
||||
- **is_watering**: Return if is currently watering per zone.
|
||||
- **status**: Return status from the Melnor RainCloud Controller and Melnor RainCloud Faucet.
|
35
source/_components/binary_sensor.random.markdown
Normal file
35
source/_components/binary_sensor.random.markdown
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Random Binary Sensor"
|
||||
description: "Instructions how to integrate random state sensors into Home Assistant."
|
||||
date: 2017-10-27 08:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Sensor
|
||||
ha_iot_class: "Local Polling"
|
||||
ha_release: 0.57
|
||||
---
|
||||
|
||||
|
||||
The `random` binary sensor platform is creating random states (`True`, 1, `on` or `False`, 0, `off`). This can be useful if you want to test automation rules. It generates a new state every time it is polled.
|
||||
|
||||
To enable the random binary sensor, add the following lines to your `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: random
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
name:
|
||||
description: Name to use in the frontend.
|
||||
required: false
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
See the [entity component options](/docs/configuration/platform_options/) to control how often the main component polls the random binary sensor. The default is 30 seconds.
|
||||
|
@ -44,4 +44,47 @@ Configuration variables:
|
||||
- **invert_logic** (*Optional*): Inverts the input logic, default is `false`.
|
||||
- **device_class** (*Optional*): See device classes in [binary_sensor component](/components/binary_sensor/), default is `None`
|
||||
|
||||
## {% linkable_title Directions for installing smbus support on Raspberry Pi %}
|
||||
|
||||
Enable I2c interface with the Raspberry Pi configuration utility:
|
||||
|
||||
```bash
|
||||
# pi user environment: Enable i2c interface
|
||||
$ sudo raspi-config
|
||||
```
|
||||
|
||||
Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish`.
|
||||
|
||||
Install dependencies for use the `smbus-cffi` module and enable your _homeassistant_ user to join the _i2c_ group:
|
||||
|
||||
```bash
|
||||
# pi user environment: Install i2c dependencies and utilities
|
||||
$ sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
|
||||
|
||||
# pi user environment: Add homeassistant user to the i2c group
|
||||
$ sudo usermod -a -G i2c homeassistant
|
||||
```
|
||||
|
||||
### {% linkable_title Check the i2c address of the sensor %}
|
||||
|
||||
After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors, so you can see the sensor address:
|
||||
|
||||
```bash
|
||||
$ /usr/sbin/i2cdetect -y 1
|
||||
```
|
||||
|
||||
It will output a table like this:
|
||||
|
||||
```text
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
00: -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --
|
||||
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
40: 40 -- -- -- -- -- UU -- -- -- -- -- -- -- -- --
|
||||
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
70: -- -- -- -- -- -- -- 77
|
||||
```
|
||||
|
||||
For more details about the `raspihats` add-on boards for Raspberry PI, visit [raspihats.com](http://www.raspihats.com/).
|
||||
|
139
source/_components/binary_sensor.rfxtrx.markdown
Normal file
139
source/_components/binary_sensor.rfxtrx.markdown
Normal file
@ -0,0 +1,139 @@
|
||||
---
|
||||
layout: page
|
||||
title: "RFXtrx Binary Sensor"
|
||||
description: "Instructions how to integrate RFXtrx binary sensors into Home Assistant."
|
||||
date: 2017-03-26 12:45
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: rfxtrx.png
|
||||
ha_category: Binary Sensor
|
||||
---
|
||||
|
||||
The `rfxtrx` platform support binary sensors that communicate in the frequency range of 433.92 MHz. The rfxtrx binary sensor component provides support for them.
|
||||
|
||||
Many cheap sensors available on the web today are based on a particular RF chip called *PT-2262*. Depending on the running firmware on the RFXcom box, some of them may be recognized under the X10 protocol but most of them are recognized under the *Lighting4* protocol. The rfxtrx binary sensor component provides some special options for them, while other rfxtrx protocols should work too.
|
||||
|
||||
# Setting up your devices
|
||||
Once you have set up your [rfxtrx hub](/components/rfxtrx/), the easiest way to find your binary sensors is to add this to your `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
platform: rfxtrx
|
||||
automatic_add: True
|
||||
```
|
||||
|
||||
Open your local home-assistant web UI and go to the "states" page. Then make sure to trigger your sensor. You should see a new entity appear in the *Current entities* list, starting with "binary_sensor." and some hexadecimal digits. Those hexadecimal digits are your device id.
|
||||
|
||||
For example: "binary_sensor.0913000022670e013b70". Here your device id is `0913000022670e013b70`. Then you should update your configuration to:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
platform: rfxtrx
|
||||
devices:
|
||||
0913000022670e013b70:
|
||||
name: device_name
|
||||
```
|
||||
|
||||
Do not forget to tweak the configuration variables:
|
||||
|
||||
- **automatic_add** (*Optional*): To enable the automatic addition of new binary sensors.
|
||||
- **device_class** (*Optional*): The [type or class of the sensor](/components/binary_sensor/) to set the icon in the frontend.
|
||||
- **off_delay** (*Optional*): For sensors that only sends 'On' state updates, this variable sets a delay after which the sensor state will be updated back to 'Off'.
|
||||
|
||||
<p class='note warning'>
|
||||
This component and the [rfxtrx switch](/components/switch/rfxtrx/) can steal each other's devices when setting the `automatic_add` configuration parameter to `true`. Set `automatic_add` only when you have some devices to add to your installation, otherwise leave it to `False`.
|
||||
</p>
|
||||
|
||||
Binary sensors have only two states - "on" and "off". Many door or window opening sensors will send a signal each time the door/window is open or closed. However, depending on their hardware or on their purpose, some sensors are only able to signal their "on" state:
|
||||
|
||||
- Most motion sensors send a signal each time they detect motion. They stay "on" for a few seconds and go back to sleep, ready to signal other motion events. Usually, they do not send a signal when they go back to sleep.
|
||||
- Some doorbells may also only send "on" signals when their toggle switch is pressed, but no "off" signal when the switch is released.
|
||||
|
||||
For those devices, use the *off_delay* parameter. It defines a delay after which a device will go back to an "Off" state. That "Off" state will be fired internally by Home Assistant, just as if the device fired it by itself. If a motion sensor can only send signals once every 5 seconds, sets the *off_delay* parameter to *seconds: 5*.
|
||||
|
||||
|
||||
Example configuration:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
platform: rfxtrx
|
||||
automatic_add: True
|
||||
devices:
|
||||
091300006ca2c6001080:
|
||||
name: motion_hall
|
||||
device_class: motion
|
||||
off_delay:
|
||||
seconds: 5
|
||||
```
|
||||
|
||||
## Options for PT-2262 devices under the Lighting4 protocol
|
||||
|
||||
When a data packet is transmitted by a PT-2262 device using the Lighting4 protocol, there is no way to automatically extract the device identifier and the command from the packet. Each device has its own id/command length combination and the fields lengths are not included in the data. One device that sends 2 different commands will be seen as 2 devices on Home Assistant. For such cases, the following options are available in order to circumvent the problem:
|
||||
|
||||
- **data_bits** (*Optional*): Defines how many bits are used for commands inside the data packets sent by the device.
|
||||
- **command_on** (*Optional*): Defines the data bits value that is sent by the device upon an 'On' command.
|
||||
- **command_off** (*Optional*): Defines the data bits value that is sent by the device upon an 'Off' command.
|
||||
|
||||
Let's try to add a new PT-2262 sensor using the "automatic_add" option and have a look at Home Assistant system log.
|
||||
|
||||
Have your sensor trigger the "On" state for the first time. Some messages will appear:
|
||||
|
||||
```
|
||||
INFO (Thread-6) [homeassistant.components.binary_sensor.rfxtrx] Added binary sensor 0913000022670e013970 (Device_id: 22670e Class: LightingDevice Sub: 0)
|
||||
```
|
||||
|
||||
Here the sensor has the id *22670e*.
|
||||
|
||||
Now have your sensor trigger the "Off" state and look for the following message in the Home Assistant log. You should see that your device has been detected as a *new* device when triggering its "Off" state:
|
||||
|
||||
```
|
||||
INFO (Thread-6) [homeassistant.components.binary_sensor.rfxtrx] Added binary sensor 09130000226707013d70 (Device_id: 226707 Class: LightingDevice Sub: 0)
|
||||
```
|
||||
|
||||
Here the device id is *226707*, which is almost similar to the *22670e* we had on the "On" event a few seconds ago.
|
||||
|
||||
From those two values, you can guess that the actual id of your device is *22670*, and that *e* and *7* are commands for "On" and "Off" states respectively. As one hexadecimal digit uses 4 bits, we can conclude that the device is using 4 data bits.
|
||||
|
||||
So here is the actual configuration section for the binary sensor:
|
||||
|
||||
```yaml
|
||||
platform: rfxtrx
|
||||
automatic_add: True
|
||||
devices:
|
||||
0913000022670e013b70:
|
||||
name: window_room2
|
||||
device_class: opening
|
||||
data_bits: 4
|
||||
command_on: 0xe
|
||||
command_off: 0x7
|
||||
```
|
||||
|
||||
The *automatic_add* option makes the rfxtrx binary sensor component calculate and display the configuration options for you in the Home Assistant logs:
|
||||
|
||||
```
|
||||
INFO (Thread-6) [homeassistant.components.rfxtrx] rfxtrx: found possible device 226707 for 22670e with the following configuration:
|
||||
data_bits=4
|
||||
command_on=0xe
|
||||
command_off=0x7
|
||||
INFO (Thread-6) [homeassistant.components.binary_sensor.rfxtrx] Found possible matching deviceid 22670e.
|
||||
```
|
||||
|
||||
This automatic guess should work most of the time but there is no guarantee on that. You should activate it only when you want
|
||||
to configure your new devices and leave it off otherwise.
|
||||
|
||||
## Known working devices
|
||||
|
||||
The following devices are known to work with the rfxtrx binary sensor component. There are too many other to list.
|
||||
|
||||
- Motion detectors:
|
||||
- Kerui P817 and P829.
|
||||
- Chuango PIR-700.
|
||||
|
||||
- Door / window sensors:
|
||||
- Kerui D026 door / window sensor: can trigger on "open" and "close". Has a tamper switch.
|
||||
- Nexa LMST-606.
|
@ -10,6 +10,7 @@ footer: true
|
||||
logo: ring.png
|
||||
ha_category: Binary Sensor
|
||||
ha_release: 0.42
|
||||
ha_iot_class: "Cloud Polling"
|
||||
---
|
||||
|
||||
To get your [Ring.com](https://ring.com/) binary sensors working within Home Assistant, please follow the instructions for the general [Ring component](/components/ring).
|
||||
@ -20,15 +21,12 @@ Once you have enabled the [Ring component](/components/ring), add the following
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: ring
|
||||
monitored_conditions:
|
||||
- ding
|
||||
- motion
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **monitored_conditions** array (*Required*): Conditions to display in the frontend. The following conditions can be monitored.
|
||||
- **monitored_conditions** array (*Optional*): Conditions to display in the frontend. The following conditions can be monitored. If not specified, all conditions below will be enabled.
|
||||
- **ding**: Return a boolean value when the doorbell button was pressed.
|
||||
- **motion**: Return a boolean value when a moviment was detected by the Ring doorbell.
|
||||
- **motion**: Return a boolean value when a movement was detected by the Ring doorbell.
|
||||
|
||||
Currently only doorbells are supported by this sensor.
|
||||
Currently it supports doorbell, external chimes and stickup cameras.
|
||||
|
@ -29,7 +29,7 @@ binary_sensor:
|
||||
Configuration variables:
|
||||
|
||||
- **ports** array (*Required*): Array of used ports.
|
||||
- **port: name** (*Required*): Port numbers and corresponding names.
|
||||
- **port: name** (*Required*): Port numbers (BCM mode pin numbers) and corresponding names.
|
||||
- **pull_mode** (*Optional*): The internal pull to use (UP or DOWN). Default is UP.
|
||||
- **bouncetime** (*Optional*): The time in milliseconds for port debouncing. Default is 50ms.
|
||||
- **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH).
|
||||
|
20
source/_components/binary_sensor.satel_integra.markdown
Normal file
20
source/_components/binary_sensor.satel_integra.markdown
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Satel Integra Binary Sensor"
|
||||
description: "Instructions how to integrate Satel Integra binary sensors into Home Assistant."
|
||||
date: 2017-09-07 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: satel.jpg
|
||||
ha_category: Binary Sensor
|
||||
ha_release: 0.54
|
||||
ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
The `satel_integra` binary sensor allows you to monitor your [SatelIntegra](http://www.satel.pl/en/) alarm zones (inputs).
|
||||
|
||||
Check the [type/class](/components/binary_sensor/) list for a possible visualization of your zone.
|
||||
|
||||
The requirement is that you have setup your [SatelIntegra hub](/components/satel_integra/).
|
33
source/_components/binary_sensor.skybell.markdown
Normal file
33
source/_components/binary_sensor.skybell.markdown
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Skybell Binary Sensor"
|
||||
description: "Instructions on how to integrate your Skybell HD devices within Home Assistant."
|
||||
date: 2017-10-03 16:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: skybell.png
|
||||
ha_category: Binary Sensor
|
||||
ha_release: 0.56
|
||||
ha_iot_class: "Cloud Polling"
|
||||
---
|
||||
|
||||
To get your [Skybell.com](https://skybell.com/) binary sensors working within Home Assistant, please follow the instructions for the general [Skybell component](/components/skybell).
|
||||
|
||||
Once you have enabled the [Skybell component](/components/skybell), add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: skybell
|
||||
monitored_conditions:
|
||||
- button
|
||||
- motion
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **monitored_conditions** array (*Required*): Conditions to display in the frontend. The following conditions can be monitored.
|
||||
- **button**: Return a boolean value when the doorbell button was pressed.
|
||||
- **motion**: Return a boolean value when movement was detected by the Skybell doorbell.
|
16
source/_components/binary_sensor.tellduslive.markdown
Normal file
16
source/_components/binary_sensor.tellduslive.markdown
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Telldus Binary Sensor"
|
||||
description: "Instructions how to integrate Telldus Live binary sensors into Home Assistant."
|
||||
date: 2017-10-24 10:09
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: telldus.png
|
||||
ha_category: Binary Sensor
|
||||
featured: false
|
||||
---
|
||||
|
||||
Integrates Telldus Live binary sensors into Home Assistant. See the [main component](/components/tellduslive/) for configuration instructions.
|
||||
|
@ -1,108 +1,205 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Template Binary Sensor"
|
||||
description: "Instructions how to integrate Template binary sensors into Home Assistant."
|
||||
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
|
||||
ha_release: 0.12
|
||||
ha_iot_class: "Local Push"
|
||||
logo: home-assistant.png
|
||||
---
|
||||
|
||||
The `template` platform supports sensors which breaks out the `state` and `state_attributes` from other entities. The state of a template binary sensor can only be `on` or `off`.
|
||||
The `template` platform supports sensors which breaks out the `state` and
|
||||
`state_attributes` from other entities. The state of a Template Binary Sensor
|
||||
can only be `on` or `off`.
|
||||
|
||||
To enable template binary sensors in your installation, add the following to your `configuration.yaml` file:
|
||||
To enable Template Binary Sensors in your installation, add the following to
|
||||
your `configuration.yaml` file:
|
||||
|
||||
{% raw %}
|
||||
```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'
|
||||
friendly_name: "Sun is up"
|
||||
value_template: >-
|
||||
{{ states.sun.sun.attributes.elevation|float > 0 }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
Configuration variables:
|
||||
{% configuration binary_sensor.template %}
|
||||
sensors:
|
||||
description: List of your sensors.
|
||||
required: true
|
||||
type: map
|
||||
keys:
|
||||
friendly_name:
|
||||
description: Name to use in the frontend.
|
||||
required: false
|
||||
type: string
|
||||
entity_id:
|
||||
description: Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update its state.
|
||||
required: false
|
||||
type: string, list
|
||||
device_class:
|
||||
description: The type/class of the sensor to set the icon in the frontend.
|
||||
required: false
|
||||
type: device_class
|
||||
default: None
|
||||
value_template:
|
||||
description: Defines a template to set the state of the sensor.
|
||||
required: true
|
||||
type: template
|
||||
delay_on:
|
||||
description: The amount of time the template state must be ***met*** before this sensor will switch to `on`.
|
||||
required: false
|
||||
type: time
|
||||
delay_off:
|
||||
description: The amount of time the template state must be ***not met*** before this sensor will switch to `off`.
|
||||
required: false
|
||||
type: time
|
||||
{% endconfiguration %}
|
||||
|
||||
- **sensors** array (*Required*): List of your sensors.
|
||||
- **friendly_name** (*Optional*): Name to use in the Frontend.
|
||||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
|
||||
- **entity_id** (*Optional*): Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update it's state.
|
||||
## {% linkable_title Considerations %}
|
||||
|
||||
If you are using the state of a platform that takes extra time to load, the
|
||||
Template Binary Sensor may get an `unknown` state during startup. This results
|
||||
in error messages in your log file until that platform has completed loading.
|
||||
If you use `is_state()` function in your template, you can avoid this situation.
|
||||
For example, you would replace
|
||||
{% raw %}`{{ states.switch.source.state == 'on' }}`{% endraw %}
|
||||
with this equivalent that returns `true`/`false` and never gives an unknown
|
||||
result:
|
||||
{% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %}
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
In this section you find some real life examples of how to use this sensor.
|
||||
|
||||
### {% linkable_title Sensor threshold %}
|
||||
### {% 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:
|
||||
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:
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
furnace_on:
|
||||
value_template: {% raw %}{{ states.sensor.furnace.state > 2.5 }}{% endraw %}
|
||||
friendly_name: 'Furnace Running
|
||||
friendly_name: "Furnace Running"
|
||||
device_class: heat
|
||||
value_template: "{{ states('sensor.furnace')|float > 2.5 }}"
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
### {% linkable_title Switch as sensor %}
|
||||
### {% linkable_title Switch as Sensor %}
|
||||
|
||||
Some movement sensors and door/window sensors will appear as a switch. By using a template binary sensor, the switch can be displayed as a binary sensors. The original switch can then be hidden by [customizing.](/getting-started/customizing-devices/)
|
||||
Some movement sensors and door/window sensors will appear as a switch. By using
|
||||
a Template Binary Sensor, the switch can be displayed as a binary sensors. The
|
||||
original switch can then be hidden by
|
||||
[customizing](/getting-started/customizing-devices/).
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
movement:
|
||||
value_template: {% raw %}"{{ states.switch.movement.state == 'on' }}"{% endraw %}
|
||||
device_class: motion
|
||||
value_template: "{{ is_state('switch.movement', 'on') }}"
|
||||
door:
|
||||
value_template: {% raw %}"{{ states.switch.door.state == 'on' }}"{% endraw %}
|
||||
device_class: opening
|
||||
value_template: "{{ is_state('switch.door', 'on') }}"
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
### {% linkable_title Combining Multiple Sensors, and Using `entity_id` %}
|
||||
|
||||
### {% linkable_title Combining multiple sensors, and using entity_id: %}
|
||||
|
||||
This example combines multiple CO sensors into a single overall status. It also shows how to use `entity_id`
|
||||
This example combines multiple CO sensors into a single overall
|
||||
status. When using templates with binary sensors, you need to return
|
||||
`true` or `false` explicitly. `entity_id` is used to limit which
|
||||
sensors are being monitored to update the state, making computing this
|
||||
sensor far more efficient.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
co:
|
||||
friendly_name: 'CO'
|
||||
device_class: 'gas'
|
||||
value_template: {% raw %}>-
|
||||
{%- if is_state("sensor.bedroom_co_status", "Ok")
|
||||
and is_state("sensor.kitchen_co_status", "Ok")
|
||||
and is_state("sensor.wardrobe_co_status", "Ok") -%}
|
||||
Off
|
||||
{%- else -%}
|
||||
On
|
||||
{%- endif %}{% endraw %}
|
||||
friendly_name: "CO"
|
||||
device_class: gas
|
||||
entity_id:
|
||||
- sensor.bedroom_co_status
|
||||
- sensor.kitchen_co_status
|
||||
- sensor.wardrobe_co_status
|
||||
value_template: >-
|
||||
{{ is_state('sensor.bedroom_co_status', 'Ok')
|
||||
and is_state('sensor.kitchen_co_status', 'Ok')
|
||||
and is_state('sensor.wardrobe_co_status', 'Ok') }}
|
||||
```
|
||||
### {% linkable_title Change the icon %}
|
||||
{% endraw %}
|
||||
|
||||
This example shows how to change the icon based on the day/night cycle.
|
||||
### {% linkable_title Washing Machine Running %}
|
||||
|
||||
This example creates a washing machine "load running" sensor by monitoring an
|
||||
energy meter connected to the washer. During the washer's operation, the energy
|
||||
meter will fluctuate wildly, hitting zero frequently even before the load is
|
||||
finished. By utilizing `off_delay`, we can have this sensor only turn off if
|
||||
there has been no washer activity for 5 minutes.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
sensor:
|
||||
# Determine when the washing machine has a load running.
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
day_night:
|
||||
friendly_name: 'Day/Night'
|
||||
value_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'{% endraw %}
|
||||
icon_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}mdi:weather-sunny{% else %}mdi:weather-night{% endif %}'{% endraw %}
|
||||
|
||||
washing_machine:
|
||||
friendly_name: "Washing Machine"
|
||||
delay_off:
|
||||
minutes: 5
|
||||
value_template: >-
|
||||
{{ states('sensor.washing_machine_power')|float > 0 }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
### {% linkable_title Is Anyone Home? %}
|
||||
|
||||
This example is determining if anyone is home based on the combination of device
|
||||
tracking and motion sensors. It's extremely useful if you have kids/baby sitter/
|
||||
grand parents who might still be in your house that aren't represented by a
|
||||
trackable device in Home Assistant. This is providing a composite of WiFi based
|
||||
device tracking and Z-Wave multisensor presence sensors.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
people_home:
|
||||
entity_id:
|
||||
- device_tracker.sean
|
||||
- device_tracker.susan
|
||||
- binary_sensor.office_124
|
||||
- binary_sensor.hallway_134
|
||||
- binary_sensor.living_room_139
|
||||
- binary_sensor.porch_ms6_1_129
|
||||
- binary_sensor.family_room_144
|
||||
value_template: >-
|
||||
{{ is_state('device_tracker.sean', 'home')
|
||||
or is_state('device_tracker.susan', 'home')
|
||||
or is_state('binary_sensor.office_124', 'on')
|
||||
or is_state('binary_sensor.hallway_134', 'on')
|
||||
or is_state('binary_sensor.living_room_139', 'on')
|
||||
or is_state('binary_sensor.porch_ms6_1_129', 'on')
|
||||
or is_state('binary_sensor.family_room_144', 'on') }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
20
source/_components/binary_sensor.tesla.markdown
Normal file
20
source/_components/binary_sensor.tesla.markdown
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Tesla Binary Sensor"
|
||||
description: "Instructions on how to integrate Tesla binary sensors into Home Assistant."
|
||||
date: 2017-08-30 12:29
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: tesla.png
|
||||
ha_category: Binary Sensor
|
||||
ha_iot_class: "Cloud polling"
|
||||
ha_release: 0.53
|
||||
---
|
||||
|
||||
The `Tesla` platform allows you to get data from your [Tesla](https://www.tesla.com/) sensors from within Home Assistant.
|
||||
|
||||
They will be automatically discovered if the Tesla component is loaded.
|
||||
|
||||
For more configuration information see the [Tesla component](/components/tesla/) documentation.
|
@ -14,7 +14,9 @@ ha_release: 0.34
|
||||
---
|
||||
|
||||
|
||||
The `threshold` binary sensor platform is consuming the state from another sensor. If the value is below (`lower`) or higher (`upper`) than the given threshold then state of this sensor change..
|
||||
The `threshold` binary sensor platform observes the state of another sensor. If the value is below (`lower`) or higher (`upper`) than the given threshold then state of the threshold sensor is changed.
|
||||
|
||||
If the sensor is configured with no hysteresis and the sensor value is equal to the threshold, the sensor is turned off since it is not `lower` or `upper` with respect to the threshold.
|
||||
|
||||
It's an alternative to the template binary sensor's `value_template:` to get the abnormal/too high/too low states.
|
||||
|
||||
@ -36,7 +38,7 @@ binary_sensor:
|
||||
Configuration variables:
|
||||
|
||||
- **entity_id** (*Required*): The entity to monitor. Only [sensors](/components/sensor/) are supported.
|
||||
- **threshold** (*Required*): The value which is the threshold.
|
||||
- **threshold** (*Required*): The threshold which the observed value is compared against.
|
||||
- **type** (*Required*): `lower` if the value needs to be below the threshold or `upper` if higher.
|
||||
- **hysteresis** (*Optional*): The distance the observed value must be from the threshold before the state is changed. Defaults to `0.0`
|
||||
- **name** (*Optional*): Name of the sensor to use in the frontend. Defaults to `Stats`.
|
||||
|
||||
|
@ -13,7 +13,7 @@ ha_release: 0.28
|
||||
ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
The `trend` platform allows you to create sensors which show the trend of numeric `state` or`state_attributes` from other entities. This sensor requires two updates of the underlying sensor to establish a trend. Thus it can take some time to show an accurate state. It can be useful as part of automations, where you want to base an action on a trend.
|
||||
The `trend` platform allows you to create sensors which show the trend of numeric `state` or`state_attributes` from other entities. This sensor requires at least two updates of the underlying sensor to establish a trend. Thus it can take some time to show an accurate state. It can be useful as part of automations, where you want to base an action on a trend.
|
||||
|
||||
To enable Trend binary sensors in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
@ -29,39 +29,54 @@ binary_sensor:
|
||||
Configuration variables:
|
||||
|
||||
- **sensors** array (*Required*): List of your sensors.
|
||||
- **friendly_name** (*Optional*): Name to use in the Frontend.
|
||||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **entity_id** (*Required*): The entity that this sensor tracks.
|
||||
- **attribute** (*Optional*): The attribute of the entity that this sensor tracks. If no attribute is specified then the sensor will track the state.
|
||||
- **invert** (*Optional*): Invert the result (so `true` means descending rather than ascending)
|
||||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **friendly_name** (*Optional*): Name to use in the Frontend.
|
||||
- **invert** (*Optional*): Invert the result (so `true` means descending rather than ascending). Defaults to `False`
|
||||
- **max_samples** (*Optional*): Limit the maximum number of stored samples. Defaults to `2`.
|
||||
- **min_gradient** (*Optional*): The minimum rate at which the observed value must be changing for this sensor to switch on. Defaults to `0.0`
|
||||
- **sample_duration** (*Optional*): The duration **in seconds** to store samples for. Samples older than this value will be discarded. Defaults to `0`
|
||||
|
||||
## {% linkable_title Using Multiple Samples %}
|
||||
|
||||
If the optional `sample_duration` and `max_samples` parameters are specified then multiple samples can be stored and used to detect long-term trends.
|
||||
|
||||
Each time the state changes, a new sample is stored along with the sample time. Samples older than `sample_duration` seconds will be discarded.
|
||||
|
||||
A trend line is then fitted to the available samples, and the gradient of this line is compared to `min_gradient` to determine the state of the trend sensor. The gradient is measured in sensor units per second - so if you want to know when the temperature is falling by 2 degrees per hour, use a gradient of (-2) / (60 x 60) = -0.00055
|
||||
|
||||
The current number of stored samples is displayed on the States page.
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
In this section you find some real life examples of how to use this sensor.
|
||||
|
||||
### {% linkable_title Temperature trend %}
|
||||
|
||||
This example indicates `true` if the temperature is rising:
|
||||
This example indicates `true` if the sun is still rising:
|
||||
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: trend
|
||||
sensors:
|
||||
temperature_up:
|
||||
friendly_name: 'Temp increasing'
|
||||
entity_id: sensor.skylight_temperature
|
||||
sun_rising:
|
||||
entity_id: sun.sun
|
||||
```
|
||||
|
||||
This example creates two sensors to indicate whether the temperature is rising or falling at a rate of at least 3 degrees an hour, and collects samples over a two hour period:
|
||||
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: trend
|
||||
sensors:
|
||||
temp_falling:
|
||||
entity_id: sensor.outside_temperature
|
||||
sample_duration: 7200
|
||||
min_gradient: -0.0008
|
||||
device_class: cold
|
||||
|
||||
temp_rising:
|
||||
entity_id: sensor.outside_temperature
|
||||
sample_duration: 7200
|
||||
min_gradient: 0.0008
|
||||
device_class: heat
|
||||
```
|
||||
|
||||
And this one indicates `true` if the temperature is falling:
|
||||
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: trend
|
||||
sensors:
|
||||
temperature_down:
|
||||
friendly_name: 'Temp decreasing'
|
||||
entity_id: sensor.skylight_temperature
|
||||
device_class: cold
|
||||
invert: Yes
|
||||
```
|
||||
|
42
source/_components/binary_sensor.velbus.markdown
Normal file
42
source/_components/binary_sensor.velbus.markdown
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Velbus sensors"
|
||||
description: "Access and control your Velbus sensors."
|
||||
date: 2017-06-17 16.58
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: velbus.png
|
||||
ha_category: Binary Sensor
|
||||
ha_iot_class: "Local Push"
|
||||
ha_release: "0.50"
|
||||
---
|
||||
|
||||
The `velbus` binary_sensor allows you to control [Velbus](http://www.velbus.eu) connected wall switches.
|
||||
|
||||
To use your Velbus wall switches in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
|
||||
binary_sensor:
|
||||
- platform: velbus
|
||||
devices:
|
||||
- name: Wall Switch 1
|
||||
module: 0xda
|
||||
channel: 4
|
||||
- name: Wall Switch 2
|
||||
module: 0xbc
|
||||
channel: 1
|
||||
is_pushbutton: true
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
- **devices** array (*Required*): The array contains the binary sensors to configure
|
||||
- **name** (*Required*): Name of the binary sensor.
|
||||
- **module** (*Required*): The hexadecimal module address
|
||||
- **channel** (*Required*): The channel number in the module.
|
||||
- **is_pushbutton** (*Optional*): Boolean to indicate if a wall switch is a push button or not (default: false)
|
||||
|
||||
For hub configuration, see [the Velbus component](/components/velbus/).
|
19
source/_components/binary_sensor.verisure.markdown
Normal file
19
source/_components/binary_sensor.verisure.markdown
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Verisure Binary Sensor"
|
||||
description: "Instructions how to integrate Verisure binary sensors into Home Assistant."
|
||||
date: 2016-02-23 21:31 +0100
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: verisure.png
|
||||
ha_category: Binary Sensor
|
||||
ha_iot_class: "Cloud Polling"
|
||||
---
|
||||
|
||||
Integrates Verisure binary sensors into Home Assistant. See the [main component](/components/verisure/) for configuration instructions.
|
||||
|
||||
The following binary sensor types are supported:
|
||||
|
||||
Door & Window
|
54
source/_components/binary_sensor.vultr.markdown
Normal file
54
source/_components/binary_sensor.vultr.markdown
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Vultr Binary Sensor"
|
||||
description: "Instructions on how to set up Vultr binary sensors within Home Assistant."
|
||||
date: 2017-10-17 21:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
ha_category: System Monitor
|
||||
logo: vultr.png
|
||||
ha_release: "0.58"
|
||||
ha_iot_class: "Cloud Polling"
|
||||
---
|
||||
|
||||
The `vultr` binary sensor platform allows you to monitor your [Vultr](https://www.vultr.com/) subscription to see if it is powered on or not.
|
||||
|
||||
To use this binary sensor, you first have to set up your [Vultr hub](/components/vultr/).
|
||||
|
||||
<p class='note'>
|
||||
The following examples assume a subscription that has an ID of `123456` and a label of `Web Server`
|
||||
</p>
|
||||
|
||||
Minimal `configuration.yaml` (produces `binary_sensor.vultr_web_server`):
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: vultr
|
||||
subscription: 123456
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
subscription:
|
||||
description: The subscription you want to monitor, this can be found in the URL when viewing a server.
|
||||
required: true
|
||||
type: string
|
||||
name:
|
||||
description: The name you want to give this binary sensor.
|
||||
required: false
|
||||
default: "Vultr {subscription label}"
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
|
||||
Full `configuration.yaml` (produces `binary_sensor.totally_awesome_server`):
|
||||
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: vultr
|
||||
name: totally_awesome_server
|
||||
subscription: 12345
|
||||
```
|
||||
|
@ -25,15 +25,15 @@ The requirement is that you have setup [Wink](/components/wink/).
|
||||
- Window/Door sensors
|
||||
- Motion sensors
|
||||
- Ring Door bells (No hub required)
|
||||
- Liquid presense sensors
|
||||
- Liquid presence sensors
|
||||
- Z-wave lock key codes
|
||||
- Lutron connected bulb remote buttons
|
||||
- Wink Relay buttons and presense detection
|
||||
- Wink Relay buttons and presence detection
|
||||
- Wink spotter loudness and vibration (No Wink hub required)
|
||||
- Wink hub devices connection status. This includes any paired hubs like Hue, Wink v1, Wink v2, Wink Relay...
|
||||
- Dropcam sensors
|
||||
|
||||
<p class='note'>
|
||||
The above devices are confimed to work, but others may work as well.
|
||||
The above devices are confirmed to work, but others may work as well.
|
||||
</p>
|
||||
|
||||
|
@ -18,7 +18,7 @@ The `workday` binary sensor indicates, whether the current day is a workday or n
|
||||
To enable the `workday` sensor in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuation.yaml entry
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: workday
|
||||
country: DE
|
||||
@ -30,6 +30,7 @@ Configuration variables:
|
||||
- **province** (*Optional*): Province code according to [holidays](https://pypi.python.org/pypi/holidays/0.8.1) notation. Defaults to None.
|
||||
- **workdays** (*Optional*): List of workdays. Defaults to `mon`, `tue`, `wed`, `thu`, `fri`.
|
||||
- **excludes** (*Optional*): List of workday excludes. Defaults to `sat`, `sun`, `holiday`.
|
||||
- **days_offset** (*Optional*): Set days offset. Defaults to `0`.
|
||||
|
||||
Days are specified as follows: `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun`. The keyword `holiday` is used for public holidays identified by the holidays module.
|
||||
|
||||
|
310
source/_components/binary_sensor.xiaomi_aqara.markdown
Normal file
310
source/_components/binary_sensor.xiaomi_aqara.markdown
Normal file
@ -0,0 +1,310 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Xiaomi Binary Sensor"
|
||||
description: "Instructions how to setup the Xiaomi binary sensors within Home Assistant."
|
||||
date: 2017-07-21 16:34
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: xiaomi.png
|
||||
ha_category: Binary Sensor
|
||||
ha_release: "0.50"
|
||||
ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
|
||||
The `xiaomi aqara` binary sensor platform allows you to get data from your [Xiaomi](http://www.mi.com/en/) binary sensors.
|
||||
|
||||
The requirement is that you have setup the [`xiaomi aqara` component](/components/xiaomi_aqara/).
|
||||
|
||||
|
||||
### {% linkable_title Type of sensors supported %}
|
||||
|
||||
| Name | ZigBee entity | Model no. | States | Event | Event key | Event values |
|
||||
|-----------------------------------|---------------------|----------------------|----------------------------------------------------|-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| Motion Sensor (1st gen) | motion | RTCGQ01LM | on, off | `motion` | | |
|
||||
| Motion Sensor (2nd gen) | sensor_motion.aq2 | RTCGQ11LM | on, off | `motion` | | |
|
||||
| Door and Window Sensor (1st gen) | magnet | WSDCGQ01LM | on, off | | | |
|
||||
| Door and Window Sensor (2nd gen) | sensor_magnet.aq2 | MCCGQ11LM | on, off | | | |
|
||||
| Smoke Detector | smoke | JTYJ-GD-01LM/BW | on, off | | | |
|
||||
| Gas Leak Detector | natgas | JTQJ-BF-01LM/BW | on, off | | | |
|
||||
| Water Leak Sensor | sensor_wleak.aq1 | SJCGQ11LM | on, off | | | |
|
||||
| Button (1st gen) | switch | WXKG01LM | on (thru long_click_press), off | `click` | `click_type` | `long_click_press`, `long_click_release`, `hold`, `single`, `double` |
|
||||
| Button (2nd gen) | sensor_switch.aq2 | WXKG11LM | off (always) | `click` | `click_type` | `single`, `double` |
|
||||
| Aqara Wireless Switch (Single) | 86sw1 | WXKG03LM | off (always) | `click` | `click_type` | `single` |
|
||||
| Aqara Wireless Switch (Double) | 86sw2 | WXKG02LM | off (always) | `click` | `click_type` | `single`, `both` |
|
||||
| Cube | cube | MFKZQ01LM | off (always) | `cube_action` | `action_type`, `action_value` (rotate) | `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swing`, `alert`, `free_fall`, `rotate` (degrees at action_value) |
|
||||
|
||||
### {% linkable_title Automation examples %}
|
||||
|
||||
#### {% linkable_title Motion %}
|
||||
|
||||
```yaml
|
||||
- alias: If there is motion and its dark turn on the gateway light
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.motion_sensor_158d000xxxxxc2
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
condition: numeric_state
|
||||
entity_id: sensor.illumination_34ce00xxxx11
|
||||
below: 300
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.gateway_light_34ce00xxxx11
|
||||
data:
|
||||
brightness: 5
|
||||
- service: automation.turn_on
|
||||
data:
|
||||
entity_id: automation.MOTION_OFF
|
||||
- alias: If there no motion for 5 minutes turn off the gateway light
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.motion_sensor_158d000xxxxxc2
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for:
|
||||
minutes: 5
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.gateway_light_34ce00xxxx11
|
||||
- service: automation.turn_off
|
||||
data:
|
||||
entity_id: automation.Motion_off
|
||||
```
|
||||
|
||||
#### {% linkable_title Door and/or Window %}
|
||||
|
||||
```yaml
|
||||
- alias: If the window is open turn off the radiator
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
service: climate.set_operation_mode
|
||||
entity_id: climate.livingroom
|
||||
data:
|
||||
operation_mode: 'Off'
|
||||
- alias: If the window is closed for 5 minutes turn on the radiator again
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for:
|
||||
minutes: 5
|
||||
action:
|
||||
service: climate.set_operation_mode
|
||||
entity_id: climate.livingroom
|
||||
data:
|
||||
operation_mode: 'Smart schedule'
|
||||
```
|
||||
|
||||
#### {% linkable_title Smoke %}
|
||||
|
||||
```yaml
|
||||
- alias: Send notification on fire alarm
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.smoke_sensor_158d0001574899
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: notify.html5
|
||||
data:
|
||||
title: Fire alarm!
|
||||
message: Fire/Smoke detected!
|
||||
- service: xiaomi_aqara.play_ringtone
|
||||
data:
|
||||
gw_mac: xxxxxxxxxxxx
|
||||
ringtone_id: 2
|
||||
ringtone_vol: 100
|
||||
```
|
||||
|
||||
#### {% linkable_title Gas %}
|
||||
|
||||
```yaml
|
||||
- alias: Send notification on gas alarm
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.natgas_sensor_158dxxxxxxxxxx
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: notify.html5
|
||||
data_template:
|
||||
title: Gas alarm!
|
||||
message: 'Gas with a density of {% raw %}{{ states.binary_sensor.natgas_sensor_158dxxxxxxxxxx.attributes.density }}{% endraw %} detected.'
|
||||
```
|
||||
|
||||
#### {% linkable_title Xiaomi Wireless Button %}
|
||||
|
||||
Available events are `single`, `double`, `hold`, `long_click_press` and `long_click_release`. For Square version (Aqara brand) only `single` and `double` events are supported. Furthermore the space between two clicks to generate a double click must be quite large now.
|
||||
|
||||
```yaml
|
||||
- alias: Toggle dining light on single press
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: click
|
||||
event_data:
|
||||
entity_id: binary_sensor.switch_158d000xxxxxc2
|
||||
click_type: single
|
||||
action:
|
||||
service: switch.toggle
|
||||
entity_id: switch.wall_switch_left_158d000xxxxx01
|
||||
- alias: Toggle couch light on double click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: click
|
||||
event_data:
|
||||
entity_id: binary_sensor.switch_158d000xxxxxc2
|
||||
click_type: double
|
||||
action:
|
||||
service: switch.toggle
|
||||
entity_id: switch.wall_switch_right_158d000xxxxx01
|
||||
- alias: Let a dog bark on long press
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: click
|
||||
event_data:
|
||||
entity_id: binary_sensor.switch_158d000xxxxxc2
|
||||
click_type: long_click_press
|
||||
action:
|
||||
service: xiaomi_aqara.play_ringtone
|
||||
data:
|
||||
gw_mac: xxxxxxxxxxxx
|
||||
ringtone_id: 8
|
||||
ringtone_vol: 8
|
||||
```
|
||||
|
||||
#### {% linkable_title Xiaomi Cube %}
|
||||
|
||||
Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swing`, `alert`, `free_fall` and `rotate`. The component stores the last action as the attribute `last_action`.
|
||||
|
||||
```yaml
|
||||
- alias: Cube event flip90
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: cube_action
|
||||
event_data:
|
||||
entity_id: binary_sensor.cube_15xxxxxxxxxxxx
|
||||
action_type: flip90
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "springgreen"
|
||||
- alias: Cube event flip180
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: cube_action
|
||||
event_data:
|
||||
entity_id: binary_sensor.cube_15xxxxxxxxxxxx
|
||||
action_type: flip180
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "darkviolet"
|
||||
- alias: Cube event move
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: cube_action
|
||||
event_data:
|
||||
entity_id: binary_sensor.cube_15xxxxxxxxxxxx
|
||||
action_type: move
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "gold"
|
||||
- alias: Cube event tap_twice
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: cube_action
|
||||
event_data:
|
||||
entity_id: binary_sensor.cube_15xxxxxxxxxxxx
|
||||
action_type: tap_twice
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "deepskyblue"
|
||||
- alias: Cube event shake_air
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: cube_action
|
||||
event_data:
|
||||
entity_id: binary_sensor.cube_15xxxxxxxxxxxx
|
||||
action_type: shake_air
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "blue"
|
||||
```
|
||||
|
||||
#### {% linkable_title Aqara Wireless Switch %}
|
||||
|
||||
The Aqara Wireless Switch is available as single-key and double-key version. Each key behaves like the Wireless Button limited to the click event `single`. The double key version adds a third device called `binary_sensor.wall_switch_both_158xxxxxxxxx12` which reports a click event called `both` if both keys are pressed.
|
||||
|
||||
```yaml
|
||||
- alias: Decrease brightness of the gateway light
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: click
|
||||
event_data:
|
||||
entity_id: binary_sensor.wall_switch_left_158xxxxxxxxx12
|
||||
click_type: single
|
||||
action:
|
||||
service: light.turn_on
|
||||
entity_id: light.gateway_light_34xxxxxxxx13
|
||||
data_template:
|
||||
brightness: {% raw %}>-
|
||||
{% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness %}
|
||||
{% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness - 60 >= 10 %}
|
||||
{{states.light.gateway_light_34xxxxxxxx13.attributes.brightness - 60}}
|
||||
{% else %}
|
||||
{{states.light.gateway_light_34xxxxxxxx13.attributes.brightness}}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
10
|
||||
{% endif %}{% endraw %}
|
||||
|
||||
- alias: Increase brightness of the gateway light
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: click
|
||||
event_data:
|
||||
entity_id: binary_sensor.wall_switch_right_158xxxxxxxxx12
|
||||
click_type: single
|
||||
action:
|
||||
service: light.turn_on
|
||||
entity_id: light.gateway_light_34xxxxxxxx13
|
||||
data_template:
|
||||
brightness: {% raw %}>-
|
||||
{% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness %}
|
||||
{% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness + 60 <= 255 %}
|
||||
{{states.light.gateway_light_34xxxxxxxx13.attributes.brightness + 60}}
|
||||
{% else %}
|
||||
{{states.light.gateway_light_34xxxxxxxx13.attributes.brightness}}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
10
|
||||
{% endif %}{% endraw %}
|
||||
|
||||
- alias: Turn off the gateway light
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: click
|
||||
event_data:
|
||||
entity_id: binary_sensor.wall_switch_both_158xxxxxxxxx12
|
||||
click_type: both
|
||||
action:
|
||||
service: light.turn_off
|
||||
entity_id: light.gateway_light_34xxxxxxxx13
|
||||
```
|
@ -12,4 +12,4 @@ ha_category: Binary Sensor
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
To get your ZigBee binary sensors working with Home Assistant, follow then instructions for the general [ZigBee Home Automationcomponent](/components/zha/).
|
||||
To get your ZigBee binary sensors working with Home Assistant, follow the instructions for the general [ZigBee Home Automation component](/components/zha/).
|
||||
|
@ -36,9 +36,9 @@ Once loaded, your front end will have the following components:
|
||||
* A camera image for each camera in your system.
|
||||
* A binary_sensor per camera that indicates whether motion detection is enabled.
|
||||
* A binary_sensor for the system that indicates if the system is armed or disarmed.
|
||||
* A sesnor per camera that reports temperature.
|
||||
* A sensor per camera that reports temperature.
|
||||
* A sensor per camera that reports battery level.
|
||||
* A sensor per camera that reports unread notification (ie. detected motion events).
|
||||
* A sensor per camera that reports unread notification (i.e., detected motion events).
|
||||
|
||||
Since the cameras are battery operated, the images are only updated in Home Assistant when the user manually forces a new photo. This image can be updated with the `snap_picture` service to force Home Assistant to request an update from Blink's servers. As a note, all of the camera-specific sensors are only polled when a new image is requested from the camera. This means that relying on any of these sensors to provide timely and accurate data is not recommended.
|
||||
|
||||
@ -59,7 +59,7 @@ For `arm_system`, the value sent can be either `True` or `False` and will arm an
|
||||
}
|
||||
```
|
||||
|
||||
Arm camera follows a similar structure, but each indidivual camera can have motion detection enabled or disabled. Because of this, you also need to supply a name. For example, if you have a camera named "Living Room" and you want to turn off motion detection on that camera, you would call the `arm_camera` service with the following payload:
|
||||
Arm camera follows a similar structure, but each individual camera can have motion detection enabled or disabled. Because of this, you also need to supply a name. For example, if you have a camera named "Living Room" and you want to turn off motion detection on that camera, you would call the `arm_camera` service with the following payload:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Other
|
||||
ha_category: Utility
|
||||
---
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ browser:
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `url` | no | The url to open
|
||||
| `url` | no | The URL to open.
|
||||
|
||||
|
||||
### {% linkable_title Usage %}
|
||||
|
136
source/_components/calendar.todoist.markdown
Normal file
136
source/_components/calendar.todoist.markdown
Normal file
@ -0,0 +1,136 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Todoist"
|
||||
description: "Instructions on how to integrate Todoist into Home Assistant."
|
||||
date: 2017-08-31 2:22
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: todoist.png
|
||||
ha_category: Calendar
|
||||
ha_iot_class: "Cloud Polling"
|
||||
ha_release: 0.54
|
||||
---
|
||||
|
||||
|
||||
This platform allows you to connect to your [Todoist Projects](https://todoist.com) and generate binary sensors. A different sensor will be created for each individual project, or you can specify "custom" projects which match against criteria you set (more on that below). These sensors will be `on` if you have a task due in that project or `off` if all the tasks in the project are completed or if the project doesn't have any tasks at all. All tasks get updated roughly every 15 minutes.
|
||||
|
||||
### {% linkable_title Prerequisites %}
|
||||
|
||||
You need to determine your Todoist API token. This is fairly simple to do; just go [to the Integrations section on your Todoist settings page](https://todoist.com/Users/viewPrefs?page=authorizations) and find the section labeled "API token" at the bottom of the page. Copy that token and use it in your configuration file.
|
||||
|
||||
### {% linkable_title Basic Setup %}
|
||||
|
||||
To integrate Todoist in Home Assistant, add the following section to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
calendar:
|
||||
- platform: todoist
|
||||
token: API_token_created_from_steps_above
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **token** (*Required*): The API token used to authorize Home Assistant to access your projects.
|
||||
- **custom_projects** (*Optional*): Details on any "custom" binary sensor projects you want to create.
|
||||
- **name** (*Required*): The name of your custom project. Only required if you specify that you want to create a custom project.
|
||||
- **due_date_days** (*Optional*): Only include tasks due within this many days. If you don't have any tasks with a due date set, this returns nothing.
|
||||
- **labels** (*Optional*): Only include tasks with at least one of these labels (i.e., this works as an `or` statement)..
|
||||
- **include_projects** (*Optional*): Only include tasks in these projects. Tasks in all other projects will be ignored.
|
||||
|
||||
|
||||
### {% linkable_title Custom Projects %}
|
||||
Creating custom projects is super-easy and quite powerful. All you need to run the basic Todoist projects is your API token, but if you wanted, you could go even deeper. Here's an example:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
calendar:
|
||||
- platform: todoist
|
||||
token: !secret todoist_token
|
||||
custom_projects:
|
||||
- name: 'All Projects'
|
||||
- name: 'Due Today'
|
||||
due_date_days: 0
|
||||
- name: 'Due This Week'
|
||||
due_date_days: 7
|
||||
- name: 'Math Homework'
|
||||
labels:
|
||||
- Homework
|
||||
include_projects:
|
||||
- Mathematical Structures II
|
||||
- Calculus II
|
||||
```
|
||||
|
||||
(See [here](https://home-assistant.io/docs/configuration/secrets/) for more details about what that `!secret` does -- it's not exclusive to Todoist, and can help keep your API keys and passwords a little safer!)
|
||||
|
||||
As you can see, there are 4 custom projects here:
|
||||
|
||||
- A project containing *all* of the tasks on this account.
|
||||
|
||||
- A project containing *all* the tasks on this account that are due today.
|
||||
|
||||
- A project containing *all* the tasks on this account due within the next week.
|
||||
|
||||
- A project containing everything with the label "Homework", taking only 2 projects into account.
|
||||
|
||||
You can mix-and-match these attributes to create all sorts of custom projects. You can even use [IFTTT](https://ifttt.com/todoist) to create a task with a certain label, then have Home Assistant do some kind of automation when a task with that label comes due.
|
||||
|
||||
Home Assistant does its best to determine what task in each project is "most" important, and it's that task which has its state reported. You can access the other tasks you have due soon via the `all_tasks` array (see below).
|
||||
|
||||
### {% linkable_title Sensor attributes %}
|
||||
|
||||
- **offset_reached**: Not used.
|
||||
|
||||
- **all_day**: `True` if the reported task doesn't have a due date. `False` if there is a due date set.
|
||||
|
||||
- **message**: The title of the "most important" task coming up in this project.
|
||||
|
||||
- **description**: A URL pointing to the task on the Todoist website.
|
||||
|
||||
- **location**: Not used.
|
||||
|
||||
- **start_time**: The last time the Todoist component got updated. Usually within the last 15 minutes.
|
||||
|
||||
- **end_time**: When the task is due.
|
||||
|
||||
- **all_tasks**: A list of all tasks in this project, sorted from most important to least important.
|
||||
|
||||
- **priority**: The priority Todoist reports this task as having. 1 means lowest priority, 4 means highest. Note that this is the **opposite** of how things are displayed in the Todoist app!
|
||||
|
||||
- **task_comments**: Any comments added to this task.
|
||||
|
||||
- **task_labels**: All labels associated with this task.
|
||||
|
||||
- **overdue**: Whether the reported task is past its due date.
|
||||
|
||||
- **due_today**: Whether the reported task is due today.
|
||||
|
||||
### {% linkable_title Services %}
|
||||
|
||||
Todoist also comes with access to a service, `todoist.new_task`. This service can be used to create a new Todoist task. You can specify labels and a project, or you can leave them blank, and the task will go to your "Inbox" project.
|
||||
|
||||
Here's an example JSON payload:
|
||||
|
||||
```json
|
||||
{
|
||||
"content": "Pick up the mail",
|
||||
"project": "Errands",
|
||||
"labels":"Homework,School",
|
||||
"priority":3,
|
||||
"due_date":"2017-09-12 14:00"
|
||||
}
|
||||
```
|
||||
|
||||
- **content** (*Required*): The name of the task you want to create.
|
||||
|
||||
- **project** (*Optional*): The project to put the task in.
|
||||
|
||||
- **labels** (*Optional*): Any labels you want to add to the task, separated by commas.
|
||||
|
||||
- **priority** (*Optional*): The priority of the task, from 1-4. Again, 1 means least important, and 4 means most important.
|
||||
|
||||
- **due_date** (*Optional*): When the task should be due, in either YYYY-MM-DD format or YYYY-MM-DD HH:MM format.
|
||||
|
||||
Note that there's (currently) no way to mark tasks as done through Home Assistant; task names do not necessarily have to be unique, so you could find yourself in a situation where you close the wrong task.
|
20
source/_components/camera.abode.markdown
Normal file
20
source/_components/camera.abode.markdown
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Abode Camera"
|
||||
description: "Instructions how to integrate Abode cameras into Home Assistant."
|
||||
date: 2017-08-26 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: abode.jpg
|
||||
ha_release: 0.54
|
||||
ha_category: Camera
|
||||
ha_iot_class: "Cloud Push"
|
||||
---
|
||||
|
||||
The `abode` security control panel platform allows you to control your [Abode](https://goabode.com/) alarms.
|
||||
|
||||
This component will automatically add `Cameras` configured in your Abode account. You can request a new still image capture by passing the `entity_id` of your cameras to the [capture_image service](/components/abode/#capture_image).
|
||||
|
||||
The requirement is that you have setup your [Abode hub](/components/abode/).
|
@ -13,33 +13,14 @@ ha_iot_class: "Local Polling"
|
||||
ha_release: 0.34
|
||||
---
|
||||
|
||||
The `amcrest` platform allows you to integrate your [Amcrest](https://amcrest.com/) IP camera in Home Assistant.
|
||||
To get your [Amcrest](https://amcrest.com/) cameras working within Home Assistant, please follow the instructions for the general [Amcrest component](/components/amcrest).
|
||||
|
||||
To enable your camera in your installation, add the following to your `configuration.yaml` file:
|
||||
Once you have enabled the [Amcrest component](/components/amcrest), add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
camera:
|
||||
- platform: amcrest
|
||||
host: IP_ADDRESS
|
||||
username: USERNAME
|
||||
password: PASSWORD
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): The IP address or hostname of your camera. If using hostname, make sure the DNS works as expected.
|
||||
- **username** (*Required*): The username for accessing your camera.
|
||||
- **password** (*Required*): The password for accessing your camera.
|
||||
- **name** (*Optional*): This parameter allows you to override the name of your camera. The default is "Amcrest Camera".
|
||||
- **port** (*Optional*): The port that the camera is running on. The default is 80.
|
||||
- **resolution** (*Optional*): This parameter allows you to specify the camera resolution. For a high resolution (1080/720p), specify the option `high`. For VGA resolution (640x480p), specify the option `low`. If omitted, it defaults to *high*.
|
||||
- **stream_source** (*Optional*): The data source for the live stream. `mjpeg` will use the camera's native MJPEG stream, whereas `snapshot` will use the camera's snapshot API to create a stream from still images. You can also set the `rtsp` option to generate the streaming via RTSP protocol. If omitted, it defaults to *mjpeg*.
|
||||
- **ffmpeg_arguments**: (*Optional*): Extra options to pass to ffmpeg, e.g. image quality or video filter options.
|
||||
|
||||
**Note:** Amcrest cameras with newer firmwares no longer have the ability to stream `high` definition video with MJPEG encoding. You may need to use `low` resolution stream or the `snapshot` stream source instead. If the quality seems too poor, lower the `Frame Rate (FPS)` and max out the `Bit Rate` settings in your camera's configuration manager.
|
||||
|
||||
**Note:** If you set the `stream_source` option to `rtsp`, make sure to follow the steps mentioned at
|
||||
[FFMPEG](https://home-assistant.io/components/ffmpeg/) documentation to install the `ffmpeg`.
|
||||
|
||||
To check if your Amcrest camera is supported/tested, visit the [supportability matrix](https://github.com/tchellomello/python-amcrest#supportability-matrix) link from the `python-amcrest` project.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user