From ec9136cf7f030abb2d8793df1b2ef3a375b233ce Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 16 Dec 2017 11:07:29 +0000 Subject: [PATCH] Site updated at 2017-12-16 11:07:28 UTC --- atom.xml | 2 +- blog/categories/announcements/atom.xml | 2 +- blog/categories/community/atom.xml | 2 +- blog/categories/device-tracking/atom.xml | 2 +- blog/categories/esp8266/atom.xml | 2 +- blog/categories/how-to/atom.xml | 2 +- blog/categories/ibeacons/atom.xml | 2 +- blog/categories/internet-of-things/atom.xml | 2 +- blog/categories/iot-data/atom.xml | 2 +- blog/categories/media/atom.xml | 2 +- blog/categories/merchandise/atom.xml | 2 +- blog/categories/micropython/atom.xml | 2 +- blog/categories/mqtt/atom.xml | 2 +- blog/categories/organisation/atom.xml | 2 +- blog/categories/owntracks/atom.xml | 2 +- blog/categories/presence-detection/atom.xml | 2 +- .../public-service-announcement/atom.xml | 2 +- blog/categories/release-notes/atom.xml | 2 +- blog/categories/survey/atom.xml | 2 +- blog/categories/talks/atom.xml | 2 +- blog/categories/technology/atom.xml | 2 +- blog/categories/user-stories/atom.xml | 2 +- blog/categories/video/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- docs/installation/virtualenv/index.html | 100 +++++++----------- sitemap.xml | 80 +++++++------- 26 files changed, 101 insertions(+), 127 deletions(-) diff --git a/atom.xml b/atom.xml index 3c17cd4015..2d1881e33d 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml index b91d666ad0..89f77cb825 100644 --- a/blog/categories/announcements/atom.xml +++ b/blog/categories/announcements/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Announcements | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 7cae05d0fe..3d828b8266 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 8f78b3383e..84f261b2f8 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 7fb2ef5259..b41363aba6 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 7589677467..459886dfb8 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 70c9776442..c74a56c68e 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 13bb3101d3..9816693431 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 4add974909..1ac72adee2 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/media/atom.xml b/blog/categories/media/atom.xml index e4a0ede2c3..042f46fca2 100644 --- a/blog/categories/media/atom.xml +++ b/blog/categories/media/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Media | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index 2020a22497..09c229ddb9 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index ff07cc2b35..fe9d7f4ab4 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index c2fbe0ea10..3c12155be9 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index b4478e9ed5..6ba71aac50 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 7cbb1e27f8..311727e863 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 2143221c34..1d684950b9 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 1b9827b8b7..16860b8328 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 54b9e6bba7..2b30fe1afb 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 349cf4b949..3f8ea9dec3 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index c3b879c175..095c4eab2c 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index edf8c96e3d..841de114fc 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 3543093c52..c011697302 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 1ffe404a76..660a91c82e 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index f67a2f9aee..79c16ce29b 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-12-16T01:58:58+00:00 + 2017-12-16T10:58:58+00:00 https://home-assistant.io/ diff --git a/docs/installation/virtualenv/index.html b/docs/installation/virtualenv/index.html index 1ea9c02299..381bf559d0 100644 --- a/docs/installation/virtualenv/index.html +++ b/docs/installation/virtualenv/index.html @@ -75,70 +75,44 @@
-

-Beginners should check our getting started guide first. +

If you alreacy have Python 3.5 or later installed, you can easily give Home Assistant a spin.

+

It’s recommended when installing Python packages that you use a virtual environment. This will make sure that your Python installation and Home Assistant installation won’t impact one another.

+

(If you’re on a Debian based system, you will need to install Python virtual environment support using apt-get install python3-pip python3-venv)

+
    +
  1. Create a virtual environment: +
    python3 -m venv homeassistant
    +
    +
    +
  2. +
  3. Open virtual environment: +
    cd homeassistant
    +
    +
    +
  4. +
  5. Activate virtual environment: +
    source bin/activate
    +
    +
    +
  6. +
  7. Install Home Assistant: +
    python3 -m pip install --upgrade homeassistant
    +
    +
    +
  8. +
  9. Run Home Assistant: +
    hass --open-ui
    +
    +
    +
  10. +
+

Notes

+
    +
  • In the future, if you want to start Home Assistant again, follow step 2, 3 and 5.
  • +
  • If you want to upgrade Home Assistant, follow step 2 and 3 and 4.
  • +
+

+Looking for more advanced guides? Check our available guides.

-

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 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 Home Assistant, and it means you don’t need to install Python packages as root.

-

Virtualenvs are pretty easy to setup. We’ll 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.

-

Basic guide

-

The basic guide is for testing Home Assistant. Also check the advanced guide for instances used in production.

-

Step 1: Install dependencies

-
$ sudo apt-get update
-$ sudo apt-get upgrade
-$ sudo apt-get install python3-pip python3-dev python3-venv
-$ sudo pip3 install --upgrade virtualenv
-
-
-

Step 2: Setup virtualenv

-
$ python3 -m venv $HOME/homeassistant
-
-
-

Step 3: Install or update Home Assistant

-
$ source $HOME/homeassistant/bin/activate
-(homeassistant)$ pip3 install --upgrade homeassistant
-
-
-

Step 4: Run Home Assistant

-
$ $HOME/homeassistant/bin/hass
-
-
-

Advanced guide

-

Separate user & group for Home Assistant (Basic guide step 2)

-

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 Home Assistant. This is a reasonably Linux oriented step, and will look different on other operating systems (or even other Linux distributions).

-
$ sudo adduser --system homeassistant
-$ sudo addgroup homeassistant
-
-
-

Home Assistant stores its configuration in $HOME/.homeassistant by default, so in this case, it would be in /home/homeassistant/.homeassistant.

-

If you plan to use a Z-Wave controller, you will need to add this user to the dialout group:

-
$ sudo usermod -G dialout -a homeassistant
-
-
-

Custom installation directory for Home Assistant (Basic guide step 2)

-

This can be anywhere you want. We chose to put it in /srv. You also need to change the ownership of the directory to the user you created above.

-
$ sudo mkdir /srv/homeassistant
-$ sudo chown homeassistant:homeassistant /srv/homeassistant
-$ python3 -m venv /srv/homeassistant
-
-
-

Install or update Home Assistant

-

This is obviously only necessary if you created a homeassistant 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.

-
$ sudo su -s /bin/bash homeassistant
-
-
-

The su command means ‘switch’ user. We use the ‘-s’ flag because the homeassistant 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).

-
$ source /srv/homeassistant/bin/activate
-(homeassistant)$ pip3 install --upgrade homeassistant
-
-
-

Run Home Assistant (Basic guide step 4)

-

There are two ways to launch Home Assistant. If you are in the virtualenv, you can just run hass and it will work as normal. If the virtualenv is not activated, you just use the hass executable in the bin directory mentioned earlier. There is one caveat… Because Home Assistant stores its configuration in the user’s home directory, we need to be the user homeassistant or specify the configuration with -c.

-
$ sudo -u homeassistant -H /srv/homeassistant/bin/hass
-
-
-

The -H flag is important. It sets the $HOME environment variable to /home/homeassistant so hass can find its configuration.

-

Starting Home Assistant on boot

-

The autostart instructions will work just fine, just be sure to replace /usr/bin/hass with /srv/homeassistant/bin/hass and specify the homeassistant user where appropriate.