Site updated at 2016-05-13 21:09:20 UTC

This commit is contained in:
Travis CI 2016-05-13 21:09:20 +00:00
parent ebea4ecf27
commit 26e61e4377
20 changed files with 58 additions and 65 deletions

View file

@ -4,7 +4,7 @@
<title><![CDATA[Home Assistant]]></title>
<link href="https://home-assistant.io/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Community | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/community/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: ESP8266 | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/esp8266/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: How-To | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/how-to/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: iBeacons | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/ibeacons/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Internet-of-Things | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/internet-of-things/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: MQTT | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/mqtt/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Organisation | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/organisation/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: OwnTracks | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/owntracks/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Presence-Detection | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/presence-detection/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Public-Service-Announcement | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/public-service-announcement/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Release-Notes | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/release-notes/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Survey | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/survey/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Talks | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/talks/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: User-Stories | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/user-stories/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Video | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/video/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Website | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/website/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-05-13T20:25:08+00:00</updated>
<updated>2016-05-13T21:08:43+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -89,30 +89,30 @@
<hr class="divider">
<p>Easily deploy a complete Home Assistant server, with Websocket MQTT and Z-Wave driver support using Fabric!</p>
<p>The “<a href="https://github.com/jbags81/fabric-home-assistant">Raspberry Pi All-In-One Installer</a>” deploy a complete Home Assistant server including support for MQTT with websocket support and Z-Wave using <a href="http://www.fabfile.org/">Fabric</a>.</p>
<p>Requirements before installation:</p>
<ul>
<li>You have a Raspberry Pi with a fresh install of <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian Jessie/Jessie-Lite</a>.</li>
<li>You are able to SSH into your Raspberry Pi</li>
<li>You have a computer running Python 3</li>
<li>You have a Raspberry Pi with a fresh installation of <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian Jessie/Jessie Lite</a> or Debian 8 connected to your network.</li>
<li>You are able to SSH into your Raspberry Pi.</li>
<li>You have a computer with Python 3 and <code>git</code> installed.</li>
</ul>
<p>Installation instructions (all from your PC):</p>
<ol>
<li>Install fabric: <code>pip3 install fabric3</code></li>
<li>Clone the script: <code>git clone https://github.com/jbags81/fabric-home-assistant.git</code></li>
<li>Change directory: <code>cd fabric-home-assistant</code></li>
<li>Edit <code>fabfile.py</code> and add the host info of your Raspberry Pi.</li>
<li>Clone the repository: <code>git clone https://github.com/jbags81/fabric-home-assistant.git</code></li>
<li>Change the directory: <code>cd fabric-home-assistant</code></li>
<li>Edit the <code>fabfile.py</code> file and add the hostname or the IP address of your Raspberry Pi to <code>env.hosts</code>. If you are using Debian 8 then replace the username <code>pi</code> in the <code>fabfile.py</code> file with your Debian user as well.</li>
<li>Build your new Home Assistant server: <code>fab deploy</code></li>
<li>Reboot your Raspberry Pi</li>
<li>Reboot your Raspberry Pi.</li>
</ol>
<p>Once rebooted, your Raspberry Pi will be up and running with Home Assistant. You can access it from <strong>http://your_raspberry_pi_ip:8123</strong>.</p>
<p>Once rebooted, your Raspberry Pi will be up and running with Home Assistant. You can access it at <strong>http://your_raspberry_pi_ip:8123</strong>.</p>
<p>The Home Assistant config is located at <code>/home/hass</code>. The virtualenv with the Home Assistant installation is located at <code>/srv/hass/hass_venv</code>.</p>
<p>The Home Assistant configuration is located at <code>/home/hass</code>. The virtualenv with the Home Assistant installation is located at <code>/srv/hass/hass_venv</code>.</p>
<p>The All-In-One Fabric script will do the following automatically:</p>
@ -130,13 +130,6 @@
<p>Fabric allows any of the underlying functions to be ran individually as well. Run <code>fab -l</code> to see a list of all callable jobs.</p>
<p>Tested with:</p>
<ul>
<li>Raspbian Jessie</li>
<li>Raspbian Jessie-Lite</li>
<li>Debian 8 (Replace username “pi” in fabfile.py with debian user)</li>
</ul>
</article>

View file

@ -89,17 +89,17 @@
<hr class="divider">
<p>There are several reasons why it makes sense to run Home Assistant in a virtual environment. A virtualenv encapsulates all aspect of a Python environment within a single directory tree. That means the Python packages you install for Home Assistant wont interact with the rest of your system and vice-versa. It means a random upgrade for some other program on your computer wont break Home Assitant, and it means you dont need to install Python packages as root.</p>
<p>There are several reasons why it makes sense to run Home Assistant in a virtual environment. A <a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a> encapsulates all aspect of a Python environment within a single directory tree. That means the Python packages you install for Home Assistant wont interact with the rest of your system and vice-versa. It means a random upgrade for some other program on your computer wont break Home Assitant, and it means you dont need to install Python packages as root.</p>
<p>Virtualenvs are pretty easy to setup. This example will walk through one method of setting one up (there are certainly others). Well be using Debian in this example (as many Home Assistant users are running Raspbian on a Raspberry Pi), but all of the Python related steps should be the same on just about any platform.</p>
<h2><a class="title-link" name="step-0-install-some-dependencies" href="#step-0-install-some-dependencies"></a> 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
<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>
@ -109,7 +109,7 @@ sudo pip install --upgrade virtualenv
<p>This step is optional, but its a good idea to give services like Home Assistant their own user. It gives you more granular control over permissions, and reduces the exposure to the rest of your system in the event there is a security related bug in Home Assistant. This is a reasonably Linux oriented step, and will look different on other operating systems (or even other Linux distributions).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>sudo adduser --system hass
<div class="code"><pre>$ sudo adduser --system hass
</pre></div>
</div>
</div>
@ -119,41 +119,41 @@ sudo pip install --upgrade virtualenv
<p>If you plan to use a Z-Wave controller, you will need to add this user to the <code>dialout</code> group</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>sudo usermod -G dialout -a hass
<div class="code"><pre>$ sudo usermod -G dialout -a hass
</pre></div>
</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>
<p>This can be anywhere you want, but I generally put stuff related to servers 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>
<p>This can be anywhere you want. AS example we put it in <code>/srv</code>. You also need to change the ownership of the directory to the user you created above (if you created one).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>sudo mkdir /srv/hass
sudo chown hass /srv/hass
<div class="code"><pre>$ sudo mkdir /srv/hass
$ 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>
<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 youll end up with mucked up permissions.</p>
<p>This is obviously only necessary if you created a <code>hass</code> user, but if you did, be sure to switch to that user whenever you install things in your virtualenv, otherwise youll end up with mucked up permissions.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>sudo su -s /bin/bash hass
<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 doesnt have a default shell by default (to prevent attackers from being able to log in as that user).</p>
<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>
<p>All this step does is stick a Python environment in the directory were using. Thats it. Its just a directory. Theres nothing special about it, and it is entirely self-contained.</p>
<p>It will include a 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>
<p>It will include a <code>bin</code> directory, which will contain all the executables used in the virtualenv (including hass itself). It also includes a script called <code>activate</code> which we will use to activate the virtualenv.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>virtualenv -p python3 /srv/hass
<div class="code"><pre>$ virtualenv -p python3 /srv/hass
</pre></div>
</div>
</div>
@ -161,36 +161,36 @@ sudo chown hass /srv/hass
<h2><a class="title-link" name="step-5-activate-the-virtualenv" href="#step-5-activate-the-virtualenv"></a> Step 5: Activate the virtualenv</h2>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>source /srv/hass/bin/activate
<div class="code"><pre>$ source /srv/hass/bin/activate
</pre></div>
</div>
</div>
<p>After that, your prompt should include (hass).</p>
<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>
<p>Once your virtualenv has been activated, you dont need to <code>sudo</code> any of your pip commands. Pip will be installing things in the virtualenv, which our hass user has permission to modify.</p>
<p>Once your virtualenv has been activated, you dont need to <code>sudo</code> any of your <code>pip</code> commands. <code>pip</code> will be installing things in the virtualenv, which the <code>hass</code> user has permission to modify.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>(hass)pip3 install --upgrade homeassistant
<div class="code"><pre>(hass)$ pip3 install --upgrade homeassistant
</pre></div>
</div>
</div>
<p>And thats it… you now have Home Assistant installed, and you can be sure that every bit of it is contained in /srv/hass</p>
<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>
<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 <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>
<p>There are two ways to launch Home Assistant. If you are <strong>in</strong> the virtualenv, you can just run <code>hass</code> and it will work as normal. If the virtualenv is not activated, you just use the <code>hass</code> executable in the <code>bin</code> directory mentioned earlier. There is one caveat… Because Home Assistant stores its configuration in the users home directory, we need to be the user <code>hass</code> user or specify the configuration with <code>-c</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>sudo -u hass -H /srv/hass/bin/hass
<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 <code>hass</code> can find its configuration.</p>
<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>
@ -204,7 +204,7 @@ sudo chown hass /srv/hass
<p>If you want to use Z-Wave devices, you will need to install <code>python-openzwave</code> in your virtualenv. This requires a small tweak to the instructions on home-assistant.io</p>
<p>Install the dependencies as normal (Note: youll need to do this as your normal user, since hass isnt a sudoer).</p>
<p>Install the dependencies as normal (Note: you will need to do this as your normal user, since <code>hass</code> isnt a sudoer).</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools
@ -220,7 +220,7 @@ sudo chown hass /srv/hass
</div>
</div>
<p>Finally, get and install python-openzwave</p>
<p>Finally, get and install <code>python-openzwave</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>(hass)$ mkdir /srv/hass/src

View file

@ -1600,26 +1600,26 @@
</url>
<url>
<loc>https://home-assistant.io/demo/frontend.html</loc>
<lastmod>2016-05-13T20:24:27+00:00</lastmod>
<lastmod>2016-05-13T21:08:05+00:00</lastmod>
</url>
<url>
<loc>https://home-assistant.io/demo/index.html</loc>
<lastmod>2016-05-13T20:24:27+00:00</lastmod>
<lastmod>2016-05-13T21:08:05+00:00</lastmod>
</url>
<url>
<loc>https://home-assistant.io/googlef4f3693c209fe788.html</loc>
<lastmod>2016-05-13T20:24:27+00:00</lastmod>
<lastmod>2016-05-13T21:08:05+00:00</lastmod>
</url>
<url>
<loc>https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html</loc>
<lastmod>2016-05-13T20:24:27+00:00</lastmod>
<lastmod>2016-05-13T21:08:05+00:00</lastmod>
</url>
<url>
<loc>https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html</loc>
<lastmod>2016-05-13T20:24:27+00:00</lastmod>
<lastmod>2016-05-13T21:08:05+00:00</lastmod>
</url>
<url>
<loc>https://home-assistant.io/static/mdi-demo.html</loc>
<lastmod>2016-05-13T20:24:27+00:00</lastmod>
<lastmod>2016-05-13T21:08:05+00:00</lastmod>
</url>
</urlset>