8,367
edits
Changes
→Installation via docker
<ol style="list-style-type: decimal;">
<li><p>First, please install docker and ensure that docker can run normally. For the installation steps of docker, please refer to the instructions in the [[\lOrange Pi Zero 2W#How to install Docker|'''How to Install Docker''']] section.</p></li>
<li><p>Then you can search for the docker image of Home Assistant</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker search homeassistant'''</p>|}</li>
<li><p>Then use the following command to download the Docker image of Home Assistant to your local computer. The image size is about 1GB, and the download time will be relatively long. Please be patient and wait for the download to complete.</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''docker pull homeassistant/home-assistant'''</p>
<p>Using default tag: latest</p>
<p>Digest: sha256:81d381f5008c082a37da97d8b08dd8b358dae7ecf49e62ce3ef1eeaefc4381bb</p>
<p>Status: Downloaded newer image for homeassistant/home-assistant:latest</p>
<p>docker.io/homeassistant/home-assistant:latest</p>|}</li>
<li><p>Then you can use the following command to view the docker image of Home Assistant you just downloaded</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''docker images homeassistant/home-assistant'''</p>
<p>REPOSITORY TAG IMAGE ID CREATED SIZE</p><p>homeassistant/home-assistant latest bfa0ab9e1cf5 2 months ago '''<span style="color:#FF0000">1.17GB</span>'''</p>|}</li>
<li><p>At this point you can run the Home Assistant docker container</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''docker run -d \'''</p>
:<p>'''--name homeassistant \'''</p>:<p>'''--privileged \'''</p>:<p>'''--restart=unless-stopped \'''</p>:<p>'''-e TZ=Asia/Shanghai \'''</p>:<p>'''-v /home/orangepi/home-assistant:/config \'''</p>:<p>'''--network=host \'''</p>:<p>'''homeassistant/home-assistant:latest'''</p>|}</li>
<li><p>Then enter【the IP address of the development board: 8123】in the browser to see the Home Assistant interface</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''It takes a while for the Home Assistant container to start. If the interface below does not display normally, please wait a few seconds before refreshing it. If the following interface is not displayed normally after waiting for more than a minute, it means there is a problem with the Home Assistant installation. At this time, you need to check whether there is a problem with the previous installation and setting process.'''</p></big>|}
<div class="figure">
<ol style="list-style-type: lower-alpha;">
<li><p>The command to view the docker container is as follows</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker ps -a'''</p>|}</li>
<li><p>The command to stop the Home Assistant container is as follows</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker stop homeassistant'''</p>|}</li>
<li><p>The command to delete the Home Assistant container is as follows</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker rm homeassistant'''</p>|}</li></ol>
</li></ol>
<span id="installation-via-python"></span>
=== Installation via python ===