System preparations and environment building
In the project, we decided to use a raspberry pi as the home-assistant server. In the raspberry pi, I have pre-installed the latest version official operation system Raspbian.

Detailed installing procedures are as followed.
1. Install the dependence and update the system with the following command.
$ sudo apt-get install python3 python3-venv python3-pip
$ sudo apt-get update
$ sudo apt-get upgrade –y
2. Create homeassistant account and set the password
$ sudo useradd -rm homeassistant -G dialout,gpio
$ sudo passwd homeassistant
3. Create the homeassistant working index
$ cd /srv
$ sudo mkdir homeassistant
$ sudo chown homeassistant:homeassistant homeassistant
$ sudo -u homeassistant -H –S
4. Create the environment for Python 3
$ cd /srv/homeassistant
$ python3 -m venv .
$ source bin/activate
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ python3 -m pip install wheel
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install homeassistant
Then, to install the homeassistant into the system, I tried to follow the instruction from the official site of homeassistant. The URL is followed.
https://www.home-assistant.io/docs/installation/raspberry-pi/
To start the homeassistant, we need to follow get in to the index and activate the user called homeassistant. Then, enter the order 'hass' to start the program.
Finally, we can login to the dashboard with the URL: http://192.168.137.33:8123/lovelace/default_view


评论
发表评论