diff --git a/_config.yml b/_config.yml index b7a22d6845d..75a8371ae7c 100644 --- a/_config.yml +++ b/_config.yml @@ -133,7 +133,7 @@ defaults: footer: true sharing: true sidebar: true - # Enable table of contents for integrations + # Enable table of contents for integrations and installations # # To set toc as a default value, we need to set the scope with an empty path # and the collection as type @@ -144,6 +144,20 @@ defaults: type: integrations values: toc: true + - scope: + path: "installation/*" + values: + toc: true + no_toc: true + - scope: + path: "common-tasks/*" + values: + toc: true + - scope: + path: "hassio/*" + values: + toc: true + # Support for files Jekyll will normally exclude include: @@ -156,3 +170,45 @@ include: toc: min_level: 2 # default: 1 max_level: 3 # default: 6 + + +# Configuration for installation pages +installation: + versions: + os: "5.11" + python: "3.8" + types: + odroid: + board: ODROID + installation_media: "eMMC module/SD card" + variants: + - name: "ODROID-N2" + key: "odroid-n2" + - name: "ODROID-N2+" + key: "odroid-n2" + - name: "ODROID-C2" + key: "odroid-c2" + - name: "ODROID-C4" + key: "odroid-c4" + - name: "ODROID-XU4" + key: "odroid-xu4" + + raspberrypi: + board: Raspberry Pi + installation_media: "SD card" + variants: + - name: "Raspberry Pi 4 64-bit" + key: "rpi4-64" + - name: "Raspberry Pi 4 32-bit" + key: "rpi4" + - name: "Raspberry Pi 3 64-bit" + key: "rpi3-64" + - name: "Raspberry Pi 3 32-bit" + key: "rpi" + + tinkerboard: + board: ASUS Tinkerboard + installation_media: "eMMC module/SD card" + variants: + - name: "ASUS Tinkerboard" + key: "tinker" diff --git a/plugins/tabbed_block.rb b/plugins/tabbed_block.rb new file mode 100644 index 00000000000..508dbf54940 --- /dev/null +++ b/plugins/tabbed_block.rb @@ -0,0 +1,63 @@ +require 'securerandom' + +module Jekyll + class TabbedBlock < Liquid::Block + + def slug(key) + key.downcase.strip.gsub(' ', '-').gsub(/[^\w\-]/, '') + end + + def render_tabbed_block(vars:, converter:, classes: nil, parent_type: nil) + block = Array.new + tabs = Array.new + tabContent = Array.new + uuid = "id" + SecureRandom.hex(10) + + tabs << "
" + vars.map do |entry| + tabs << "" + tabContent << "
#{converter.convert(entry['content'].to_s)}
" + end + tabs << "
" + block << tabs.join + block << tabContent.join + block.join + end + + def render(context) + contents = super(context) + vars = SafeYAML.load(contents) + + site = context.registers[:site] + converter = site.find_converter_instance(::Jekyll::Converters::Markdown) + + <<~MARKUP + +
+ #{render_tabbed_block(vars: vars, converter: converter)} +
+ MARKUP + end + end +end + +Liquid::Template.register_tag('tabbed_block', Jekyll::TabbedBlock) \ No newline at end of file diff --git a/sass/custom/_getting_started.scss b/sass/custom/_getting_started.scss new file mode 100644 index 00000000000..9cab303af76 --- /dev/null +++ b/sass/custom/_getting_started.scss @@ -0,0 +1,150 @@ +#getting_started { + .intro { + padding-bottom: 16px; + } + + .installations { + + h2 { + font-size: 0; + margin: 0; + } + + .installations-card { + text-decoration: none !important; + color: black !important; + + .material-card { + display: flex; + flex-direction: row; + justify-content: space-between; + margin: 8px 0; + + .content-container { + display: flex; + + div:first-of-type { + margin-right: 24px; + + img, svg { + max-width: 170px; + max-height: 170px; + min-width: 170px; + min-height: 170px; + padding: 32px; + border-radius: 3px; + box-shadow: rgba(0,0,0,0.06) 0 0 10px; + vertical-align: middle; + border: 5px solid #fff; + } + } + + div:last-of-type { + + b { + font-size: 28px; + } + + p { + font-size: 0.8em; + margin: 0; + } + + ul { + font-size: 0.8em; + margin-left: 24px; + margin-top: 1rem; + + li { + margin: 0; + } + } + } + } + svg { + height: 42px; + max-width: 42px; + min-width: 42px; + align-self: center; + } + } + } + } + + .compare-installations td,.compare-installations th { + text-align: center; + } + + table.compare-installations { + background-color: #ffffff !important; + border-radius: 2px !important; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), + 0 1px 5px 0 rgba(0,0,0,0.12), + 0 3px 1px -2px rgba(0,0,0,0.2) !important; + + td, th { + text-align: center; + } + + tr { + td:first-of-type { + text-align: left; + } + } + + tr:nth-child(even) { + background-color: #fafafa; + } + } +} + +.link-card { + text-decoration: none !important; + color: black !important; + div { + margin: 32px 0; + height: 64px; + display: flex; + justify-content: space-between; + svg { + height: 32px; + width: 32px; + max-width: 32px; + } + p { + margin: 0; + align-self: center; + } + } +} +.next-step { + p { + text-transform: uppercase; + } +} + +@media only screen and (max-width: $palm-end) { + #getting_started { + .installations { + .installations-card { + .material-card { + .content-container { + flex-flow: wrap; + svg { + display: block; + } + div:first-of-type { + width: 100%; + display: flex; + justify-content: center; + margin-bottom: 16px; + } + } + svg { + display: none; + } + } + } + } + } +} \ No newline at end of file diff --git a/sass/custom/_tabbed_block.scss b/sass/custom/_tabbed_block.scss new file mode 100644 index 00000000000..818276e63f3 --- /dev/null +++ b/sass/custom/_tabbed_block.scss @@ -0,0 +1,48 @@ +.tabbed-content-block { + background-color: #FAFAFA; + margin: 16px 0; + overflow: hidden; + border-radius: 10px; + box-shadow: -1px 0px 0px 0px #dfdfdf, 0px 0px 0px 1px #dfdfdf; + box-sizing: border-box; + + .tabbed-content-block-tabs { + overflow: hidden; + padding: 0 8px; + + label { + input{ + display:none; + } + input:checked + div{ + opacity: 1; + border-bottom: 2px solid $primary-color; + } + + div{ + float:left; + padding: 8px; + cursor: pointer; + opacity: 0.7; + transition: 0.3s; + border-bottom: 2px solid transparent; + font-size: 0.8em; + } + + div:hover { + opacity: 1; + } + } + } + + .tabbed-content-block-content { + padding: 8px 16px 0; + display: none; + animation: fadeEffect .5s; + } + + @keyframes fadeEffect{ + 0%{opacity:0} + 100%{opacity:1} + } +} \ No newline at end of file diff --git a/sass/screen.scss b/sass/screen.scss index dda71c2daa4..13ef2c23179 100644 --- a/sass/screen.scss +++ b/sass/screen.scss @@ -6,4 +6,6 @@ @import 'custom/syntax'; @import 'custom/details'; @import 'custom/print'; -@import 'custom/layout'; \ No newline at end of file +@import 'custom/layout'; +@import 'custom/getting_started'; +@import 'custom/tabbed_block'; \ No newline at end of file diff --git a/source/_docs/installation.markdown b/source/_docs/installation.markdown deleted file mode 100644 index 8ba3c999d4b..00000000000 --- a/source/_docs/installation.markdown +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "Installation of Home Assistant" -description: "Instructions on how to install Home Assistant to launch on start." ---- - -
- -Beginners should check our [Getting started guide](/getting-started/) first. - -
- -Home Assistant provides multiple ways to be installed. The first start may take up to 20 minutes because the required packages will be downloaded and installed. The web interface will be served on `http://ip.add.re.ss:8123/`. Replace `ip.add.re.ss` with the IP of the computer you installed it on. - -
- - Please remember to [secure your installation](/docs/configuration/securing/) once you've finished with the installation process. - -
- -## Hardware - -Below is a list of **minimum** requirements - -Type | Minimum --- | -- -Storage | 32 GB -Memory | 1 GB -Network | 100 Mb/s wired -Power (if Pi) | At least 2.5A - -### Performance expectations - -This is a list of popular platforms and what to expect from them. - -Platform | Notes --- | -- -Raspberry Pi Zero/Pi 2 | **Only** use these for testing -Raspberry Pi 3/3+/4 | This is a good starting point, and depending on the amount of devices you integrate this can be enough - use an [A2 class SD](https://amzn.to/2X0Z2di) card if possible. -NUC i3 | This is if you need a little more power over a Pi -NUC i5 | This will allow you to run multiple services without any issues, perfect for a homelab -NUC i7/i9 | Pure power, you should not have *any* performance issues - -## Recommended - -These install options are fully supported by Home Assistant's documentation. For example, if an integration requires that you install something to make it work on one of these methods then the integration page will document the steps required. - -
- -The only installation methods that allow you to use Home Assistant Add-ons is using the Home Assistant image. All other methods only install the base Home Assistant packages, however the software from the add-ons may still usually be installed manually like any other program. - -
- -**Method**|**You have**|**Recommended for** -:-----|:-----|:----- -[Home Assistant OS](/hassio/installation/)|[A supported platform](/hassio/installation/)|Anybody -[Home Assistant Container](/docs/installation/docker/)|Docker|Anybody already running Docker - -## Alternative installs - -If you use these install methods, we assume that you know how to manage and administer the operating system you're using. Due to the range of platforms on which these install methods can be used, integration documentation may only tell you what you have to install, not how to install it. - -**Method**|**You have**|**Recommended for** -:-----|:-----|:----- -[Home Assistant Core](/docs/installation/raspberry-pi/)|Any Linux, Python 3.8 or later|Those familiar with their operating system -[Home Assistant Supervised](https://github.com/home-assistant/supervised-installer) | [Requirements](https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md#supported-operating-system-system-dependencies-and-versions) | Those very familiar with their operating system -[venv
(as your user)](/docs/installation/virtualenv/)|Any Python 3.8 or later|**Developers** - -## Community provided guides - -Additional installation guides can be found on our [Community Forum](https://community.home-assistant.io/tags/c/community-guides/51/installation). - -These Community Guides are provided as-is. Some of these install methods are more limited than the methods above. Some integrations may not work due to limitations of the platform. diff --git a/source/_docs/installation/docker.markdown b/source/_docs/installation/docker.markdown deleted file mode 100644 index b92b6a7f736..00000000000 --- a/source/_docs/installation/docker.markdown +++ /dev/null @@ -1,317 +0,0 @@ ---- -title: "Installation on Docker" -description: "Instructions to install Home Assistant on a Docker." ---- - -
- -These below instructions are for an installation of Home Assistant Core running in your own Docker environment, which you manage yourself. - -Note that Docker command line option `--net=host` or the compose file equivalent `network_mode: host` must be used to put Home Assistant on the host's network, otherwise certain functionality - including mDNS and UPnP - will break. The `-p` command line option or the compose file equivalent `ports:` is not compatible with host networking mode and must not be used. - -
- -## Platform Installation - -Installation with Docker is straightforward. Adjust the following command so that `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration and run it: - -## Autostart using Docker - -
- -Do not try to combine Docker `restart` policies with host-level process managers (such as `systemd`), because this creates conflicts. - -
- -Add `--restart=always` to your `docker run` command before homeassistant/home-assistant:stable. See [the Docker autostart documentation](https://docs.docker.com/config/containers/start-containers-automatically/) for details and more options. - -### Linux - -```bash -docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable -``` - -Updating: - -```bash -docker pull homeassistant/home-assistant:stable # if this returns "Image is up to date" then you can stop here -docker stop home-assistant # stop the running container -docker rm home-assistant # remove it from Docker's list of containers -docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable # finally, start a new one -``` - -### Raspberry Pi 3/4 (Raspberry Pi OS) - -Raspberry Pi 3: -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /PATH_TO_YOUR_CONFIG:/config --net=host homeassistant/raspberrypi3-homeassistant:stable -``` - -Raspberry Pi 4: -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /PATH_TO_YOUR_CONFIG:/config --net=host homeassistant/raspberrypi4-homeassistant:stable -``` - -You need to replace `/PATH_TO_YOUR_CONFIG` with your path to the configuration. For example, if you choose your configuration path to be `/home/pi/homeassistant`, the command for **Raspberry Pi 3** would be: - -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /home/pi/homeassistant:/config --net=host homeassistant/raspberrypi3-homeassistant:stable -``` - -### macOS - -When using `docker-ce` (or `boot2docker`) on macOS, you are unable to map the local timezone to your Docker container ([Docker issue](https://github.com/docker/for-mac/issues/44)). Instead of `-v /etc/localtime:/etc/localtime:ro`, just pass in the timezone environment variable when you launch the container, e.g, `-e "TZ=America/Los_Angeles"`. Replace "America/Los_Angeles" with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - -```bash -docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v /PATH_TO_YOUR_CONFIG:/config -p 8123:8123 homeassistant/home-assistant:stable -``` - -Alternatively, `docker-compose` works with any recent release of Docker CE on macOS. Note the `/dev/tty*` device name used by your Arduino etc. devices will differ from the Linux example, so the compose `mount:` may require updates. - -### Windows - -Docker containers are completely isolated from its Windows host system. So when you delete a container, all the changes you made to that container are also removed. If you want to have configuration files or other assets remain persistent, try mounting Windows folders on containers. - -Before proceeding, make sure you have shared out a drive for Docker to mount to. This will allow the saving of configuration files to persist on the local machine rather than in the Docker container (which may be destroyed when upgraded). - - - - -```powershell -docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v /PATH_TO_YOUR_CONFIG:/config -p 8123:8123 homeassistant/home-assistant:stable -``` - -It’s easier to understand the trick when put into practice. Here we would like to mount a current working directory (something like `C:\Users\\homeassistant` make sure this exists first) into the `homeassistant/home-assistant:stable` image at the `/config` location in the container. We would do that as so: - -```powershell -docker run --init -d --name="home-assistant" -e "TZ=America/Los_Angeles" -v //c/Users//homeassistant:/config -p 8123:8123 homeassistant/home-assistant:stable -``` - -Host networking is not supported on Windows so we have to forward the port 8123. This will let you access your Home Assistant portal from `http://localhost:8123`, and if you forward port 8123 on your router to your machine IP, the traffic will be forwarded on through to the Docker container. - -### Synology NAS - -As Synology within DSM now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see - -The steps would be: - -- Install "Docker" package on your Synology NAS -- Launch Docker-app and move to "Registry"-section -- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag. -- Wait for some time until your NAS has pulled the image -- Move to the "Image"-section of the Docker-app -- Click on "Launch" -- Choose a container-name you want (e.g., "homeassistant") -- Click on "Advanced Settings" -- Set "Enable auto-restart" if you like -- Within "Volume" click on "Add Folder" and choose either an existing folder or add a new folder. The "mount path" has to be "/config", so that Home Assistant will use it for the configs and logs. It is therefore recommended that the folder you choose should be named "config" or "homeassistant/config" to avoid confusion when referencing it within service calls. -- Within "Network" select "Use same network as Docker Host" -- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) -- Confirm the "Advanced Settings" -- Click on "Next" and then "Apply" -- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Synology NAS IP address - for example `http://192.168.1.10:8123`) - -If you are using the built-in firewall, you must also add the port 8123 to allowed list. This can be found in "Control Panel -> Security" and then the Firewall tab. Click "Edit Rules" besides the Firewall Profile dropdown box. Create a new rule and select "Custom" for Ports and add 8123. Edit Source IP if you like or leave it at default "All". Action should stay at "Allow". - -To use a Z-Wave USB stick for Z-Wave control, the HA Docker container needs extra configuration to access to the USB stick. While there are multiple ways to do this, the least privileged way of granting access can only be performed via the Terminal, at the time of writing. See this page for configuring Terminal acces to your Synology NAS: - - - -See this page for accessing the Terminal via SSH: - - - -Adjust the following Terminal command as follows : - -- Replace `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration -- Replace `/PATH_TO_YOUR_USB_STICK` matches the path for your USB stick (e.g., `/dev/ttyACM0` for most Synology users) -- Replace "Australia/Melbourne" with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) - -Run it in Terminal. - -```bash -sudo docker run --restart always -d --name="homeassistant" -v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK -e TZ=Australia/Melbourne --net=host homeassistant/home-assistant:stable -``` - -Complete the remainder of the Z-Wave configuration by [following the instructions here.](/docs/z-wave/installation) - -Remark: to update your Home Assistant on your Docker within Synology NAS, you just have to do the following: - -- Go to the Docker-app and move to "Registry"-section -- Find "homeassistant/home-assistant" within registry and click on "Download". Choose the "stable" tag. -- Wait until the system-message/-notification comes up, that the download is finished (there is no progress bar) -- Move to "Container"-section -- Stop your container if it's running -- Right-click on it and select "Action"->"Clear". You won't lose any data, as all files are stored in your configuration-directory -- Start the container again - it will then boot up with the new Home Assistant image - -Remark: to restart your Home Assistant within Synology NAS, you just have to do the following: - -- Go to the Docker-app and move to "Container"-section -- Right-click on it and select "Action"->"Restart". - -
- -If you want to use a USB Bluetooth adapter or Z-Wave USB Stick with Home Assistant on Synology Docker these instructions do not correctly configure the container to access the USB devices. To configure these devices on your Synology Docker Home Assistant you can follow the instructions provided [here](https://philhawthorne.com/installing-home-assistant-io-on-a-synology-diskstation-nas/) by Phil Hawthorne. - -
- -### QNAP NAS - -As QNAP within QTS now supports Docker (with a neat UI), you can simply install Home Assistant using Docker without the need for command-line. For details about the package (including compatibility-information, if your NAS is supported), see - -The steps would be: - -- Install "Container Station" package on your Qnap NAS -- Launch Container Station and move to "Create Container"-section -- Search image "homeassistant/home-assistant" with Docker Hub and click on "Install" - Make attention to CPU architecture of your NAS. For ARM CPU types the correct image is "homeassistant/armhf-homeassistant" -- Choose "stable" version and click next -- Choose a container-name you want (e.g., "homeassistant") -- Click on "Advanced Settings" -- Within "Shared Folders" click on "Volume from host" > "Add" and choose either an existing folder or add a new folder. The "mount point has to be `/config`, so that Home Assistant will use it for the configuration and logs. -- Within "Network" and select Network Mode to "Host" -- To ensure that Home Assistant displays the correct timezone go to the "Environment" tab and click the plus sign then add `variable` = `TZ` & `value` = `Europe/London` choosing [your correct timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) -- Click on "Create" -- Wait for some time until your NAS has created the container -- Your Home Assistant within Docker should now run and will serve the web interface from port 8123 on your Docker host (this will be your Qnap NAS IP address - for example `http://192.xxx.xxx.xxx:8123`) - -Remark: To update your Home Assistant on your Docker within Qnap NAS, you just remove container and image and do steps again (Don't remove "config" folder). - -If you want to use a USB Bluetooth adapter or Z-Wave USB stick with Home Assistant on Qnap Docker, follow those steps: - -#### Z-Wave - -- Connect to your NAS over SSH -- Load cdc-acm kernel module(when NAS restart need to run this command) - `insmod /usr/local/modules/cdc-acm.ko` -- Find USB devices attached. Type command: - `ls /dev/tty*` - The above command should show you any USB devices plugged into your NAS. If you have more than one, you may get multiple items returned. Like : `ttyACM0` - -- Run Docker command: - - ```bash - docker run --init --name home-assistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London --device /dev/ttyACM0 homeassistant/home-assistant:stable - ``` - - `-v` is your configuration path - `-e` is set timezone - -- Edit `configuration.yaml` - -```yaml -zwave: - usb_path: /dev/ttyACM0 -``` - -That will tell Home Assistant where to look for our Z-Wave radio. - -#### Bluetooth - -- Connect to your NAS over SSH -- Run Docker command: - - ```bash - docker run --init --name home-assistant --net=host --privileged -itd -v /share/CACHEDEV1_DATA/Public/homeassistant/config:/config -e TZ=Europe/London -v /dev/bus/usb:/dev/bus/usb -v /var/run/dbus:/var/run/dbus homeassistant/home-assistant:stable - ``` - - First `-v` is your configuration path - `-e` is set timezone - -- Edit the `configuration.yaml` file - -```yaml -device_tracker: - - platform: bluetooth_tracker -``` - -## Restart - -If you change the configuration you have to restart the server. To do that you have 2 options. - - 1. You can go to the **Developer Tools** -> **Services**, select the service `homeassistant.restart` and click "Call Service". - 2. Or you can restart it from a terminal by running `docker restart home-assistant` - -## Docker Compose - -As the Docker command becomes more complex, switching to `docker-compose` can be preferable and support automatically restarting on failure or system restart. Create a `docker-compose.yml` file: - -```yaml - version: "3" - services: - homeassistant: - container_name: home-assistant - image: homeassistant/home-assistant:stable - volumes: - - /PATH_TO_YOUR_CONFIG:/config - environment: - - TZ=America/New_York - restart: always - network_mode: host -``` - -Then start the container with: - -```bash -docker-compose up -d -``` - -To restart Home Assistant when you have changed configuration: - -```bash -docker-compose restart -``` - -To update your docker-compose image to the latest version and restart: - -```bash -docker-compose pull homeassistant -docker-compose up -d -``` - -Note: the above will fetch the latest matching image for the `homeassistant` service only. To fetch all matching images for all services defined in the same `docker-compose.yaml` file, omit the service name from the first command. - -## Exposing Devices - -In order to use Z-Wave, Zigbee or other integrations that require access to devices, you need to map the appropriate device into the container. Ensure the user that is running the container has the correct privileges to access the `/dev/tty*` file, then add the device mapping to your Docker command: - -```bash -$ docker run --init -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config \ - -e "TZ=Australia/Melbourne" --device /dev/ttyUSB0:/dev/ttyUSB0 \ - --net=host homeassistant/home-assistant:stable -``` - -or in a `docker-compose.yml` file: - -```yaml - version: "3" - services: - homeassistant: - container_name: home-assistant - image: homeassistant/home-assistant:stable - volumes: - - /PATH_TO_YOUR_CONFIG:/config - devices: - - /dev/ttyUSB0:/dev/ttyUSB0 - - /dev/ttyUSB1:/dev/ttyUSB1 - - /dev/ttyACM0:/dev/ttyACM0 - environment: - - TZ=America/New_York - restart: always - network_mode: host -``` - -
- -On Mac, USB devices are [not passed through](https://github.com/docker/for-mac/issues/900) by default. Follow the instructions in [Using USB with Docker for Mac](https://dev.to/rubberduck/using-usb-with-docker-for-mac-3fdd) by Christopher McClellan if your device is not showing up. - -
- -## Optimizations - -The Home Assistant Container is using an alternative memory allocation library [jemalloc](http://jemalloc.net/) for better memory management and Python runtime speedup. - -As jemalloc can cause issues on certain hardware, it can be disabled by passing the environment variable `DISABLE_JEMALLOC` with any value, for example: `-e "DISABLE_JEMALLOC=true"`. - -The error message `: Unsupported system page size` is one known indicator. diff --git a/source/_docs/installation/raspberry-pi.markdown b/source/_docs/installation/raspberry-pi.markdown deleted file mode 100644 index 1c6cef6a41d..00000000000 --- a/source/_docs/installation/raspberry-pi.markdown +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: "Manual installation on a Raspberry Pi" -description: "Instructions to install Home Assistant Core on a Raspberry Pi running Raspberry Pi OS Lite." ---- - -This installation of Home Assistant Core requires the Raspberry Pi to run [Raspberry Pi OS Lite](https://www.raspberrypi.org/downloads/raspberry-pi-os/). The installation will be installed in a [Virtual Environment](/docs/installation/virtualenv) with minimal overhead. Instructions assume this is a new installation of Raspberry Pi OS Lite. - -You must have Python 3.8 or later installed (including the package `python3-dev`) which is *not* the case for Raspberry Pi OS and you will need to install Python manually. - -
-Although these installation steps specifically mention a Raspberry Pi, you can go ahead and proceed on any Linux install as well. This guide is also referred to as the "Advanced Guide" for a virtual environment install. -
- -
- -Please remember to ensure you're using an [appropriate power supply](https://www.raspberrypi.org/documentation/faqs/#pi-power) with your Pi. Mobile chargers may not be suitable, since some are designed to only provide the full power with that manufacturer's handsets. USB ports on your computer also will not supply enough power and must not be used. - -
- -Connect to the Raspberry Pi over SSH. Default password is `raspberry`. -You will need to enable SSH access. The Raspberry Pi website has instructions [here](https://www.raspberrypi.org/documentation/remote-access/ssh/). - -```bash -ssh pi@ipaddress -``` - -Changing the default password is encouraged. - -```bash -passwd -``` - -Update the system. - -```bash -sudo apt-get update -sudo apt-get upgrade -y -``` - -Install the dependencies. - -```bash -sudo apt-get install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 -``` - -Add an account for Home Assistant Core called `homeassistant`. -Since this account is only for running Home Assistant Core the extra arguments of `-rm` is added to create a system account and create a home directory. The arguments `-G dialout,gpio,i2c` adds the user to the `dialout`, `gpio` and the `i2c` group. The first is required for using Z-Wave and Zigbee controllers, while the second is required to communicate with Raspberry's GPIO. - -```bash -sudo useradd -rm homeassistant -G dialout,gpio,i2c -``` - -Next we will create a directory for the installation of Home Assistant Core and change the owner to the `homeassistant` account. - -```bash -cd /srv -sudo mkdir homeassistant -sudo chown homeassistant:homeassistant homeassistant -``` - -Next up is to create and change to a virtual environment for Home Assistant Core. This will be done as the `homeassistant` account. - -```bash -sudo -u homeassistant -H -s -cd /srv/homeassistant -python3.8 -m venv . -source bin/activate -``` - -Once you have activated the virtual environment (notice the prompt change to `(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $`) you will need to run the following command to install a required Python package. - -```bash -python3 -m pip install wheel -``` - -Once you have installed the required Python package it is now time to install Home Assistant Core! - -```bash -pip3 install homeassistant -``` - -Start Home Assistant Core for the first time. This will complete the installation for you, automatically creating the `.homeassistant` configuration directory in the `/home/homeassistant` directory, and installing any basic dependencies. - -```bash -hass -``` - -You can now reach your installation on your Raspberry Pi over the web interface on `http://ipaddress:8123`. - -
- -When you run the `hass` command for the first time, it will download, install and cache the necessary libraries/dependencies. This procedure may take anywhere between 5 to 10 minutes. During that time, you may get "site cannot be reached" error when accessing the web interface. This will only happen for the first time, and subsequent restarts will be much faster. - -
- -## Updating - -To update to the latest version of Home Assistant Core follow these simple steps: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install --upgrade homeassistant -``` - -Once the last command executes, restart the Home Assistant Core service to apply the latest updates. Please keep in mind that some updates may take longer to start up than others. If Home Assistant Core fails to start, make sure you check the **Breaking Changes** from the [Release Notes](https://www.home-assistant.io/latest-release-notes/). - -## Run a specific version - -In the event that a Home Assistant Core version doesn't play well with your hardware setup, you can downgrade to a previous release. For example: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install homeassistant==0.XX.X -``` - -## Run the beta version - -If you would like to test next release before anyone else, you can install the beta version released every two weeks, for example: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install --pre --upgrade homeassistant -``` - -## Run the development version - -If you want to stay on the bleeding-edge Home Assistant Core development branch, you can upgrade to `dev`. - -
- The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption. -
- -For example: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev -``` - -## Activating the virtual environment - -When instructions tell you to activate the virtual environment, the following commands will do this: - -```bash -sudo -u homeassistant -H -s -source /srv/homeassistant/bin/activate -``` diff --git a/source/_docs/installation/updating.markdown b/source/_docs/installation/updating.markdown deleted file mode 100644 index 5352fdbc3ea..00000000000 --- a/source/_docs/installation/updating.markdown +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "Updating Home Assistant" -description: "Step to update Home Assistant." ---- - -
- -The upgrade process differs depending on the installation you have, so please review the documentation that is specific to your install: [Home Assistant](/hassio/) or [Home Assistant Core](/docs/installation/virtualenv/#upgrade). - -
- -Check what's new in the latest version and potentially impacts your system in the [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). It is good practice to review these release notes and pay close attention to the **Breaking Changes** that are listed there. If you haven't done an update for a while, you should also check previous release notes as they can also contain relevant **Breaking Changes**. These **Breaking Changes** may require configuration updates for your components. If you missed this and Home Assistant refuses to start, check the log file in the [configuration](/docs/configuration/) directory, e.g., `.homeassistant/home-assistant.log`, for details about broken components. - -
- -To avoid permission errors, the upgrade must be run as the same user as was used during the initial installation, again review the documentation specific to your install [Home Assistant](/hassio/) or [Home Assistant Core](/docs/installation/virtualenv). - -
- -The default way to update Home Assistant to the latest release, when available, is: - -```bash -pip3 install --upgrade homeassistant -``` - -For a Docker container, simply pull the latest stable one: - -```bash -sudo docker pull homeassistant/home-assistant:stable -``` - -For a Raspberry Pi Docker container, simply pull the latest stable one: - -```bash -sudo docker pull homeassistant/raspberrypi3-homeassistant:stable -``` - -After updating, you must start/restart Home Assistant for the changes to take effect. This means that you will have to restart `hass` itself. -Startup can take a considerable amount of time (i.e., minutes) depending on your device. This is because all requirements are updated as well. - -[BRUH automation](https://www.bruhautomation.io/) has created [a tutorial video](https://www.youtube.com/watch?v=tuG2rs1Cl2Y) explaining how to upgrade Home Assistant. - -## Run a specific version - -In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release: - -```bash -pip3 install homeassistant==0.XX.X -``` - -## Run the beta version - -If you would like to test the next release before anyone else, you can install the beta version released every two weeks: - -```bash -pip3 install --pre --upgrade homeassistant -``` - -## Run the development version - -If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`. - -
- The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption. -
- -```bash -pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev -``` - -## Update Home Assistant installation - -Best practice for updating a Home Assistant installation: - -1. Backup your installation, using the snapshot functionality Home Assistant offers. -2. Check the release notes for breaking changes on [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (`CTRL + f`) and search for **Breaking Changes**. -3. Check your configuration using the [Check Home Assistant configuration](/addons/check_config/) add-on. -4. If the check passes, you can safely update. If not, update your configuration accordingly. -5. Update Home Assistant. diff --git a/source/_docs/installation/virtualenv.markdown b/source/_docs/installation/virtualenv.markdown deleted file mode 100644 index 3676ecf1b26..00000000000 --- a/source/_docs/installation/virtualenv.markdown +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: "Installation in Python virtual environment" -description: "How to install Home Assistant in a Python virtual environment." ---- - -If you already have Python 3.8 or later installed, you can easily give Home Assistant a spin. - -It's recommended when installing Python packages that you use a [virtual environment](https://docs.python.org/3.8/library/venv.html#module-venv). This will make sure that your Python installation and Home Assistant installation won't impact one another. The following steps will work on most UNIX like systems. - -
- -This is a generic guide for running Home Assistant under Python. We recommend to use [our recommended installation guides](/docs/installation/#recommended). The steps below may be shorter but some users find difficulty when applying updates and may run into issues. - -Before you begin the guide below, ensure that you have a *so-called standard* build environment that includes things like `make`, `gcc`, `python3`, including Python 3 `setuptools` and `pip` modules. Less obvious is the need to install `libssl-dev` (for opensslv.h), `libffi-dev` (for cffi.h) for things to build later on, `libjpeg-dev`, `zlib1g-dev`, `libopenjp2-7` and `libtiff5` needed for the frontend. - -
- -{% comment %} -This page describes installation instructions for a pure Python installation. -It should not contain any OS specific instructions. -{% endcomment %} - -### Install - - 1. Create a virtual environment in your current directory: - ```bash - python3.8 -m venv homeassistant - ``` - 2. Open the virtual environment: - ```bash - cd homeassistant - ``` - 3. Activate the virtual environment: - ```bash - source bin/activate - ``` - 4. Install Home Assistant: - ```bash - python3 -m pip install homeassistant - ``` - 5. Run Home Assistant: - ```bash - hass --open-ui - ``` - 6. You can now reach the web interface on `http://ipaddress:8123/` - the first start may take a couple of minutes before the web interface is available. This can take longer if you're using lower-end hardware like a Raspberry Pi Zero. - -### Upgrade - - 1. Stop Home Assistant - - 2. Open the directory where the virtual environment is located, activate the virtual environment, then upgrade Home Assistant: - ```bash - cd homeassistant - source bin/activate - python3 -m pip install --upgrade homeassistant - ``` - 3. Start Home Assistant - 4. You can now reach the web interface on `http://ipaddress:8123/` - the first start may take some time before the web interface is available, depending on how many integrations need to be upgraded. - -### Run a specific version - -In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release. For example: - -```bash -cd homeassistant -source bin/activate -pip3 install homeassistant==0.XX.X -``` - -#### Run the beta version - -If you would like to test next release before anyone else, you can install the beta version, for example: - -```bash -cd homeassistant -source bin/activate -pip3 install --pre --upgrade homeassistant -``` - -#### Run the development version - -If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`. - -
- The "dev" branch is likely to be unstable. Potential consequences include loss of data and instance corruption. -
- -For example: - -```bash -cd homeassistant -source bin/activate -pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev -``` - -### Notes - -- In the future, if you want to start Home Assistant manually again, follow step 2, 3 and 5. -- It's recommended to run Home Assistant as a dedicated user. - -
- -Looking for more advanced guides? Check our [Raspberry Pi OS guide](/docs/installation/raspberry-pi/) or the [other installation guides](/docs/installation/). - -
- -### After upgrading Python - -If you've upgraded Python (for example, you were running 3.8.1 and now you've installed 3.8.6) then you'll need to build a new virtual environment. Simply rename your existing virtual environment directory: - -```bash -mv homeassistant homeassistant.old -``` - -Then follow the [Install](#install) steps again, being sure to use the newly installed version of Python. diff --git a/source/_docs/installation/troubleshooting.markdown b/source/_docs/troubleshooting.markdown similarity index 97% rename from source/_docs/installation/troubleshooting.markdown rename to source/_docs/troubleshooting.markdown index 991ab732d6c..a6a0d70ec53 100644 --- a/source/_docs/installation/troubleshooting.markdown +++ b/source/_docs/troubleshooting.markdown @@ -46,7 +46,7 @@ iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere ### System freezes -On small systems (such as a Pi2), not directly sypported by binaries (Python Wheels) you may run out of memory. +On small systems (such as a Pi2), not directly supported by binaries (Python Wheels) you may run out of memory. Upon the first run or after an upgrade, Home Assistant uses a lot of resources to (re)compile all the integrations. If you run out of memory and/or swap memory, your system will freeze. Increasing swap memory can help: diff --git a/source/_faq/404.markdown b/source/_faq/404.markdown new file mode 100644 index 00000000000..9d141de0354 --- /dev/null +++ b/source/_faq/404.markdown @@ -0,0 +1,13 @@ +--- +title: "404 Client Error: Not Found ('no such image: homeassistant/...)" +ha_category: Home Assistant +--- + +This error indicates the image, whether for updating to Home Assistant or installing or updating an add-on, was not able to be pulled to your system. This is usually a situation where there is not enough space for the image to be downloaded. The first thing to check for is the available space on your system. + +Please note, if you are running the operating system as a virtual machine; the default VM image is only about 6GB. Many VM users run into this as they have not allocated enough storage. 32GB is the minimum recommended size. + +You will need to explore your own system to determine where space has gone. +Using `df -h` in the SSH add-on console to you can quickly check to see if you have space available. + +If there is plenty of space available then you might check to see if you are having network issues that are preventing images from being downloaded. \ No newline at end of file diff --git a/source/_faq/addon_not_starting.markdown b/source/_faq/addon_not_starting.markdown new file mode 100644 index 00000000000..296490979c1 --- /dev/null +++ b/source/_faq/addon_not_starting.markdown @@ -0,0 +1,8 @@ +--- +title: "Why does the start button for an add-on flash red when I click it?" +ha_category: Home Assistant +--- + +If you are looking for more information about add-ons, which won't start or install, navigate to Supervisor > System in the UI and check the logs. + +The logs on this page are the same you would see using `ha logs` in the custom CLI. diff --git a/source/_faq/rpi4_8gb.markdown b/source/_faq/rpi4_8gb.markdown new file mode 100644 index 00000000000..1be74dc1bf4 --- /dev/null +++ b/source/_faq/rpi4_8gb.markdown @@ -0,0 +1,6 @@ +--- +title: "Is the Raspberry Pi 4 with 8GB RAM supported?" +ha_category: Home Assistant +--- + +The Raspberry Pi 4 with 8GB RAM is supported with Home Assistant OS 5.5 and later using the 32-bit and 64-bit image. The 64-bit is the better tested option at this point. \ No newline at end of file diff --git a/source/_faq/sdcard_files.markdown b/source/_faq/sdcard_files.markdown new file mode 100644 index 00000000000..6004145dc7f --- /dev/null +++ b/source/_faq/sdcard_files.markdown @@ -0,0 +1,9 @@ +--- +title: "I'm trying to find my files on the host or SD card. Where are they?" +ha_category: Home Assistant +--- + +On a Home Assistant OS install, your files are on the data partition within `/mnt/data/supervisor/`. +On the SD itself, this is an EXT4 partition labeled `hassos-data`. + +On a Supervised install, they are in `/usr/share/hassio/`. \ No newline at end of file diff --git a/source/_faq/usb_boot.markdown b/source/_faq/usb_boot.markdown new file mode 100644 index 00000000000..9b7dc3f364f --- /dev/null +++ b/source/_faq/usb_boot.markdown @@ -0,0 +1,8 @@ +--- +title: "Is USB Boot for the Raspberry Pi 4 supported?" +ha_category: Home Assistant +--- + +Due to the complexity of USB and the USB mass storage device class booting from a USB device is brittle. Since booting from a USB drive this process has to be done multiple times (firmware/boot loader and the operating system), there is a high chance that this process doesn't complete in one of these stages. In general, the Linux USB stack is solid. Due to this, it is recommended to boot Home Assistant OS from an SD card and use a USB attached flash drive as data partition only. The `datactl` command, available on the OS shell, allows moving of the data partition. + +That said, booting Home Assistant OS completely from a USB drive (SSD or any other USB mass storage device) works with *some* USB devices. USB Devices that are known to work with Raspberry Pi OS (check the Raspberry Pi Forum) are more likely to work with Home Assistant OS. However, because Home Assistant OS has also U-Boot in the boot chain, there are devices which are known to work with Raspberry Pi OS but do *not* work with Home Assistant OS. \ No newline at end of file diff --git a/source/_faq/usb_config.markdown b/source/_faq/usb_config.markdown new file mode 100644 index 00000000000..a3d100a6d77 --- /dev/null +++ b/source/_faq/usb_config.markdown @@ -0,0 +1,6 @@ +--- +title: "Do I need to leave the USB stick connected for Wi-Fi?" +ha_category: Home Assistant +--- + +No. The USB "CONFIG" stick is only used to import a network profile to `/etc/NetworkManager/system-connections/` and can be removed. \ No newline at end of file diff --git a/source/_includes/asides/common_tasks_navigation.html b/source/_includes/asides/common_tasks_navigation.html new file mode 100644 index 00000000000..92eb027cb99 --- /dev/null +++ b/source/_includes/asides/common_tasks_navigation.html @@ -0,0 +1,11 @@ +
+
+

Common Tasks

+ +
+
diff --git a/source/_includes/asides/component_navigation.html b/source/_includes/asides/component_navigation.html index a5e54266097..01975079f1e 100644 --- a/source/_includes/asides/component_navigation.html +++ b/source/_includes/asides/component_navigation.html @@ -67,11 +67,6 @@ {%- endif -%} - {%- unless page.no_toc -%} -
-

On this page

- {% toc %} - {%- endunless -%} diff --git a/source/_includes/asides/docs_navigation.html b/source/_includes/asides/docs_navigation.html index f70674aa17c..06730186efb 100644 --- a/source/_includes/asides/docs_navigation.html +++ b/source/_includes/asides/docs_navigation.html @@ -8,12 +8,12 @@ {% active_link /docs/glossary/ Glossary %}
  • - {% active_link /docs/installation/ Installation %} + {% active_link /getting-started Getting Started %}
      -
    • {% active_link /hassio/ Home Assistant %}
    • -
    • {% active_link /docs/installation/updating/ Updating %}
    • +
    • {% active_link /installation Installation %}
    • +
    • {% active_link /common-tasks/os/ Common Tasks %}
    • - {% active_link /docs/installation/troubleshooting/ Troubleshooting + {% active_link /docs/troubleshooting/ Troubleshooting %}
    diff --git a/source/_includes/asides/getting_started_navigation.html b/source/_includes/asides/getting_started_navigation.html index 32653342fad..2d70544e2df 100644 --- a/source/_includes/asides/getting_started_navigation.html +++ b/source/_includes/asides/getting_started_navigation.html @@ -2,7 +2,7 @@

    Getting Started