默认先决条件
Raspberry Pi OS 64 (debian11)
已经安装了Docker
停用冲突的容器,如Portainer
已拥有梯子
预编写NetworkManager的配置
创建配置目录和文件
sudo mkdir -p /etc/NetworkManager/conf.d/
对文件追加内容
sudo nano /etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf
[connection]
wifi.mac-address-randomization=1
[device]
wifi.scan-rand-mac-address=no
安装 HA 依赖项
sudo apt install \
apparmor \
jq \
wget \
curl \
udisks2 \
libglib2.0-bin \
network-manager \
dbus \
lsb-release \
systemd-journal-remote -y
切换 Docker 到 Cgroup v1
编辑内核配置文件
sudo nano /boot/cmdline.txt
在末尾添加(不要换行)
systemd.unified_cgroup_hierarchy=false lsm=apparmor
安装 HA OS-Agent
wget https://github.com/home-assistant/os-agent/releases/download/1.5.1/os-agent_1.5.1_linux_aarch64.deb
sudo dpkg -i os-agent_1.5.1_linux_aarch64.deb
安装失败的话,可以直接到桌面系统找到deb双击运行
检查是否安装成功
gdbus introspect --system --dest io.hass.os --object-path /io/hass/os
输出完整JSON配置文件,并且没有报错,就算成功了
重启系统
reboot
安装 Home Assistant Supervised
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
sudo apt install ./homeassistant-supervised.deb
安装过程中弹出 界面 选择 raspberrypi4-64
安装完毕后查看系统日志
journalctl -f
等红色的日志差不多没了 HA 也就初始化好了.
安装 Home Assistant Community Store
进入容器homeassistant的命令行
sudo docker exec -it homeassistant bash
下载并直接安装
wget -O - https://hacs.vip/get
参考
https://zhuanlan.zhihu.com/p/498773266
https://blog.csdn.net/jeffen0428/article/details/127768637
https://github.com/home-assistant/supervised-installer
发布
https://94zl.com