@@ -449,13 +449,13 @@ To set a cron job to run the script at regular intervals:
* Change to your Home Assistant user (where `homeassistant` is the name of the user):
```bash
-$ sudo -u homeassistant -H -s
+sudo -u homeassistant -H -s
```
* Open the crontab:
```bash
-$ crontab -e
+crontab -e
```
* If you are a TWO-RULE Person: Scroll to the bottom of the file and paste in the following line
@@ -506,19 +506,19 @@ To manually update:
* Change to your Home Assistant user (where `homeassistant` is the name of the user):
```bash
-$ sudo -u homeassistant -H -s
+sudo -u homeassistant -H -s
```
* Change to your certbot folder
```bash
-$ cd ~/certbot/
+cd ~/certbot/
```
* Run the renewal command
```bash
-$ ./certbot-auto renew --quiet --no-self-upgrade --standalone --preferred-challenges http-01
+./certbot-auto renew --quiet --no-self-upgrade --standalone --preferred-challenges http-01
```
* If you are a ONE-RULE person, replace the `certbot-auto` command above with `~/certbot/certbot-auto renew --quiet --no-self-upgrade --standalone --preferred-challenges tls-sni-01 --tls-sni-01-port 8123 --pre-hook "sudo systemctl stop home-assistant@homeassistant.service" --post-hook "sudo systemctl start home-assistant@homeassistant.service"`
diff --git a/source/_docs/ecosystem/certificates/tls_domain_certificate.markdown b/source/_docs/ecosystem/certificates/tls_domain_certificate.markdown
index 92131164e30..6c3a06ab7c0 100644
--- a/source/_docs/ecosystem/certificates/tls_domain_certificate.markdown
+++ b/source/_docs/ecosystem/certificates/tls_domain_certificate.markdown
@@ -15,11 +15,11 @@ If your Home Assistant instance is only accessible from your local network you c
### Run certbot
```bash
-$ mkdir certbot
-$ cd certbot
-$ wget https://dl.eff.org/certbot-auto
-$ chmod a+x certbot-auto
-$ sudo ./certbot-auto --manual certonly --preferred-challenges dns -d "mydomain.com" --email your@email.address
+mkdir certbot
+cd certbot
+wget https://dl.eff.org/certbot-auto
+chmod a+x certbot-auto
+sudo ./certbot-auto --manual certonly --preferred-challenges dns -d "mydomain.com" --email your@email.address
```
* Agree to Terms of Service
diff --git a/source/_docs/ecosystem/certificates/tls_self_signed_certificate.markdown b/source/_docs/ecosystem/certificates/tls_self_signed_certificate.markdown
index 4c71ad65b42..5554734520d 100644
--- a/source/_docs/ecosystem/certificates/tls_self_signed_certificate.markdown
+++ b/source/_docs/ecosystem/certificates/tls_self_signed_certificate.markdown
@@ -21,7 +21,7 @@ If you are going to use this certificate with the iOS app, you need to ensure yo
* If you are using iOS 10.3 or newer then [additional steps](https://support.apple.com/en-us/HT204477) are needed.
```bash
-$ openssl req -sha256 -newkey rsa:4096 -nodes -keyout privkey.pem -x509 -days 730 -out certificate.pem
+openssl req -sha256 -newkey rsa:4096 -nodes -keyout privkey.pem -x509 -days 730 -out certificate.pem
```
For details about the parameters, please check the OpenSSL documentation. Provide the requested information during the generation process.
@@ -41,8 +41,8 @@ A restart of Home Assistant is required for the changes to take effect.
If you get any log error about *ssl_key* or *ssl_certificate* that is **not a file for dictionary value** when run Home Assistant, you need to change owner or access permission of the `.pem` files as following:
```bash
-$ sudo chown homeassistant:homeassistant certificate.pem privkey.pem
-$ sudo chmod 755 certificate.pem privkey.pem
+sudo chown homeassistant:homeassistant certificate.pem privkey.pem
+sudo chmod 755 certificate.pem privkey.pem
```
A tutorial "[Working with SSL Certificates, Private Keys and CSRs](https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs)" could give you some insight about special cases.
diff --git a/source/_docs/ecosystem/nginx.markdown b/source/_docs/ecosystem/nginx.markdown
index 4acff2a4012..8a84cb0d0d4 100644
--- a/source/_docs/ecosystem/nginx.markdown
+++ b/source/_docs/ecosystem/nginx.markdown
@@ -37,11 +37,11 @@ Instead of example.com, use your domain. You will need to renew this certificate
If you do not own your own domain, you may generate a self-signed certificate. This will not work with IFTTT, but it will encrypt all of your Home Assistant traffic.
```bash
-$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 9999
-$ openssl rsa -in key.pem -out key.pem
-$ sudo cp key.pem cert.pem /etc/nginx/ssl
-$ sudo chmod 600 /etc/nginx/ssl/key.pem /etc/nginx/ssl/cert.pem
-$ sudo chown root:root /etc/nginx/ssl/key.pem /etc/nginx/ssl/cert.pem
+openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 9999
+openssl rsa -in key.pem -out key.pem
+sudo cp key.pem cert.pem /etc/nginx/ssl
+sudo chmod 600 /etc/nginx/ssl/key.pem /etc/nginx/ssl/cert.pem
+sudo chown root:root /etc/nginx/ssl/key.pem /etc/nginx/ssl/cert.pem
```
### 4. Create dhparams file
@@ -49,8 +49,8 @@ $ sudo chown root:root /etc/nginx/ssl/key.pem /etc/nginx/ssl/cert.pem
As a fair warning, this file will take a while to generate.
```bash
-$ cd /etc/nginx/ssl
-$ sudo openssl dhparam -out dhparams.pem 2048
+cd /etc/nginx/ssl
+sudo openssl dhparam -out dhparams.pem 2048
```
### 5. Install configuration file in nginx.
@@ -66,9 +66,9 @@ Some Linux distributions (including CentOS and Fedora) will not have the `/etc/n
### 6. Enable the Home Assistant configuration.
```bash
-$ cd /etc/nginx/sites-enabled
-$ sudo unlink default
-$ sudo ln ../sites-available/hass default
+cd /etc/nginx/sites-enabled
+sudo unlink default
+sudo ln ../sites-available/hass default
```
### 7. Start NGINX.
diff --git a/source/_docs/installation/armbian.markdown b/source/_docs/installation/armbian.markdown
index 29c44e2acd5..f26dfca7c2b 100644
--- a/source/_docs/installation/armbian.markdown
+++ b/source/_docs/installation/armbian.markdown
@@ -8,8 +8,8 @@ description: "Instructions to install Home Assistant on an Armbian-powered syste
Setup Python and `pip`:
```bash
-$ sudo apt-get update
-$ sudo apt-get install python3-dev python3-pip
+sudo apt-get update
+sudo apt-get install python3-dev python3-pip
```
Now that you installed python, there are two ways to install Home Assistant:
@@ -17,8 +17,8 @@ Now that you installed python, there are two ways to install Home Assistant:
2. Alternatively, you can install Home Assistant for the user you created when first booting Armbian:
```bash
-$ sudo pip3 install homeassistant
-$ hass --open-ui
+sudo pip3 install homeassistant
+hass --open-ui
```
Running these commands will:
diff --git a/source/_docs/installation/centos.markdown b/source/_docs/installation/centos.markdown
index 853fbd3b6c4..38a0d1aba1c 100644
--- a/source/_docs/installation/centos.markdown
+++ b/source/_docs/installation/centos.markdown
@@ -10,33 +10,33 @@ To run Python 3.x on [CentOS](https://www.centos.org/) or RHEL (Red Hat Enterpri
First of all install the software collection repository as root and [scl utils](https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/1/html-single/Software_Collections_Guide/). For example, on CentOS:
```bash
-$ sudo yum install centos-release-scl
-$ sudo yum-config-manager --enable centos-sclo-rh-testing
-$ sudo yum install -y scl-utils
+sudo yum install centos-release-scl
+sudo yum-config-manager --enable centos-sclo-rh-testing
+sudo yum install -y scl-utils
```
Install some dependencies you'll need later.
```bash
-$ sudo yum install gcc gcc-c++ systemd-devel
+sudo yum install gcc gcc-c++ systemd-devel
```
Then install the Python 3.6 package. If you are using CentOS 7 then you may have to install the packages for Python 3.6 using RHEL Methods listed here: https://www.softwarecollections.org/en/scls/rhscl/rh-python36/) for this to work as mentioned above.
```bash
-$ sudo yum install rh-python36
+sudo yum install rh-python36
```
This is part of the slight change when trying to install Python 3.6 and running the command `python36 --version` which will after install give you the correct version, but won't allow you to set the software collection using the `scl` command. This command downloads the RH collection of Python to allow you to run `scl` command to enable the environment in `bash` and then run the automate command using the template.
```bash
-$ yum install rh-python36
+yum install rh-python36
```
### Start using software collections
```bash
-$ scl enable rh-python36 bash
+scl enable rh-python36 bash
```
Once installed, switch to your `homeassistant` user (if you've set one up), enable the software collection and check that it has set up the new version of Python:
diff --git a/source/_docs/installation/fedora.markdown b/source/_docs/installation/fedora.markdown
index f241774e06f..0db6af933c9 100644
--- a/source/_docs/installation/fedora.markdown
+++ b/source/_docs/installation/fedora.markdown
@@ -8,29 +8,29 @@ description: "Installation of Home Assistant on your Fedora computer."
Install the development package of Python.
```bash
-$ sudo dnf -y install python3-devel redhat-rpm-config
+sudo dnf -y install python3-devel redhat-rpm-config
```
and Home Assistant itself.
```bash
-$ pip3 install homeassistant
+pip3 install homeassistant
```
To isolate the Home Assistant installation a [`venv`](https://docs.python.org/3/library/venv.html) is handy. First create a new directory to store the installation and adjust the permissions.
```bash
-$ sudo mkdir -p /opt/homeassistant
-$ sudo useradd -rm homeassistant -G dialout
-$ sudo chown -R homeassistant:homeassistant /opt/homeassistant
+sudo mkdir -p /opt/homeassistant
+sudo useradd -rm homeassistant -G dialout
+sudo chown -R homeassistant:homeassistant /opt/homeassistant
```
Now switch to the new directory, setup the `venv`, and activate it.
```bash
-$ sudo -u homeassistant -H -s
-$ cd /opt/homeassistant
-$ python3.6 -m venv .
-$ source bin/activate
+sudo -u homeassistant -H -s
+cd /opt/homeassistant
+python3.6 -m venv .
+source bin/activate
```
Install Home Assistant itself.
diff --git a/source/_docs/installation/hassbian.markdown b/source/_docs/installation/hassbian.markdown
index 3f1b772d888..1b26f35791f 100644
--- a/source/_docs/installation/hassbian.markdown
+++ b/source/_docs/installation/hassbian.markdown
@@ -16,6 +16,6 @@ Hassbian is our customized operating system for the Raspberry Pi Zero, 2,3 and 3
When instructions tell you to activate the virtual environment to install a Python library, or perform some tasks, the following commands will do this:
```bash
-$ sudo -u homeassistant -H -s
-$ source /srv/homeassistant/bin/activate
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
```
diff --git a/source/_docs/installation/hassbian/common-tasks.markdown b/source/_docs/installation/hassbian/common-tasks.markdown
index 59ad41cf261..304e12e17a4 100644
--- a/source/_docs/installation/hassbian/common-tasks.markdown
+++ b/source/_docs/installation/hassbian/common-tasks.markdown
@@ -12,7 +12,7 @@ Connect to the Raspberry Pi over ssh. Default user name is `pi` and password is
Linux and Mac OS users execute the following command in a terminal.
```bash
-$ ssh pi@ip-address-of-pi
+ssh pi@ip-address-of-pi
```
Windows users start [Putty][ssh-putty], enter the IP address of the Raspberry Pi in the *Host name* field and port 22 in the *Port* field. Then click *Open* and a terminal window will open. Enter the credentials. Default user name is `pi` and password is `raspberry`.
@@ -24,7 +24,7 @@ Optionally, starting with Windows 10 anniversary update, you can use the built-i
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo systemctl stop home-assistant@homeassistant.service
+sudo systemctl stop home-assistant@homeassistant.service
```
Replace `stop` with `start` or `restart` to get the desired functionality.
@@ -41,12 +41,12 @@ You can use `hassbian-config` to automate the process by running `sudo hassbian-
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo systemctl stop home-assistant@homeassistant.service
-$ sudo -u homeassistant -H -s
-$ source /srv/homeassistant/bin/activate
-$ pip3 install --upgrade homeassistant
-$ exit
-$ sudo systemctl start home-assistant@homeassistant.service
+sudo systemctl stop home-assistant@homeassistant.service
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
+pip3 install --upgrade homeassistant
+exit
+sudo systemctl start home-assistant@homeassistant.service
```
This will in order do the following:
@@ -63,9 +63,9 @@ This will in order do the following:
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo -u homeassistant -H -s
-$ source /srv/homeassistant/bin/activate
-$ hass
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
+hass
```
This will start Home Assistant in your shell and output anything that ends up in the log and more into the console. This will fail if the Home Assistant service is already running so don't forget to [stop][stop-homeassistant] it first. If you want the log output to be colored, execute `hass --script check_config` first. This will install the `colorlog` module.
@@ -75,9 +75,9 @@ This will start Home Assistant in your shell and output anything that ends up in
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo -u homeassistant -H -s
-$ source /srv/homeassistant/bin/activate
-$ hass --script check_config
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
+hass --script check_config
```
This will output any errors in your configuration files to console.
@@ -87,9 +87,9 @@ This will output any errors in your configuration files to console.
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo -u homeassistant -H -s
-$ cd /home/homeassistant/.homeassistant
-$ nano home-assistant.log
+sudo -u homeassistant -H -s
+cd /home/homeassistant/.homeassistant
+nano home-assistant.log
```
This will in order do the following:
@@ -102,7 +102,7 @@ Optionally, you can also view the log with `journalctl`.
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo journalctl -fu home-assistant@homeassistant.service
+sudo journalctl -fu home-assistant@homeassistant.service
```
### Edit the Home Assistant configuration
@@ -110,9 +110,9 @@ $ sudo journalctl -fu home-assistant@homeassistant.service
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo -u homeassistant -H -s
-$ cd /home/homeassistant/.homeassistant
-$ nano configuration.yaml
+sudo -u homeassistant -H -s
+cd /home/homeassistant/.homeassistant
+nano configuration.yaml
```
This will in order do the following:
@@ -126,7 +126,7 @@ It's generally recommended that you read the [Getting started][configuring-homea
### Change locale, timezone and keyboard layout
```bash
-$ sudo raspi-config
+sudo raspi-config
```
[configuring-homeassistant]: /getting-started/configuration/
diff --git a/source/_docs/installation/hassbian/upgrading.markdown b/source/_docs/installation/hassbian/upgrading.markdown
index 33cafa35593..f9d25d306f3 100644
--- a/source/_docs/installation/hassbian/upgrading.markdown
+++ b/source/_docs/installation/hassbian/upgrading.markdown
@@ -8,8 +8,8 @@ Hassbian is based on Raspbian and uses the same repositories. Any changes to Ras
Log in as the `pi` account and execute the following commands:
```bash
-$ sudo apt-get update
-$ sudo apt-get -y upgrade
+sudo apt-get update
+sudo apt-get -y upgrade
```
#### Updating Home Assistant
@@ -23,10 +23,10 @@ You can use `hassbian-config` to automate the process by running `sudo hassbian-
To update the Home Assistant installation execute the following command as the `pi` user.
```bash
-$ sudo systemctl stop home-assistant@homeassistant.service
-$ sudo -u homeassistant -H -s
-$ source /srv/homeassistant/bin/activate
-$ pip3 install --upgrade homeassistant
-$ exit
-$ sudo systemctl start home-assistant@homeassistant.service
+sudo systemctl stop home-assistant@homeassistant.service
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
+pip3 install --upgrade homeassistant
+exit
+sudo systemctl start home-assistant@homeassistant.service
```
diff --git a/source/_docs/installation/macos.markdown b/source/_docs/installation/macos.markdown
index 8658f7cedc8..58c4a215f2e 100644
--- a/source/_docs/installation/macos.markdown
+++ b/source/_docs/installation/macos.markdown
@@ -10,9 +10,9 @@ To run Home Assistant on macOS, you need to install Python first. Download Pytho
Open a terminal and install Home Assistant in a virtual environment:
```bash
-$ python3 -m venv homeassistant
-$ source homeassistant/bin/activate
-$ pip3 install homeassistant
+python3 -m venv homeassistant
+source homeassistant/bin/activate
+pip3 install homeassistant
```
You can then configure Home Assistant to autostart by following [this guide](/docs/autostart/macos/).
diff --git a/source/_docs/installation/python.markdown b/source/_docs/installation/python.markdown
index b837680b10d..ecb67056676 100644
--- a/source/_docs/installation/python.markdown
+++ b/source/_docs/installation/python.markdown
@@ -13,8 +13,8 @@ If you're running a Linux-based platform, we strongly recommend you follow the i
Once Python is installed, execute the following code in a console:
```bash
-$ pip3 install homeassistant
-$ hass --open-ui
+pip3 install homeassistant
+hass --open-ui
```
Running these commands will:
diff --git a/source/_docs/installation/raspberry-pi.markdown b/source/_docs/installation/raspberry-pi.markdown
index 1d662e30ffc..982fd32faac 100644
--- a/source/_docs/installation/raspberry-pi.markdown
+++ b/source/_docs/installation/raspberry-pi.markdown
@@ -28,44 +28,44 @@ $ ssh pi@ipaddress
Changing the default password is encouraged.
```bash
-$ passwd
+passwd
```
Update the system.
```bash
-$ sudo apt-get update
-$ sudo apt-get upgrade -y
+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
+sudo apt-get install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev
```
Add an account for Home Assistant called `homeassistant`.
Since this account is only for running Home Assistant 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
+sudo useradd -rm homeassistant -G dialout,gpio,i2c
```
Next we will create a directory for the installation of Home Assistant and change the owner to the `homeassistant` account.
```bash
-$ cd /srv
-$ sudo mkdir homeassistant
-$ sudo chown homeassistant:homeassistant homeassistant
+cd /srv
+sudo mkdir homeassistant
+sudo chown homeassistant:homeassistant homeassistant
```
Next up is to create and change to a virtual environment for Home Assistant. This will be done as the `homeassistant` account.
```bash
-$ sudo -u homeassistant -H -s
-$ cd /srv/homeassistant
-$ python3 -m venv .
-$ source bin/activate
+sudo -u homeassistant -H -s
+cd /srv/homeassistant
+python3 -m venv .
+source bin/activate
```
Once you have activated the virtual environment (notice the prompt change) you will need to run the following command to install a required python package.
@@ -99,9 +99,9 @@ If you want to setup `hass` as a daemon and autostart it on boot please refer to
To update to the latest version of Home Assistant follow these simple steps:
```bash
-$ sudo -u homeassistant -H -s
-$ source /srv/homeassistant/bin/activate
-$ pip3 install --upgrade homeassistant
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
+pip3 install --upgrade homeassistant
```
Once the last command executes, restart the Home Assistant service to apply the latest updates. Please keep in mind that some updates may take longer to start up than others. If Home Assistant fails to start, make sure you check the **Breaking Changes** from the [Release Notes](https://github.com/home-assistant/home-assistant/releases).
@@ -111,9 +111,9 @@ Once the last command executes, restart the Home Assistant service to apply the
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
-$ sudo -u homeassistant -H -s
-$ source /srv/homeassistant/bin/activate
-$ pip3 install homeassistant==0.XX.X
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
+pip3 install homeassistant==0.XX.X
```
### Run the beta version
@@ -121,9 +121,9 @@ $ pip3 install homeassistant==0.XX.X
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
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
+pip3 install --pre --upgrade homeassistant
```
### Run the development version
@@ -137,9 +137,9 @@ If you want to stay on the bleeding-edge Home Assistant development branch, you
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
+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
@@ -147,6 +147,6 @@ $ pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@
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
+sudo -u homeassistant -H -s
+source /srv/homeassistant/bin/activate
```
diff --git a/source/_docs/installation/troubleshooting.markdown b/source/_docs/installation/troubleshooting.markdown
index c9fc3c2eb9b..a27b9582a29 100644
--- a/source/_docs/installation/troubleshooting.markdown
+++ b/source/_docs/installation/troubleshooting.markdown
@@ -13,7 +13,7 @@ This utility should have been installed as part of the Python installation. Chec
If you are able to successfully run `python3 --version` but not `pip3`, install Home Assistant by running the following command instead:
```bash
-$ python3 -m pip install homeassistant
+python3 -m pip install homeassistant
```
On a Debian system, you can also install python3 by `sudo apt-get install python3`, and pip3 by `sudo apt-get install python3-pip`.
@@ -22,7 +22,7 @@ On a Debian system, you can also install python3 by `sudo apt-get install python
[Pip](https://pip.pypa.io/en/stable/) should come bundled with the latest Python 3 but is omitted by some distributions. If you are unable to run `python3 -m pip --version` you can install `pip` by [downloading the installer](https://bootstrap.pypa.io/get-pip.py) and running it with Python 3:
```bash
-$ python3 get-pip.py
+python3 get-pip.py
```
#### libyaml is not found or a compiler error
@@ -43,21 +43,21 @@ To fix this you will need to open your machine's firewall for TCP traffic to por
For systems with **firewalld** (Fedora, CentOS/RHEL, etc.):
```bash
-$ sudo firewall-cmd --permanent --add-port=8123/tcp
-$ sudo firewall-cmd --reload
+sudo firewall-cmd --permanent --add-port=8123/tcp
+sudo firewall-cmd --reload
```
For UFW systems (Ubuntu, Debian, Raspbian, etc.):
```bash
-$ sudo ufw allow 8123/tcp
+sudo ufw allow 8123/tcp
```
For `iptables` systems (was the default for older distributions):
```bash
-$ iptables -I INPUT -p tcp --dport 8123 -j ACCEPT
-$ iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere
+iptables -I INPUT -p tcp --dport 8123 -j ACCEPT
+iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere
```
#### After upgrading, your browser login gets stuck at the "loading data" step
diff --git a/source/_docs/installation/virtualenv.markdown b/source/_docs/installation/virtualenv.markdown
index 3625dc13954..e420e890ff7 100644
--- a/source/_docs/installation/virtualenv.markdown
+++ b/source/_docs/installation/virtualenv.markdown
@@ -23,23 +23,23 @@ It should not contain any OS specific instructions.
1. Create a virtual environment in your current directory:
```bash
- $ python3 -m venv homeassistant
+ python3 -m venv homeassistant
```
2. Open the virtual environment:
```bash
- $ cd homeassistant
+ cd homeassistant
```
3. Activate the virtual environment:
```bash
- $ source bin/activate
+ source bin/activate
```
4. Install Home Assistant:
```bash
- $ python3 -m pip install homeassistant
+ python3 -m pip install homeassistant
```
5. Run Home Assistant:
```bash
- $ hass --open-ui
+ 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.
@@ -49,9 +49,9 @@ It should not contain any OS specific instructions.
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
+ 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.
@@ -61,9 +61,9 @@ It should not contain any OS specific instructions.
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
+cd homeassistant
+source bin/activate
+pip3 install homeassistant==0.XX.X
```
#### Run the beta version
@@ -71,9 +71,9 @@ $ pip3 install homeassistant==0.XX.X
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
+cd homeassistant
+source bin/activate
+pip3 install --pre --upgrade homeassistant
```
#### Run the development version
@@ -87,9 +87,9 @@ If you want to stay on the bleeding-edge Home Assistant development branch, you
For example:
```bash
-$ cd homeassistant
-$ source bin/activate
-$ pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
+cd homeassistant
+source bin/activate
+pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
```
### Notes
@@ -109,7 +109,7 @@ Looking for more advanced guides? Check our [Raspbian guide](/docs/installation/
If you've upgraded Python (for example, you were running 3.7.1 and now you've installed 3.7.3) then you'll need to build a new virtual environment. Simply rename your existing virtual environment directory:
```bash
-$ mv homeassistant homeassistant.old
+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/z-wave/installation.markdown b/source/_docs/z-wave/installation.markdown
index 93e31892ea0..66d3e410d80 100644
--- a/source/_docs/z-wave/installation.markdown
+++ b/source/_docs/z-wave/installation.markdown
@@ -137,7 +137,7 @@ $ docker run -d --name="home-assistant" -v /home/pi/homeassistant:/config -v /et
If the path of `/dev/ttyACM0` doesn't work then you can find the path of the stick by disconnecting and then reconnecting it, and running the following in the Docker host:
```bash
-$ ls -1tr /dev/tty*|tail -n 1
+ls -1tr /dev/tty*|tail -n 1
```
The `modemmanager` package will interfere with any Z-Wave (or Zigbee) stick and should be removed or disabled. Failure to do so will result in random failures of those components. For example you can disable with `sudo systemctl disable ModemManager` and remove with `sudo apt-get purge modemmanager`
@@ -149,7 +149,7 @@ You do not need to install any software to use Z-Wave.
To find the path of your Z-Wave USB stick, disconnect it and then reconnect it to your system and run:
```bash
-$ ls -1tr /dev/tty*|tail -n 1
+ls -1tr /dev/tty*|tail -n 1
```
### Community install methods
@@ -173,7 +173,7 @@ You may also have to install the Python development libraries for your version o
To find the path of your Z-Wave USB stick, disconnect it and then reconnect it to your system and run:
```bash
-$ ls -ltr /dev/tty*|tail -n 1
+ls -ltr /dev/tty*|tail -n 1
```
That will give you a line that looks something like this:
@@ -187,7 +187,7 @@ Where the date and time displayed is approximately the time you connected the US
Or, if there is no result, try to find detailed USB connection info with:
```bash
-$ dmesg | grep USB
+dmesg | grep USB
```
If Home Assistant (`hass`) runs with another user (e.g., *homeassistant*) you need to give access to the stick with:
@@ -210,13 +210,13 @@ The output from `ls -ltr` above contains the following information:
When installing on macOS you may have to also run the command below ahead of time, replace "x.x" with the version of Python (`$ python3 --version`) you have installed.
```bash
-$ sudo /Applications/Python\ x.x/Install\ Certificates.command
+sudo /Applications/Python\ x.x/Install\ Certificates.command
```
On macOS you can find the USB stick with:
```bash
-$ ls /dev/cu.usbmodem*
+ls /dev/cu.usbmodem*
```
## Troubleshooting
@@ -242,7 +242,7 @@ systemctl disable ModemManager.service
Sometimes the device may not be accessible and you'll get an error message upon startup about not being able to set up Z-Wave. Run the following command for your device path (here we're using `/dev/ttyAMA0` for our Razberry board):
```bash
-$ ls -l /dev/ttyAMA0
+ls -l /dev/ttyAMA0
```
You should then see something like this:
@@ -254,20 +254,20 @@ crw-rw---- 1 root dialout 204, 64 Apr 1 12:34 /dev/ttyAMA0
The important pieces are the first piece `crw-rw----` and the group `dialout`. If those are different then, for your device path, run:
```bash
-$ sudo chgrp dialout /dev/ttyAMA0
-$ sudo chmod g+rw /dev/ttyAMA0
+sudo chgrp dialout /dev/ttyAMA0
+sudo chmod g+rw /dev/ttyAMA0
```
Check too that the account you're running Home Assistant as is in the `dialout` group. For instance, if you're using `homeassistant`:
```bash
-$ groups homeassistant
+groups homeassistant
```
That should include `dialout`, if it doesn't then:
```bash
-$ sudo usermod -aG dialout homeassistant
+sudo usermod -aG dialout homeassistant
```
### Unable to install Python Openzwave
diff --git a/source/_posts/2015-09-18-monitoring-with-glances-and-home-assistant.markdown b/source/_posts/2015-09-18-monitoring-with-glances-and-home-assistant.markdown
index a42a75e54b8..fd84a65e426 100644
--- a/source/_posts/2015-09-18-monitoring-with-glances-and-home-assistant.markdown
+++ b/source/_posts/2015-09-18-monitoring-with-glances-and-home-assistant.markdown
@@ -22,14 +22,14 @@ In this post a default Fedora 22 Workstation installation is used on the host th
First some extra packages are needed beside Glances, especially the [bottle](http://bottlepy.org/docs/dev/index.html) webserver. I guess that Glances is available for your distribution as well. Otherwise follow those [instructions](https://github.com/nicolargo/glances#installation).
```bash
-$ sudo dnf -y install glances python-bottle
+sudo dnf -y install glances python-bottle
```
On Fedora the Firewall settings are strict. Let's open port 61208 to allow other hosts to connect to that port. This is not needed if you just want to observe your local machine.
```bash
-$ sudo firewall-cmd --permanent --add-port=61208/tcp
-$ sudo firewall-cmd --reload
+sudo firewall-cmd --permanent --add-port=61208/tcp
+sudo firewall-cmd --reload
```
Launch `glances` and keep an eye on the output.
diff --git a/source/_posts/2015-12-07-influxdb-and-grafana.markdown b/source/_posts/2015-12-07-influxdb-and-grafana.markdown
index 30367848413..99cd2cc3edb 100644
--- a/source/_posts/2015-12-07-influxdb-and-grafana.markdown
+++ b/source/_posts/2015-12-07-influxdb-and-grafana.markdown
@@ -18,13 +18,13 @@ The `influxdb` component makes it possible to transfer all state changes from Ho
The first step is to install the InfluxDB packages. If you are not running Fedora, check the [installation](https://influxdb.com/docs/v0.9/introduction/installation.html) section for further details.
```bash
-$ sudo dnf -y install http://influxdb.s3.amazonaws.com/influxdb-0.9.5.1-1.x86_64.rpm
+sudo dnf -y install http://influxdb.s3.amazonaws.com/influxdb-0.9.5.1-1.x86_64.rpm
```
Launch the InfluxDB service.
```bash
-$ sudo systemctl start influxdb
+sudo systemctl start influxdb
```
If everything went well, then the web interface of the database should be accessible at [http://localhost:8083/](http://localhost:8083/). Create a database `home_assistant` to use with Home Assistant either with the web interface or the commandline tool `influx`.
@@ -77,15 +77,15 @@ time domain entity_id value
[Grafana](http://grafana.org/) is a dashboard that can create graphs from different sources including InfluxDB. The installation is simple, and there are detailed steps for many different configurations on the [Grafana installation](http://docs.grafana.org/installation/) page. For a recent system that is running Fedora:
```bash
-$ sudo dnf -y install https://grafanarel.s3.amazonaws.com/builds/grafana-2.5.0-1.x86_64.rpm
+sudo dnf -y install https://grafanarel.s3.amazonaws.com/builds/grafana-2.5.0-1.x86_64.rpm
```
Start the grafana server.
```bash
-$ sudo systemctl daemon-reload
-$ sudo systemctl start grafana-server
-$ sudo systemctl status grafana-server
+sudo systemctl daemon-reload
+sudo systemctl start grafana-server
+sudo systemctl status grafana-server
```
Login with the username `admin` and the password `admin` at [http://localhost:3000/login](http://localhost:3000/login). Now follow the [InfluxDB setup instructions](http://docs.grafana.org/datasources/influxdb/).
@@ -103,4 +103,3 @@ If the graph is not showing up in the dashboard you need to adjust the time rang

Grafana Temperature graph
-
diff --git a/source/_posts/2016-07-06-pocketchip-running-home-assistant.markdown b/source/_posts/2016-07-06-pocketchip-running-home-assistant.markdown
index 3c87611103b..da50f1aed52 100644
--- a/source/_posts/2016-07-06-pocketchip-running-home-assistant.markdown
+++ b/source/_posts/2016-07-06-pocketchip-running-home-assistant.markdown
@@ -28,27 +28,27 @@ First a couple of tweaks like setting up `sudo`, upgrading the existing installa
A Debian installation is available by default. This means that some dependencies for Home Assistant are missing. I haven't checked if a new build for the PocketCHIP would include them. So, after a `$ sudo apt-get update` installing those dependencies take a minute or two.
```bash
-$ sudo apt-get install python3-dev python3-pip python3-venv
+sudo apt-get install python3-dev python3-pip python3-venv
```
As usual I run Python applications in a [venv](https://docs.python.org/3/library/venv.html).
```bash
-$ pvenv ha
+pvenv ha
```
Let's activate the created environment.
```bash
-$ cd ha
-$ source bin/activate
+cd ha
+source bin/activate
```
If you haven't seen the next two commands already then you should visit our [frontsite](/).
```bash
-$ pip3 install homeassistant
-$ hass --open-ui
+pip3 install homeassistant
+hass --open-ui
```
With `surf` the browsing experience on the low-resolution display is not that great. Most smartphones, even very cheap ones, have touchscreens with higher resolutions. Nevermind, [`midori`](https://twitter.com/fabaff/status/748852317047418880) is not better.
@@ -59,4 +59,3 @@ With `surf` the browsing experience on the low-resolution display is not that gr
Well, with PocketCHIP and Home Assistant you could run your home automation on a 49 USD device with a touchscreen, an integrated USP, and a keyboard. With the GPIO available on top of the display you could even connect your PocketCHIP directly to sensors and actuators.
-
diff --git a/source/_posts/2016-07-16-sqlalchemy-knx-join-simplisafe.markdown b/source/_posts/2016-07-16-sqlalchemy-knx-join-simplisafe.markdown
index 8e18989d11c..2c3b2a3c11c 100644
--- a/source/_posts/2016-07-16-sqlalchemy-knx-join-simplisafe.markdown
+++ b/source/_posts/2016-07-16-sqlalchemy-knx-join-simplisafe.markdown
@@ -15,8 +15,8 @@ It's time for Home Assistant 0.24 and it's full of new integration for your Home
[Roy Hooper][@rhooper] did an amazing job migrating the history support from being tied to SQLite to use the ORM SQLAlchemy instead. This means that you can now use **any** SQL backend for the history. So besides SQLite you can now databases like MySQL or PostgreSQL. However, this does require that you install [SQLAlchemy] and run a command to migrate your existing history over. We tried to make the process as seamless as possible by introducing a new command line script:
```bash
-$ pip3 install SQLAlchemy
-$ hass --script db_migrator --config /path/to/config
+pip3 install SQLAlchemy
+hass --script db_migrator --config /path/to/config
```
You can omit the `--config` option if you use the default configuration directory. Run the script with `--help` to get more options.
diff --git a/source/_posts/2017-02-03-hassbian-toybox.markdown b/source/_posts/2017-02-03-hassbian-toybox.markdown
index b7c9f6e2979..c7ff75b749c 100644
--- a/source/_posts/2017-02-03-hassbian-toybox.markdown
+++ b/source/_posts/2017-02-03-hassbian-toybox.markdown
@@ -24,12 +24,12 @@ Currently includes:
All of these scripts are available in the directory `/home/pi/hassbian-scripts/`. This directory is actually a cloned git repository that's cloned on first boot and can be updated to the latest release with ease after.
To update the hassbian-scripts directory execute the following command as the `pi` user.
```bash
-$ cd hassbian-scripts
-$ git pull
+cd hassbian-scripts
+git pull
```
To use any of the hassbian-scripts, execute the following command as the `pi` user. Here we use the libcec script as an example.
```bash
-$ sudo ./hassbian-scripts/install_libcec.sh
+sudo ./hassbian-scripts/install_libcec.sh
```
For more information about these scripts have a look a the [hassbian-scripts repository][hassbian-repo].
diff --git a/source/_posts/2017-02-04-babyphone.markdown b/source/_posts/2017-02-04-babyphone.markdown
index 2ba7eeb2f16..9aa91a293f2 100644
--- a/source/_posts/2017-02-04-babyphone.markdown
+++ b/source/_posts/2017-02-04-babyphone.markdown
@@ -29,10 +29,10 @@ We change the platform name for binary sensor in 0.38 from `ffmpeg` to `ffmpeg_n
On Raspbian Jessie, you can setup [FFmpeg](/components/ffmpeg) and install an [icecast2](http://icecast.org/) server using:
```bash
-$ sudo echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
-$ sudo apt-get update
-$ sudo apt-get -t jessie-backports install ffmpeg
-$ sudo apt-get install icecast2
+sudo echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
+sudo apt-get update
+sudo apt-get -t jessie-backports install ffmpeg
+sudo apt-get install icecast2
```
We setup an icecast mount point for our babyphone and update `/etc/icecast2/icecast.xml`:
diff --git a/source/_posts/2017-05-01-home-assistant-on-raspberry-pi-zero-in-30-minutes.markdown b/source/_posts/2017-05-01-home-assistant-on-raspberry-pi-zero-in-30-minutes.markdown
index a9fb1455cd9..85276819db0 100644
--- a/source/_posts/2017-05-01-home-assistant-on-raspberry-pi-zero-in-30-minutes.markdown
+++ b/source/_posts/2017-05-01-home-assistant-on-raspberry-pi-zero-in-30-minutes.markdown
@@ -63,8 +63,8 @@ It's a good idea to change the password. To do so, use the `passwd` command.
Next, type the following two commands into the SSH console:
```bash
-$ sudo systemctl enable install_homeassistant.service
-$ sudo systemctl start install_homeassistant.service
+sudo systemctl enable install_homeassistant.service
+sudo systemctl start install_homeassistant.service
```
Wait about 15-20 minutes and voilà you have your Home Assistant on your Raspberry Pi Zero W in 30 minutes.
diff --git a/source/_posts/2018-03-29-fedora-atomic.markdown b/source/_posts/2018-03-29-fedora-atomic.markdown
index a435984b1b7..8fe3280c300 100644
--- a/source/_posts/2018-03-29-fedora-atomic.markdown
+++ b/source/_posts/2018-03-29-fedora-atomic.markdown
@@ -35,8 +35,8 @@ Deployments:
The release is 27.100. The latest is 27.105. So, let's update the host and reboot it.
```bash
-$ sudo atomic host upgrade
-$ sudo systemctl reboot
+sudo atomic host upgrade
+sudo systemctl reboot
```
You can also see that Docker is already running. No installation needed.
@@ -54,21 +54,21 @@ Further we will cover how it works for Home Assistant and [Mosquitto](https://mo
Instead of `docker` we can use the command-line tool [`atomic`](http://www.projectatomic.io/docs/usr-bin-atomic/) to perform a lot of tasks. Download the images for the containers. We are pulling the images from [Docker Hub](https://hub.docker.com/), thus we need to add the registry to use.
```bash
-$ sudo atomic install docker.io/homeassistant/home-assistant
-$ sudo atomic install docker.io/eclipse-mosquitto
+sudo atomic install docker.io/homeassistant/home-assistant
+sudo atomic install docker.io/eclipse-mosquitto
```
Both containers need additional directories for persistent storage.
```bash
-$ sudo mkdir -p /opt/home-assistant
-$ sudo mkdir -p /opt/mosquitto/{config,data,log}
+sudo mkdir -p /opt/home-assistant
+sudo mkdir -p /opt/mosquitto/{config,data,log}
```
We need a copy of `mosquitto.conf` to run Mosquitto later:
```bash
-$ sudo curl -o /opt/mosquitto/config/mosquitto.conf \
+sudo curl -o /opt/mosquitto/config/mosquitto.conf \
https://raw.githubusercontent.com/eclipse/mosquitto/master/mosquitto.conf
```
@@ -125,14 +125,14 @@ Exit to be not longer `root`.
Reload `systemd` to make it aware of the new configurations.
```bash
-$ sudo systemctl daemon-reload
+sudo systemctl daemon-reload
```
Now, both container can be controlled by `systemctl`.
```bash
-$ sudo systemctl enable home-assistant.service --now
-$ sudo systemctl enable mosquitto.service --now
+sudo systemctl enable home-assistant.service --now
+sudo systemctl enable mosquitto.service --now
```
Check with `$ sudo systemctl status [name].service` if there are error or the services are running.
diff --git a/source/hassio/commandline.markdown b/source/hassio/commandline.markdown
index 6e7022717b7..1023c77882b 100644
--- a/source/hassio/commandline.markdown
+++ b/source/hassio/commandline.markdown
@@ -13,40 +13,40 @@ On the SSH command line, you can use the `hassio` command to retrieve logs, chec
## Home Assistant
```bash
-$ hassio homeassistant check
-$ hassio homeassistant info
-$ hassio homeassistant logs
-$ hassio homeassistant options
-$ hassio homeassistant rebuild
-$ hassio homeassistant restart
-$ hassio homeassistant start
-$ hassio homeassistant stats
-$ hassio homeassistant stop
-$ hassio homeassistant update
+hassio homeassistant check
+hassio homeassistant info
+hassio homeassistant logs
+hassio homeassistant options
+hassio homeassistant rebuild
+hassio homeassistant restart
+hassio homeassistant start
+hassio homeassistant stats
+hassio homeassistant stop
+hassio homeassistant update
```
## Supervisor
```bash
-$ hassio supervisor info
-$ hassio supervisor logs
-$ hassio supervisor reload
-$ hassio supervisor update
+hassio supervisor info
+hassio supervisor logs
+hassio supervisor reload
+hassio supervisor update
```
## Host
```bash
-$ hassio host reboot
-$ hassio host shutdown
-$ hassio host update
+hassio host reboot
+hassio host shutdown
+hassio host update
```
## Hardware
```bash
-$ hassio hardware info
-$ hassio hardware audio
+hassio hardware info
+hassio hardware audio
```
## Usage examples