更改

跳转至: 导航搜索

Orange Pi Zero 2W

添加991字节, 2023年9月21日 (四) 15:02
通过docker安装
<ol style="list-style-type: decimal;">
<li><p>首先请安装好docker,并确保docker能正常运行。docker的安装步骤请参考[[\lOrange Pi Zero 2W#安装Docker的方法|'''安装Docker的方法''']]一节的说明。</p></li>
<li><p>然后可以搜索下Home Assistant的docker镜像</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker search homeassistant'''</p>|}</li>
<li><p>然后使用下面的命令下载Home Assistant的docker镜像到本地,镜像大小大概有1GB多,下载时间会比较长,请耐心等待下载完成</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>然后可以使用下面的命令查看下刚下载的Home Assistant的docker镜像</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''docker images homeassistant/home-assistant'''</p>
<p>REPOSITORY &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TAG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CREATED &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE</p><p>homeassistant/home-assistant &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latest &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bfa0ab9e1cf5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 months ago &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<span style="color:#FF0000">1.17GB</span>'''</p>|}</li>
<li><p>此时就可以运行Home Assistant的docker容器了</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>然后在浏览器中输入【开发板的IP地址:8123】就能看到Home Assistant的界面</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Home Assistant容器的启动需要一段时间,如果下面的界面没有正常显示,请等待几秒钟再刷新。如果等待一分钟以上还没有正常显示下面的界面说明Home Assistant安装有问题,此时需要去检查前面的安装设置过程是否有问题了。'''</p></big>|}
<p>[[File:media/image183.png]]</p></li>
<li><p>然后输入'''姓名、用户名'''和'''密码'''再点击'''创建账号'''</p>
<ol style="list-style-type: lower-alpha;">
<li><p>查看docker容器的命令如下所示</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker ps -a'''</p>|}</li>
<li><p>停止Home Assistant容器的命令如下所示</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker stop homeassistant'''</p>|}</li>
<li><p>删除Home Assistant容器的命令如下所示</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''docker rm homeassistant'''</p>|}</li></ol>
</li></ol>
8,460
个编辑

导航菜单