Site updated at 2016-06-05 14:12:13 UTC

This commit is contained in:
Travis CI 2016-06-05 14:12:13 +00:00
parent 78f980f8ba
commit 2d7d7cbeaa
53 changed files with 679 additions and 252 deletions

View file

@ -93,7 +93,7 @@
<p>Virtualenvs are pretty easy to setup. This example will walk through one method of setting one up (there are certainly others). Well be using Debian in this example (as many Home Assistant users are running Raspbian on a Raspberry Pi), but all of the Python related steps should be the same on just about any platform.</p>
<h2><a class="title-link" name="step-0-install-some-dependencies" href="#step-0-install-some-dependencies"></a> Step 0: Install some dependencies</h2>
<h3><a class="title-link" name="step-0-install-some-dependencies" href="#step-0-install-some-dependencies"></a> Step 0: Install some dependencies</h3>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo apt-get update
@ -104,7 +104,7 @@ $ sudo pip install --upgrade virtualenv
</div>
</div>
<h2><a class="title-link" name="step-1-create-a-home-assistant-user" href="#step-1-create-a-home-assistant-user"></a> Step 1: Create a Home Assistant user</h2>
<h3><a class="title-link" name="step-1-create-a-home-assistant-user" href="#step-1-create-a-home-assistant-user"></a> Step 1: Create a Home Assistant user</h3>
<p>This step is optional, but its a good idea to give services like Home Assistant their own user. It gives you more granular control over permissions, and reduces the exposure to the rest of your system in the event there is a security related bug in Home Assistant. This is a reasonably Linux oriented step, and will look different on other operating systems (or even other Linux distributions).</p>
@ -124,7 +124,7 @@ $ sudo pip install --upgrade virtualenv
</div>
</div>
<h2><a class="title-link" name="step-2-create-a-directory-for-home-assistant" href="#step-2-create-a-directory-for-home-assistant"></a> Step 2: Create a directory for Home Assistant</h2>
<h3><a class="title-link" name="step-2-create-a-directory-for-home-assistant" href="#step-2-create-a-directory-for-home-assistant"></a> Step 2: Create a directory for Home Assistant</h3>
<p>This can be anywhere you want. AS example we put it in <code>/srv</code>. You also need to change the ownership of the directory to the user you created above (if you created one).</p>
@ -134,7 +134,8 @@ $ sudo chown hass /srv/hass
</pre></div>
</div>
</div>
<p>## <a class="title-link" name="step-3-become-the-new-user" href="#step-3-become-the-new-user"></a> Step 3: Become the new user</p>
<h3><a class="title-link" name="step-3-become-the-new-user" href="#step-3-become-the-new-user"></a> Step 3: Become the new user</h3>
<p>This is obviously only necessary if you created a <code>hass</code> user, but if you did, be sure to switch to that user whenever you install things in your virtualenv, otherwise youll end up with mucked up permissions.</p>
@ -146,7 +147,7 @@ $ sudo chown hass /srv/hass
<p>The <code>su</code> command means switch user. We use the -s flag because the <code>hass</code> user is a system user and doesnt have a default shell by default (to prevent attackers from being able to log in as that user).</p>
<h2><a class="title-link" name="step-4-set-up-the-virtualenv" href="#step-4-set-up-the-virtualenv"></a> Step 4: Set up the virtualenv</h2>
<h3><a class="title-link" name="step-4-set-up-the-virtualenv" href="#step-4-set-up-the-virtualenv"></a> Step 4: Set up the virtualenv</h3>
<p>All this step does is stick a Python environment in the directory were using. Thats it. Its just a directory. Theres nothing special about it, and it is entirely self-contained.</p>
@ -168,7 +169,7 @@ $ sudo chown hass /srv/hass
<p>After that, your prompt should include <code>(hass)</code>.</p>
<h2><a class="title-link" name="step-6-install-home-assistant" href="#step-6-install-home-assistant"></a> Step 6: Install Home Assistant</h2>
<h3><a class="title-link" name="step-6-install-home-assistant" href="#step-6-install-home-assistant"></a> Step 6: Install Home Assistant</h3>
<p>Once your virtualenv has been activated, you dont need to <code>sudo</code> any of your <code>pip</code> commands. <code>pip</code> will be installing things in the virtualenv, which the <code>hass</code> user has permission to modify.</p>
@ -180,7 +181,7 @@ $ sudo chown hass /srv/hass
<p>And thats it… you now have Home Assistant installed, and you can be sure that every bit of it is contained in <code>/srv/hass</code>.</p>
<h2><a class="title-link" name="finally-run-home-assistant" href="#finally-run-home-assistant"></a> Finally… Run Home Assistant</h2>
<h3><a class="title-link" name="finally-run-home-assistant" href="#finally-run-home-assistant"></a> Finally… Run Home Assistant</h3>
<p>There are two ways to launch Home Assistant. If you are <strong>in</strong> the virtualenv, you can just run <code>hass</code> and it will work as normal. If the virtualenv is not activated, you just use the <code>hass</code> executable in the <code>bin</code> directory mentioned earlier. There is one caveat… Because Home Assistant stores its configuration in the users home directory, we need to be the user <code>hass</code> user or specify the configuration with <code>-c</code>.</p>
@ -192,15 +193,15 @@ $ sudo chown hass /srv/hass
<p>The <code>-H</code> flag is important. It sets the <code>$HOME</code> environment variable to <code>/home/hass</code> so <code>hass</code> can find its configuration.</p>
<h2><a class="title-link" name="upgrading-home-assistant" href="#upgrading-home-assistant"></a> Upgrading Home Assistant</h2>
<h3><a class="title-link" name="upgrading-home-assistant" href="#upgrading-home-assistant"></a> Upgrading Home Assistant</h3>
<p>Upgrading Home Assistant is simple, just repeat steps 3, 5 and 6.</p>
<h2><a class="title-link" name="starting-home-assistant-on-boot" href="#starting-home-assistant-on-boot"></a> Starting Home Assistant on boot</h2>
<h3><a class="title-link" name="starting-home-assistant-on-boot" href="#starting-home-assistant-on-boot"></a> Starting Home Assistant on boot</h3>
<p>The <a href="/getting-started/autostart/">autostart instructions</a> will work just fine, just be sure to replace <code>/usr/bin/hass</code> with <code>/srv/hass/bin/hass</code> and specify the <code>hass</code> user where appropriate.</p>
<h2><a class="title-link" name="installing-python-openzwave" href="#installing-python-openzwave"></a> Installing python-openzwave</h2>
<h3><a class="title-link" name="installing-python-openzwave" href="#installing-python-openzwave"></a> Installing python-openzwave</h3>
<p>If you want to use Z-Wave devices, you will need to install <code>python-openzwave</code> in your virtualenv. This requires a small tweak to the instructions on home-assistant.io</p>
@ -257,15 +258,16 @@ $ sudo chown hass /srv/hass
<li><a href='/getting-started/installation-raspberry-pi-all-in-one/'>Raspberry Pi All-In-One Installer </a></li>
<li><a href='/getting-started/installation-docker/'>Docker </a></li>
<li><a href='/getting-started/installation-synology/'>Synology NAS </a></li>
<li><a class='active' href='/getting-started/installation-virtualenv/'>VirtualEnv Linux </a></li>
<li><a class='active' href='/getting-started/installation-virtualenv/'>Virtualenv Linux </a></li>
<li><a href='/getting-started/updating/'>Updating </a></li>
<li><a href='/getting-started/troubleshooting/'>Troubleshooting </a></li>
</ul>
</li>
<li>
Configuration
<a href='/getting-started/configuration/'>Configuration </a>
<ul>
<li><a href='/getting-started/configuration/'>Configuration.yaml </a></li>
<li><a href='/getting-started/yaml/'>YAML </a></li>
<li><a href='/getting-started/basic/'>Basic information </a></li>
<li><a href='/getting-started/devices/'>Setting up devices </a></li>
<li><a href='/getting-started/customizing-devices/'>Customizing devices and services </a></li>
<li><a href='/getting-started/presence-detection/'>Presence Detection </a></li>