Site updated at 2016-04-17 00:12:10 UTC
This commit is contained in:
parent
4e2ff4e405
commit
ad7ff08172
558 changed files with 3948 additions and 5718 deletions
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/android/';</script>
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -118,6 +110,53 @@
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/automation/';</script>
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -272,6 +264,53 @@
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a class='active' href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
198
getting-started/autostart-macos/index.html
Normal file
198
getting-started/autostart-macos/index.html
Normal file
|
@ -0,0 +1,198 @@
|
|||
<!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 macOS boot - Home Assistant</title>
|
||||
<meta name="author" content="Paulus Schoutsen">
|
||||
<meta name="description" content="Instructions how to setup Home Assistant to launch on macOS boot.">
|
||||
|
||||
<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 macOS boot">
|
||||
<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 macOS boot.">
|
||||
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="@home_assistant">
|
||||
|
||||
<meta name="twitter:title" content="Autostart on macOS boot">
|
||||
<meta name="twitter:description" content="Instructions how to setup Home Assistant to launch on macOS boot.">
|
||||
<meta name="twitter:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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 macOS Boot
|
||||
</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 it’s 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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
221
getting-started/autostart-synology/index.html
Normal file
221
getting-started/autostart-synology/index.html
Normal 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>Autostart on Synology NAS boot - Home Assistant</title>
|
||||
<meta name="author" content="Paulus Schoutsen">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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 & 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>That’s 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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
246
getting-started/autostart-systemd/index.html
Normal file
246
getting-started/autostart-systemd/index.html
Normal file
|
@ -0,0 +1,246 @@
|
|||
<!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="Paulus Schoutsen">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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 systemd for managing daemons. Typically, systems based on Fedora or Debian 8 or later use systemd. 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 <<EOF >> /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/balloob/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/balloob/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</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 Assistant’s 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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
199
getting-started/autostart-upstart/index.html
Normal file
199
getting-started/autostart-upstart/index.html
Normal file
|
@ -0,0 +1,199 @@
|
|||
<!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="Paulus Schoutsen">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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/balloob/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 user’s 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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/autostart/';</script>
|
|
@ -1,326 +0,0 @@
|
|||
<!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>Launch Home Assistant on boot - Home Assistant</title>
|
||||
<meta name="author" content="Paulus Schoutsen">
|
||||
<meta name="description" content="Instructions how to setup Home Assistant to launch on boot on various platforms.">
|
||||
|
||||
<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="Launch Home Assistant on boot">
|
||||
<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 boot on various platforms.">
|
||||
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="@home_assistant">
|
||||
|
||||
<meta name="twitter:title" content="Launch Home Assistant on boot">
|
||||
<meta name="twitter:description" content="Instructions how to setup Home Assistant to launch on boot on various platforms.">
|
||||
<meta name="twitter:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</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">
|
||||
<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>
|
||||
|
||||
|
||||
<header>
|
||||
<h1 class="title indent">
|
||||
Launch Home Assistant on Boot
|
||||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
|
||||
|
||||
<div class="advanced-installs-container">
|
||||
<input name="advanced-installs" type="radio" id="upstart-install" checked="" />
|
||||
<input name="advanced-installs" type="radio" id="systemd-install" />
|
||||
<input name="advanced-installs" type="radio" id="osx-install" />
|
||||
<input name="advanced-installs" type="radio" id="synology-install" />
|
||||
<label class="menu-selector upstart" for="upstart-install">Upstart Daemon</label>
|
||||
<label class="menu-selector systemd" for="systemd-install">Systemd Daemon</label>
|
||||
<label class="menu-selector osx" for="osx-install">OS X</label>
|
||||
<label class="menu-selector synology" for="synology-install">Synology NAS</label>
|
||||
|
||||
<div class="advanced-installs upstart">
|
||||
<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/balloob/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 user’s name. Instructions for setting this up are outside the scope of this document.</p>
|
||||
</div> <!-- UPSTART -->
|
||||
|
||||
<div class="advanced-installs systemd">
|
||||
<p>Newer linux distributions are trending towards using systemd for managing daemons. Typically, systems based on Fedora or Debian 8 or later use systemd. 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 <<EOF >> /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/balloob/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/balloob/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</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 Assistant’s 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>
|
||||
|
||||
</div> <!-- SYSTEMD -->
|
||||
|
||||
<div class="advanced-installs osx">
|
||||
<p>Setting up Home Assistant to run as a background service is simple. OS X will start it on boot and make sure it’s 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>
|
||||
|
||||
</div> <!-- OSX -->
|
||||
|
||||
<div class="advanced-installs synology">
|
||||
<p>To get Home Assistant to automatically start when you boot your Synology NAS:</p>
|
||||
|
||||
<p>SSH onto your synology & 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>That’s it - reboot your NAS and Home Assistant should automatically start</p>
|
||||
</div> <!-- SYNOLOGY -->
|
||||
</div>
|
||||
|
||||
<h3><a href="/getting-started/">« Back to Getting Started</a></h3>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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">
|
||||
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>
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/configuration/';</script>
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -226,6 +218,53 @@ The other properties (like name) are specified using mappings. Note that the sec
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a class='active' href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/devices/';</script>
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -205,6 +197,53 @@ Each group exists of a name and a list of entity IDs. Entity IDs can be retrieve
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a class='active' href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -97,342 +89,49 @@
|
|||
<hr class="divider">
|
||||
|
||||
|
||||
<div class="install-instructions-container">
|
||||
<input name="install-instructions" type="radio" id="normal-install" checked="" />
|
||||
<input name="install-instructions" type="radio" id="raspberry-install" />
|
||||
<input name="install-instructions" type="radio" id="docker-install" />
|
||||
<input name="install-instructions" type="radio" id="synology-install" />
|
||||
<label class="menu-selector normal" for="normal-install">Local machine</label>
|
||||
<label class="menu-selector raspberry" for="raspberry-install">Raspberry Pi</label>
|
||||
<label class="menu-selector docker" for="docker-install">Docker</label>
|
||||
<label class="menu-selector synology" for="synology-install">Synology NAS</label>
|
||||
<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="install-instructions normal">
|
||||
<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>
|
||||
|
||||
<p class="note">
|
||||
<p class="note">
|
||||
It’s highly recommended to use a <a href="https://docs.python.org/3.4/library/venv.html">virtual environment</a> to keep things separated. A virtual environment can be created by exceuting the following command: <code>python3 -m venv /path/where/you/home-assistant/</code>. Then change to the created directory and go the next step.
|
||||
</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ pip3 install homeassistant
|
||||
$ hass --open-ui
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Running these commands will:</p>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<h3><a class="title-link" name="updating" href="#updating"></a> Updating</h3>
|
||||
|
||||
<p>To update Home Assistant to the latest release when available, run: <code>pip3 install --upgrade homeassistant</code></p>
|
||||
<p>To update Home Assistant to the latest release when available, run:</p>
|
||||
|
||||
<p>You have to restart Home Assistant (<code>hass</code> itself or with the help of the autostarting daemon if you use any) for the changes to take effect.</p>
|
||||
|
||||
</div> <!-- INSTALL-INSTRUCTIONS NORMAL -->
|
||||
|
||||
|
||||
<div class="install-instructions docker">
|
||||
|
||||
<p>Installation with Docker is straightforward. Adjust the following command so that <code>/path/to/your/config/</code> points at the folder where you want to store your config and run it:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host balloob/home-assistant
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>pip3 install --upgrade homeassistant
|
||||
</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>
|
||||
|
||||
</div> <!-- INSTALL-INSTRUCTIONS DOCKER -->
|
||||
|
||||
|
||||
<div class="install-instructions raspberry">
|
||||
|
||||
<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="updating" href="#updating"></a> Updating</h3>
|
||||
|
||||
<p>To update Home Assistant to the latest release when available, run: <code>pip3 install --upgrade homeassistant</code></p>
|
||||
|
||||
<p>You have to restart Home Assistant (<code>hass</code> itself or with the help of the autostarting daemon if you use any) for the changes to take effect.</p>
|
||||
|
||||
</div> <!-- INSTALL-INSTRUCTIONS RASPBERRY -->
|
||||
|
||||
<div class="install-instructions synology">
|
||||
|
||||
<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 & 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 (Python’s 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 & 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="homeassistant"
|
||||
DNAME="Home Assistant"
|
||||
|
||||
# Others
|
||||
USER="homeassistant"
|
||||
PYTHON_DIR="/volume1/@appstore/py3k/usr/local/bin"
|
||||
PYTHON="$PYTHON_DIR/python3"
|
||||
HASS="$PYTHON_DIR/hass"
|
||||
INSTALL_DIR="/volume1/homeassistant"
|
||||
PID_FILE="$INSTALL_DIR/home-assistant.pid"
|
||||
FLAGS="-v --config $INSTALL_DIR --pid-file $PID_FILE --daemon"
|
||||
REDIRECT="> $INSTALL_DIR/home-assistant.log 2>&1"
|
||||
|
||||
start_daemon ()
|
||||
{
|
||||
su ${USER} -s /bin/sh -c "$PYTHON $HASS $FLAGS $REDIRECT;"
|
||||
}
|
||||
|
||||
stop_daemon ()
|
||||
{
|
||||
kill `cat ${PID_FILE}`
|
||||
wait_for_status 1 20 || kill -9 `cat ${PID_FILE}`
|
||||
rm -f ${PID_FILE}
|
||||
}
|
||||
|
||||
daemon_status ()
|
||||
{
|
||||
if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
rm -f ${PID_FILE}
|
||||
return 1
|
||||
}
|
||||
|
||||
wait_for_status ()
|
||||
{
|
||||
counter=$2
|
||||
while [ ${counter} -gt 0 ]; do
|
||||
daemon_status
|
||||
[ $? -eq $1 ] && return
|
||||
let counter=counter-1
|
||||
sleep 1
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
if daemon_status; then
|
||||
echo ${DNAME} is already running
|
||||
exit 0
|
||||
else
|
||||
echo Starting ${DNAME} ...
|
||||
start_daemon
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if daemon_status; then
|
||||
echo Stopping ${DNAME} ...
|
||||
stop_daemon
|
||||
exit $?
|
||||
else
|
||||
echo ${DNAME} is not running
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
if daemon_status; then
|
||||
echo Stopping ${DNAME} ...
|
||||
stop_daemon
|
||||
echo Starting ${DNAME} ...
|
||||
start_daemon
|
||||
exit $?
|
||||
else
|
||||
echo ${DNAME} is not running
|
||||
echo Starting ${DNAME} ...
|
||||
start_daemon
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
if daemon_status; then
|
||||
echo ${DNAME} is running
|
||||
exit 0
|
||||
else
|
||||
echo ${DNAME} is not running
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
log)
|
||||
echo ${LOG_FILE}
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
</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
|
||||
That’s it… you’re 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>
|
||||
|
||||
</div> <!-- INSTALL-INSTRUCTIONS SYNOLOGY -->
|
||||
</div>
|
||||
<p>After updating, restart Home Assistant for the changes to take effect.</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>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>
|
||||
|
||||
|
@ -444,8 +143,6 @@ That’s it… you’re all set to go</p>
|
|||
|
||||
<h3><a class="title-link" name="whats-next" href="#whats-next"></a> What’s next</h3>
|
||||
|
||||
<p>If you want to have Home Assistant start on boot, <a href="/getting-started/autostart/">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>
|
||||
|
@ -457,6 +154,53 @@ That’s it… you’re all set to go</p>
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
202
getting-started/installation-docker/index.html
Normal file
202
getting-started/installation-docker/index.html
Normal file
|
@ -0,0 +1,202 @@
|
|||
<!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="Paulus Schoutsen">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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="home-assistant" -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/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 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 class='active' href='/getting-started/installation-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
220
getting-started/installation-raspberry-pi/index.html
Normal file
220
getting-started/installation-raspberry-pi/index.html
Normal file
|
@ -0,0 +1,220 @@
|
|||
<!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="Paulus Schoutsen">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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="updating" href="#updating"></a> Updating</h3>
|
||||
|
||||
<p>To update Home Assistant to the latest release when available, run: <code>pip3 install --upgrade homeassistant</code></p>
|
||||
|
||||
<p>You have to restart Home Assistant (<code>hass</code> itself or with the help of the autostarting daemon if you use any) for the changes to take effect.</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/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> What’s 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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
425
getting-started/installation-synology/index.html
Normal file
425
getting-started/installation-synology/index.html
Normal file
|
@ -0,0 +1,425 @@
|
|||
<!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="Paulus Schoutsen">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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 & 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 (Python’s 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 & 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="homeassistant"
|
||||
DNAME="Home Assistant"
|
||||
|
||||
# Others
|
||||
USER="homeassistant"
|
||||
PYTHON_DIR="/volume1/@appstore/py3k/usr/local/bin"
|
||||
PYTHON="$PYTHON_DIR/python3"
|
||||
HASS="$PYTHON_DIR/hass"
|
||||
INSTALL_DIR="/volume1/homeassistant"
|
||||
PID_FILE="$INSTALL_DIR/home-assistant.pid"
|
||||
FLAGS="-v --config $INSTALL_DIR --pid-file $PID_FILE --daemon"
|
||||
REDIRECT="> $INSTALL_DIR/home-assistant.log 2>&1"
|
||||
|
||||
start_daemon ()
|
||||
{
|
||||
su ${USER} -s /bin/sh -c "$PYTHON $HASS $FLAGS $REDIRECT;"
|
||||
}
|
||||
|
||||
stop_daemon ()
|
||||
{
|
||||
kill `cat ${PID_FILE}`
|
||||
wait_for_status 1 20 || kill -9 `cat ${PID_FILE}`
|
||||
rm -f ${PID_FILE}
|
||||
}
|
||||
|
||||
daemon_status ()
|
||||
{
|
||||
if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
rm -f ${PID_FILE}
|
||||
return 1
|
||||
}
|
||||
|
||||
wait_for_status ()
|
||||
{
|
||||
counter=$2
|
||||
while [ ${counter} -gt 0 ]; do
|
||||
daemon_status
|
||||
[ $? -eq $1 ] && return
|
||||
let counter=counter-1
|
||||
sleep 1
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
if daemon_status; then
|
||||
echo ${DNAME} is already running
|
||||
exit 0
|
||||
else
|
||||
echo Starting ${DNAME} ...
|
||||
start_daemon
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if daemon_status; then
|
||||
echo Stopping ${DNAME} ...
|
||||
stop_daemon
|
||||
exit $?
|
||||
else
|
||||
echo ${DNAME} is not running
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
if daemon_status; then
|
||||
echo Stopping ${DNAME} ...
|
||||
stop_daemon
|
||||
echo Starting ${DNAME} ...
|
||||
start_daemon
|
||||
exit $?
|
||||
else
|
||||
echo ${DNAME} is not running
|
||||
echo Starting ${DNAME} ...
|
||||
start_daemon
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
if daemon_status; then
|
||||
echo ${DNAME} is running
|
||||
exit 0
|
||||
else
|
||||
echo ${DNAME} is not running
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
log)
|
||||
echo ${LOG_FILE}
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
</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 />
|
||||
That’s it… you’re 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> What’s 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-docker/'>Docker </a></li>
|
||||
<li><a class='active' href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
312
getting-started/installation-virtualenv/index.html
Normal file
312
getting-started/installation-virtualenv/index.html
Normal file
|
@ -0,0 +1,312 @@
|
|||
<!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="Paulus Schoutsen">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<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/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/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 virtualenv. A virtualenv encapsulates all aspect of a Python environment within a single directory tree. That means the Python packages you install for Home Assistant won’t interact with the rest of your system and vice-versa. It means a random upgrade for some other program on your computer won’t break HA, and it means you don’t need to install a bunch of 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). We’ll be using Debian in this example (as many HA 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>
|
||||
|
||||
<h2>Step 0: Install some dependencies</h2>
|
||||
|
||||
<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
|
||||
sudo pip install --upgrade virtualenv
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Step 1: Create a Home Assistant user</h2>
|
||||
|
||||
<p>This step is optional, but it’s 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 HA. This is a reasonably Linux oriented step, and will look different on other OS’s (or even other Linux distros).</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 config in <code>$HOME/.homeassistant</code> by default, so in this case, it would be in <code>/home/hass/.homeassistant</code></p>
|
||||
|
||||
<h2>Step 2: Create a directory for Home Assistant</h2>
|
||||
|
||||
<p>This can be anywhere you want, but I generally put stuff related to servers in /srv. 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>
|
||||
|
||||
<h2>Step 3: Become the new user</h2>
|
||||
|
||||
<p>This is obviously only necessary if you created a ‘hass’ user, but if you did, be sure to switch to that user whenever you install things in your virtualenv, otherwise you’ll 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 ‘su’ command means ‘switch’ user. We use the ‘-s’ flag because the hass user is a system user and doesn’t have a default shell by default (to prevent attackers from being able to log in as that user).</p>
|
||||
|
||||
<h2>Step 4: Set up the virtualenv</h2>
|
||||
|
||||
<p>All this step does is stick a Python environment in the directory we’re using. That’s it. It’s just a directory. There’s nothing ‘special’ about it, and it is entirely self-contained.</p>
|
||||
|
||||
<p>It will include a ‘bin’ directory, which will contain all the executables used in the virtualenv (including hass itself). It also includes a script called ‘activate’ 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>
|
||||
|
||||
<h2>Step 5: Activate the virtualenv</h2>
|
||||
|
||||
<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 ‘(hass)’.</p>
|
||||
|
||||
<h2>Step 6: Install Home Assistant</h2>
|
||||
|
||||
<p>Once your virtualenv has been activated, you don’t need to ‘sudo’ any of your pip commands. Pip will be installing things in the virtualenv, which our ‘hass’ 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 that’s it… you now have Home Assistant installed, and you can be sure that every bit of it is contained in /srv/hass</p>
|
||||
|
||||
<h2>Finally… Run Home Assistant</h2>
|
||||
|
||||
<p>There are two ways to launch Home Assistant. If you are ‘in’ 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 ‘hass’ executable in that bin directory I mentioned earlier. There is one caveat… Because Home Assistant stores it’s config in the user’s home directory, we need to be the hass user.</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 ‘-H’ flag is important. It sets the <code>$HOME</code> environment variable to <code>/home/hass</code> so hass can find its configs.</p>
|
||||
|
||||
<h2>Upgrading Home Assistant</h2>
|
||||
|
||||
<p>Upgrading HA is simple, just repeat steps 3, 5 and 6.</p>
|
||||
|
||||
<h2>Starting Home Assistant on boot</h2>
|
||||
|
||||
<p>The autostart instructions on home-assistant.io will work just fine, just be sure to replace <code>/usr/bin/hass</code> with <code>/srv/hass/bin/hass</code> and specify the ‘hass’ user where appropriate.</p>
|
||||
|
||||
<h2>Installing python-openzwave</h2>
|
||||
|
||||
<p>If you want to use Z Wave devices, you’ll need to install python-openzwave in your virtualenv. This requires a small tweak to the instructions on home-assistant.io</p>
|
||||
|
||||
<p>Install the dependencies as normal (note: you’ll need to do this as your normal user, since ‘hass’ isn’t 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 python-openzwave</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a class='active' href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</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">
|
||||
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>
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/presence-detection/';</script>
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -141,6 +133,53 @@ OwnTracks communicates directly with your MQTT broker, no data will pass through
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a class='active' href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/topics/templating/';</script>
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/troubleshooting-configuration/';</script>
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -189,6 +181,53 @@ Whenever you report an issue, be aware that we are volunteers who do not have ac
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a class='active' href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<script>document.location = '/getting-started/troubleshooting/';</script>
|
|
@ -53,17 +53,8 @@
|
|||
<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>Getting started <i class="icon icon-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration/'>Configuration Basics</a></li>
|
||||
<li><a href='/getting-started/devices/'>Adding devices</a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection</a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation</a></li>
|
||||
<li><a href='/topics/'>Advanced Topics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<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>
|
||||
|
@ -86,7 +77,8 @@
|
|||
|
||||
|
||||
<article class="page">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
|
@ -177,6 +169,53 @@ $ iptables-save > /etc/network/iptables.rules # your rules may be saved else
|
|||
</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-docker/'>Docker </a></li>
|
||||
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
|
||||
<li><a href='/getting-started/installation-virtualenv/'>Virtual Environment </a></li>
|
||||
<li><a class='active' href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Configuration
|
||||
<ul>
|
||||
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
|
||||
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
|
||||
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>
|
||||
<li><a href='/getting-started/automation/'>Automation </a></li>
|
||||
<li><a href='/getting-started/troubleshooting-configuration/'>Troubleshooting configuration.yaml </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Auto-start Home Assistant
|
||||
<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/'>macOS </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>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue