在弹出的选择机型选择raspberrypi3
没有弹出就重新执行apt --fix-broken install
7、安装成功后有提示:用你的ip:8123进入homeassiatant。
浏览器输入前面设置的onecloudIP:8123进入homeassiatant,根据网络情况大概要等5到10分钟。
期间也可以安装docker管理软件看镜像及容器的安装情况
docker run --restart always --name fast -p 8081:8081 -d -v /var/run/docker.sock:/var/run/docker.sock wangbinxingkong/fast
安装完成后在浏览器访问 IP:8081查看,会有一堆自动下载的和supervised相关的镜像,
浏览器打开出现欢迎界面后还会自动下载homeassistant镜像,看网络情况大概要10到20分钟,直至出现登录界面,此时容器管理那边你会看到多出了个1.2G左右的homeassistant镜像。
四、安装airplay
1、
sudo apt install -y ufw zsh vim tmux
chsh -s $(which zsh)
sh -c "$(wget -O- https://raw.githubusercontent.co ... er/tools/install.sh)"
2、设置防火墙规则:下面的五行IP为你路由器的IP
sudo ufw allow proto tcp to 0.0.0.0/0 port 22 comment "sshd listen port"
sudo ufw allow proto tcp to 0.0.0.0/0 port 80 comment "for http server"
sudo ufw allow proto tcp to 0.0.0.0/0 port 5900 comment "vnc server listen port"
sudo ufw allow proto tcp to 0.0.0.0/0 port 8000 comment "for python -m http.server 8000"
sudo ufw allow from 192.168.1.1/24 to any port 5353 comment "shairport-sync"
sudo ufw allow proto tcp from 192.168.2.2/24 to any port 3689 comment "shairport-sync"
sudo ufw allow proto tcp from 192.168.2.2/24 to any port 5000:5005 comment "shairport-sync"
sudo ufw allow proto udp from 192.168.2.2/24 to any port 6000:6005 comment "shairport-sync"
sudo ufw allow proto udp from 192.168.2.2/24 to any port 35000:65535 comment "shairport-sync"
sudo ufw allow proto tcp from 192.168.2.2/24 to any port 8123 comment "homeassistant"
应用规则:
sudo ufw default deny
sudo ufw enable
3、安装依赖
可用winscp连接onecloud,更改/etc/shairport-sync.conf文件,或者不怕麻烦直接用vi命令来更改。
搜索alsa = 一下部分去掉//更改为
alsa =
{
output_device = "hw:1,0"; // the name of the alsa output device. Use "shairport-sync -h" to discover the names of ALSA hardware devices. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc.
mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. No default. If not specified, no mixer is used and volume in adjusted in software.