Site updated at 2016-07-24 17:39:50 UTC

This commit is contained in:
Travis CI 2016-07-24 17:39:51 +00:00
parent 2d9a218a1b
commit 29118ce15d
1007 changed files with 168343 additions and 140 deletions

View file

@ -0,0 +1,219 @@
<!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>Getting started on Android - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Android instructions to add Home Assistant to your homescreen.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/android/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Getting started on Android">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/android/">
<meta property="og:type" content="website">
<meta property="og:description" content="Android instructions to add Home Assistant to your homescreen.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Getting started on Android">
<meta name="twitter:description" content="Android instructions to add Home Assistant to your homescreen.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Getting Started on Android
</h1>
</header>
<hr class="divider">
<p>Home Assistant is not available on the Play Store. Instead, Home Assistant leverages the new <a href="https://w3c.github.io/manifest/">manifest.json support</a> to allow Android devices to add the web application to your homescreen as if it was a native application.</p>
<ol>
<li>Open Chrome</li>
<li>Navigate to your Home Assistant instance</li>
<li>Click on the menu icon (three vertical dots)</li>
<li>Click on Add to Homescreen</li>
<li>A dialog will popup, click on Add</li>
</ol>
<p class="img" style="width:500px; margin-left: auto; margin-right: auto;">
<img src="/images/screenshots/android-homescreen-guide.gif" />
</p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/android.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a class='active' href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,265 @@
<!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>Automation Actions - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Automations result in action.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation-action/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Automation Actions">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation-action/">
<meta property="og:type" content="website">
<meta property="og:description" content="Automations result in action.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Automation Actions">
<meta name="twitter:description" content="Automations result in action.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Automation Actions
</h1>
</header>
<hr class="divider">
<p>The action of an automation rule is what is being executed when a rule fires. The action part follows the <a href="/getting-started/scripts/">script syntax</a> which can be used to interact with anything via services or events. For services you can specify the entity_id that it should apply to and optional service parameters (to specify for example the brightness).</p>
<p>You can also call the service to activate <a href="/components/scene/">a scene</a> which will allow you to define how you want your devices to be and have Home Assistant call the right services.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="comment"># Change the light in the kitchen and living room to 150 brightness and color red.</span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">homeassistant.turn_on</span></span>
<span class="key">entity_id</span>:
- <span class="string"><span class="content">light.kitchen</span></span>
- <span class="string"><span class="content">light.living_room</span></span>
<span class="key">data</span>:
<span class="key">brightness</span>: <span class="string"><span class="content">150</span></span>
<span class="key">rgb_color</span>: <span class="string"><span class="content">[255, 0, 0]</span></span>
<span class="key">automation 2</span>:
<span class="comment"># Notify me on my mobile phone of an event</span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">offset</span>: <span class="string"><span class="content">-00:30</span></span>
<span class="key">action</span>:
<span class="comment"># Actions are scripts so can also be a list of actions</span>
- <span class="string"><span class="content">service: notify.notify</span></span>
<span class="key">data</span>:
<span class="key">message</span>: <span class="string"><span class="content">Beautiful sunset!</span></span>
- <span class="string"><span class="content">delay: 0:35</span></span>
- <span class="string"><span class="content">service: notify.notify</span></span>
<span class="key">data</span>:
<span class="key">message</span>: <span class="string"><span class="content">Oh wow you really missed something great.</span></span>
</pre></div>
</div>
</div>
<p>Conditions can also be part of an action:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
- <span class="string"><span class="content">alias: 'Enciende Despacho'</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">sensor.mini_despacho</span></span>
<span class="key">to</span>: <span class="string"><span class="content">'ON'</span></span>
<span class="key">action</span>:
- <span class="string"><span class="content">condition: or</span></span>
<span class="key">conditions</span>:
- <span class="string"><span class="content">condition: template</span></span>
<span class="key">value_template</span>: <span class="string"><span class="content">''</span></span>
- <span class="string"><span class="content">condition: template</span></span>
<span class="key">value_template</span>: <span class="string"><span class="content">''</span></span>
- <span class="string"><span class="content">service: scene.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.DespiertaDespacho</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation-action.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a class='active' href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,241 @@
<!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>Automation Conditions - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Automations can test conditions when invoked.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation-condition/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Automation Conditions">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation-condition/">
<meta property="og:type" content="website">
<meta property="og:description" content="Automations can test conditions when invoked.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Automation Conditions">
<meta name="twitter:description" content="Automations can test conditions when invoked.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Automation Conditions
</h1>
</header>
<hr class="divider">
<p>Conditions are an optional part of an automation rule and be used to prevent an action from happening when triggered. Conditions look very similar to triggers but are very different. A trigger will look at events happening in the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is currently on or off.</p>
<p>If your triggers and conditions are exactly the same, you can use a shortcut to specify conditions. In this case, triggers that are not valid conditions will be ignored.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">condition</span>: <span class="string"><span class="content">use_trigger_values</span></span>
</pre></div>
</div>
</div>
<p>The available conditions for an automation are the same as for the script syntax. So see that page for a <a href="/getting-started/scripts-conditions/">full list of available conditions</a>.</p>
<p>Example of using condition:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>- <span class="string"><span class="content">alias: 'Enciende Despacho'</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">sensor.mini_despacho</span></span>
<span class="key">to</span>: <span class="string"><span class="content">'ON'</span></span>
<span class="key">condition</span>:
<span class="key">condition</span>: <span class="string"><span class="content">or</span></span>
<span class="key">conditions</span>:
- <span class="string"><span class="content">condition: template</span></span>
<span class="key">value_template</span>: <span class="string"><span class="content">''</span></span>
- <span class="string"><span class="content">condition: template</span></span>
<span class="key">value_template</span>: <span class="string"><span class="content">''</span></span>
<span class="key">action</span>:
- <span class="string"><span class="content">service: scene.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.DespiertaDespacho</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation-condition.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a class='active' href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,313 @@
<!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>Your First Automation - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Step by step guiding through making your first automation.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation-create-first/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Your First Automation">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation-create-first/">
<meta property="og:type" content="website">
<meta property="og:description" content="Step by step guiding through making your first automation.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Your First Automation">
<meta name="twitter:description" content="Step by step guiding through making your first automation.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Your First Automation
</h1>
</header>
<hr class="divider">
<p>Before we dive deeper into what every piece of automation <em>can</em> do, lets look at a simple automation rule: <strong>Turn on the lights when the sun sets</strong></p>
<p>In this example, we are defining a trigger to track the sunset and tell it to fire when the sun is setting. When this event is triggered, the service <code>light.turn_on</code> is called without any parameters. Because we specify no parameters, it will turn on all the lights.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">automation</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Turn on light when sun sets</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">light.turn_on</span></span>
</pre></div>
</div>
</div>
<p>After a few days of running this automation rule you come to realize that this automation rule is not good enough. It was already dark when the lights went on and the one day you werent home, the lights turned on anyway. Time for some tweaking. Lets add an offset to the sunset trigger and a condition to only turn on the lights if anyone is home.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">automation</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Turn on light when sun sets</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">offset</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">-01:00:00</span><span class="delimiter">&quot;</span></span>
<span class="key">condition</span>:
<span class="key">condition</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">home</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">light.turn_on</span></span>
</pre></div>
</div>
</div>
<p>Now youre happy and all is good. You start to like this automation business and buy some more lights, this time you put them in the bedroom. But what you now realize is that when the sun is setting, the lights in the bedroom are also being turned on! Time to tweak the automation to only turn on the living room lights.</p>
<p>The first thing you do is to look at the entities in the developer tools (second icon) in the app. You see the names of your lights and you write them down: <code>light.table_lamp</code>, <code>light.bedroom</code>, <code>light.ceiling</code>.</p>
<p>Instead of hard coding the entity IDs of the lights in the automation rule, we will set up a group. This will allow us to see the living room separate in the app and be able to address it from automation rules.</p>
<p>So we tweak the config to add the group and have the automation rule only turn on the group.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">group</span>:
<span class="key">living_room</span>:
- <span class="string"><span class="content">light.table_lamp</span></span>
- <span class="string"><span class="content">light.ceiling</span></span>
<span class="key">automation</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Turn on light when sun sets</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">offset</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">-01:00:00</span><span class="delimiter">&quot;</span></span>
<span class="key">condition</span>:
<span class="key">condition</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">home</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">light.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
</pre></div>
</div>
</div>
<p>Christmas is coming along and you decide to buy a remote switch to control the Christmas lights from Home Assistant. You cant claim to live in the house of the future if youre still manually turning on your Christmas lights!</p>
<p>We hook the switch up to Home Assistant and grab the entity ID from the developer tools: <code>switch.christmas_lights</code>. We will update the group to include the switch and will change our action. We are no longer able to call <code>light.turn_on</code> because we also want to turn on a switch. This is where <code>homeassistant.turn_on</code> comes to the rescue. This service is capable of turning any entity on.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">group</span>:
<span class="key">living_room</span>:
- <span class="string"><span class="content">light.table_lamp</span></span>
- <span class="string"><span class="content">light.ceiling</span></span>
- <span class="string"><span class="content">switch.christmas_lights</span></span>
<span class="key">automation</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Turn on light when sun sets</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">offset</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">-01:00:00</span><span class="delimiter">&quot;</span></span>
<span class="key">condition</span>:
<span class="key">condition</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">home</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">homeassistant.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
</pre></div>
</div>
</div>
<h3><a class="title-link" name="learn-more" href="#learn-more"></a> Learn more</h3>
<ul>
<li><a href="/getting-started/automation-trigger/">Triggers</a></li>
<li><a href="/getting-started/automation-condition/">Conditions</a></li>
<li><a href="/getting-started/automation-action/">Actions</a></li>
<li><a href="/getting-started/automation-templating/">Templating</a> (advanced)</li>
</ul>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation-create-first.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a class='active' href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,261 @@
<!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>Automation Examples - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Some automation examples to get you started.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation-examples/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Automation Examples">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation-examples/">
<meta property="og:type" content="website">
<meta property="og:description" content="Some automation examples to get you started.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Automation Examples">
<meta name="twitter:description" content="Some automation examples to get you started.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Automation Examples
</h1>
</header>
<hr class="divider">
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example of entry in configuration.yaml</span>
<span class="key">automation</span>:
<span class="comment"># Turns on lights 1 hour before sunset if people are home</span>
<span class="comment"># and if people get home between 16:00-23:00</span>
- <span class="string"><span class="content">alias: 'Rule 1 Light on in the evening'</span></span>
<span class="key">trigger</span>:
<span class="comment"># Prefix the first line of each trigger configuration</span>
<span class="comment"># with a '-' to enter multiple</span>
- <span class="string"><span class="content">platform: sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">offset</span>: <span class="string"><span class="content">'-01:00:00'</span></span>
- <span class="string"><span class="content">platform: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'home'</span></span>
<span class="key">condition</span>:
<span class="comment"># Prefix the first line of each condition configuration</span>
<span class="comment"># with a '-'' to enter multiple</span>
- <span class="string"><span class="content">platform: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'home'</span></span>
- <span class="string"><span class="content">platform: time</span></span>
<span class="key">after</span>: <span class="string"><span class="content">'16:00:00'</span></span>
<span class="key">before</span>: <span class="string"><span class="content">'23:00:00'</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">homeassistant.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
<span class="comment"># Turn off lights when everybody leaves the house</span>
- <span class="string"><span class="content">alias: 'Rule 2 - Away Mode'</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'not_home'</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">light.turn_off</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_lights</span></span>
<span class="comment"># Notify when Paulus leaves the house in the evening</span>
- <span class="string"><span class="content">alias: 'Leave Home notification'</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">zone</span></span>
<span class="key">event</span>: <span class="string"><span class="content">leave</span></span>
<span class="key">zone</span>: <span class="string"><span class="content">zone.home</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus</span></span>
<span class="key">condition</span>:
<span class="key">platform</span>: <span class="string"><span class="content">time</span></span>
<span class="key">after</span>: <span class="string"><span class="content">'20:00'</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">notify.notify</span></span>
<span class="key">data</span>:
<span class="key">message</span>: <span class="string"><span class="content">'Paulus left the house'</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation-examples.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,455 @@
<!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>Automation Templating - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Advanced automation documentation using templating.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation-templating/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Automation Templating">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation-templating/">
<meta property="og:type" content="website">
<meta property="og:description" content="Advanced automation documentation using templating.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Automation Templating">
<meta name="twitter:description" content="Advanced automation documentation using templating.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Automation Templating
</h1>
</header>
<hr class="divider">
<p>In Home Assistant 0.19 we introduced a new powerful feature: variables in scripts and automations. This makes it possible to adjust your condition and action based on the information of the trigger.</p>
<p>The trigger data made is available during template rendering as the <code>trigger</code> variable.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entries</span>
<span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">notify.notify</span></span>
<span class="key">data_template</span>:
<span class="key">message</span>: <span class="string"><span class="delimiter">&gt;</span><span class="content">
Paulus just changed from {{ trigger.from_state.state }}
to {{ trigger.to_state.state }}</span></span>
<span class="key">automation 2</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">topic</span>: <span class="string"><span class="content">/notify/+</span></span>
<span class="key">action</span>:
<span class="key">service_template</span>: <span class="string"><span class="delimiter">&gt;</span><span class="content">
notify.{{ trigger.topic.split('/')[-1] }}</span></span>
<span class="key">data_template</span>:
<span class="key">message</span>: <span class="string"><span class="content">{{ trigger.payload }}</span></span>
</pre></div>
</div>
</div>
<h3><a class="title-link" name="available-trigger-data" href="#available-trigger-data"></a> Available Trigger Data</h3>
<p>The following tables show the available trigger data per platform.</p>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>event</code>.</td>
</tr>
<tr>
<td><code>trigger.event</code></td>
<td>Event object that matched.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>mqtt</code>.</td>
</tr>
<tr>
<td><code>trigger.topic</code></td>
<td>Topic that received payload.</td>
</tr>
<tr>
<td><code>trigger.payload</code></td>
<td>Payload.</td>
</tr>
<tr>
<td><code>trigger.qos</code></td>
<td>QOS of payload.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>numeric_state</code></td>
</tr>
<tr>
<td><code>trigger.entity_id</code></td>
<td>Entity ID that we observe.</td>
</tr>
<tr>
<td><code>trigger.below</code></td>
<td>The below threshold, if any.</td>
</tr>
<tr>
<td><code>trigger.above</code></td>
<td>The above threshold, if any.</td>
</tr>
<tr>
<td><code>trigger.from_state</code></td>
<td>The previous state of the entity.</td>
</tr>
<tr>
<td><code>trigger.to_state</code></td>
<td>The new state that triggered trigger.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>state</code></td>
</tr>
<tr>
<td><code>trigger.entity_id</code></td>
<td>Entity ID that we observe.</td>
</tr>
<tr>
<td><code>trigger.from_state</code></td>
<td>The previous state of the entity.</td>
</tr>
<tr>
<td><code>trigger.to_state</code></td>
<td>The new state that triggered trigger.</td>
</tr>
<tr>
<td><code>trigger.for</code></td>
<td>Timedelta object how long state has been to state, if any.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>sun</code></td>
</tr>
<tr>
<td><code>trigger.event</code></td>
<td>The event that just happened: <code>sunset</code> or <code>sunrise</code>.</td>
</tr>
<tr>
<td><code>trigger.offset</code></td>
<td>Timedelta object with offset to the event, if any.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>template</code></td>
</tr>
<tr>
<td><code>trigger.entity_id</code></td>
<td>Entity ID that caused change.</td>
</tr>
<tr>
<td><code>trigger.from_state</code></td>
<td>Previous state of entity that caused change.</td>
</tr>
<tr>
<td><code>trigger.to_state</code></td>
<td>New state of entity that caused template to change.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>time</code></td>
</tr>
<tr>
<td><code>trigger.now</code></td>
<td>DateTime object that triggered the time trigger.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Template variable</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>trigger.platform</code></td>
<td>Hardcoded: <code>zone</code></td>
</tr>
<tr>
<td><code>trigger.entity_id</code></td>
<td>Entity ID that we are observing.</td>
</tr>
<tr>
<td><code>trigger.from_state</code></td>
<td>Previous state of the entity.</td>
</tr>
<tr>
<td><code>trigger.to_state</code></td>
<td>New state of the entity.</td>
</tr>
<tr>
<td><code>trigger.zone</code></td>
<td>State object of zone</td>
</tr>
<tr>
<td><code>trigger.event</code></td>
<td>Event that trigger observed: <code>enter</code> or <code>leave</code>.</td>
</tr>
</tbody>
</table>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation-templating.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a class='active' href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,353 @@
<!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>Automation Trigger - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="All the different ways how automations can be triggered.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation-trigger/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Automation Trigger">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation-trigger/">
<meta property="og:type" content="website">
<meta property="og:description" content="All the different ways how automations can be triggered.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Automation Trigger">
<meta name="twitter:description" content="All the different ways how automations can be triggered.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Automation Trigger
</h1>
</header>
<hr class="divider">
<p>Triggers are what starts the processing of an automation rule. It is possible to specify multiple triggers for the same rule. Once a trigger starts, Home Assistant will validate the conditions, if any, and call the action.</p>
<h4><a class="title-link" name="event-trigger" href="#event-trigger"></a> Event trigger</h4>
<p>Triggers when an event is being processed. Events are the raw building blocks of Home Assistant. You can match events on just the event name or also require specific event data to be present.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">MY_CUSTOM_EVENT</span></span>
<span class="comment"># optional</span>
<span class="key">event_data</span>:
<span class="key">mood</span>: <span class="string"><span class="content">happy</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="mqtt-trigger" href="#mqtt-trigger"></a> MQTT trigger</h4>
<p>Triggers when a specific message is received on given topic. Optionally can match on the payload being sent over the topic.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">topic</span>: <span class="string"><span class="content">living_room/switch/ac</span></span>
<span class="comment"># Optional</span>
<span class="key">payload</span>: <span class="string"><span class="content">'on'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="numeric-state-trigger" href="#numeric-state-trigger"></a> Numeric state trigger</h4>
<p>On state change of a specified entity, attempts to parse the state as a number and triggers if value is above and/or below a threshold.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">numeric_state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">sensor.temperature</span></span>
<span class="comment"># Optional</span>
<span class="key">value_template</span>: <span class="string"><span class="content">'{{ state.attributes.battery }}'</span></span>
<span class="comment"># At least one of the following required</span>
<span class="key">above</span>: <span class="string"><span class="content">17</span></span>
<span class="key">below</span>: <span class="string"><span class="content">25</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="state-trigger" href="#state-trigger"></a> State trigger</h4>
<p>Triggers when the state of tracked entities change. If only entity_id given will match all state changes.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus, device_tracker.anne_therese</span></span>
<span class="comment"># Optional </span>
<span class="key">state</span>: <span class="string"><span class="content">'xy'</span></span>
<span class="comment"># or (don't use that with condition: use_trigger_values)</span>
<span class="key">from</span>: <span class="string"><span class="content">'not_home'</span></span>
<span class="key">to</span>: <span class="string"><span class="content">'home'</span></span>
<span class="comment"># If given, will trigger when state has been the to state for X time.</span>
<span class="key">for</span>:
<span class="key">hours</span>: <span class="string"><span class="content">1</span></span>
<span class="key">minutes</span>: <span class="string"><span class="content">10</span></span>
<span class="key">seconds</span>: <span class="string"><span class="content">5</span></span>
</pre></div>
</div>
</div>
<p class="note warning">
Use quotes around your values for <code>from</code> and <code>to</code> to avoid the YAML parser interpreting values as booleans.
</p>
<h4><a class="title-link" name="sun-trigger" href="#sun-trigger"></a> Sun trigger</h4>
<p>Trigger when the sun is setting or rising. An optional time offset can be given to have it trigger for example 45 minutes before sunset, when dusk is setting in.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">sun</span></span>
<span class="comment"># Possible values: sunset, sunrise</span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="comment"># Optional time offset. This example is 45 minutes.</span>
<span class="key">offset</span>: <span class="string"><span class="content">'-00:45:00'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="template-trigger" href="#template-trigger"></a> Template trigger</h4>
<p>Template triggers work by evaluating a [template] on each state change. The trigger will fire if the state change caused the template to render true. This is achieved by having the template result in a true boolean expression (<code>{{ is_state('device_tracker.paulus', 'home') }}</code>) or by having the template render true (example below).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">template</span></span>
<span class="key">value_template</span>: <span class="string"><span class="content">'{% if is_state('device_tracker.paulus', 'home') %}true{% endif %}'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="time-trigger" href="#time-trigger"></a> Time trigger</h4>
<p>Time can be triggered in many ways. The most common is to specify <code>after</code> and trigger at a specific point in time each day. Alternatively, you can also match if the hour, minute or second of the current time has a specific value. You can prefix the value with a <code>/</code> to match whenever the value is divisible by that number. You cannot use <code>after</code> together with hour, minute or second.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">time</span></span>
<span class="comment"># Matches every hour at 5 minutes past whole</span>
<span class="key">minutes</span>: <span class="string"><span class="content">5</span></span>
<span class="key">seconds</span>: <span class="string"><span class="content">0</span></span>
<span class="key">automation 2</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">time</span></span>
<span class="comment"># When 'after' is used, you cannot also match on hour, minute, seconds.</span>
<span class="comment"># Military time format.</span>
<span class="key">after</span>: <span class="string"><span class="content">'15:32:00'</span></span>
<span class="key">automation 3</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">time</span></span>
<span class="comment"># You can also match on interval. This will match every 5 minutes</span>
<span class="key">minutes</span>: <span class="string"><span class="content">'/5'</span></span>
<span class="key">seconds</span>: <span class="string"><span class="content">0</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="zone-trigger" href="#zone-trigger"></a> Zone trigger</h4>
<p>Zone triggers can trigger when an entity is entering or leaving the zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the <a href="/components/device_tracker.owntracks/">OwnTracks platform</a> as well as the <a href="/components/device_tracker.icloud/">iCloud platform</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">automation</span>:
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">zone</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus</span></span>
<span class="key">zone</span>: <span class="string"><span class="content">zone.home</span></span>
<span class="comment"># Event is either enter or leave</span>
<span class="key">event</span>: <span class="string"><span class="content">enter</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation-trigger.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a class='active' href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,221 @@
<!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>Troubleshooting Automations - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Tips on how to troubleshoot your automations.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation-troubleshooting/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Troubleshooting Automations">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation-troubleshooting/">
<meta property="og:type" content="website">
<meta property="og:description" content="Tips on how to troubleshoot your automations.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Troubleshooting Automations">
<meta name="twitter:description" content="Tips on how to troubleshoot your automations.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Troubleshooting Automations
</h1>
</header>
<hr class="divider">
<p>You can verify that your automation rules are being initialized correctly by watching both the realtime logs (<code>homeassistant.log</code> in the configuration directory) and also the <a href="/components/logbook/">Logbook</a>. The realtime logs will show the rules being initialized (once for each trigger), example:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>INFO [homeassistant.components.automation] Initialized rule Rainy Day
INFO [homeassistant.components.automation] Initialized rule Rainy Day
INFO [homeassistant.components.automation] Initialized rule Rainy Day
INFO [homeassistant.components.automation] Initialized rule Rain is over
</pre></div>
</div>
</div>
<p>The Logbook component will show a line entry when an automation is triggered. You can look at the previous entry to determine which trigger in the rule triggered the event.</p>
<p><img src="/images/components/automation/logbook.png" alt="Logbook example" /></p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation-troubleshooting.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,270 @@
<!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>Automating Home Assistant - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Steps to help you get automation setup in Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/automation/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Automating Home Assistant">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/automation/">
<meta property="og:type" content="website">
<meta property="og:description" content="Steps to help you get automation setup in Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Automating Home Assistant">
<meta name="twitter:description" content="Steps to help you get automation setup in Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Automating Home Assistant
</h1>
</header>
<hr class="divider">
<p>When all your devices are set up its time to put the cherry on the pie: automation. Home Assistant offers <a href="/components/#automation">a few built-in automations</a> but mainly youll be using the automation component to set up your own rules.</p>
<p>Home Assistant offers a wide range of automations. In the next few pages well try to guide you through all the different possibilities and options. Besides this documentation there are also a couple of people who have made their automation configurations <a href="/cookbook/#example-configurationyaml">publicly available</a>.</p>
<h3><a class="title-link" name="the-basics-of-automation" href="#the-basics-of-automation"></a> The basics of automation</h3>
<p>Before you can go ahead and create your own automations, its important to learn the basics. To explore the basics, lets have a look at the following example home automation rule:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>(trigger) When Paulus arrives home
(condition) and it is after sunset:
(action) Turn the lights in the living room on
</pre></div>
</div>
</div>
<p>The example consists of three different parts: a trigger, a condition and an action.</p>
<p>The first line is the trigger of the automation rule. Triggers describe events that should trigger the automation rule. In this case it is a person arriving home, which can be observed in Home Assistant by observing the state of Paulus changing from not_home to home.</p>
<p>The second line is the condition part of the automation rule. Conditions are optional tests that can limit an automation rule to only work in your specific use cases. A condition will test against the current state of the system. This includes the current time, devices, people and other things like the sun. In this case we only want to act when the sun has set.</p>
<p>The third part is the action which will be performed when a rule is triggered and all conditions are met.For example, it can turn a light on, set the temperature on your thermostat or activate a scene.</p>
<p class="note">
The difference between a condition and a trigger can be confusing as they are very similar. Triggers are looking at the actions while conditions look at the result: turning a light on vs a light being on.
</p>
<h3><a class="title-link" name="exploring-the-internal-state" href="#exploring-the-internal-state"></a> Exploring the internal state</h3>
<p>Automation rules interact directly with the internal state of Home Assistant so youll need to familiarize yourself with it. Home Assistant exposes its current state via the developer tools which are available at the bottom of the sidebar in the frontend. The <img src="/images/screenshots/developer-tool-states-icon.png" class="no-shadow" height="38" /> icon will show all currently available states. An entity can be anything. A light, a switch, a person and even the sun. A state consists of the following parts:</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>Entity ID</td>
<td>Unique identifier for the entity.</td>
<td><code>light.kitchen</code></td>
</tr>
<tr>
<td>State</td>
<td>The current state of the device.</td>
<td><code>home</code></td>
</tr>
<tr>
<td>Attributes</td>
<td>Extra data related to the device and/or current state.</td>
<td><code>brightness</code></td>
</tr>
</tbody>
</table>
<p>State changes can be used as the source of triggers and the current state can be used in conditions.</p>
<p>Actions are all about calling services. To explore the available services open the <img src="/images/screenshots/developer-tool-services-icon.png" class="no-shadow" height="38" /> Services developer tool. Services allow to change anything. For example turn on a light, run a script or enable a scene. Each service has a domain and a name. For example the service <code>light.turn_on</code> is capable of turning on any light in your system. Services can be passed parameters to for example tell which device to turn on or what color to use.</p>
<h3><a href="/getting-started/automation-create-first/">Next step: Your First Automation »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/automation.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a class='active' href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,229 @@
<!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>Autostart on OS X - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to setup Home Assistant to launch on OS X.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/autostart-macos/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Autostart on OS X">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/autostart-macos/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to setup Home Assistant to launch on OS X.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Autostart on OS X">
<meta name="twitter:description" content="Instructions how to setup Home Assistant to launch on OS X.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Autostart on OS X
</h1>
</header>
<hr class="divider">
<p>Setting up Home Assistant to run as a background service is simple. OS X will start it on boot and make sure its always running.</p>
<p>To get Home Assistant installed as a background service, run:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ hass --install-osx
Home Assistant has been installed. Open it here: http://localhost:8123
</pre></div>
</div>
</div>
<p>Home Assistant will log to <code>~/Library/Logs/homeassistant.log</code></p>
<p>To uninstall the service, run:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ hass --uninstall-osx
Home Assistant has been uninstalled.
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/autostart-macos.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a class='active' href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,252 @@
<!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>Autostart on Synology NAS boot - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to setup Home Assistant to launch on boot on Synology NAS.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/autostart-synology/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Autostart on Synology NAS boot">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/autostart-synology/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to setup Home Assistant to launch on boot on Synology NAS.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Autostart on Synology NAS boot">
<meta name="twitter:description" content="Instructions how to setup Home Assistant to launch on boot on Synology NAS.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Autostart on Synology NAS Boot
</h1>
</header>
<hr class="divider">
<p>To get Home Assistant to automatically start when you boot your Synology NAS:</p>
<p>SSH onto your synology &amp; login as admin or root</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ cd /volume1/homeassistant
</pre></div>
</div>
</div>
<p>Create “homeassistant.conf” file using the following code</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre># only start this service after the httpd user process has started
start on started httpd-user
# stop the service gracefully if the runlevel changes to 'reboot'
stop on runlevel [06]
# run the scripts as the 'http' user. Running as root (the default) is a bad ide
#setuid admin
# exec the process. Use fully formed path names so that there is no reliance on
# the 'www' file is a node.js script which starts the foobar application.
exec /bin/sh /volume1/homeassistant/hass-daemon start
</pre></div>
</div>
</div>
<p>Register the autostart</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ ln -s homeassistant-conf /etc/init/homeassistant-conf
</pre></div>
</div>
</div>
<p>Make the relevant files executable:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ chmod -r 777 /etc/init/homeassistant-conf
</pre></div>
</div>
</div>
<p>Thats it - reboot your NAS and Home Assistant should automatically start</p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/autostart-synology.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a class='active' href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,277 @@
<!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>Autostart using systemd - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to setup Home Assistant to launch on boot using systemd.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/autostart-systemd/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Autostart using systemd">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/autostart-systemd/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to setup Home Assistant to launch on boot using systemd.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Autostart using systemd">
<meta name="twitter:description" content="Instructions how to setup Home Assistant to launch on boot using systemd.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Autostart Using Systemd
</h1>
</header>
<hr class="divider">
<p>Newer linux distributions are trending towards using <code>systemd</code> for managing daemons. Typically, systems based on Fedora, ArchLinux, or Debian (8 or later) use <code>systemd</code>. This includes Ubuntu releases including and after 15.04, CentOS, and Red Hat. If you are unsure if your system is using <code>systemd</code>, you may check with the following command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ ps -p 1 -o comm=
</pre></div>
</div>
</div>
<p>If the preceding command returns the string <code>systemd</code>, you are likely using <code>systemd</code>.</p>
<p>If you want Home Assistant to be launched automatically, an extra step is needed to setup <code>systemd</code>. You need a service file to control Home Assistant with <code>systemd</code>. If you are using a Raspberry Pi with Raspbian then replace the <code>[your user]</code> with <code>pi</code> otherwise use your user you want to run Home Assistant. <code>ExecStart</code> contains the path to <code>hass</code> and this may vary. Check with <code>whereis hass</code> for the location.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ su -c 'cat &lt;&lt;EOF &gt;&gt; /lib/systemd/system/home-assistant@[your user].service
[Unit]
Description=Home Assistant
After=network.target
[Service]
Type=simple
User=%i
ExecStart=/usr/bin/hass
[Install]
WantedBy=multi-user.target
EOF'
</pre></div>
</div>
</div>
<p>There is also another <a href="https://raw.githubusercontent.com/home-assistant/home-assistant/master/script/home-assistant%40.service">sample service file</a> available. To use this one, just download it.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo wget https://raw.githubusercontent.com/home-assistant/home-assistant/master/script/home-assistant%40.service -O /lib/systemd/system/home-assistant@[your user].service
</pre></div>
</div>
</div>
<p>You need to reload <code>systemd</code> to make the daemon aware of the new configuration. Enable and launch Home Assistant after that.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo systemctl --system daemon-reload
$ sudo systemctl enable home-assistant@[your user]
$ sudo systemctl start home-assistant@[your user]
</pre></div>
</div>
</div>
<p>If everything went well, <code>sudo systemctl start home-assistant@[your user]</code> should give you a positive feedback.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo systemctl status home-assistant@[your user] -l
● home-assistant@fab.service - Home Assistant for [your user]
Loaded: loaded (/usr/lib/systemd/system/home-assistant@[your user].service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2016-03-26 12:26:06 CET; 13min ago
Main PID: 30422 (hass)
CGroup: /system.slice/system-home\x2dassistant.slice/home-assistant@[your user].service
├─30422 /usr/bin/python3 /usr/bin/hass
└─30426 /usr/bin/python3 /usr/bin/hass
[...]
</pre></div>
</div>
</div>
<p>To get Home Assistants logging output, simple use <code>journalctl</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo journalctl -f -u home-assistant@[your user]
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/autostart-systemd.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a class='active' href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,230 @@
<!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>Autostart using Upstart - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to setup Home Assistant to launch on boot using Upstart.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/autostart-upstart/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Autostart using Upstart">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/autostart-upstart/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to setup Home Assistant to launch on boot using Upstart.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Autostart using Upstart">
<meta name="twitter:description" content="Instructions how to setup Home Assistant to launch on boot using Upstart.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Autostart Using Upstart
</h1>
</header>
<hr class="divider">
<p>Many linux distributions use the Upstart system (or similar) for managing daemons. Typically, systems based on Debian 7 or previous use Upstart. This includes Ubuntu releases before 15.04. If you are unsure if your system is using Upstart, you may check with the following command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ ps -p 1 -o comm=
</pre></div>
</div>
</div>
<p>If the preceding command returns the string <code>init</code>, you are likely using Upstart.</p>
<p>Upstart will launch init scripts that are located in the directory <code>/etc/init.d/</code>. A sample init script for systems using Upstart is <a href="https://raw.githubusercontent.com/home-assistant/home-assistant/dev/script/hass-daemon">maintained by this project</a>.</p>
<p>To install this script, download it, tweak it to you liking, and install it by following the directions in the header. This script will setup Home Assistant to run when the system boots. To start/stop Home Assistant manually, issue the following commands:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo service hass-daemon start
$ sudo service hass-daemon stop
</pre></div>
</div>
</div>
<p>When running Home Assistant with this script, the configuration directory will be located at <code>/var/opt/homeassistant</code>. This directory will contain a verbose log rather than simply an error log.</p>
<p>When running daemons, it is good practice to have the daemon run under its own user name rather than the default users name. Instructions for setting this up are outside the scope of this document.</p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/autostart-upstart.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a class='active' href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,214 @@
<!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>Autostart Home Assistant - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to setup Home Assistant to launch on start.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/autostart/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Autostart Home Assistant">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/autostart/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to setup Home Assistant to launch on start.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Autostart Home Assistant">
<meta name="twitter:description" content="Instructions how to setup Home Assistant to launch on start.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Autostart Home Assistant
</h1>
</header>
<hr class="divider">
<p>Once you get started with Home Assistant you want it to start automatically when you launch your machine. To help you get started weve compiled a few guides for different systems.</p>
<ul>
<li><a href="/getting-started/autostart-systemd/">Linux - systemd</a></li>
<li><a href="/getting-started/autostart-upstart/">Linux - Upstart</a></li>
<li><a href="/getting-started/autostart-macos/">OS X</a></li>
<li><a href="/getting-started/autostart-synology/">Synology NAS</a></li>
</ul>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/autostart.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a class='active' href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,263 @@
<!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>Setup basic information - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Setting up the basic info of Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/basic/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Setup basic information">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/basic/">
<meta property="og:type" content="website">
<meta property="og:description" content="Setting up the basic info of Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Setup basic information">
<meta name="twitter:description" content="Setting up the basic info of Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Setup Basic Information
</h1>
</header>
<hr class="divider">
<p>By default Home Assistant will try to detect your location and will automatically select a temperature unit and time zone based on your location. You can overwrite this by adding the following information to your <code>configuration.yaml</code>:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">homeassistant</span>:
<span class="comment"># Omitted values in this section will be auto detected using freegeoip.io</span>
<span class="comment"># Location required to calculate the time the sun rises and sets</span>
<span class="key">latitude</span>: <span class="string"><span class="content">32.87336</span></span>
<span class="key">longitude</span>: <span class="string"><span class="content">117.22743</span></span>
<span class="comment"># Impacts weather/sunrise data (altitude above sea level) </span>
<span class="key">elevation</span>: <span class="string"><span class="content">430</span></span>
<span class="comment"># C for Celsius, F for Fahrenheit</span>
<span class="key">temperature_unit</span>: <span class="string"><span class="content">C</span></span>
<span class="comment"># Pick yours from here:</span>
<span class="comment"># http://en.wikipedia.org/wiki/List_of_tz_database_time_zones</span>
<span class="key">time_zone</span>: <span class="string"><span class="content">America/Los_Angeles</span></span>
<span class="comment"># Name of the location where Home Assistant is running</span>
<span class="key">name</span>: <span class="string"><span class="content">Home</span></span>
</pre></div>
</div>
</div>
<h3><a class="title-link" name="password-protecting-the-web-interface" href="#password-protecting-the-web-interface"></a> Password protecting the web interface</h3>
<p>The first thing you will want to add is a password for the web interface. Use your favourite text editor to open <code>configuration.yaml</code> and edit the <code>http</code> section:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">http</span>:
<span class="key">api_password</span>: <span class="string"><span class="content">YOUR_PASSWORD</span></span>
</pre></div>
</div>
</div>
<p>See the <a href="/components/http/">HTTP component documentation</a> for more options like HTTPS encryption.</p>
<h3><a class="title-link" name="setting-up-your-phone-or-tablet" href="#setting-up-your-phone-or-tablet"></a> Setting up your phone or tablet</h3>
<p>Home Assistant runs as a self-hosted web application and contains support to be added to your home screen. If youre on Android you can follow <a href="/getting-started/android/">the visual guide</a>. For other devices, open Home Assistant on your mobile browser and tap the add to home screen option.</p>
<h3><a class="title-link" name="remote-access" href="#remote-access"></a> Remote access</h3>
<p>To make Home Assistant accessible while away from home, you will have to make it accessible.</p>
<p>The common approach is to setup port forwarding from your router to port 8123 on the computer that is hosting Home Assistant. Instructions on how to do this can be found by searching <code>&lt;Router model&gt; port forwarding instructions</code>.</p>
<p>The problem with making a port accessible is that some Internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while away. You can solve this by using a free Dynamic DNS service like <a href="https://www.duckdns.org/">DuckDNS</a>.</p>
<p>Just putting a port up is not secure. You should definitely consider to encrypt your traffic if you are accessing your Home Assistant installation from abroad. For details please check the <a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Lets Encrypt</a> blog post.</p>
<p>If you want the very best security, check out <a href="/cookbook/tor_configuration/">the instructions how to use Tor to access your home</a>.</p>
<h3><a href="/getting-started/devices/">Next step: Setting up devices »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/basic.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a class='active' href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,413 @@
<!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>Browsers - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Browser Compatibility List">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/browsers/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Browsers">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/browsers/">
<meta property="og:type" content="website">
<meta property="og:description" content="Browser Compatibility List">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Browsers">
<meta name="twitter:description" content="Browser Compatibility List">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Browsers
</h1>
</header>
<hr class="divider">
<p>Home Assistant requires a web browser to show the frontend. Not all browsers include features which are needed to use the Home Assistant frontend. If you are running into trouble, check the list below.</p>
<p>We dont test the web interface against all available browsers but this page tracks different browsers on various operating systems and should help you to pick a browser which works.</p>
<p>We would appreciate if you help to keep this page up-to-date and add feedback.</p>
<h2><a class="title-link" name="microsoft-windows" href="#microsoft-windows"></a> Microsoft Windows</h2>
<table>
<thead>
<tr>
<th style="text-align: left">Browser</th>
<th style="text-align: left">Release</th>
<th style="text-align: left">State</th>
<th style="text-align: left">Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">Internet Explorer (<a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie">IE</a>)</td>
<td style="text-align: left">11</td>
<td style="text-align: left">partially</td>
<td style="text-align: left">Streaming updates not working. Display issues</td>
</tr>
<tr>
<td style="text-align: left">Microsoft <a href="https://www.microsoft.com/en-us/windows/microsoft-edge">Edge</a></td>
<td style="text-align: left">deli. Win 10</td>
<td style="text-align: left">partially</td>
<td style="text-align: left">Streaming updates not working.</td>
</tr>
<tr>
<td style="text-align: left"><a href="https://www.google.com/chrome/">Chrome</a></td>
<td style="text-align: left">50.0.2661.102</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="https://www.mozilla.org/en-US/firefox/">Firefox</a></td>
<td style="text-align: left">43.0.1</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="https://iridiumbrowser.de/">Iridium</a></td>
<td style="text-align: left">48.2</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="macos" href="#macos"></a> MacOS</h2>
<table>
<thead>
<tr>
<th style="text-align: left">Browser</th>
<th style="text-align: left">Release</th>
<th style="text-align: left">State</th>
<th style="text-align: left">Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><a href="http://www.apple.com/safari/">Safari</a></td>
<td style="text-align: left"> </td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="linux" href="#linux"></a> Linux</h2>
<table>
<thead>
<tr>
<th style="text-align: left">Browser</th>
<th style="text-align: left">Release</th>
<th style="text-align: left">State</th>
<th style="text-align: left">Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><a href="https://www.mozilla.org/en-US/firefox/">Firefox</a></td>
<td style="text-align: left">47.0</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="http://midori-browser.org/">Midori</a></td>
<td style="text-align: left">0.5.11</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="https://www.chromium.org/">Chromium</a></td>
<td style="text-align: left">50.0.2661.102</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="http://conkeror.org/">Conkeror</a></td>
<td style="text-align: left">1.0.2</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="https://konqueror.org/">Konqueror</a></td>
<td style="text-align: left"> </td>
<td style="text-align: left">unknown</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="http://www.uzbl.org/">Uzbl</a></td>
<td style="text-align: left">0.9.0</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="http://www.opera.com/">Opera</a></td>
<td style="text-align: left"> </td>
<td style="text-align: left">unknown</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="http://lynx.browser.org/">Lynx</a></td>
<td style="text-align: left">2.12</td>
<td style="text-align: left">fails</td>
<td style="text-align: left">loads empty page</td>
</tr>
<tr>
<td style="text-align: left"><a href="http://elinks.or.cz/">elinks</a></td>
<td style="text-align: left"> </td>
<td style="text-align: left">fails</td>
<td style="text-align: left">page with manifest and import</td>
</tr>
<tr>
<td style="text-align: left"><a href="http://w3m.sourceforge.net/">w3m</a></td>
<td style="text-align: left">0.5.3</td>
<td style="text-align: left">fails</td>
<td style="text-align: left">display the icon shown while loading HA</td>
</tr>
<tr>
<td style="text-align: left"><a href="https://wiki.gnome.org/Apps/Web">Epiphany</a></td>
<td style="text-align: left">3.18.5</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="http://surf.suckless.org/">surf</a></td>
<td style="text-align: left">0.7</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="android" href="#android"></a> Android</h2>
<table>
<thead>
<tr>
<th style="text-align: left">Browser</th>
<th style="text-align: left">Release</th>
<th style="text-align: left">State</th>
<th style="text-align: left">Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><a href="https://www.google.com/chrome/">Chrome</a></td>
<td style="text-align: left">50.0.2661.89</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
<tr>
<td style="text-align: left"><a href="https://www.mozilla.org/en-US/firefox/">Firefox</a></td>
<td style="text-align: left">46.0.1</td>
<td style="text-align: left">works</td>
<td style="text-align: left"> </td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="ios" href="#ios"></a> iOS</h2>
<table>
<thead>
<tr>
<th style="text-align: left">Browser</th>
<th style="text-align: left">Release</th>
<th style="text-align: left">State</th>
<th style="text-align: left">Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><a href="http://www.apple.com/safari/">Safari</a></td>
<td style="text-align: left"> </td>
<td style="text-align: left">unknown</td>
<td style="text-align: left"> </td>
</tr>
</tbody>
</table>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/browsers.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a class='active' href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,223 @@
<!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>Configuring Home Assistant - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Configuring Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/configuration/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Configuring Home Assistant">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/configuration/">
<meta property="og:type" content="website">
<meta property="og:description" content="Configuring Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Configuring Home Assistant">
<meta name="twitter:description" content="Configuring Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Configuring Home Assistant
</h1>
</header>
<hr class="divider">
<p>Home Assistant will create a configuration folder when it is run for the first time. The location of the folder differs between operating systems: on OS X and Linux its <code>~/.homeassistant</code> and on Windows its <code>%APPDATA%/.homeassistant</code>. If you want to use a different folder for configuration, run <code>hass --config path/to/config</code>.</p>
<p>Inside your configuration folder is the file <code>configuration.yaml</code>. This is the main file that contains which components will be loaded and what their configuration is. This file contains YAML code, which is explained briefly below. <a href="https://github.com/home-assistant/home-assistant/blob/master/config/configuration.yaml.example">An example configuration file is located here</a>.</p>
<p>When launched for the first time, Home Assistant will write a default configuration file enabling the web interface and device discovery. It can take up to a minute for your devices to be discovered and show up in the user interface.</p>
<p>If you run into trouble while configuring Home Assistant, have a look at <a href="/getting-started/troubleshooting-configuration/">the configuration troubleshooting page</a>.</p>
<p class="note tip">
Install colorlog (<code>$ pip install colorlog</code>) to make the console output easier to read, hence also easier to catch errors and warnings.
</p>
<p class="note">
You will have to restart Home Assistant each time you make changes in <code>configuration.yaml</code> in order for these to take effect.
</p>
<h3><a href="/getting-started/yaml/">Next step: Get familiar with YAML »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/configuration.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a class='active' href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,249 @@
<!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>Customizing devices and services - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Simple customization for devices and services in the frontend.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/customizing-devices/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Customizing devices and services">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/customizing-devices/">
<meta property="og:type" content="website">
<meta property="og:description" content="Simple customization for devices and services in the frontend.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Customizing devices and services">
<meta name="twitter:description" content="Simple customization for devices and services in the frontend.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Customizing Devices and Services
</h1>
</header>
<hr class="divider">
<p>By default, all of your devices will be visible and have a default icon determined by their domain. You can customize the look and feel of your front page by altering some of these parameters. This can be done by adding the following configuration inside the <code>homeassistant:</code> section.</p>
<p>Devices that you dont want to have visible can be hidden with <code>hidden</code>.</p>
<p><code>entity_picture</code>entries, badges, <code>device_tracker</code> pictures, etc. can either be external URLs (e.g. <code>http://example.com/example.jpg</code>) or of the form <code>/local/filename.jpg</code>, where <code>/local</code> represents the directory <code>www</code> in the HASS configuration directory. You may have to create the <code>www</code> directory yourself as it is not made automatically.</p>
<p>You can also use <code>icon</code> and refer to any icon from <a href="http://MaterialDesignIcons.com">MaterialDesignIcons.com</a>.</p>
<p>For switches with an assumed state two buttons are shown (turn off, turn on) instead of a switch. By setting <code>assumed_state</code> to <code>false</code> you will get the default switch icon.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">homeassistant</span>:
<span class="comment"># Add this to your existing configuration</span>
<span class="comment"># Only the `entity_id` is required. All other options are optional.</span>
<span class="key">customize</span>:
<span class="key">sensor.living_room_motion</span>:
<span class="key">hidden</span>: <span class="string"><span class="content">true</span></span>
<span class="key">thermostat.family_roomfamily_room</span>:
<span class="key">entity_picture</span>: <span class="string"><span class="content">https://dl.dropboxusercontent.com/u/12345/images/nest.jpg</span></span>
<span class="key">friendly_name</span>: <span class="string"><span class="content">Nest</span></span>
<span class="key">switch.wemo_switch_1</span>:
<span class="key">friendly_name</span>: <span class="string"><span class="content">Toaster</span></span>
<span class="key">entity_picture</span>: <span class="string"><span class="content">/local/toaster.jpg</span></span>
<span class="key">switch.wemo_switch_2</span>:
<span class="key">friendly_name</span>: <span class="string"><span class="content">Kitchen kettle</span></span>
<span class="key">icon</span>: <span class="string"><span class="content">mdi:kettle</span></span>
<span class="key">switch.rfxtrx_switch</span>:
<span class="key">assumed_state</span>: <span class="string"><span class="content">false</span></span>
</pre></div>
</div>
</div>
<h3><a class="title-link" name="reloading-customize" href="#reloading-customize"></a> Reloading customize</h3>
<p>Home Assistant offers a service to reload the core configuration while Home Assistant is running called <code>homeassistant/reload_core_config</code>. This allows you to change your customize section and see it being applied without having to restart Home Assistant. To call this service, go to the <img src="/images/screenshots/developer-tool-services-icon.png" alt="service developer tool icon" class="no-shadow" height="38" /> service developer tools, select the service <code>homeassistant/reload_core_config</code> and click “Call Service”.</p>
<p class="note warning">
New customize information will be applied the next time the state of the entity gets updated.
</p>
<h3><a href="/getting-started/presence-detection/">Next step: Setting up presence detection »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/customizing-devices.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a class='active' href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,275 @@
<!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>Adding devices to Home Assistant - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Steps to help you get your devices in Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/devices/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Adding devices to Home Assistant">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/devices/">
<meta property="og:type" content="website">
<meta property="og:description" content="Steps to help you get your devices in Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Adding devices to Home Assistant">
<meta name="twitter:description" content="Steps to help you get your devices in Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Adding Devices to Home Assistant
</h1>
</header>
<hr class="divider">
<p>Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers on your network if you have <a href="/components/discovery/">the discovery component</a> enabled (which is by default).</p>
<p>See the <a href="/components/">components overview page</a> to find installation instructions for your devices and services. If you cant find support for your favorite device or service, <a href="/developers/add_new_platform/">consider adding support</a>.</p>
<p>Usually every entity needs its own entry in the <code>configuration.yaml</code> file. There are two styles for multiple entries:</p>
<h4><a class="title-link" name="style-1-collect-every-entity-under-the-parent" href="#style-1-collect-every-entity-under-the-parent"></a> Style 1: Collect every entity under the “parent”</h4>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">sensor</span>:
- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home/bedroom/temperature</span><span class="delimiter">&quot;</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">MQTT Sensor 1</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home/kitchen/temperature</span><span class="delimiter">&quot;</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">MQTT Sensor 2</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="content">platform: rest</span></span>
<span class="key">resource</span>: <span class="string"><span class="content">http://IP_ADDRESS/ENDPOINT</span></span>
<span class="key">switch</span>:
- <span class="string"><span class="content">platform: vera</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="style-2-list-each-device-separately" href="#style-2-list-each-device-separately"></a> Style 2: List each device separately</h4>
<p>You need to append numbers or strings to differentiate the entries, as in the example below. The appended number or string must be unique.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">media_player livingroom</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mpd</span></span>
<span class="key">server</span>: <span class="string"><span class="content">IP_ADDRESS</span></span>
<span class="key">media_player kitchen</span>:
<span class="key">platform</span>: <span class="string"><span class="content">plex</span></span>
<span class="key">camera 1</span>:
<span class="key">platform</span>: <span class="string"><span class="content">generic</span></span>
<span class="key">camera 2</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mjpeg</span></span>
</pre></div>
</div>
</div>
<p class="note note">
If your devices are not showing up in the frontend then check the entries in your <code>configuration.yaml</code> file for duplicates.
</p>
<h3><a class="title-link" name="grouping-devices" href="#grouping-devices"></a> Grouping devices</h3>
<p>Once you have a bunch of devices set up, it is time to organize them into groups. <br />
Each group exists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (second icon).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry showing two styles</span>
<span class="key">group</span>:
<span class="key">living_room</span>: <span class="string"><span class="content">light.table_lamp, switch.ac</span></span>
<span class="key">bedroom</span>:
- <span class="string"><span class="content">light.bedroom</span></span>
- <span class="string"><span class="content">media_player.nexus_player</span></span>
</pre></div>
</div>
</div>
<p>For more details please check the <a href="https://home-assistant.io/components/group/">Group</a> page.</p>
<h3><a href="/getting-started/customizing-devices/">Next step: Customizing devices and services »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/devices.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a class='active' href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

253
getting-started/index.html Normal file
View file

@ -0,0 +1,253 @@
<!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>Getting Started - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Step by step guide to get started with Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Getting Started">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/">
<meta property="og:type" content="website">
<meta property="og:description" content="Step by step guide to get started with Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Getting Started">
<meta name="twitter:description" content="Step by step guide to get started with Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Getting Started
</h1>
</header>
<hr class="divider">
<p>Below you can find the standard instructions. See the sidebar for installation instructions for specific platforms. If youre running a Linux based platform, we suggest to follow the <a href="/getting-started/installation-virtualenv/">VirtualEnv Linux instructions</a> to avoid having to use root.</p>
<p>Installing and running Home Assistant on your local machine is easy. Make sure you have <a href="https://www.python.org/downloads/">Python 3.4 or higher</a> installed and execute the following code in a console:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ pip3 install homeassistant
$ hass --open-ui
</pre></div>
</div>
</div>
<p>Running these commands will:</p>
<ul>
<li>Install Home Assistant</li>
<li>Launch Home Assistant and serve the web interface on <a href="http://localhost:8123">http://localhost:8123</a></li>
</ul>
<p>If you prefer to watch a video tutorial, <a href="https://github.com/tktino">tktino</a> has made some great ones.</p>
<ul>
<li><a href="https://www.youtube.com/watch?v=X27eVvuqwnY">Windows 10</a></li>
<li><a href="https://www.youtube.com/watch?v=hej6ipN86ls">Mac OS X</a></li>
<li><a href="https://www.youtube.com/watch?v=SXaAG1lGNH0">Ubuntu 14.04</a></li>
</ul>
<h3><a class="title-link" name="updating" href="#updating"></a> Updating</h3>
<p>To update Home Assistant to the latest release check the <a href="/getting-started/updating/">Updating section</a>.</p>
<h3><a class="title-link" name="troubleshooting" href="#troubleshooting"></a> Troubleshooting</h3>
<p>If you run into any issues, please see <a href="/getting-started/troubleshooting/">the troubleshooting page</a>. It contains solutions to many of the common encountered issues.</p>
<p>In addition to this site, check out these sources for additional help:</p>
<ul>
<li><a href="https://community.home-assistant.io">Forum</a> for Home Assistant discussions and questions.</li>
<li><a href="https://gitter.im/home-assistant/home-assistant">Gitter Chat Room</a> for real-time chat about Home Assistant.</li>
<li><a href="https://github.com/home-assistant/home-assistant/issues">GitHub Page</a> for issue reporting.</li>
</ul>
<h3><a class="title-link" name="whats-next" href="#whats-next"></a> Whats next?</h3>
<p>To see what Home Assistant can do, launch demo mode: <code>hass --demo-mode</code> or visit the <a href="/demo">demo page</a>.</p>
<h3><a href="/getting-started/configuration/">Next step: Configuring Home Assistant »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/index.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a class='active' href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,233 @@
<!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>Installation on Docker - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions to install Home Assistant on a Docker.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/installation-docker/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Installation on Docker">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/installation-docker/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions to install Home Assistant on a Docker.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Installation on Docker">
<meta name="twitter:description" content="Instructions to install Home Assistant on a Docker.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Installation on Docker
</h1>
</header>
<hr class="divider">
<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>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ docker run -d --name=&quot;home-assistant&quot; -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
</pre></div>
</div>
</div>
<p>This will launch Home Assistant and serve the web interface from port 8123 on your Docker host.</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">your timezone</a>)
</p>
<h3><a class="title-link" name="troubleshooting" href="#troubleshooting"></a> Troubleshooting</h3>
<p>If you run into any issues, please see <a href="/getting-started/troubleshooting/">the troubleshooting page</a>. It contains solutions to many of the more commonly encountered issues.</p>
<p>In addition to this site, check out these sources for additional help:</p>
<ul>
<li><a href="https://community.home-assistant.io">Forum</a> for Home Assistant discussions and questions.</li>
<li><a href="https://gitter.im/home-assistant/home-assistant">Gitter Chat Room</a> for real-time chat about Home Assistant.</li>
<li><a href="https://github.com/home-assistant/home-assistant/issues">GitHub Page</a> for issue reporting.</li>
</ul>
<h3><a href="/getting-started/configuration/">Next step: Configuring Home Assistant »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/installation-docker.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a class='active' href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,306 @@
<!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>Raspberry Pi All-In-One Installer - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Home Assistant is an open-source home automation platform running on Python 3.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Raspberry Pi All-In-One Installer">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/">
<meta property="og:type" content="website">
<meta property="og:description" content="">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Raspberry Pi All-In-One Installer">
<meta name="twitter:description" content="">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Raspberry Pi All-In-One Installer
</h1>
</header>
<hr class="divider">
<p>The <a href="https://github.com/home-assistant/fabric-home-assistant">Raspberry Pi All-In-One Installer</a> deploys a complete Home Assistant server including support for MQTT with websockets, Z-Wave, and the Open-Zwave Control Panel.</p>
<p>The only requirement is that you have a Raspberry Pi with a fresh installation of <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian Jessie/Jessie Lite</a> connected to your network.</p>
<ul>
<li>Login to Raspberry Pi. For example with <code>ssh pi@your_raspberry_pi_ip</code></li>
<li>Run the following command</li>
</ul>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ wget -Nnv https://raw.githubusercontent.com/home-assistant/fabric-home-assistant/master/hass_rpi_installer.sh &amp;&amp; bash hass_rpi_installer.sh
</pre></div>
</div>
</div>
<p class="note warning">
Note this command is one-line and not run as sudo.
</p>
<p>Installation will take approx. 1-2 hours depending on the Raspberry Pi model the installer is being run against. The installer will identitfy what Raspberry PI hardware revision you are using and adjust commands accordingly. A complete log of the install is located at: <code>/home/pi/fabric-home-assistant/installation_report.txt</code> The installer has been updated to simply log any errors encountered, but resume installing. Please consult the “installation report” if your install encountered issues.</p>
<p><a href="http://www.bruhautomation.com">BRUH automation</a> has created <a href="https://www.youtube.com/watch?v=VGl3KTrYo6s">a tutorial video</a> explaining how to install Raspbian on your Raspberry Pi and install Home Assistant using the All-In-One Installer.</p>
<p>Once rebooted, your Raspberry Pi will be up and running with Home Assistant. You can access it at <a href="http://your_raspberry_pi_ip:8123">http://your_raspberry_pi_ip:8123</a>.</p>
<p>The Home Assistant configuration is located at <code>/home/hass/.homeassistant</code>. The <a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a> with the Home Assistant installation is located at <code>/srv/hass/hass_venv</code>. As part of the secure installation, a new user (<strong>hass</strong>) is added to your Raspberry Pi to run Home Assistant. This is a system account and does not have login or other abilities by design. When editing your <code>configuration.yaml</code> files, you will need to run the commands with <code>sudo</code> or by switching user.</p>
<p class="note note">
<em>Windows users</em>: Setting up WinSCP to allow this seemlessly is at the end of this page.
</p>
<p>By default, installation makes use of a Python Virtualenv. If you wish to not follow this recommendation, you may add the flag <code>-n</code> to the end of the install command specified above.</p>
<p>The All-In-One Installer script will do the following automatically:</p>
<ul>
<li>Create all needed directories</li>
<li>Create needed service accounts</li>
<li>Install OS and Python dependencies</li>
<li>Setup a python virtualenv to run Home Assistant and components inside.</li>
<li>Run as <code>hass</code> service account</li>
<li>Install Home Assistant in a virtualenv</li>
<li>Build and install Mosquitto v1.4.9 from source with websocket support running on ports 1883 and 9001</li>
<li>Build and Install Python-openzwave in the Home Assistant virtualenv</li>
<li>Build openzwave-control-panel in <code>/srv/hass/src/open-zwave-control-panel</code></li>
<li>Add both Home Assistant and Mosquitto to systemd services to start at boot</li>
</ul>
<h3><a class="title-link" name="upgrading" href="#upgrading"></a> Upgrading</h3>
<p>To upgrade the All-In-One setup manually:</p>
<ul>
<li>Login to Raspberry Pi <code>ssh pi@your_raspberry_pi_ip</code></li>
<li>Change to hass user <code>sudo su -s /bin/bash hass</code></li>
<li>Change to virtual enviroment <code>source /srv/hass/hass_venv/bin/activate</code></li>
<li>Update HA <code>pip3 install --upgrade homeassistant</code></li>
</ul>
<p>To upgrade with fabric:</p>
<ul>
<li>Login to Raspberry Pi <code>ssh pi@your_raspberry_pi_ip</code></li>
<li>Change to <code>cd ~/fabric-home-assistant</code></li>
<li>Run <code>fab upgrade_homeassistant</code></li>
</ul>
<h3><a class="title-link" name="using-the-ozwcp-web-application" href="#using-the-ozwcp-web-application"></a> Using the OZWCP web application</h3>
<p>To launch the OZWCP web application:</p>
<ul>
<li>Login to Raspberry Pi <code>ssh pi@your_raspberry_pi_ip</code></li>
<li>Change to the ozwcp directory <code>cd /srv/hass/src/open-zwave-control-panel/</code></li>
<li>Launch the control panel <code>sudo ./ozwcp -p 8888</code></li>
<li>Open a web browser to <code>http://your_pi_ip:8888</code></li>
<li>Specify your zwave controller, for example <code>/dev/ttyACM0</code> and hit initialize</li>
</ul>
<p class="note warning">
Dont check the USB box regardless of using a USB based device.
</p>
<h3><a class="title-link" name="winscp" href="#winscp"></a> WinSCP</h3>
<p>If you are Windows users who is using <a href="https://winscp.net/">WinSCP</a>, please note that after running the installer, you will need to modify settings allowing you to “switch users” to edit your configuration files. The needed change within WinSCP is: <strong>Environment</strong> -&gt; <strong>SCP/Shell</strong> -&gt; <strong>Shell</strong> and set it to <code>sudo su -</code>.</p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/installation-raspberry-pi-all-in-one.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a class='active' href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>
<script>
var disqus_shortname = 'home-assistant';
// var disqus_developer = 1;
var disqus_identifier = 'https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/';
var disqus_url = 'https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/';
var disqus_script = 'embed.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
</body>
</html>

View file

@ -0,0 +1,245 @@
<!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>Installation on a Raspberry Pi - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions to install Home Assistant on a Raspberry Pi.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/installation-raspberry-pi/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Installation on a Raspberry Pi">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/installation-raspberry-pi/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions to install Home Assistant on a Raspberry Pi.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Installation on a Raspberry Pi">
<meta name="twitter:description" content="Instructions to install Home Assistant on a Raspberry Pi.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Installation on a Raspberry Pi
</h1>
</header>
<hr class="divider">
<p>Home Assistant requires the Raspberry Pi to run <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian Jessie</a>. This version was 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>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo pip3 install homeassistant
$ hass
</pre></div>
</div>
</div>
<p>Running these commands will:</p>
<ul>
<li>Install Home Assistant</li>
<li>Launch Home Assistant and serve the web interface on <a href="http://localhost:8123">http://localhost:8123</a></li>
</ul>
<p>There is also a <a href="https://www.youtube.com/watch?v=GjzOXkPb7XE">video tutorial</a> created by <a href="https://github.com/brusc">brusc</a>.</p>
<h3><a class="title-link" name="troubleshooting" href="#troubleshooting"></a> Troubleshooting</h3>
<p>If you run into any issues, please see <a href="/getting-started/troubleshooting/">the troubleshooting page</a>. It contains solutions to many of the more commonly encountered issues.</p>
<p>In addition to this site, check out these sources for additional help:</p>
<ul>
<li><a href="https://community.home-assistant.io">Forum</a> for Home Assistant discussions and questions.</li>
<li><a href="https://gitter.im/home-assistant/home-assistant">Gitter Chat Room</a> for real-time chat about Home Assistant.</li>
<li><a href="https://github.com/home-assistant/home-assistant/issues">GitHub Page</a> for issue reporting.</li>
</ul>
<h3><a class="title-link" name="whats-next" href="#whats-next"></a> Whats next</h3>
<p>If you want to have Home Assistant start on boot, <a href="/getting-started/autostart-systemd/">autostart instructions can be found here</a>.</p>
<p>To see what Home Assistant can do, launch demo mode: <code>hass --demo-mode</code> or visit the <a href="/demo">demo page</a>.</p>
<h3><a href="/getting-started/configuration/">Next step: Configuring Home Assistant »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/installation-raspberry-pi.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a class='active' href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,456 @@
<!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>Installation on a Synology NAS - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions to install Home Assistant on a Synology NAS.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/installation-synology/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Installation on a Synology NAS">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/installation-synology/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions to install Home Assistant on a Synology NAS.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Installation on a Synology NAS">
<meta name="twitter:description" content="Instructions to install Home Assistant on a Synology NAS.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Installation on a Synology NAS
</h1>
</header>
<hr class="divider">
<p>The following configuration has been tested on Synology 413j running DSM 6.0-7321 Update 1.</p>
<p>Running these commands will:</p>
<ul>
<li>Install Home Assistant</li>
<li>Enable Home Assistant to be launched on <a href="http://localhost:8123">http://localhost:8123</a></li>
</ul>
<p>Using the Synology webadmin:</p>
<ul>
<li>Install python3 using the Synology package centre</li>
<li>Create homeassistant user and add to the “users” group</li>
</ul>
<p>SSH onto your synology &amp; login as admin or root</p>
<p>Check the path to python3 (assumed to be /volume1/@appstore/py3k/usr/local/bin)</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ cd /volume1/@appstore/py3k/usr/local/bin
</pre></div>
</div>
</div>
<p>Install PIP (Pythons package management system)</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ python -m ensurepip
</pre></div>
</div>
</div>
<p>Use PIP to install Homeassistant package</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ pip3 install homeassistant
</pre></div>
</div>
</div>
<p>Create homeassistant config directory &amp; switch to it</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ mkdir /volume1/homeassistant
$ cd /volume1/homeassistant
</pre></div>
</div>
</div>
<p>Create hass-daemon file using the following code (edit the variables in uppercase if necessary)</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>#!/bin/sh
# Package
PACKAGE=&quot;homeassistant&quot;
DNAME=&quot;Home Assistant&quot;
# Others
USER=&quot;homeassistant&quot;
PYTHON_DIR=&quot;/volume1/@appstore/py3k/usr/local/bin&quot;
PYTHON=&quot;$PYTHON_DIR/python3&quot;
HASS=&quot;$PYTHON_DIR/hass&quot;
INSTALL_DIR=&quot;/volume1/homeassistant&quot;
PID_FILE=&quot;$INSTALL_DIR/home-assistant.pid&quot;
FLAGS=&quot;-v --config $INSTALL_DIR --pid-file $PID_FILE --daemon&quot;
REDIRECT=&quot;&gt; $INSTALL_DIR/home-assistant.log 2&gt;&amp;1&quot;
start_daemon ()
{
su ${USER} -s /bin/sh -c &quot;$PYTHON $HASS $FLAGS $REDIRECT;&quot;
}
stop_daemon ()
{
kill `cat ${PID_FILE}`
wait_for_status 1 20 || kill -9 `cat ${PID_FILE}`
rm -f ${PID_FILE}
}
daemon_status ()
{
if [ -f ${PID_FILE} ] &amp;&amp; kill -0 `cat ${PID_FILE}` &gt; /dev/null 2&gt;&amp;1; then
return
fi
rm -f ${PID_FILE}
return 1
}
wait_for_status ()
{
counter=$2
while [ ${counter} -gt 0 ]; do
daemon_status
[ $? -eq $1 ] &amp;&amp; return
let counter=counter-1
sleep 1
done
return 1
}
case $1 in
start)
if daemon_status; then
echo ${DNAME} is already running
exit 0
else
echo Starting ${DNAME} ...
start_daemon
exit $?
fi
;;
stop)
if daemon_status; then
echo Stopping ${DNAME} ...
stop_daemon
exit $?
else
echo ${DNAME} is not running
exit 0
fi
;;
restart)
if daemon_status; then
echo Stopping ${DNAME} ...
stop_daemon
echo Starting ${DNAME} ...
start_daemon
exit $?
else
echo ${DNAME} is not running
echo Starting ${DNAME} ...
start_daemon
exit $?
fi
;;
status)
if daemon_status; then
echo ${DNAME} is running
exit 0
else
echo ${DNAME} is not running
exit 1
fi
;;
log)
echo ${LOG_FILE}
exit 0
;;
*)
exit 1
;;
esac
</pre></div>
</div>
</div>
<p>Create links to python folders to make things easier in the future:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ ln -s /volume1/@appstore/py3k/usr/local/bin python3
$ ln -s /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/homeassistant
</pre></div>
</div>
</div>
<p>Set the owner and permissions on your config folder</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ chown -R homeassistant:users /volume1/homeassistant
$ chmod -R 664 /volume1/homeassistant
</pre></div>
</div>
</div>
<p>Make the daemon file executable:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ chmod 777 /volume1/homeassistant/hass-daemon
</pre></div>
</div>
</div>
<p>Copy your configuration.yaml file into the config folder<br />
Thats it… youre all set to go</p>
<p>Here are some useful commands:</p>
<ul>
<li>Start Home Assistant:</li>
</ul>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sh hass-daemon start
</pre></div>
</div>
</div>
<ul>
<li>Stop Home Assistant:</li>
</ul>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sh hass-daemon stop
</pre></div>
</div>
</div>
<ul>
<li>Restart Home Assistant:</li>
</ul>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sh hass-daemon restart
</pre></div>
</div>
</div>
<ul>
<li>Upgrade Home Assistant::</li>
</ul>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ python3 -m pip install --upgrade homeassistant
</pre></div>
</div>
</div>
<h3><a class="title-link" name="troubleshooting" href="#troubleshooting"></a> Troubleshooting</h3>
<p>If you run into any issues, please see <a href="/getting-started/troubleshooting/">the troubleshooting page</a>. It contains solutions to many of the more commonly encountered issues.</p>
<p>In addition to this site, check out these sources for additional help:</p>
<ul>
<li><a href="https://community.home-assistant.io">Forum</a> for Home Assistant discussions and questions.</li>
<li><a href="https://gitter.im/balloob/home-assistant">Gitter Chat Room</a> for real-time chat about Home Assistant.</li>
<li><a href="https://github.com/home-assistant/home-assistant/issues">GitHub Page</a> for issue reporting.</li>
</ul>
<h3><a class="title-link" name="whats-next" href="#whats-next"></a> Whats next</h3>
<p>If you want to have Home Assistant start on boot, <a href="/getting-started/autostart-synology/">autostart instructions can be found here</a>.</p>
<p>To see what Home Assistant can do, launch demo mode: <code>hass --demo-mode</code> or visit the <a href="/demo">demo page</a>.</p>
<h3><a href="/getting-started/configuration/">Next step: Configuring Home Assistant »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/installation-synology.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a class='active' href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,300 @@
<!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>Installation on Vagrant - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions to run Home Assistant on a Vagrant VM.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/installation-vagrant/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Installation on Vagrant">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/installation-vagrant/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions to run Home Assistant on a Vagrant VM.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Installation on Vagrant">
<meta name="twitter:description" content="Instructions to run Home Assistant on a Vagrant VM.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Installation on Vagrant
</h1>
</header>
<hr class="divider">
<p>A <code>Vagrantfile</code> is avalable into <code>virtualization/vagrant</code> folder for quickly spinning up a Linux virtual machine running Home Assistant. This can be beneficial for those who want to experiment with Home Assistant and/or developers willing to easily test local changes and run test suite against them.</p>
<p class="note">
Vagrant is intended for testing/development only. It is NOT recommended for permanent installations.
</p>
<h2><a class="title-link" name="install-vagrant" href="#install-vagrant"></a> Install Vagrant</h2>
<p>You must have <a href="https://www.vagrantup.com/downloads.html">Vagrant</a> and <a href="https://www.virtualbox.org/wiki/Downloads">Virtualbox</a> installed on your workstation.</p>
<h2><a class="title-link" name="get-home-assistant-source-code" href="#get-home-assistant-source-code"></a> Get Home Assistant source code</h2>
<p>Download the home-assistant source code by either downloading the .zip file from <a href="https://github.com/home-assistant/home-assistant/releases">GitHub releases page</a>, or by using <a href="https://git-scm.com/">Git</a></p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>git clone https://github.com/home-assistant/home-assistant.git
cd home-assistant/virtualization/vagrant
</pre></div>
</div>
</div>
<p class="note">
The following instructions will assume you changed your working directory to be home-assistant/virtualization/vagrant. This is mandatory because Vagrant will look for informations about the running VM inside that folder and wont work otherwise
</p>
<h2><a class="title-link" name="create-the-vagrant-vm-and-start-home-assistant" href="#create-the-vagrant-vm-and-start-home-assistant"></a> Create the Vagrant VM and start Home Assistant</h2>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>vagrant up
</pre></div>
</div>
</div>
<p>This will download and start a virtual machine using Virtualbox, which will internally setup the development environment necessary to start Home Assistant process and run test suite as well. After the VM has started succesfully, the Home Assistant frontend will be accessible locally from your browser at <a href="http://localhost:8123">http://localhost:8123</a></p>
<h2><a class="title-link" name="stopping-vagrant" href="#stopping-vagrant"></a> Stopping Vagrant</h2>
<p>To shutdown the Vagrant host:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>vagrant halt
</pre></div>
</div>
</div>
<p>To start it again, just run <code>vagrant up</code></p>
<h2><a class="title-link" name="restarting-home-assistant-process-to-test-changes" href="#restarting-home-assistant-process-to-test-changes"></a> Restarting Home Assistant process to test changes</h2>
<p>The root <code>home-assistant</code> directory on your workstation will be mirrored with <code>/home-assistant</code> inside the VM. In <code>virtualization/vagrant</code> theres also a <code>config</code> folder that you can use to drop configuration files (Check the <a href="https://home-assistant.io/getting-started/configuration/">Getting started section</a> for more information about how to configure Home Assistant).</p>
<p>Any changes made to the local directory on your workstation will be available from the Vagrant host, so to apply your changes to the Home Assistant process, just restart it:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>touch restart ; vagrant provision
</pre></div>
</div>
</div>
<h2><a class="title-link" name="run-test-suite-tox" href="#run-test-suite-tox"></a> Run test suite (Tox)</h2>
<p>To run tests against your changes:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>touch run_tests ; vagrant provision
</pre></div>
</div>
</div>
<h2><a class="title-link" name="cleanup" href="#cleanup"></a> Cleanup</h2>
<p>To completely remove the VM:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>rm setup_done ; vagrant destroy -f
</pre></div>
</div>
</div>
<p>You can now recreate a completely new Vagrant host with <code>vagrant up</code></p>
<h3><a class="title-link" name="troubleshooting" href="#troubleshooting"></a> Troubleshooting</h3>
<p>If you run into any issues, please see <a href="/getting-started/troubleshooting/">the troubleshooting page</a>. It contains solutions to many of the more commonly encountered issues.</p>
<p>In addition to this site, check out these sources for additional help:</p>
<ul>
<li><a href="https://community.home-assistant.io">Forum</a> for Home Assistant discussions and questions.</li>
<li><a href="https://gitter.im/home-assistant/home-assistant">Gitter Chat Room</a> for real-time chat about Home Assistant.</li>
<li><a href="https://github.com/home-assistant/home-assistant/issues">GitHub Page</a> for issue reporting.</li>
</ul>
<h3><a href="/getting-started/configuration/">Next step: Configuring Home Assistant »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/installation-vagrant.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a class='active' href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,351 @@
<!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>Installation in virtualenv - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to install Home Assistant in a virtual environment.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/installation-virtualenv/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Installation in virtualenv">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/installation-virtualenv/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to install Home Assistant in a virtual environment.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Installation in virtualenv">
<meta name="twitter:description" content="Instructions how to install Home Assistant in a virtual environment.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Installation in Virtualenv
</h1>
</header>
<hr class="divider">
<p>There are several reasons why it makes sense to run Home Assistant in a virtual environment. A <a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a> encapsulates all aspect of a Python environment within a single directory tree. That means the Python packages you install for Home Assistant wont interact with the rest of your system and vice-versa. It means a random upgrade for some other program on your computer wont break Home Assitant, and it means you dont need to install Python packages as root.</p>
<p>Virtualenvs are pretty easy to setup. This example will walk through one method of setting one up (there are certainly others). Well be using Debian in this example (as many Home Assistant users are running Raspbian on a Raspberry Pi), but all of the Python related steps should be the same on just about any platform.</p>
<h3><a class="title-link" name="step-0-install-some-dependencies" href="#step-0-install-some-dependencies"></a> Step 0: Install some dependencies</h3>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install python-pip python3-dev
$ sudo pip install --upgrade virtualenv
</pre></div>
</div>
</div>
<h3><a class="title-link" name="step-1-create-a-home-assistant-user" href="#step-1-create-a-home-assistant-user"></a> Step 1: Create a Home Assistant user</h3>
<p>This step is optional, but its a good idea to give services like Home Assistant their own user. It gives you more granular control over permissions, and reduces the exposure to the rest of your system in the event there is a security related bug in Home Assistant. This is a reasonably Linux oriented step, and will look different on other operating systems (or even other Linux distributions).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo adduser --system hass
</pre></div>
</div>
</div>
<p>Home Assistant stores its configuration in <code>$HOME/.homeassistant</code> by default, so in this case, it would be in <code>/home/hass/.homeassistant</code></p>
<p>If you plan to use a Z-Wave controller, you will need to add this user to the <code>dialout</code> group</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo usermod -G dialout -a hass
</pre></div>
</div>
</div>
<h3><a class="title-link" name="step-2-create-a-directory-for-home-assistant" href="#step-2-create-a-directory-for-home-assistant"></a> Step 2: Create a directory for Home Assistant</h3>
<p>This can be anywhere you want. AS example we put it in <code>/srv</code>. You also need to change the ownership of the directory to the user you created above (if you created one).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo mkdir /srv/hass
$ sudo chown hass /srv/hass
</pre></div>
</div>
</div>
<h3><a class="title-link" name="step-3-become-the-new-user" href="#step-3-become-the-new-user"></a> Step 3: Become the new user</h3>
<p>This is obviously only necessary if you created a <code>hass</code> user, but if you did, be sure to switch to that user whenever you install things in your virtualenv, otherwise youll end up with mucked up permissions.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo su -s /bin/bash hass
</pre></div>
</div>
</div>
<p>The <code>su</code> command means switch user. We use the -s flag because the <code>hass</code> user is a system user and doesnt have a default shell by default (to prevent attackers from being able to log in as that user).</p>
<h3><a class="title-link" name="step-4-set-up-the-virtualenv" href="#step-4-set-up-the-virtualenv"></a> Step 4: Set up the virtualenv</h3>
<p>All this step does is stick a Python environment in the directory were using. Thats it. Its just a directory. Theres nothing special about it, and it is entirely self-contained.</p>
<p>It will include a <code>bin</code> directory, which will contain all the executables used in the virtualenv (including hass itself). It also includes a script called <code>activate</code> which we will use to activate the virtualenv.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ virtualenv -p python3 /srv/hass
</pre></div>
</div>
</div>
<h3><a class="title-link" name="step-5-activate-the-virtualenv" href="#step-5-activate-the-virtualenv"></a> Step 5: Activate the virtualenv</h3>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ source /srv/hass/bin/activate
</pre></div>
</div>
</div>
<p>After that, your prompt should include <code>(hass)</code>.</p>
<h3><a class="title-link" name="step-6-install-home-assistant" href="#step-6-install-home-assistant"></a> Step 6: Install Home Assistant</h3>
<p>Once your virtualenv has been activated, you dont need to <code>sudo</code> any of your <code>pip</code> commands. <code>pip</code> will be installing things in the virtualenv, which the <code>hass</code> user has permission to modify.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>(hass)$ pip3 install --upgrade homeassistant
</pre></div>
</div>
</div>
<p>And thats it… you now have Home Assistant installed, and you can be sure that every bit of it is contained in <code>/srv/hass</code>.</p>
<h3><a class="title-link" name="finally-run-home-assistant" href="#finally-run-home-assistant"></a> Finally… Run Home Assistant</h3>
<p>There are two ways to launch Home Assistant. If you are <strong>in</strong> the virtualenv, you can just run <code>hass</code> and it will work as normal. If the virtualenv is not activated, you just use the <code>hass</code> executable in the <code>bin</code> directory mentioned earlier. There is one caveat… Because Home Assistant stores its configuration in the users home directory, we need to be the user <code>hass</code> user or specify the configuration with <code>-c</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo -u hass -H /srv/hass/bin/hass
</pre></div>
</div>
</div>
<p>The <code>-H</code> flag is important. It sets the <code>$HOME</code> environment variable to <code>/home/hass</code> so <code>hass</code> can find its configuration.</p>
<h3><a class="title-link" name="upgrading-home-assistant" href="#upgrading-home-assistant"></a> Upgrading Home Assistant</h3>
<p>Upgrading Home Assistant is simple, just repeat steps 3, 5 and 6.</p>
<h3><a class="title-link" name="starting-home-assistant-on-boot" href="#starting-home-assistant-on-boot"></a> Starting Home Assistant on boot</h3>
<p>The <a href="/getting-started/autostart/">autostart instructions</a> will work just fine, just be sure to replace <code>/usr/bin/hass</code> with <code>/srv/hass/bin/hass</code> and specify the <code>hass</code> user where appropriate.</p>
<h3><a class="title-link" name="installing-python-openzwave" href="#installing-python-openzwave"></a> Installing python-openzwave</h3>
<p>If you want to use Z-Wave devices, you will need to install <code>python-openzwave</code> in your virtualenv. This requires a small tweak to the instructions on home-assistant.io</p>
<p>Install the dependencies as normal (Note: you will need to do this as your normal user, since <code>hass</code> isnt a sudoer).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools
</pre></div>
</div>
</div>
<p>Then, activate your virtualenv (steps 3 and 5 above) and upgrade cython.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>(hass)$ pip3 install --upgrade cython
</pre></div>
</div>
</div>
<p>Finally, get and install <code>python-openzwave</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>(hass)$ mkdir /srv/hass/src
(hass)$ cd /srv/hass/src
(hass)$ git clone https://github.com/OpenZWave/python-openzwave.git
(hass)$ cd python-openzwave
(hass)$ git checkout python3
(hass)$ PYTHON_EXEC=`which python3` make build
(hass)$ PYTHON_EXEC=`which python3` make install
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/installation-virtualenv.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a class='active' href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,242 @@
<!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="Home Assistant">
<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/">
<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/">
<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/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Setting up presence detection">
<meta name="twitter:description" content="Instructions how to setup presence detection within Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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 my child arrives at school</li>
<li>Turn on the 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-detection">supported routers</a> or <a href="/components/device_tracker.nmap_scanner/">scan the network using nmap</a>. This approach does have its limitations however, it will only be able to detect if a device is home. It also struggles with iPhones because they disconnect from WiFi if idle, marking them as not home when they actually are.</p>
<p>Home Assistant currently supports two third party services for presence detection: <a href="/components/device_tracker.owntracks/">OwnTracks</a> and <a href="/components/device_tracker.locative/">Locative</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/#run-your-own">freely host yourself</a> or get <a href="/components/mqtt/#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;" /></p>
<p>Home Assistant will know the location of your device if you are using OwnTracks. By <a href="/components/zone/">setting up zones</a> you will be able to add names to the locations of your devices. This way you can easily spot on the state page where the people in your house are and use it as <a href="/getting-started/automation-trigger/#zone-trigger">triggers</a> and <a href="/getting-started/automation-condition/#zone-condition">conditions</a> for automation.</p>
<h3><a href="/getting-started/automation/">Next step: Setting up automation »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/presence-detection.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a class='active' href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,378 @@
<!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>Conditions - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Documentation about all available conditions.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/scripts-conditions/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Conditions">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/scripts-conditions/">
<meta property="og:type" content="website">
<meta property="og:description" content="Documentation about all available conditions.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Conditions">
<meta name="twitter:description" content="Documentation about all available conditions.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Conditions
</h1>
</header>
<hr class="divider">
<p>Conditions can be used within a script or automation to prevent further execution. A condition will look at the system right now. For example a condition can test if a switch is currently turned on or off.</p>
<h4><a class="title-link" name="and-condition" href="#and-condition"></a> AND condition</h4>
<p>Test multiple conditions in 1 condition statement. Passes if all embedded conditions are valid.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">and</span></span>
<span class="key">conditions</span>:
- <span class="string"><span class="content">condition: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">'device_tracker.paulus'</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'home'</span></span>
- <span class="string"><span class="content">condition: numeric_state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">'sensor.temperature'</span></span>
<span class="key">below</span>: <span class="string"><span class="content">'20'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="or-condition" href="#or-condition"></a> OR condition</h4>
<p>Test multiple conditions in 1 condition statement. Passes if any embedded conditions is valid.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">or</span></span>
<span class="key">conditions</span>:
- <span class="string"><span class="content">condition: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">'device_tracker.paulus'</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'home'</span></span>
- <span class="string"><span class="content">condition: numeric_state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">'sensor.temperature'</span></span>
<span class="key">below</span>: <span class="string"><span class="content">'20'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="mixed--and-and-or-conditions" href="#mixed--and-and-or-conditions"></a> MIXED AND and OR conditions</h4>
<p>Test multiple AND and OR conditions in 1 condition statement. Passes if any embedded conditions is valid.<br />
This allows you to mix several AND and OR conditions together.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">and</span></span>
<span class="key">conditions</span>:
- <span class="string"><span class="content">condition: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">'device_tracker.paulus'</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'home'</span></span>
- <span class="string"><span class="content">condition: or</span></span>
<span class="key">conditions</span>:
- <span class="string"><span class="content">condition: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">sensor.weather_precip</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'rain'</span></span>
- <span class="string"><span class="content">condition: numeric_state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">'sensor.temperature'</span></span>
<span class="key">below</span>: <span class="string"><span class="content">'20'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="numeric-state-condition" href="#numeric-state-condition"></a> Numeric state condition</h4>
<p>This type of condition attempts to parse the state of specified entity as a number and triggers if the value matches all of the above or below thresholds.</p>
<p>For above, the condition passes if <code>value &gt;= above</code>. For below, the condition passes if <code>value &lt;= below</code>. If both <code>below</code> and <code>above</code> are specified, both tests have to pass.</p>
<p>You can optionally use a <code>value_template</code> to process the value of the state before testing it.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">numeric_state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">sensor.temperature</span></span>
<span class="key">above</span>: <span class="string"><span class="content">17</span></span>
<span class="key">below</span>: <span class="string"><span class="content">25</span></span>
<span class="comment"># If your sensor value needs to be adjusted</span>
<span class="key">value_template</span>:
</pre></div>
</div>
</div>
<h4><a class="title-link" name="state-condition" href="#state-condition"></a> State condition</h4>
<p>Tests if an entity is a specified state.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus</span></span>
<span class="key">state</span>: <span class="string"><span class="content">not_home</span></span>
<span class="comment"># optional: trigger only if state was this for last X time.</span>
<span class="key">for</span>:
<span class="key">hours</span>: <span class="string"><span class="content">1</span></span>
<span class="key">minutes</span>: <span class="string"><span class="content">10</span></span>
<span class="key">seconds</span>: <span class="string"><span class="content">5</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="sun-condition" href="#sun-condition"></a> Sun condition</h4>
<p>The sun condition can test if the sun has already set or risen when a trigger occurs. The <code>before</code> and <code>after</code> keys can only be set to <code>sunset</code> or <code>sunrise</code>. They have a corresponding optional offset value (<code>before_offset</code>, <code>after_offset</code>) that can be added, similar to the <a href="#sun-trigger">sun trigger</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">sun</span></span>
<span class="key">after</span>: <span class="string"><span class="content">sunset</span></span>
<span class="comment"># Optional offset value</span>
<span class="key">after_offset</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">-1:00:00</span><span class="delimiter">&quot;</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="template-condition" href="#template-condition"></a> Template condition</h4>
<p>The template condition will test if the [given template][template] renders a value equal to true. This is achieved by having the template result in a true boolean expression or by having the template render true.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">template</span></span>
<span class="key">value_template</span>: <span class="string"><span class="content">'{{ state.attributes.battery &gt; 50 }}'</span></span>
</pre></div>
</div>
</div>
<p>Within an automation, template conditions also have access to the <code>trigger</code> variable as <a href="/getting-started/automation-templating/">described here</a>.</p>
<h4><a class="title-link" name="time-condition" href="#time-condition"></a> Time condition</h4>
<p>The time condition can test if it is after a specified time, before a specified time or if it is a certain day of the week</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">time</span></span>
<span class="comment"># At least one of the following is required.</span>
<span class="key">after</span>: <span class="string"><span class="content">'15:00:00'</span></span>
<span class="key">before</span>: <span class="string"><span class="content">'23:00:00'</span></span>
<span class="key">weekday</span>:
- <span class="string"><span class="content">mon</span></span>
- <span class="string"><span class="content">wed</span></span>
- <span class="string"><span class="content">fri</span></span>
</pre></div>
</div>
</div>
<p>Valid values for <code>weekday</code> are <code>mon</code>, <code>tue</code>, <code>wed</code>, <code>thu</code>, <code>fri</code>, <code>sat</code>, <code>sun</code>.</p>
<h4><a class="title-link" name="zone-condition" href="#zone-condition"></a> Zone condition</h4>
<p>Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the <a href="/components/device_tracker.owntracks/">OwnTracks platform</a> and the <a href="/components/device_tracker.icloud/">iCloud platform</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">zone</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus</span></span>
<span class="key">zone</span>: <span class="string"><span class="content">zone.home</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="examples" href="#examples"></a> Examples</h4>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre> <span class="key">condition</span>:
- <span class="string"><span class="content">condition: numeric_state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">sun.sun</span></span>
<span class="key">value_template</span>: <span class="string"><span class="content">''</span></span>
<span class="key">below</span>: <span class="string"><span class="content">1</span></span>
- <span class="string"><span class="content">condition: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">light.living_room</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'off'</span></span>
- <span class="string"><span class="content">condition: time</span></span>
<span class="key">before</span>: <span class="string"><span class="content">'23:00:00'</span></span>
<span class="key">after</span>: <span class="string"><span class="content">'14:00:00'</span></span>
- <span class="string"><span class="content">condition: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">script.light_turned_off_5min</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'off'</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/scripts-conditions.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a class='active' href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,285 @@
<!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>Service Calls - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to call services in Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/scripts-service-calls/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Service Calls">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/scripts-service-calls/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to call services in Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Service Calls">
<meta name="twitter:description" content="Instructions how to call services in Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Service Calls
</h1>
</header>
<hr class="divider">
<p>Various components allow calling services when a certain event occurs. The most common one is calling a service when an automation trigger happens. But a service can also be called from a script or via the Amazon Echo.</p>
<p>The configuration options to call a config are the same between all components and are described on this page.</p>
<p>Examples on this page will be given as part of an automation component configuration but different approaches can be used for other components too.</p>
<p class="note">
Use the <img src="/images/screenshots/developer-tool-services-icon.png" class="no-shadow" height="38" /> service developer tool in the frontend to discover available services.
</p>
<h3><a class="title-link" name="the-basics" href="#the-basics"></a> The basics</h3>
<p>Call the service <code>homeassistant.turn_on</code> on the entity <code>group.living_room</code>. This will turn all members of <code>group.living_room</code> on. You can also omit <code>entity_id</code> and it will turn on all possible entities.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">service</span>: <span class="string"><span class="content">homeassistant.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
</pre></div>
</div>
</div>
<h3><a class="title-link" name="passing-data-to-the-service-call" href="#passing-data-to-the-service-call"></a> Passing data to the service call</h3>
<p>You can also specify other parameters beside the entity to target. For example, the light turn on service allows specifying the brightness.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">service</span>: <span class="string"><span class="content">light.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
<span class="key">data</span>:
<span class="key">brightness</span>: <span class="string"><span class="content">120</span></span>
<span class="key">rgb_color</span>: <span class="string"><span class="content">[255, 0, 0]</span></span>
</pre></div>
</div>
</div>
<h3><a class="title-link" name="use-templates-to-decide-which-service-to-call" href="#use-templates-to-decide-which-service-to-call"></a> Use templates to decide which service to call</h3>
<p>You can use <a href="/topics/templating/">templating</a> support to dynamically choose which service to call. For example, you can call a certain service based on if a light is on.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">service_template</span>: <span class="string"><span class="delimiter">&gt;</span><span class="content">
{% if states.sensor.temperature | float &gt; 15 %}
switch.turn_on
{% else %}
switch.turn_off
{% endif %}</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">switch.ac</span></span>
</pre></div>
</div>
</div>
<h3><a class="title-link" name="using-the-services-developer-tool" href="#using-the-services-developer-tool"></a> Using the Services Developer Tool</h3>
<p>You can use the Services Developer Tool to test data to pass in a service call.<br />
For example, you may test turning on or off a group (See [groups] for more info)</p>
<p>To turn a group on or off, pass the following info:<br />
Domain: <code>homeassistant</code><br />
Service: <code>turn_on</code><br />
Service Data: <code>{ "entity_id": "group.kitchen" }</code></p>
<h3><a class="title-link" name="use-templates-to-determine-the-attributes" href="#use-templates-to-determine-the-attributes"></a> Use templates to determine the attributes</h3>
<p>Templates can also be used for the data that you pass to the service call.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">service</span>: <span class="string"><span class="content">thermostat.set_temperature</span></span>
<span class="key">data_template</span>:
<span class="key">entity_id</span>: <span class="string"><span class="delimiter">&gt;</span><span class="content">
{% if is_state('device_tracker.paulus', 'home') %}
thermostat.upstairs
{% else %}
thermostat.downstairs
{% endif %}</span></span>
<span class="key">temperature</span>: <span class="string"><span class="content">{{ 22 - distance(states.device_tracker.paulus) }}</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/scripts-service-calls.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a class='active' href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,293 @@
<!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>Script Syntax - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Documention for the Home Assistant Script Syntax.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/scripts/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Script Syntax">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/scripts/">
<meta property="og:type" content="website">
<meta property="og:description" content="Documention for the Home Assistant Script Syntax.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Script Syntax">
<meta name="twitter:description" content="Documention for the Home Assistant Script Syntax.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Script Syntax
</h1>
</header>
<hr class="divider">
<p>Scripts are a sequence of actions that Home Assistant will execute. Scripts are available as an entity through the standalone <a href="/components/script/">Script component</a> but can also be embedded in <a href="/getting-started/automation-action/">automations</a> and <a href="/components/alexa/">Alexa/Amazon Echo</a> configurations.</p>
<p>The script syntax basic structure is a list of key/value maps that contain actions. If a script contains only 1 action, the wrapping list can be omitted.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example script component containing script syntax</span>
<span class="key">script</span>:
<span class="key">example_script</span>:
<span class="key">sequence</span>:
<span class="comment"># This is written using the Script Syntax</span>
- <span class="string"><span class="content">service: light.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">light.ceiling</span></span>
- <span class="string"><span class="content">service: notify.notify</span></span>
<span class="key">data</span>:
<span class="key">message</span>: <span class="string"><span class="content">'Turned on the ceiling light!'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="call-a-service" href="#call-a-service"></a> Call a Service</h4>
<p>The most important one is the action to call a service. This can be done in various ways. For all the different possibilities, have a look at the <a href="/getting-started/scripts-service-calls/">service calls page</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">alias</span>: <span class="string"><span class="content">Bedroom lights on</span></span>
<span class="key">service</span>: <span class="string"><span class="content">light.turn_on</span></span>
<span class="key">data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">group.bedroom</span></span>
<span class="key">brightness</span>: <span class="string"><span class="content">100</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="test-a-condition" href="#test-a-condition"></a> Test a Condition</h4>
<p>While executing a script you can add a condition to stop further execution. When a condition does not return <code>true</code>, the script will finish. There are many different conditions which are documented at the <a href="/getting-started/scripts-conditions/">conditions page</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">condition</span>: <span class="string"><span class="content">state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus</span></span>
<span class="key">state</span>: <span class="string"><span class="content">'home'</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="delay" href="#delay"></a> Delay</h4>
<p>Delays are useful for temporarily suspending your script and start it at a later moment. We support different syntaxes for a delay as shown below.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Waits 1 hour</span>
<span class="key">delay</span>: <span class="string"><span class="content">01:00</span></span>
</pre></div>
</div>
</div>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Waits 1 minute, 30 seconds</span>
<span class="key">delay</span>: <span class="string"><span class="content">00:01:30</span></span>
</pre></div>
</div>
</div>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Waits 1 minute</span>
<span class="key">delay</span>:
<span class="comment"># supports seconds, minutes, hours, days</span>
<span class="key">minutes</span>: <span class="string"><span class="content">1</span></span>
</pre></div>
</div>
</div>
<h4><a class="title-link" name="fire-an-event" href="#fire-an-event"></a> Fire an Event</h4>
<p>This action allows you to fire an event. Events can be used for many things. It could trigger an automation or indicate to another component that something is happening. For instance, in the below example it is used to create an entry in the logbook.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">event</span>: <span class="string"><span class="content">LOGBOOK_ENTRY</span></span>
<span class="key">event_data</span>:
<span class="key">name</span>: <span class="string"><span class="content">Paulus</span></span>
<span class="key">message</span>: <span class="string"><span class="content">is waking up</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.paulus</span></span>
<span class="key">domain</span>: <span class="string"><span class="content">light</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/scripts.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a class='active' href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,290 @@
<!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>Troubleshooting your configuration - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Common problems with tweaking your configuration and their solutions.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/troubleshooting-configuration/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Troubleshooting your configuration">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/troubleshooting-configuration/">
<meta property="og:type" content="website">
<meta property="og:description" content="Common problems with tweaking your configuration and their solutions.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Troubleshooting your configuration">
<meta name="twitter:description" content="Common problems with tweaking your configuration and their solutions.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Troubleshooting Your Configuration
</h1>
</header>
<hr class="divider">
<p>It can happen that you run into trouble while configuring Home Assistant. Perhaps a component is not showing up or is acting strangely. This page will discuss a few of the most common problems.</p>
<p>Before we dive into common issues, make sure you know where your configuration directory is. Home Assistant will print out the configuration directory it is using when starting up.</p>
<p>Whenever a component or configuration option results in a warning, it will be stored in <code>home-assistant.log</code> in the configuration directory. This file is reset on start of Home Assistant.</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>
<h4><a class="title-link" name="problems-with-the-configuration" href="#problems-with-the-configuration"></a> Problems with the configuration</h4>
<p>One of the most common problems with Home Assistant is an invalid <code>configuration.yaml</code> file.</p>
<ul>
<li>You can test your configuration using <a href="http://yaml-online-parser.appspot.com/">this online YAML parser</a> or <a href="http://www.yamllint.com/">YAML Lint</a>.</li>
<li>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 (the examples there are specific to SaltStack, but do explain YAML issues well).</li>
</ul>
<p><code>configuration.yaml</code> does not allow multiple sections to have the same name. If you want a specific platform to be loaded twice, append a <a href="/getting-started/devices/#style-2">number or string</a> to the name or nest them using <a href="/getting-started/devices/#style-1">this style</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">forecast</span></span>
<span class="error">...</span>
<span class="key">sensor 2</span>:
<span class="key">platform</span>: <span class="string"><span class="content">bitcoin</span></span>
<span class="error">...</span>
</pre></div>
</div>
</div>
<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 on how to setup the components.</p>
<p>If you find any errors or want to expand the documentation, please <a href="https://github.com/home-assistant/home-assistant.io/issues">let us know</a>.</p>
<h4><a class="title-link" name="problems-with-dependencies" href="#problems-with-dependencies"></a> Problems with dependencies</h4>
<p>Almost all components have external dependencies to communicate with your devices and services. Sometimes Home Assistant is unable to install the necessary dependencies. If this is the case, it should show up in <code>home-assistant.log</code>.</p>
<p>The first step is trying to restart Home Assistant and see if the problem persists. If it does, look at the log to see what the error is. If you cant figure it out, please <a href="https://github.com/home-assistant/home-assistant/issues">report it</a> so we can investigate what is going on.</p>
<h4><a class="title-link" name="problems-with-components" href="#problems-with-components"></a> Problems with components</h4>
<p>It can happen that some components either do not work right away or stop working after Home Assistant has been running for a while. If this happens to you, please <a href="https://github.com/home-assistant/home-assistant/issues">report it</a> so that we can have a look.</p>
<h4><a class="title-link" name="multiple-files" href="#multiple-files"></a> Multiple files</h4>
<p>If you are using multiple files for your setup, make sure that the pointers are correct and the format of the files is valid.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">light</span>: <span class="type">!include</span> <span class="string"><span class="content">devices/lights.yaml</span></span>
<span class="key">sensor</span>: <span class="type">!include</span> <span class="string"><span class="content">devices/sensors.yaml</span></span>
</pre></div>
</div>
</div>
<p>Contents of <code>lights.yaml</code> (notice it does not contain <code>light: </code>):</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>- <span class="string"><span class="content">platform: hyperion</span></span>
<span class="key">host</span>: <span class="string"><span class="content">192.168.1.98</span></span>
<span class="error">...</span>
</pre></div>
</div>
</div>
<p>Contents of <code>sensors.yaml</code>:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Room Humidity</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">room/humidity</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Door Motion</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">door/motion</span><span class="delimiter">&quot;</span></span>
<span class="error">...</span>
</pre></div>
</div>
</div>
<p class="note">
Whenever you report an issue, be aware that we are volunteers who do not have access to every single device in the world nor unlimited time to fix every problem out there.
</p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/troubleshooting-configuration.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a class='active' href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,277 @@
<!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>Troubleshooting installation problems - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Common installation problems and their solutions.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/troubleshooting/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Troubleshooting installation problems">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/troubleshooting/">
<meta property="og:type" content="website">
<meta property="og:description" content="Common installation problems and their solutions.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Troubleshooting installation problems">
<meta name="twitter:description" content="Common installation problems and their solutions.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Troubleshooting Installation Problems
</h1>
</header>
<hr class="divider">
<p>It can happen that you run into trouble while installing Home Assistant. This page is here to help you solve the most common problems.</p>
<h4><a class="title-link" name="pip3-command-not-found" href="#pip3-command-not-found"></a> pip3: command not found</h4>
<p>This utility should have been installed as part of the Python 3.4 installation. Check if Python 3.4 is installed by running <code>python3 --version</code>. If it is not installed, <a href="https://www.python.org/getit/">download it here</a>.</p>
<p>If you are able to successfully run <code>python3 --version</code> but not <code>pip3</code>, install Home Assistant by running the following command instead:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ python3 -m pip install homeassistant
</pre></div>
</div>
</div>
<h4><a class="title-link" name="no-module-named-pip" href="#no-module-named-pip"></a> No module named pip</h4>
<p><a href="https://pip.pypa.io/en/stable/">Pip</a> should come bundled with the latest Python 3 but is omitted by some distributions. If you are unable to run <code>python3 -m pip --version</code> you can install <code>pip</code> by <a href="https://bootstrap.pypa.io/get-pip.py">downloading the installer</a> and running it with Python 3:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ python3 get-pip.py
</pre></div>
</div>
</div>
<h4><a class="title-link" name="distutilserrorsdistutilsoptionerror-must-supply-either-home-or-prefixexec-prefix----not-both" href="#distutilserrorsdistutilsoptionerror-must-supply-either-home-or-prefixexec-prefix----not-both"></a> distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix not both</h4>
<p>This is a known issue if youre on a Mac using Homebrew to install Python. Please follow <a href="https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md#note-on-pip-install---user">these instructions</a> to resolve it.</p>
<h4><a class="title-link" name="centos-and-python-3" href="#centos-and-python-3"></a> CentOS and Python 3</h4>
<p>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>
<h4><a class="title-link" name="no-access-to-the-frontend" href="#no-access-to-the-frontend"></a> No access to the frontend</h4>
<p>In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host is very limited. This means that you cant 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>
<p>To fix this you will need to open your machines firewall for TCP traffic over port 8123. The method for doing this will vary depending on your operating system and the firewall you have installed. Below are some suggestions to try. Google is your friend here.</p>
<ul>
<li><a href="http://windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7">Windows instructions</a></li>
<li><a href="https://support.apple.com/en-us/HT201642">Mac OSX instructions</a></li>
</ul>
<p>For systems with <strong>firewalld</strong> (Fedora, CentOS/RHEL, etc.):</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo firewall-cmd --permanent --add-port=8123/tcp
$ sudo firewall-cmd --reload
</pre></div>
</div>
</div>
<p>For UFW systems (Ubuntu, Debian, Raspbian, etc.):</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo ufw allow 8123/tcp
</pre></div>
</div>
</div>
<p>For <code>iptables</code> systems (was the default for older distributions):</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ iptables -I INPUT -p tcp --dport 8123 -j ACCEPT
$ iptables-save &gt; /etc/network/iptables.rules # your rules may be saved elsewhere
</pre></div>
</div>
</div>
<h4><a class="title-link" name="after-upgrading-your-browser-login-gets-stuck-at-the-loading-data-step" href="#after-upgrading-your-browser-login-gets-stuck-at-the-loading-data-step"></a> After upgrading, your browser login gets stuck at the “loading data” step</h4>
<p>After upgrading to a new version, you may notice your browser gets stuck at the “loading data” login screen. Close the window/tab and go into your browser settings and delete all the cookies for your URL. You can then log back in and it should work.</p>
<p>Android Chrome <br />
chrome -&gt; settings -&gt; site settings -&gt; storage -&gt; search for your URL for home assistant-&gt; “clear &amp; reset”</p>
<h3><a href="/getting-started/">« Back to Getting Started</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/troubleshooting.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a class='active' href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,234 @@
<!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>Updating Home Assistant - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Step to update Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/updating/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Updating Home Assistant">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/updating/">
<meta property="og:type" content="website">
<meta property="og:description" content="Step to update Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Updating Home Assistant">
<meta name="twitter:description" content="Step to update Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Updating Home Assistant
</h1>
</header>
<hr class="divider">
<p>The default way to update Home Assistant to the latest release, when available, is:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ pip3 install --upgrade homeassistant
</pre></div>
</div>
</div>
<p>Different installation methods as <a href="/getting-started/installation-raspberry-pi-all-in-one/#upgrading">Raspberry Pi All-In-One Installer</a>, <a href="/getting-started/installation-vagrant/">Vagrant</a>, or <a href="/getting-started/installation-virtualenv/#upgrading-home-assistant">Virtualenv</a> may have an alternative way for updating Home Assistant.</p>
<p>After updating, restart Home Assistant for the changes to take effect. This means that you have to restart <code>hass</code> itself or the <a href="/getting-started/autostart/">autostarting</a> daemon if you use any.</p>
<p class="note note">
The upgrade needs to be run as the same user as the installation was done to avoid permission errors.
</p>
<h4><a class="title-link" name="run-the-development-version" href="#run-the-development-version"></a> Run the development version</h4>
<p>If you want to stay on top of the development of Home Assistant then you can upgrade to the <code>dev</code> branch.</p>
<p class="note warning">
This can result in an unstable system, loss of data, etc. etc.
</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/updating.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a class='active' href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,263 @@
<!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>YAML - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Details about YAML to configure Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/yaml/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="YAML">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/yaml/">
<meta property="og:type" content="website">
<meta property="og:description" content="Details about YAML to configure Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="YAML">
<meta name="twitter:description" content="Details about YAML to configure Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
YAML
</h1>
</header>
<hr class="divider">
<p>Home Assistant uses the <a href="http://yaml.org/">YAML</a> syntax for configuration. YAML might take a while to get used to but is really powerful in allowing you to express complex configurations.</p>
<p>For each component that you want to use in Home Assistant, you add code in your <code>configuraton.yaml</code> file to specify its settings.<br />
The following example entry specifies that you want to use the <a href="/components/notify">notify component</a> with the <a href="/components/notify.pushbullet">pushbullet platform</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">pushbullet</span></span>
<span class="key">api_key</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">o.1234abcd</span><span class="delimiter">&quot;</span></span>
<span class="key">name</span>: <span class="string"><span class="content">pushbullet</span></span>
</pre></div>
</div>
</div>
<ul>
<li>A <strong>component</strong> provides the core logic for some functionality (like <code>notify</code> provides sending notifications).</li>
<li>A <strong>platform</strong> makes the connection to a specific software or hardware platform (like <code>pushbullet</code> works with the service from pushbullet.com).</li>
</ul>
<p>The basics of YAML syntax are block collections and mappings containing key-value pairs. Each item in a collection starts with a <code>-</code> while mappings have the format <code>key: value</code>. If you specify duplicate keys, the last value for a key is used.</p>
<p>Note that indentation is an important part of specifying relationships using YAML. Things that are indented are nested “inside” things that are one level higher. So in the above example, <code>platform: pushbullet</code> is a property of (nested inside) the <code>notify</code> component.<br />
Getting the right indentation can be tricky if youre not using an editor with a fixed width font. Tabs are not allowed to be used for indentation. Convention is to use 2 spaces for each level of indentation.</p>
<p>Lines that start with <strong>#</strong> are comments and are ignored by the system.</p>
<p>The next example shows an <a href="/components/input_select">input_select</a> component that uses a block collection for the options values.<br />
The other properties (like name) are specified using mappings. Note that the second line just has <code>threat:</code> with no value on the same line. Here threat is the name of the input_select and the values for it are everything nested below it.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">input_select</span>:
<span class="key">threat</span>:
<span class="key">name</span>: <span class="string"><span class="content">Threat level</span></span>
<span class="comment"># A collection is used for options</span>
<span class="key">options</span>:
- <span class="string"><span class="content">0</span></span>
- <span class="string"><span class="content">1</span></span>
- <span class="string"><span class="content">2</span></span>
- <span class="string"><span class="content">3</span></span>
<span class="key">initial</span>: <span class="string"><span class="content">0</span></span>
</pre></div>
</div>
</div>
<p>The following example shows nesting a collection of mappings in a mapping. In Home Assistant, this would create two sensors that each use the MQTT platform but have different values for their <code>state_topic</code> (one of the properties used for MQTT sensors).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">sensor</span>:
- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="content">sensor/topic</span></span>
- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="content">sensor2/topic</span></span>
</pre></div>
</div>
</div>
<h3><a href="/getting-started/basic/">Next step: Setting up the basics »</a></h3>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/yaml.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a class='active' href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,252 @@
<!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>Z-Wave USB Controllers - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Extended instructions how to setup Z-Wave.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/z-wave-controllers/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Z-Wave USB Controllers">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/z-wave-controllers/">
<meta property="og:type" content="website">
<meta property="og:description" content="Extended instructions how to setup Z-Wave.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Z-Wave USB Controllers">
<meta name="twitter:description" content="Extended instructions how to setup Z-Wave.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Z-Wave USB Controllers
</h1>
</header>
<hr class="divider">
<p>Z-Wave is a popular home automation protocol that is not always straightforward to setup. This page will try to help you make sense of it all.</p>
<p class="note">
Upon first run, the z-wave component will take time to initialize entities and entities may appear with incomplete names. Running a network heal may expidite this proccess.
</p>
<h2><a class="title-link" name="supported-z-wave-sticks" href="#supported-z-wave-sticks"></a> Supported Z-Wave Sticks</h2>
<table>
<thead>
<tr>
<th>Device</th>
<th>Works on Linux</th>
<th>Works on Windows</th>
<th>Works on OSX</th>
</tr>
</thead>
<tbody>
<tr>
<td>Aeotec Z-Stick Series 2</td>
<td></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Aeotec Z-Stick Series 5</td>
<td></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Razberry GPIO Module</td>
<td></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="stick-alternatives" href="#stick-alternatives"></a> Stick Alternatives</h2>
<p>The alternative to a stick is a hub that supports Z-Wave. Home Assistant supports the following hubs with Z-Wave support:</p>
<ul>
<li><a href="/components/vera/">Vera</a></li>
</ul>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/z-wave-controllers.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a class='active' href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,281 @@
<!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>Z-Wave Device Specific Settings - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Extended instructions how to setup Z-Wave.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/z-wave-device-specific/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Z-Wave Device Specific Settings">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/z-wave-device-specific/">
<meta property="og:type" content="website">
<meta property="og:description" content="Extended instructions how to setup Z-Wave.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Z-Wave Device Specific Settings">
<meta name="twitter:description" content="Extended instructions how to setup Z-Wave.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Z-Wave Device Specific Settings
</h1>
</header>
<hr class="divider">
<h5><a class="title-link" name="aeon-minimote" href="#aeon-minimote"></a> Aeon Minimote</h5>
<p>Heres a handy configuration for the Aeon Labs Minimote that defines all possible button presses. Put it into <code>automation.yaml</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>- <span class="string"><span class="content">alias: Minimote Button 1 Pressed</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">1</span></span>
- <span class="string"><span class="content">alias: Minimote Button 1 Held</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">2</span></span>
- <span class="string"><span class="content">alias: Minimote Button 2 Pressed</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">3</span></span>
- <span class="string"><span class="content">alias: Minimote Button 2 Held</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">4</span></span>
- <span class="string"><span class="content">alias: Minimote Button 3 Pressed</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">5</span></span>
- <span class="string"><span class="content">alias: Minimote Button 3 Held</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">6</span></span>
- <span class="string"><span class="content">alias: Minimote Button 4 Pressed</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">7</span></span>
- <span class="string"><span class="content">alias: Minimote Button 4 Held</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">aeon_labs_minimote_1</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">8</span></span>
</pre></div>
</div>
</div>
<h5><a class="title-link" name="aeotec-multisensor-6" href="#aeotec-multisensor-6"></a> Aeotec MultiSensor 6</h5>
<p>In order for Home Assistant to recognize well the motion sensor, you will need to change its configuration from <code>Basic Set (default)</code> to <code>Binary Sensor report</code>. Currently theres no way to do this in Home Assistant but you can use ozwcp (OpenZWave control panel), Domoticz or similar to do it</p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/z-wave-device-specific.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a class='active' href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,209 @@
<!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>Z-Wave Settings - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Extended instructions how to setup Z-Wave.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/z-wave-settings/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Z-Wave Settings">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/z-wave-settings/">
<meta property="og:type" content="website">
<meta property="og:description" content="Extended instructions how to setup Z-Wave.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Z-Wave Settings">
<meta name="twitter:description" content="Extended instructions how to setup Z-Wave.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Z-Wave Settings
</h1>
</header>
<hr class="divider">
<p>You may wish to modify the zwave settings ozw*.xml file in your .homeassistant root folder, or certain situations/devices may require it (i.e. Aeon Multisensor 6). To do this, utilize <a href="https://github.com/OpenZWave/open-zwave-control-panel">Open-Zwave Control Panel</a>. Alternatively, use <a href="https://www.domoticz.com/">Domoticz</a>, which incorporates the Open-Zwave Control Panel project into an easy to use Raspberry Pi image.</p>
<p>The reasoning for using these tools is that your Zwave controller stores the values and data that are used to control the network. The XML file in the .homeassistant folder acts as a settings/values cache for the zwave network, so modifying it directly wont change the network values. The Open-Zwave Control Panel writes values directly to the network, and will provide you with an updated .xml file to overwrite in your .homeassistant folder. This is the most foolproof way to make modifications to your zwave devices.</p>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/z-wave-settings.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a class='active' href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>

View file

@ -0,0 +1,382 @@
<!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>Z-Wave - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions how to integrate your existing Z-Wave within Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/getting-started/z-wave/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Z-Wave">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/getting-started/z-wave/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to integrate your existing Z-Wave within Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Z-Wave">
<meta name="twitter:description" content="Instructions how to integrate your existing Z-Wave within Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.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='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</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></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></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">
Z-Wave
</h1>
</header>
<hr class="divider">
<p><a href="http://www.z-wave.com/">Z-Wave</a> integration for Home Assistant allows you to observe and control connected Z-Wave devices. Z-Wave support requires a <a href="https://github.com/OpenZWave/open-zwave/wiki/Controller-Compatibility-List">supported Z-Wave USB stick</a> to be plugged into the host.</p>
<p>There is currently support for switches, lights and sensors. All will be picked up automatically after configuring this platform.</p>
<h3><a class="title-link" name="installation" href="#installation"></a> Installation</h3>
<p>To allow Home Assistant to talk to your Z-Wave USB stick you will have to compile the OpenZWave library and install the related <a href="https://github.com/OpenZWave/python-openzwave">python-OpenZWave package</a>. This can be done as follows. <em>(Note: The Home Assistant docker image has support for Z-Wave built-in)</em></p>
<p>Make sure you have the correct dependencies installed before running the script:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools
</pre></div>
</div>
</div>
<p>Make sure you have at least version 0.23 of cython.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo pip3 install --upgrade cython
</pre></div>
</div>
</div>
<p>Then get the OpenZWave files and switch to the <code>python3</code> branch:</p>
<p class="note warning">Do not use root to build python-openzwave as it will surely fail.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ git clone https://github.com/OpenZWave/python-openzwave.git
$ cd python-openzwave
$ git checkout python3
$ PYTHON_EXEC=$(which python3) make build
$ sudo PYTHON_EXEC=$(which python3) make install
</pre></div>
</div>
</div>
<p class="note">
Instead of <code>make install</code>, you can alternatively build your own python-openzwave package which can be easily uninstalled:
<code>$ sudo PYTHON_EXEC=$(which python3) checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave</code>
</p>
<p>With this installation, your <code>config_path</code> needed below will resemble:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>/usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config
</pre></div>
</div>
</div>
<h3><a class="title-link" name="configuration" href="#configuration"></a> Configuration</h3>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">zwave</span>:
<span class="key">usb_path</span>: <span class="string"><span class="content">/dev/ttyUSB0</span></span>
<span class="key">config_path</span>: <span class="string"><span class="content">/usr/local/share/python-openzwave/config</span></span>
<span class="key">polling_interval</span>: <span class="string"><span class="content">60000</span></span>
<span class="key">customize</span>:
<span class="key">sensor.greenwave_powernode_6_port_energy_10</span>:
<span class="key">polling_intensity</span>: <span class="string"><span class="content">1</span></span>
</pre></div>
</div>
</div>
<p>Configuration variables:</p>
<ul>
<li><strong>usb_path</strong> (<em>Required</em>): The port where your device is connected to your Home Assistant host.</li>
<li><strong>config_path</strong> (<em>Optional</em>): The path to the Python Open Z-Wave configuration files.</li>
<li><strong>autoheal</strong> (<em>Optional</em>): Allows disabling auto ZWave heal at midnight. Defaults to True.</li>
<li><strong>polling_interval</strong> (<em>Optional</em>): The time period in milliseconds between polls of a nodes value. Be careful about using polling values below 30000 (30 seconds) as polling can flood the zwave network and cause problems.</li>
<li><strong>customize</strong> (<em>Optional</em>): This attribute contains node-specific override values:
<ul>
<li><strong>polling_intensity</strong> (<em>Optional</em>): Enables polling of a value and sets the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc). If not specified then your device will not be polled.</li>
</ul>
</li>
</ul>
<p>To find the path of your Z-Wave stick, run:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ ls /dev/ttyUSB*
</pre></div>
</div>
</div>
<p>Or, on some other systems (such as Raspberry Pi), use:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ ls /dev/ttyACM*
</pre></div>
</div>
</div>
<p class="note">
Depending on whats plugged into your USB ports, the name found above may change. You can lock in a name, such as <code>/dev/zwave</code>, by following <a href="http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/">these instructions</a>.
</p>
<h4><a class="title-link" name="events" href="#events"></a> Events</h4>
<p>Some devices can also trigger scene activation events, which can be used in automation scripts (for example the press of a button on a wall switch):</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml automation entry</span>
<span class="key">automation</span>:
- <span class="string"><span class="content">alias: Turn on Desk light</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">event</span></span>
<span class="key">event_type</span>: <span class="string"><span class="content">zwave.scene_activated</span></span>
<span class="key">event_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">zwaveme_zme_wallcs_secure_wall_controller_8</span></span>
<span class="key">scene_id</span>: <span class="string"><span class="content">11</span></span>
</pre></div>
</div>
</div>
<p>The <em>entity_id</em> and <em>scene_id</em> of all triggered events can be seen in the console output.</p>
<h4><a class="title-link" name="services" href="#services"></a> Services</h4>
<p>The Z-Wave component exposes four services to help maintain the network.</p>
<table>
<thead>
<tr>
<th>Service</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>add_node</td>
<td>Put the zwave controller in inclusion mode. Allows one to add a new device to the zwave network.</td>
</tr>
<tr>
<td>remove_node</td>
<td>Put the zwave controller in exclusion mode. Allows one to remove a device from the zwave network.</td>
</tr>
<tr>
<td>heal_network</td>
<td>Tells the controller to “heal” the network. Bascially asks the nodes to tell the controller all of their neighbors so the controller can refigure out optimal routing.</td>
</tr>
<tr>
<td>soft_reset</td>
<td>Tells the controller to do a “soft reset”. This is not supposed to lose any data, but different controllers can behave differently to a “soft reset” command.</td>
</tr>
<tr>
<td>test_network</td>
<td>Tells the controller to send no-op commands to each node and measure the time for a response. In theory, this can also bring back nodes which have been marked “presumed dead”.</td>
</tr>
</tbody>
</table>
<p>The soft_reset and heal_network commands can be used as part of an automation script<br />
to help keep a zwave network running relliably. For example:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml automation entry</span>
<span class="key">automation</span>:
- <span class="string"><span class="content">alias: soft reset at 2:30am</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">time</span></span>
<span class="key">after</span>: <span class="string"><span class="content">'2:30:00'</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">zwave.soft_reset</span></span>
- <span class="string"><span class="content">alias: heal at 2:31am</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">time</span></span>
<span class="key">after</span>: <span class="string"><span class="content">'2:31:00'</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">zwave.heal_network</span></span>
</pre></div>
</div>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.io/tree/master/source/getting-started/z-wave.markdown'>Edit this page on GitHub</a></div>
<div class='section'>
<h1 class="title delta">Getting Started Guide</h1>
<ul class='divided sidebar-menu'>
<li>
<a href='/getting-started/'>Installation </a>
<ul>
<li><a href='/getting-started/installation-raspberry-pi/'>Raspberry Pi </a></li>
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-vagrant/'>Vagrant </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting </a></li>
</ul>
</li>
<li>
<a href='/getting-started/automation/'>Automation </a>
<ul>
<li><a href='/getting-started/automation-create-first/'>Tutorial </a></li>
<li><a href='/getting-started/automation-trigger/'>Triggers </a></li>
<li><a href='/getting-started/automation-condition/'>Conditions </a></li>
<li><a href='/getting-started/automation-action/'>Actions </a></li>
<li><a href='/getting-started/automation-templating/'>Templates </a></li>
</ul>
</li>
<li>
<a href='/getting-started/scripts/'>Scripts </a>
<ul>
<li><a href='/getting-started/scripts-service-calls/'>Service Calls </a></li>
<li><a href='/getting-started/scripts-conditions/'>Conditions </a></li>
</ul>
</li>
<li>
<a class='active' href='/getting-started/z-wave/'>Z-Wave </a>
<ul>
<li><a href='/getting-started/z-wave-controllers/'>USB Controllers </a></li>
<li><a href='/getting-started/z-wave-settings/'>Modifying Settings </a></li>
<li><a href='/getting-started/z-wave-device-specific/'>Device Specific </a></li>
</ul>
</li>
<li>
<a href='/getting-started/autostart/'>Autostart </a>
<ul>
<li><a href='/getting-started/autostart-systemd/'>Linux - systemd </a></li>
<li><a href='/getting-started/autostart-upstart/'>Linux - Upstart </a></li>
<li><a href='/getting-started/autostart-macos/'>OS X </a></li>
<li><a href='/getting-started/autostart-synology/'>Synology NAS </a></li>
</ul>
</li>
<li><a href='/topics/'>Advanced Topics </a></li>
<li><a href='/getting-started/android/'>Add to Android Homescreen </a></li>
<li><a href='/getting-started/browsers/'>Browser Compatibility List </a></li>
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<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>