Site updated at 2015-08-18 04:09:54 UTC

This commit is contained in:
Paulus Schoutsen 2015-08-17 21:09:54 -07:00
parent 872bf48dd0
commit 1e8bb05106
48 changed files with 1240 additions and 434 deletions

View file

@ -157,7 +157,7 @@ It’s assumed that your user has an entry in the sudoers file. Otherwise, r
<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 rhscl-rh-python34-*.noarch.rpm
</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>
@ -169,7 +169,7 @@ It&#8217;s assumed that your user has an entry in the sudoers file. Otherwise, r
<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'>sudo scl <span class="nb">enable </span>rh-python34 bash
</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>
@ -179,10 +179,6 @@ It&#8217;s assumed that your user has an entry in the sudoers file. Otherwise, r
<br />
<!-- ###### Preparation END ######################## -->
<h3>Installation</h3>
<p>
@ -206,7 +202,22 @@ It&#8217;s assumed that your user has an entry in the sudoers file. Otherwise, r
<li>Activate the isolated environment (on Windows, run <code>Scripts/activate.bat</code>)</li>
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123'>http://localhost:8123</a></li>
</ol>
<p>If you run into any issues, please see the <a href='/getting-started/troubleshooting.html'>troubleshooting page</a>.</p>
<br />
<!-- ###### Post-Installation START ######################## -->
<h3>Post-Installation</h3>
<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>
<!-- ###### 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 class='note'>
You can run Home Assistant in demo mode by appending <code>--demo-mode</code> to line 5.
@ -216,8 +227,115 @@ It&#8217;s assumed that your user has an entry in the sudoers file. Otherwise, r
If you want to update to the latest version in the future, run: <code>scripts/update</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>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>su -c <span class="s1">&#39;cat &lt;&lt;EOF &gt;&gt; /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">WorkingDirectory=/home/fab/home-assistant/</span>
</span><span class='line'><span class="s1">Environment=&quot;PYTHONPATH=/home/fab/home-assistant/&quot;</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&#39;</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&#8217;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 class='note'>
If you want to update to the latest version in the future, run: <code>scripts/update</code> and restart Home Assistant.
</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>
</div>
<!-- ##### Post-installation instructions Debian ######################### -->
<div class='post-instructions debian-post'>
<p>Coming soon&#8230;</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>
@ -233,6 +351,7 @@ When using boot2docker on OS X you are unable to map the local time to your Dock
</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>

View file

@ -111,7 +111,7 @@
Check if Python 3.4 is installed by running <code>python3 --version</code>. If it is not installed, <a href="https://www.python.org/getit/">download it here</a>.</p>
<p><strong>No module named pip</strong><br>
Pip should come bundled with the latest Python 3 but is ommitted by some distributions. If you are unable to run <code>python3 -m pip --version</code> you can install pip by <a href="https://bootstrap.pypa.io/get-pip.py">downloading the installer</a> and run it with Python 3: <code>python3 get-pip.py</code>.</p>
<a href="https://pip.pypa.io/en/stable/">Pip</a> should come bundled with the latest Python 3 but is ommitted by some distributions. If you are unable to run <code>python3 -m pip --version</code> you can install <code>pip</code> by <a href="https://bootstrap.pypa.io/get-pip.py">downloading the installer</a> and run it with Python 3: <code>python3 get-pip.py</code>.</p>
<p><strong>git: command not found</strong><br>
Check if Git is installed by running <code>git --version</code>. If you are unable to run this command you can install it by following <a href="http://git-scm.com/downloads">these instructions</a>.</p>
@ -127,7 +127,7 @@ There is a problem with installing dependencies on the fly. Install the dependen
<p><strong>Ubuntu 14.04: &hellip; returned non-zero exit status</strong><br>
There is a known issue with installing on Ubuntu 14.04 and possibly many other newer Debian based distributions. The venv Python 3.4 package that has been bundled in the apt-get repository are known to be broken. This has been documented <a href="https://bugs.launchpad.net/ubuntu/+source/python3.4/+bug/1290847">in this bug report</a>. If you are encountering an error that looks like the following while creating the virtual environment, you are experiencing this bug.</p>
There is a known issue with installing on Ubuntu 14.04 and possibly many other newer Debian based distributions. The <code>venv</code> Python 3.4 package that has been bundled in the apt-get repository are known to be broken. This has been documented <a href="https://bugs.launchpad.net/ubuntu/+source/python3.4/+bug/1290847">in this bug report</a>. If you are encountering an error that looks like the following while creating the virtual environment, you are experiencing this bug.</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'>Error: Command <span class="s1">&#39;[&#39;</span>home-assistant/bin/python3.4<span class="s1">&#39;, &#39;</span>-Im<span class="s1">&#39;, &#39;</span>ensurepip<span class="s1">&#39;, &#39;</span>--upgrade<span class="s1">&#39;, &#39;</span>--default-pip<span class="s1">&#39;]&#39;</span> returned non-zero <span class="nb">exit </span>status
@ -147,7 +147,10 @@ There is a known issue with installing on Ubuntu 14.04 and possibly many other n
</span></code></pre></td></tr></table></div></figure>
<p>After these commands have been successfully executed, the venv package will be fixed system-wide.</p>
<p>After these commands have been successfully executed, the <code>venv</code> package will be fixed system-wide.</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&rsquo;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/index.html">Getting started</a> page and follow the instruction that match your distribution to allow access to port 8123.</p>
</article>