1,575
edits
Changes
Created page with "[https://www.home-assistant.io/ Home Assistant] is an Open Source [https://en.wikipedia.org/wiki/Home_automation Home Automation] framework that was very easy to setup and get..."
[https://www.home-assistant.io/ Home Assistant] is an Open Source [https://en.wikipedia.org/wiki/Home_automation Home Automation] framework that was very easy to setup and get running. I'm not going to lie, I first tried [https://www.openhab.org/ OpenHAB] (it was billed as being the oldest, most stable, and best community supported system) but was unable to ever get it working right. Home Assistant worked "right out of the box". This is a quick write-up on how to install it under Debian 10.
=Setup the Environment=
#Update and upgrade you system by running <pre>sudo apt update sudo apt upgrade</pre>
#Install some necessary Python3 packages by running <pre>sudo apt install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev</pre>
#Create a user (and add him to the dialout group) for Home Assistant by running <pre>sudo useradd -rm homeassistant -G dialout</pre>
#Create an Install Directory for Home Assistant and set the permissions by running <pre>sudo mkdir /srv/homeassistant sudo chmod homeassistant:homeassistant /srv/homeassistant</pre>
=Create and move to the Virtual Environment=
#Switch to our HA user by running <pre>sudo -u homeassistant -H -s</pre>
#Move to the HA install directory by running <pre>cd /srv/homeassistant</pre>
#Setup the Python3 Virtual Environment by running <pre>python3 -m venv . source bin/activate</pre>
=Install and Run Home Assistant=
#Install Python 3's package installer [https://pypi.org/project/pip/ pip] by running <pre>python3 -m pip install wheel</pre>
#Install Home Assistant using pip by running <pre>pip3 install homeassistant</pre>
#Start Home Assistant by running <pre>hass</pre>
=Make HA Auto-Start on Boot=
#Create a new systemd service for Home Assistant by running <pre>sudo nano /etc/systemd/system/homeassistant.service</pre>
#Fill in the contents of this new file by running <pre>[Unit] Description=Home Assistant After=network-online.target [Service] Type=simple User=%i ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant" [Install] WantedBy=multi-user.target</pre>
#Reload systemd so it will recognized our new service by running <pre>sudo systemctl --system daemon-reload</pre>
#Enable our new service by running <pre>sudo systemctl enable homeassistant</pre>
=Finish Setup=
#Visit '''http://<my_ha_server_name>:8123''' on a web browser and follow the prompts to create a new user.
=Setup the Environment=
#Update and upgrade you system by running <pre>sudo apt update sudo apt upgrade</pre>
#Install some necessary Python3 packages by running <pre>sudo apt install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev</pre>
#Create a user (and add him to the dialout group) for Home Assistant by running <pre>sudo useradd -rm homeassistant -G dialout</pre>
#Create an Install Directory for Home Assistant and set the permissions by running <pre>sudo mkdir /srv/homeassistant sudo chmod homeassistant:homeassistant /srv/homeassistant</pre>
=Create and move to the Virtual Environment=
#Switch to our HA user by running <pre>sudo -u homeassistant -H -s</pre>
#Move to the HA install directory by running <pre>cd /srv/homeassistant</pre>
#Setup the Python3 Virtual Environment by running <pre>python3 -m venv . source bin/activate</pre>
=Install and Run Home Assistant=
#Install Python 3's package installer [https://pypi.org/project/pip/ pip] by running <pre>python3 -m pip install wheel</pre>
#Install Home Assistant using pip by running <pre>pip3 install homeassistant</pre>
#Start Home Assistant by running <pre>hass</pre>
=Make HA Auto-Start on Boot=
#Create a new systemd service for Home Assistant by running <pre>sudo nano /etc/systemd/system/homeassistant.service</pre>
#Fill in the contents of this new file by running <pre>[Unit] Description=Home Assistant After=network-online.target [Service] Type=simple User=%i ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant" [Install] WantedBy=multi-user.target</pre>
#Reload systemd so it will recognized our new service by running <pre>sudo systemctl --system daemon-reload</pre>
#Enable our new service by running <pre>sudo systemctl enable homeassistant</pre>
=Finish Setup=
#Visit '''http://<my_ha_server_name>:8123''' on a web browser and follow the prompts to create a new user.