Site updated at 2015-10-06 06:20:04 UTC
This commit is contained in:
parent
65ede4184b
commit
0cd346e676
175 changed files with 4690 additions and 1281 deletions
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
@ -348,9 +349,16 @@ go automate!</p>
|
|||
<li>Learn about the available <a href="/components/automation.html#conditions">automation conditions</a></li>
|
||||
<li>Learn about <a href="/components/script.html">scripts</a> to help you trigger multiple actions and delays</li>
|
||||
<li>Learn about <a href="/components/scene.html">scenes</a> to help you set many entities at once to your liking</li>
|
||||
<li>Setup the <a href="/components/#notify-service">notification component</a> to sent yourself messages</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p class='note warning'>
|
||||
Whenever you write the value <code>on</code> or <code>off</code>, surround it with quotes to avoid
|
||||
the YAML parser interpreting the values as booleans.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
@ -117,14 +118,6 @@ Most components that support multiple entries within the <code>configuration.yam
|
|||
</p>
|
||||
|
||||
|
||||
<p>To get the most out of automation, it is useful to setup the following things:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/components/#presence">Presence Detection</a></li>
|
||||
<li><a href="/components/#notify-service">Notification service</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>If you can’t find support for your favorite device or service,
|
||||
<a href="/developers/add_new_platform.html">consider adding support</a></p>
|
||||
|
||||
|
@ -168,17 +161,17 @@ of these parameters. This can be done by adding the following config to the <cod
|
|||
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
|
||||
</span><span class='line'><span class="l-Scalar-Plain">homeassistant</span><span class="p-Indicator">:</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'> <span class="c1"># Add this to your existing configuration</span>
|
||||
</span><span class='line'> <span class="c1"># Only the `entity_id` is required. All other options are optional.</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">customize</span><span class="p-Indicator">:</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">some.entity_id</span><span class="p-Indicator">:</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">hidden</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">entity_picture</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">http://placehold.it/200x200</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">friendly_name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">My better name</span>
|
||||
</span><span class='line'> <span class="c1"># Add this to your existing configuration</span>
|
||||
</span><span class='line'> <span class="c1"># Only the `entity_id` is required. All other options are optional.</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">customize</span><span class="p-Indicator">:</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">some.entity_id</span><span class="p-Indicator">:</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">hidden</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">entity_picture</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">http://placehold.it/200x200</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">friendly_name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">My better name</span>
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
|
||||
<h3><a href="/getting-started/automation.html">Next step: Setting up automation »</a></h3>
|
||||
<h3><a href="/getting-started/presence-detection.html">Next step: Setting up presence detection »</a></h3>
|
||||
|
||||
|
||||
</article>
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
@ -113,8 +114,6 @@
|
|||
<label class='menu-selector raspberry' for='raspberry-install'>Install on a Raspberry Pi</label>
|
||||
<label class='menu-selector docker' for='docker-install'>Install using Docker</label></p>
|
||||
|
||||
<p><h3>Installation</h3></p>
|
||||
|
||||
<p><div class='install-instructions normal'>
|
||||
Installing and running Home Assistant on your local machine is easy. Make sure you have <a href='https://www.python.org/downloads/' target="_blank">Python 3.4</a> installed and execute the following code in a console:</p>
|
||||
|
||||
|
@ -128,42 +127,52 @@ Installing and running Home Assistant on your local machine is easy. Make sure y
|
|||
<p>Running these commands will:</p>
|
||||
<ol>
|
||||
<li>Install Home Assistant</li>
|
||||
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123' target="_blank"><a href="http://localhost:8123">http://localhost:8123</a></a></li>
|
||||
<li>Launch Home Assistant and serve web interface on
|
||||
<a href='http://localhost:8123' target="_blank"><a href="http://localhost:8123">http://localhost:8123</a></a></li>
|
||||
</ol>
|
||||
</div> <!-- INSTALL-INSTRUCTIONS NORMAL --></p>
|
||||
|
||||
<p><div class='install-instructions docker'>
|
||||
<p>Installation with Docker is straightforward. Adjust the following command so that <code>/path/to/your/config/</code> points at the folder where you want to store your config and run it:</p></p>
|
||||
<p><div class='install-instructions docker'></p>
|
||||
|
||||
<p>Installation with Docker is straightforward. Adjust the following command so that <code>/path/to/your/config/</code>
|
||||
points at the folder where you want to store your config and run it:</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>docker run -d <span class="se">--</span><span class="nv">name</span><span class="o">=</span><span class="s2">"home-assistant"</span> -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro <span class="se">--</span><span class="nv">net</span><span class="o">=</span>host balloob/home-assistant
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<p><p>This will launch Home Assistant and serve its web interface from port 8123 on your Docker host.</p></p>
|
||||
<p>This will launch Home Assistant and serve its web interface from port 8123 on your Docker host.</p>
|
||||
|
||||
<p><p class='note'>
|
||||
When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace <code>-v /etc/localtime:/etc/localtime:ro</code> with <code>-e “TZ=America/Los_Angeles”</code> (replacing America/Los_Angeles with <a href='http://en.wikipedia.org/wiki/List_of_tz_database_time_zones' target="_blank">your timezone</a>)
|
||||
</p>
|
||||
</div> <!-- INSTALL-INSTRUCTIONS DOCKER --></p>
|
||||
When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace
|
||||
<code>-v /etc/localtime:/etc/localtime:ro</code> with <code>-e “TZ=America/Los_Angeles”</code>
|
||||
(replacing America/Los_Angeles with <a href='http://en.wikipedia.org/wiki/List_of_tz_database_time_zones' target="_blank">your timezone</a>)
|
||||
</p></p>
|
||||
|
||||
<p><div class='install-instructions raspberry'>
|
||||
<p>Home Assistant uses Python 3.4 which is not shipped with the current Raspbian distibution for the Raspberry Pi. Before installing Home Assistant, you will have to <a href="https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=113961#p779265" target="_blank">install Python 3.4</a>.</p>
|
||||
<p></div> <!-- INSTALL-INSTRUCTIONS DOCKER --></p>
|
||||
|
||||
<p>Once that is complete, installing and running Home Assistant on your local machine is easy. Make sure you have <a href='https://www.python.org/downloads/' target="_blank">Python 3.4</a> installed and execute the following code in a console:</p>
|
||||
<p><div class='install-instructions raspberry'></p>
|
||||
|
||||
<p><p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<p>Home Assistant requires the Raspberry Pi to run <a href='https://www.raspberrypi.org/downloads/raspbian/'>Raspbian Jessie</a>.
|
||||
This version has been released on September 24, 2015 and comes by default with Python 3.4 which is required for Home Assistant.</p>
|
||||
|
||||
<p>Execute the following code in a console:</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pip3 install homeassistant
|
||||
</span><span class='line'>hass <span class="se">--</span>open-ui
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
</p>
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<p>Running these commands will:</p>
|
||||
<ol>
|
||||
|
||||
<ul>
|
||||
<li>Install Home Assistant</li>
|
||||
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123' target="_blank"><a href="http://localhost:8123">http://localhost:8123</a></a></li>
|
||||
</ol>
|
||||
</div> <!-- INSTALL-INSTRUCTIONS RASPBERRY --></p>
|
||||
<li>Launch Home Assistant and serve web interface on <a href="http://localhost:8123">http://localhost:8123</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p></div> <!-- INSTALL-INSTRUCTIONS RASPBERRY --></p>
|
||||
|
||||
<h3><a class='title-link' name='troubleshooting' href='#troubleshooting'></a> Troubleshooting</h3>
|
||||
|
||||
|
|
204
getting-started/presence-detection.html
Normal file
204
getting-started/presence-detection.html
Normal file
|
@ -0,0 +1,204 @@
|
|||
<!doctype html>
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
|
||||
|
||||
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Setting up presence detection - Home Assistant</title>
|
||||
<meta name="author" content="Paulus Schoutsen">
|
||||
|
||||
<meta name="description" content="Instructions how to setup presence detection within Home Assistant.">
|
||||
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="canonical" href="https://home-assistant.io/getting-started/presence-detection.html">
|
||||
|
||||
<meta property="fb:app_id" content="338291289691179">
|
||||
<meta property="og:title" content="Setting up presence detection">
|
||||
<meta property="og:site_name" content="Home Assistant">
|
||||
<meta property="og:url" content="https://home-assistant.io/getting-started/presence-detection.html/">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="Instructions how to setup presence detection within Home Assistant.">
|
||||
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
|
||||
<nav>
|
||||
<input type="checkbox" id="toggle">
|
||||
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
|
||||
<ul class="menu pull-right">
|
||||
<li>
|
||||
<a href="/getting-started/">Getting started</a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/developers/">Developers</a>
|
||||
<ul>
|
||||
<li><a href="/developers/architecture.html">Architecture</a></li>
|
||||
<li><a href="/developers/frontend.html">Frontend development</a></li>
|
||||
<li><a href="/developers/creating_components.html">
|
||||
Creating components
|
||||
</a></li>
|
||||
<li><a href="/developers/add_new_platform.html">
|
||||
Adding platform support
|
||||
</a></li>
|
||||
<li><a href="/developers/api.html">API</a></li>
|
||||
<li><a href="/developers/credits.html">Credits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
<li><a href="/help/">Need help?</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid grid-center">
|
||||
|
||||
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
|
||||
|
||||
|
||||
<article class="page">
|
||||
|
||||
|
||||
<header>
|
||||
<h1 class="title indent">
|
||||
Setting Up Presence Detection
|
||||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
|
||||
|
||||
<p class='note'>
|
||||
We care about privacy. Collected data is <b>only</b> stored in your instance of Home Assistant.
|
||||
</p>
|
||||
|
||||
|
||||
<p>Presence detection detects if people are home, an important input for automation. The most important
|
||||
piece of information is to know if anyone is home. But knowing who is home or where they are will open
|
||||
a whole range of other automation options:</p>
|
||||
|
||||
<ul>
|
||||
<li>Send me a notification when the kid arrives at school</li>
|
||||
<li>Turn on AC when I leave work</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p class='img'>
|
||||
<img src='/images/screenshots/map.png' />
|
||||
Screenshot of Home Assistant showing a school, work and home zone and two people.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a class='title-link' name='setting-it-up' href='#setting-it-up'></a> Setting it up</h2>
|
||||
|
||||
<p>The device tracker component offers presence detection for Home Assistant. It supports two different
|
||||
methods for presence detection: scan for connected devices on the local network and connect to third
|
||||
party service.</p>
|
||||
|
||||
<p>Scanning for connected devices is easy to setup. See the instructions for our <a href="/components/#presence">supported routers</a>
|
||||
or <a href="/components/device_tracker.nmap_scanner.html">scan the network using nmap</a>. This approach does have its limitations. It will only be able
|
||||
to detect if a device is home. It also struggles with iPhones because they disconnect from the WiFi if
|
||||
idle, marking them as not home while they are not.</p>
|
||||
|
||||
<p>Home Assistant currently supports one third party service for presence detection: <a href="http://www.owntracks.org">OwnTracks</a>.
|
||||
OwnTracks is an app that you install on your iPhone or Android phone that allows you to push the location
|
||||
of your device to Home Assistant using an MQTT broker. An MQTT broker is an Internet of Things communication
|
||||
platform that you can <a href="/components/mqtt.html#run-your-own">freely host yourself</a> or get <a href="/components/mqtt.html#run-your-own">a private instance for free in the cloud</a>.</p>
|
||||
|
||||
<p class='note'>
|
||||
OwnTracks communicates directly with your MQTT broker, no data will pass through their servers.
|
||||
</p>
|
||||
|
||||
|
||||
<h4><a class='title-link' name='zones' href='#zones'></a> Zones</h4>
|
||||
|
||||
<p><img src='/images/screenshots/badges-zone.png' style='float: right; margin-left: 8px; height: 100px;'>
|
||||
Home Assistant will know about the location for your device if you are using OwnTracks. By <a href="/components/zone.html">setting up
|
||||
zones</a> you will be able to add names to locations of your devices. This way you can easily
|
||||
spot on the state page where the people in your house are and use it as <a href="/components/automation.html#zone-trigger">triggers</a> and
|
||||
<a href="/components/automation.html#zone-condition">conditions</a> for automation.</p>
|
||||
|
||||
<h3><a href="/getting-started/automation.html">Next step: Setting up automation »</a></h3>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
<div class="grid__item">
|
||||
<p class="copyright">
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
@ -114,15 +115,78 @@ Home Assistant will print out the configuration directory it is using when start
|
|||
<p>Whenever a component or configuration option results in a warning, it will be stored in
|
||||
<code>home-assistant.log</code>. This file is reset on start of Home Assistant.</p>
|
||||
|
||||
<h3><a class='title-link' name='yaml' href='#yaml'></a> YAML</h3>
|
||||
|
||||
<p>Home Assistant uses the YAML syntax for configuration. YAML can be confusing at start but it is really
|
||||
powerful in allowing you to express complex configurations.</p>
|
||||
|
||||
<p>The basics of YAML are lists and lookup tables containing key-value pairs. Lists will have each item
|
||||
start with a <code>-</code> while lookup tables will have the format <code>key: value</code>. The last value for a key is
|
||||
used in case you specify a duplicate key.</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
<span class='line-number'>4</span>
|
||||
<span class='line-number'>5</span>
|
||||
<span class='line-number'>6</span>
|
||||
<span class='line-number'>7</span>
|
||||
<span class='line-number'>8</span>
|
||||
<span class='line-number'>9</span>
|
||||
<span class='line-number'>10</span>
|
||||
<span class='line-number'>11</span>
|
||||
<span class='line-number'>12</span>
|
||||
<span class='line-number'>13</span>
|
||||
<span class='line-number'>14</span>
|
||||
<span class='line-number'>15</span>
|
||||
<span class='line-number'>16</span>
|
||||
<span class='line-number'>17</span>
|
||||
<span class='line-number'>18</span>
|
||||
<span class='line-number'>19</span>
|
||||
<span class='line-number'>20</span>
|
||||
<span class='line-number'>21</span>
|
||||
<span class='line-number'>22</span>
|
||||
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># A list</span>
|
||||
</span><span class='line'><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">hello</span>
|
||||
</span><span class='line'><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">how</span>
|
||||
</span><span class='line'><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">are</span>
|
||||
</span><span class='line'><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">you</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'><span class="c1"># Lookup table</span>
|
||||
</span><span class='line'><span class="l-Scalar-Plain">beer</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">ice cold</span> <span class="c1"># <-- will be ignored because key specified twice</span>
|
||||
</span><span class='line'><span class="l-Scalar-Plain">beer</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">warm</span>
|
||||
</span><span class='line'><span class="l-Scalar-Plain">wine</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">room temperature</span>
|
||||
</span><span class='line'><span class="l-Scalar-Plain">water</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">cold</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'><span class="c1"># Nesting tables</span>
|
||||
</span><span class='line'><span class="l-Scalar-Plain">device_tracker</span><span class="p-Indicator">:</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">mqtt</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'><span class="c1"># Nesting a list of tables in a table</span>
|
||||
</span><span class='line'><span class="l-Scalar-Plain">sensor</span><span class="p-Indicator">:</span>
|
||||
</span><span class='line'> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">mqtt</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">state_topic</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">sensor/topic</span>
|
||||
</span><span class='line'> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">mqtt</span>
|
||||
</span><span class='line'> <span class="l-Scalar-Plain">state_topic</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">sensor2/topic</span>
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
|
||||
<p>Indentation is used to specify which objects are nested under one anohter. Getting the right indentation
|
||||
can be tricky if you’re not using an editor with a fixed width font. You can test your
|
||||
configuration using <a href="http://yaml-online-parser.appspot.com/">this online YAML parser</a>.</p>
|
||||
|
||||
<p>To learn more about the quirks of YAML, read
|
||||
<a href="https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html">YAML IDIOSYNCRASIES</a>
|
||||
by SaltStack.</p>
|
||||
|
||||
<h3><a class='title-link' name='my-component-does-not-show-up' href='#my-component-does-not-show-up'></a> My component does not show up</h3>
|
||||
|
||||
<p>When a component does not show up, many different things can be the case. Before you try any of
|
||||
these steps, make sure to look at the <code>home-assistant.log</code> file and see if there are any errors
|
||||
related to your component you are trying to set up.</p>
|
||||
|
||||
<p><strong>Problems with the configuration<br></strong></p>
|
||||
|
||||
<p><code>configuration.yaml</code> does not allow multiple sections to have the same name. If you want a
|
||||
<p><strong>Problems with the configuration<br></strong>
|
||||
<code>configuration.yaml</code> does not allow multiple sections to have the same name. If you want a
|
||||
specific component to be loaded twice, append a number to the name.</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
|
@ -144,8 +208,9 @@ related to your component you are trying to set up.</p>
|
|||
|
||||
<p>Another common problem is that a required configuration setting is missing. If this is the
|
||||
case, the component will report this to <code>home-assistant.log</code>. You can have a look at
|
||||
<a href="/components/">the component page</a> for instructions how to setup the components. If you find any
|
||||
errors or want to expand the documentation, please
|
||||
<a href="/components/">the component page</a> for instructions how to setup the components.</p>
|
||||
|
||||
<p>If you find any errors or want to expand the documentation, please
|
||||
<a href="https://github.com/balloob/home-assistant.io/issues">let us know</a>.</p>
|
||||
|
||||
<p><strong>Problems with dependencies<br></strong>
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
|
||||
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection.html'>Presence detection</a></li>
|
||||
<li><a href='/getting-started/automation.html'>Automation</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
</ul>
|
||||
|
@ -122,6 +123,12 @@ by some distributions. If you are unable to run <code>python3 -m pip --version</
|
|||
<a href="https://bootstrap.pypa.io/get-pip.py">downloading the installer</a> and run it with Python 3:
|
||||
<code>python3 get-pip.py</code>.</p>
|
||||
|
||||
<p><strong>CentOS and Python 3</strong><br>
|
||||
To run Python 3.x on <a href="https://www.centos.org/">CentOS</a> or RHEL, <a href="https://www.softwarecollections.org/en/scls/rhscl/rh-python34/">Software Collections</a> needs to be activated.</p></p>
|
||||
|
||||
<p><strong>Run the development version</strong><br>
|
||||
If you want to stay on top of the development of Home Assistant then you can upgrade to the latest stuff what is available in the dev branch <code>pip3 install --upgrade git+git://github.com/balloob/home-assistant.git@dev</code>. Keep in mind, that stable releases of Home Assistant are published often.</p>
|
||||
|
||||
<p><strong>No access to the frontend</strong><br>
|
||||
In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host is very limited.
|
||||
This means that you can’t access the Home Assistant Frontend that is running on a host outside of the host machine. Windows and OSX machines may also have issues with this.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue