Site updated at 2015-09-10 19:39:00 UTC
This commit is contained in:
parent
718cb79e66
commit
3ce314c0a7
82 changed files with 2127 additions and 953 deletions
257
getting-started/advanced.html
Normal file
257
getting-started/advanced.html
Normal file
|
@ -0,0 +1,257 @@
|
|||
<!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>Advanced Installation - Home Assistant</title>
|
||||
<meta name="author" content="Paulus Schoutsen">
|
||||
|
||||
<meta name="description" content="Brief advanced installation tutorials.">
|
||||
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="canonical" href="https://home-assistant.io">
|
||||
|
||||
<meta property="fb:app_id" content="338291289691179">
|
||||
<meta property="og:title" content="Advanced Installation">
|
||||
<meta property="og:site_name" content="Home Assistant">
|
||||
<meta property="og:url" content="https://home-assistant.io/getting-started/advanced.html/">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="Brief advanced installation tutorials.">
|
||||
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
|
||||
<nav>
|
||||
<input type="checkbox" id="toggle">
|
||||
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
|
||||
<ul class="menu pull-right">
|
||||
<li>
|
||||
<a href="/getting-started/">Getting started</a>
|
||||
<ul>
|
||||
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
|
||||
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
|
||||
<li><a href='/components/'>Component overview</a></li>
|
||||
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/developers/">Developers</a>
|
||||
<ul>
|
||||
<li><a href="/developers/architecture.html">Architecture</a></li>
|
||||
<li><a href="/developers/frontend.html">Frontend development</a></li>
|
||||
<li><a href="/developers/creating_components.html">
|
||||
Creating components
|
||||
</a></li>
|
||||
<li><a href="/developers/add_new_platform.html">
|
||||
Adding platform support
|
||||
</a></li>
|
||||
<li><a href="/developers/api.html">API</a></li>
|
||||
<li><a href="/developers/credits.html">Credits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
<li><a href="/help/">Need help?</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid grid-center">
|
||||
|
||||
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
|
||||
|
||||
|
||||
<article class="page">
|
||||
|
||||
|
||||
<header>
|
||||
<h1 class="title indent">
|
||||
Advanced Installation
|
||||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
|
||||
|
||||
<p>Here are some general tutorials on how to setup some of the more advanced deployments that are frequently requested.</p>
|
||||
|
||||
<p><div class='advanced-installs-container'>
|
||||
<input name='advanced-installs' type='radio' id='upstart-install' checked>
|
||||
<input name='advanced-installs' type='radio' id='systemd-install'>
|
||||
<label class='menu-selector upstart' for='upstart-install'>Upstart Daemon</label>
|
||||
<label class='menu-selector systemd' for='systemd-install'>Systemd Daemon</label></p>
|
||||
|
||||
<p><div class='advanced-installs upstart'>
|
||||
Many linux distributions use the Upstart system (or similar) for managing daemons. Typically, systems based on Debian 7 or previous use Upstart. This includes Ubuntu releases before 15.04 and all current Raspian releases. If you are unsure if your system is using Upstart, you may check with the following command:</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>ps -p <span class="m">1</span> -o <span class="nv">comm</span><span class="o">=</span>
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<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/scripts/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:
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo service hass-daemon start
|
||||
</span><span class='line'>sudo service hass-daemon stop
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<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.
|
||||
</div> <!-- UPSTART --></p>
|
||||
|
||||
<p><div class='advanced-installs systemd'>
|
||||
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 systemd, you may check with the following command:</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>ps -p <span class="m">1</span> -o <span class="nv">comm</span><span class="o">=</span>
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<p>If the preceding command returns the string <code>systemd</code>, you are likely using systemd.</p>
|
||||
|
||||
<p>If you want Home Assistant to be launched automatically, an extra step is needed to setup systemd. You need a service file to control Home Assistant with systemd.</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
<span class='line-number'>4</span>
|
||||
<span class='line-number'>5</span>
|
||||
<span class='line-number'>6</span>
|
||||
<span class='line-number'>7</span>
|
||||
<span class='line-number'>8</span>
|
||||
<span class='line-number'>9</span>
|
||||
<span class='line-number'>10</span>
|
||||
<span class='line-number'>11</span>
|
||||
<span class='line-number'>12</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>su -c <span class="s1">'cat <<EOF >> /lib/systemd/system/home-assistant.service</span>
|
||||
</span><span class='line'><span class="s1">[Unit]</span>
|
||||
</span><span class='line'><span class="s1">Description=Home Assistant</span>
|
||||
</span><span class='line'><span class="s1">After=network.target</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'><span class="s1">[Service]</span>
|
||||
</span><span class='line'><span class="s1">Type=simple</span>
|
||||
</span><span class='line'><span class="s1">ExecStart=hass</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'><span class="s1">[Install]</span>
|
||||
</span><span class='line'><span class="s1">WantedBy=multi-user.target</span>
|
||||
</span><span class='line'><span class="s1">EOF'</span>
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<p>You need to reload systemd to make the daemon aware of the new configuration. Enable and launch Home Assistant after that.</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo systemctl –system daemon-reload
|
||||
</span><span class='line'>sudo systemctl <span class="nb">enable </span>home-assistant
|
||||
</span><span class='line'>sudo systemctl start home-assistant
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<p>If everything went well, <code>sudo systemctl start home-assistant</code> should give you a positive feedback.</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
<span class='line-number'>4</span>
|
||||
<span class='line-number'>5</span>
|
||||
<span class='line-number'>6</span>
|
||||
<span class='line-number'>7</span>
|
||||
<span class='line-number'>8</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>sudo systemctl status home-assistant -l
|
||||
</span><span class='line'>● home-assistant.service - Home Assistant
|
||||
</span><span class='line'> Loaded: loaded <span class="o">(</span>/usr/lib/systemd/system/home-assistant.service<span class="p">;</span> disabled<span class="p">;</span> vendor preset: disabled<span class="o">)</span>
|
||||
</span><span class='line'> Active: active <span class="o">(</span>running<span class="o">)</span> since Thu 2015-06-25 23:38:37 CEST<span class="p">;</span> 3min 13s ago
|
||||
</span><span class='line'> Main PID: <span class="m">8557</span> <span class="o">(</span>python3.4<span class="o">)</span>
|
||||
</span><span class='line'> CGroup: /system.slice/home-assistant.service
|
||||
</span><span class='line'> └─8557 /usr/bin/python3.4 -m homeassistant
|
||||
</span><span class='line'><span class="o">[</span>…<span class="o">]</span>
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<p>To get Home Assistant’s logging output, simple use <code>journalctl</code>.</p>
|
||||
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo journalctl -f -u home-assistant
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
</div> <!-- SYSTEMD --></p>
|
||||
|
||||
<h3><a href="/getting-started/index.html">« Back to Getting Started</a></h3>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
<div class="grid__item">
|
||||
<p class="copyright">
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -107,11 +107,11 @@
|
|||
<p>Home Assistant is not available on the Play Store. Instead, Home Assistant leverages the new <a href="https://w3c.github.io/manifest/">manifest.json support</a> to allow Android devices to add the web application to your homescreen as if it was a native application.</p>
|
||||
|
||||
<ol>
|
||||
<li> Open Chrome</li>
|
||||
<li> Navigate to your Home Assistant instance</li>
|
||||
<li> Click on the menu icon (three vertical dots)</li>
|
||||
<li> Click on Add to Homescreen</li>
|
||||
<li> A dialog will popup, click on Add</li>
|
||||
<li>Open Chrome</li>
|
||||
<li>Navigate to your Home Assistant instance</li>
|
||||
<li>Click on the menu icon (three vertical dots)</li>
|
||||
<li>Click on Add to Homescreen</li>
|
||||
<li>A dialog will popup, click on Add</li>
|
||||
</ol>
|
||||
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<hr class="divider">
|
||||
|
||||
|
||||
<p>By default, Home Assistant will create a configuration folder. Depending on your operating system this is <code>~/.homeassistant</code> (OS X/Linux) or <code>%APPDATA%/.homeassistant</code> (Windows). If you want to use a different folder for configuration, run <code>hass --config path/to/config</code>.</p></p>
|
||||
<p>Home Assistant will create a configuration folder when it is run for the first time. Depending on your operating system this is <code>~/.homeassistant</code> (OS X/Linux) or <code>%APPDATA%/.homeassistant</code> (Windows). If you want to use a different folder for configuration, run <code>hass --config path/to/config</code>.</p></p>
|
||||
|
||||
<p>Inside your configuration folder is the file <code>configuration.yaml</code>. This is the main file that contains which components will be loaded and what their configuration is. An example configuration file is located at <a href="https://github.com/balloob/home-assistant/blob/master/config/configuration.yaml.example"><code>here</code></a>.</p>
|
||||
|
||||
|
|
|
@ -104,313 +104,93 @@
|
|||
<hr class="divider">
|
||||
|
||||
|
||||
<div class='install-instructions-container'>
|
||||
<p><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'>
|
||||
<label class='menu-selector normal' for='normal-install'>Install on local machine</label>
|
||||
<label class='menu-selector raspberry' for='raspberry-install'>Install on a Raspberry Pi</label>
|
||||
<label class='menu-selector docker' for='docker-install'>Install using Docker</label>
|
||||
<div class='install-instructions normal'>
|
||||
<label class='menu-selector docker' for='docker-install'>Install using Docker</label></p>
|
||||
|
||||
<h3>Preparation</h3>
|
||||
<!-- ###### Preparation START ######################## -->
|
||||
<div class='prep-instructions-container'>
|
||||
<input name='prep-instructions' type='radio' id='generic-prep' checked>
|
||||
<input name='prep-instructions' type='radio' id='fedora-prep'>
|
||||
<input name='prep-instructions' type='radio' id='centos-prep'>
|
||||
<label class='menu-selector generic' for='generic-prep'>Generic</label>
|
||||
<label class='menu-selector fedora' for='fedora-prep'>Fedora</label>
|
||||
<label class='menu-selector centos' for='centos-prep'>CentOS</label>
|
||||
<p><h3>Installation</h3></p>
|
||||
|
||||
<!-- ###### Preparation instructions Generic ######################## -->
|
||||
<div class='prep-instructions generic'>
|
||||
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</a> installed and execute the following code in a console:
|
||||
<p><div class='install-instructions normal'>
|
||||
Installing and running Home Assistant on your local machine is easy. Make sure you have <a href='https://www.python.org/downloads/' target="_blank">Python 3.4</a> installed and execute the following code in a console:</p>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- ###### Preparation instructions Fedora ######################## -->
|
||||
<div class='prep-instructions fedora'>
|
||||
<p>The preparation of a <a href='https://fedoraproject.org'>Fedora</a> 22 host will only take a couple of minutes. First install Python 3.4 and the other needed packages out of the <a href='https://admin.fedoraproject.org/pkgdb'>Fedora Package Collection</a>. This ensure that you receive updates in the future.</p>
|
||||
|
||||
<p class='note'>
|
||||
It’s assumed that your user has an entry in the sudoers file. Otherwise, run the commands which needs more privileges as root.
|
||||
</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo dnf -y install python3 python3-devel gcc
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
</div>
|
||||
<!-- ##### Preparation instructions Centos ######################### -->
|
||||
<div class='prep-instructions centos'>
|
||||
|
||||
<p><a href='https://www.centos.org/'>CentOS</a> is providing longtime support and often not shipping the latest release of a software component. To run, Python 3.x on CentOS <a href='https://www.softwarecollections.org/en/scls/rhscl/rh-python34/'>Software Collections</a> needs to be activated.</p>
|
||||
|
||||
<h5>Step 1. Install the tools for the Software Collection</h5>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo yum -y install scl-utils
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<h5>Step 2. Make the repository available.</h5>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo yum -y install https://www.softwarecollections.org/en/scls/rhscl/rh-python34/epel-7-x86_64/download/rhscl-rh-python34-epel-7-x86_64.noarch.rpm
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<h5>Step 3. Install Python 3.x</h5>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo yum -y install rh-python34
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<h5>Step 4. Start using software collections:</h5>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>scl <span class="nb">enable </span>rh-python34 bash
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<!-- ###### Preparation END ######################## -->
|
||||
|
||||
<h3>Installation</h3>
|
||||
|
||||
<p>
|
||||
<p><p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pip3 install homeassistant
|
||||
</span><span class='line'>hass --open-ui
|
||||
</span><span class='line'>hass <span class="se">--</span>open-ui
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
</p>
|
||||
<p>Running these commands will:</p>
|
||||
<ol>
|
||||
<li>Install Home Assistant</li>
|
||||
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123'>http://localhost:8123</a></li>
|
||||
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123' target="_blank"><a href="http://localhost:8123">http://localhost:8123</a></a></li>
|
||||
</ol>
|
||||
<br />
|
||||
</div> <!-- INSTALL-INSTRUCTIONS NORMAL --></p>
|
||||
|
||||
<!-- ###### Post-Installation START ######################## -->
|
||||
<h3>Post-Installation</h3>
|
||||
<p><div class='install-instructions docker'>
|
||||
<p>Installation with Docker is straightforward. Adjust the following command so that <code>/path/to/your/config/</code> points at the folder where you want to store your config and run it:</p></p>
|
||||
|
||||
<div class='post-instructions-container'>
|
||||
<input name='post-instructions' type='radio' id='generic-post' checked>
|
||||
<input name='post-instructions' type='radio' id='fedora-post'>
|
||||
<input name='post-instructions' type='radio' id='debian-post'>
|
||||
<label class='menu-selector generic-post' for='generic-post'>Generic</label>
|
||||
<label class='menu-selector fedora-post' for='fedora-post'>Fedora/CentOS</label>
|
||||
<!-- <label class='menu-selector debian-post' for='debian-post'>Debian</label> –>
|
||||
<p><figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>docker run -d <span class="se">--</span><span class="nv">name</span><span class="o">=</span><span class="s2">"home-assistant"</span> -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro <span class="se">--</span><span class="nv">net</span><span class="o">=</span>host balloob/home-assistant
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<!-- ###### Post-installation instructions Generic ######################## -->
|
||||
<div class='post-instructions generic-post'>
|
||||
<p>There is nothing else to do. If you run into any issues, please see the <a href='/getting-started/troubleshooting.html'>troubleshooting page</a>.</p>
|
||||
<p><p>This will launch Home Assistant and serve its web interface from port 8123 on your Docker host.</p></p>
|
||||
|
||||
<p>If you want to see what Home Assistant can do, you can start the demo mode by running <code>hass --demo-mode</code>.</p>
|
||||
|
||||
<p>In the future, if you want to update to the latest version, run <code>pip3 install --upgrade home-assistant</code>.</p>
|
||||
|
||||
</div>
|
||||
<!-- ###### Post-installation instructions Fedora/CentOS ######################## -->
|
||||
<div class='post-instructions fedora-post'>
|
||||
<p>By default, the access to port 8123 is not allowed. If you want to allow other hosts in your local network access, open port 8123.</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo firewall-cmd --permanent --add-port<span class="o">=</span>8123/tcp
|
||||
</span><span class='line'>sudo firewall-cmd --reload
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
<p>Home Assistant will serve its web interface on <a href='http://[IP address of the host]:8123'>http://[IP address of the host]:8123</a>.</p>
|
||||
|
||||
<p>If you want that Home Assistant is lauched automatically, an extra step is needed to setup <code>systemd</code>. You need a service file to control Home Assistant with <code>systemd</code>. <!-- The <code>WorkingDirectory</code> and the <code>PYTHONPATH</code> must point to your clone git repository. –></p>
|
||||
|
||||
<!-- WorkingDirectory=/home/fab/home-assistant/
|
||||
Environment="PYTHONPATH=/home/fab/home-assistant/" -->
|
||||
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
<span class='line-number'>4</span>
|
||||
<span class='line-number'>5</span>
|
||||
<span class='line-number'>6</span>
|
||||
<span class='line-number'>7</span>
|
||||
<span class='line-number'>8</span>
|
||||
<span class='line-number'>9</span>
|
||||
<span class='line-number'>10</span>
|
||||
<span class='line-number'>11</span>
|
||||
<span class='line-number'>12</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>su -c <span class="s1">'cat <<EOF >> /lib/systemd/system/home-assistant.service</span>
|
||||
</span><span class='line'><span class="s1">[Unit]</span>
|
||||
</span><span class='line'><span class="s1">Description=Home Assistant</span>
|
||||
</span><span class='line'><span class="s1">After=network.target</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'><span class="s1">[Service]</span>
|
||||
</span><span class='line'><span class="s1">Type=simple</span>
|
||||
</span><span class='line'><span class="s1">ExecStart=/usr/bin/python3.4 -m homeassistant</span>
|
||||
</span><span class='line'>
|
||||
</span><span class='line'><span class="s1">[Install]</span>
|
||||
</span><span class='line'><span class="s1">WantedBy=multi-user.target</span>
|
||||
</span><span class='line'><span class="s1">EOF'</span>
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<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>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo systemctl --system daemon-reload
|
||||
</span><span class='line'>sudo systemctl <span class="nb">enable </span>home-assistant
|
||||
</span><span class='line'>sudo systemctl start home-assistant
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p>If everything went well, <code>sudo systemctl start home-assistant</code> should give you a positive feedback.</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
<span class='line-number'>4</span>
|
||||
<span class='line-number'>5</span>
|
||||
<span class='line-number'>6</span>
|
||||
<span class='line-number'>7</span>
|
||||
<span class='line-number'>8</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>sudo systemctl status home-assistant -l
|
||||
</span><span class='line'>● home-assistant.service - Home Assistant
|
||||
</span><span class='line'> Loaded: loaded <span class="o">(</span>/usr/lib/systemd/system/home-assistant.service<span class="p">;</span> disabled<span class="p">;</span> vendor preset: disabled<span class="o">)</span>
|
||||
</span><span class='line'> Active: active <span class="o">(</span>running<span class="o">)</span> since Thu 2015-06-25 23:38:37 CEST<span class="p">;</span> 3min 13s ago
|
||||
</span><span class='line'> Main PID: <span class="m">8557</span> <span class="o">(</span>python3.4<span class="o">)</span>
|
||||
</span><span class='line'> CGroup: /system.slice/home-assistant.service
|
||||
</span><span class='line'> └─8557 /usr/bin/python3.4 -m homeassistant
|
||||
</span><span class='line'><span class="o">[</span>...<span class="o">]</span>
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p>To get Home Assistant’s logging output, simple use <code>journalctl</code>.</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo journalctl -f -u home-assistant
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p>In the future, if you want to update to the latest version, run <code>pip3 install --upgrade home-assistant</code>.</p>
|
||||
|
||||
<p class='note'>
|
||||
Those instructions were written for Fedora 22 Server and Workstation. They may work for Cloud flavor as well but this was not tested.
|
||||
<p><p class='note'>
|
||||
When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace <code>-v /etc/localtime:/etc/localtime:ro</code> with <code>-e “TZ=America/Los_Angeles”</code> (replacing America/Los_Angeles with <a href='http://en.wikipedia.org/wiki/List_of_tz_database_time_zones' target="_blank">your timezone</a>)
|
||||
</p>
|
||||
</div> <!-- INSTALL-INSTRUCTIONS DOCKER --></p>
|
||||
|
||||
<p><div class='install-instructions raspberry'>
|
||||
<p>Home Assistant uses Python 3.4 which is not shipped with the current Raspbian distibution for the Raspberry Pi. Before installing Home Assistant, you will have to <a href="http://depado.markdownblog.com/2015-03-12-short-tutorial-raspbian-python3-4-rpi-gpio" target="_blank">install Python 3.4</a>.</p>
|
||||
|
||||
</div>
|
||||
<!-- ##### Post-installation instructions Debian ######################### -->
|
||||
<div class='post-instructions debian-post'>
|
||||
<p>Once that is complete, installing and running Home Assistant on your local machine is easy. Make sure you have <a href='https://www.python.org/downloads/' target="_blank">Python 3.4</a> installed and execute the following code in a console:</p>
|
||||
|
||||
<p>Coming soon…</p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<!-- ###### Post-installation END ######################## -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ###### Docker START ######################## -->
|
||||
<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>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>docker run -d --name<span class="o">=</span><span class="s2">"home-assistant"</span> -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net<span class="o">=</span>host balloob/home-assistant
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p>This will launch Home Assistant and serve its 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>
|
||||
|
||||
<!-- ###### Paspberry Pi START ######################## -->
|
||||
<div class='install-instructions raspberry'>
|
||||
|
||||
<p>Home Assistant uses Python 3.4. This makes installation on a Raspberry Pi a bit more difficult as it is not available in the package repository. Please follow the following instructions to get it up and running.</p>
|
||||
|
||||
<p><b>Step 1. Install pyenv</b></p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer <span class="p">|</span> bash
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p>After the installation is done, run:</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>nano ~/.bashrc
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p>Then add these lines to the end of the file and save:</p>
|
||||
<p><p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
<span class='line-number'>3</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nb">export </span><span class="nv">PATH</span><span class="o">=</span><span class="s2">"$HOME/.pyenv/bin:$PATH"</span>
|
||||
</span><span class='line'><span class="nb">eval</span> <span class="s2">"$(pyenv init -)"</span>
|
||||
</span><span class='line'><span class="nb">eval</span> <span class="s2">"$(pyenv virtualenv-init -)"</span>
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<h5>Step 2. Install requirements</h5>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo apt-get install python3-dev
|
||||
</span><span class='line'>sudo apt-get install libsqlite3-dev libreadline-dev libbz2-dev
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p>Log out and then back in so your bashrc is reloaded.</p>
|
||||
|
||||
<p class='note'>
|
||||
NOTE: the rest of the commands are not being run as sudo and will install python etc under you user’s home directory.
|
||||
</p>
|
||||
|
||||
<p><b>Step 3. Install python 3.4.2 (this will take a few hours)</b></p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pyenv install 3.4.2
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p><b>Step 4. Create Python Virtual Environment</b></p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pyenv virtualenv 3.4.2 homeassistant
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p><b>Step 5. Set the virtual environment</b></p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nb">cd </span>home-assistant
|
||||
</span><span class='line'>pyenv <span class="nb">local </span>homeassistant
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
<p><b>Step 6. Install Home Assistant</b></p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pip3 install homeassistant
|
||||
</span><span class='line'>hass <span class="se">--</span>open-ui
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
</p>
|
||||
<p>Running these commands will:</p>
|
||||
<ol>
|
||||
<li>Install Home Assistant</li>
|
||||
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123' target="_blank"><a href="http://localhost:8123">http://localhost:8123</a></a></li>
|
||||
</ol>
|
||||
</div> <!-- INSTALL-INSTRUCTIONS RASPBERRY --></p>
|
||||
|
||||
<p><b>Step 7. Start it up</b></p>
|
||||
<p><h3>Troubleshooting</h3></p>
|
||||
|
||||
<p><p>If you run into any issues, please see the <a href='/getting-started/troubleshooting.html'>troubleshooting page</a>. It contains solutions to many of the more commonly encountered issues.</p></p>
|
||||
|
||||
<p><p>For additional help, in addition to this site, there are three sources:
|
||||
<ul>
|
||||
<li><a href="https://gitter.im/balloob/home-assistant" target="_blank">Gitter Chatroom</a> for general Home Assistant discussions and questions.</li>
|
||||
<li><a href="https://groups.google.com/forum/#!forum/home-assistant-dev" target="_blank">Development Mailing List</a> for development related questions and discussing new features.</li>
|
||||
<li><a href="https://github.com/balloob/home-assistant" target="_blank">GitHub Page</a> for issue reporting.</li>
|
||||
</ul>
|
||||
</p></p>
|
||||
|
||||
<p><h3>Staying Up to Date</h3>
|
||||
<p>In order to update Home Assistant to the latest stable release, simply type the following into a console:</p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>hass
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pip3 install <span class="se">--</span>upgrade homeassistant
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
<p>If you would like to stay up to date with the newest unstable builds (alphas, betas, and release candidates), use this command:</p>
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pip3 install <span class="se">--</span>upgrade <span class="se">--</span>pre homeassistant
|
||||
</span></code></pre></td></tr></table></div></figure></p>
|
||||
|
||||
<p>It will be up and running on port 8123</p>
|
||||
<p><h3>What’s Next</h3>
|
||||
<p>If you want to see what Home Assistant can do, you can start the demo mode by running <code>hass --demo-mode</code>. Home Assistant has a few other command line flags that can be displayed by running <code>hass --help</code>.</p>
|
||||
<p>From here you may now start configuring Home Assistant to your liking. For more advanced users, the <a href='/getting-started/advanced.html'>advanced configuration page</a> contains brief tutorials on creating more advanced installations.</p></p>
|
||||
|
||||
<p>In the future, if you want to update to the latest version, run <code>pip3 install --upgrade home-assistant</code>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h3><a href="/getting-started/configuration.html">Next step: configuring Home Assistant »</a></h3>
|
||||
<h3><a href="/getting-started/configuration.html">Next step: Configuring Home Assistant »</a></h3>
|
||||
|
||||
|
||||
</article>
|
||||
|
|
|
@ -112,7 +112,7 @@ This utility should have been installed as part of the Python 3.4 installation.
|
|||
is installed by running <code>python3 --version</code>. If it is not installed,
|
||||
<a href="https://www.python.org/getit/">download it here</a>.</p>
|
||||
|
||||
<p>If you are to succesfully run <code>python3 --version</code> but not <code>pip3</code>, run the following command instead
|
||||
<p>If you are able to successfully run <code>python3 --version</code> but not <code>pip3</code>, run the following command instead
|
||||
to install Home Assistant: <code>python3 -m pip install homeassistant</code>.</p>
|
||||
|
||||
<p><strong>No module named pip</strong><br>
|
||||
|
@ -122,10 +122,39 @@ by some distributions. If you are unable to run <code>python3 -m pip --version</
|
|||
<code>python3 get-pip.py</code>.</p>
|
||||
|
||||
<p><strong>No access to the frontend</strong><br>
|
||||
In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host are very limited.
|
||||
This means that you can’t access the Home Assistant Frontend that is running on a host in your
|
||||
network. Check the Post-installation section on the <a href="/getting-started/">Getting started</a> page and
|
||||
follow the instruction that match your distribution to allow access to port 8123.</p>
|
||||
In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host is very limited.
|
||||
This means that you can’t access the Home Assistant Frontend that is running on a host outside of the host machine. Windows and OSX machines may also have issues with this.</p>
|
||||
|
||||
<p>To fix this you will need to open your machine’s firewall for TCP traffic over port 8123. The method for doing this will vary depending on your operating system and the firewall you have installed. Below are some suggestions to try. Google is your friend here.</p>
|
||||
|
||||
<p><a href="http://windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7">Windows</a> and <a href="https://support.apple.com/en-us/HT201642">Mac OSX</a> have good instructions posted.</p>
|
||||
|
||||
<p>For firewalld systems (Fedora, RHEL, etc.):</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo firewall-cmd --permanent --add-port<span class="o">=</span>8123/tcp
|
||||
</span><span class='line'>sudo firewall-cmd --reload
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
|
||||
<p>For UFW systems (Ubuntu, Debian, Raspbian, etc.):</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>sudo ufw allow 8123/tcp
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
|
||||
<p>For iptables systems (usually the default):</p>
|
||||
|
||||
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
|
||||
<span class='line-number'>2</span>
|
||||
</pre></td><td class='code'><pre><code class='bash'><span class='line'>iptables -I INPUT -p tcp --dport <span class="m">8123</span> -j ACCEPT
|
||||
</span><span class='line'>iptables-save > /etc/network/iptables.rules <span class="c"># your rules may be saved elsewhere</span>
|
||||
</span></code></pre></td></tr></table></div></figure>
|
||||
|
||||
|
||||
<h3><a href="/getting-started/index.html">« Back to Getting Started</a></h3>
|
||||
|
||||
|
||||
</article>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue