Created
September 7, 2020 10:14
-
-
Save mintbird/12a2645ef6c10b37f55240e2aff75434 to your computer and use it in GitHub Desktop.
Script for Installing Home Assistant for Raspberry Pi Zero / Zero W
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Createed from instruction on this page | |
# https://www.home-assistant.io/docs/installation/raspberry-pi/ | |
# Update library | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Install required library | |
sudo apt-get -y install python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev autoconf build-essential | |
# Add an account for Home Assistant Core | |
sudo useradd -rm homeassistant -G dialout,gpio,i2c | |
# Create a directory for the installation | |
cd /srv | |
sudo mkdir homeassistant | |
sudo chown homeassistant:homeassistant homeassistant | |
# Create and change to a virtual environment for Home Assistant Core | |
sudo -u homeassistant -H -s | |
cd /srv/homeassistant | |
python3 -m venv . | |
source bin/activate | |
# Install a required Python package | |
python3 -m pip install wheel | |
# Install Home Assistant Core | |
pip3 install homeassistant | |
# Run Home Assistant | |
hass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment