Homebridge 安装日志

9 months ago

在树莓派上搭建Homebridge将米家智能家居接入Homekit
  • 安装 Node.js
    • Ubuntu/Debian

curl -sL [https://deb.nodesource.com/setup_8.x](https://deb.nodesource.com/setup_8.x) | sudo -E bash -
    
sudo apt-get install -y nodejs
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

sudo apt-get install -y nodejs


  • 手动安装

wget https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-armv7l.tar.xz
    
tar Jxvf node-v8.12.0-linux-armv7l.tar.xz
    
cd node-v8.12.0-linux-armv7l
    
sudo cp -R * /usr/local/


  • 安装 Avahi 和相关依赖软件包

sudo apt-get install libavahi-compat-libdnssd-dev



sudo npm install -g –unsafe-perm homebridge



sudo nano /etc/homebridge


# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/homebridge -I
# If you uncomment the following line, homebridge will log more
# You can display this via systemd’s journalctl: journalctl -f -u homebridge
# DEBUG=*
sudo nano /etc/systemd/system/homebridge.service
[Unit]
Description=dingdangnao’s HomeKit Server
After=syslog.target network-online.target
[Service]
Type=simple
User=dingdangnao
EnvironmentFile=/etc/homebridge
ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target


  • 配置文件

sudo mkdir /var/homebridge
cd /var/homebridge
sudo touch config.json
sudo chmod -R 0777 /var/homebridge


  • 查看运行状态

启动 sudo systemctl start homebridge

停止 sudo systemctl stop homebridge

重启 sudo systemctl restart homebridge

状态 sudo systemctl status homebridge

查看运行log sudo journalctl -f -u homebridge





插件


  • 几个插件整理

[HomeKit/HomeBridge Plugin Navigation](http://homekit.yinhh.com)


[Xiaomi Smart Home Ecosystem](Xiaomi Smart Home Ecosystem)


  • 树莓派CPU温度

https://github.com/YinHangCode/homebridge-raspberrypi-temperature)


sudo npm install -g homebridge-raspberrypi-temperature


  • UI面板

https://github.com/oznu/homebridge-config-ui-x


sudo npm install -g –unsafe-perm homebridge-config-ui-x


  • 米家多功能网关

https://github.com/YinHangCode/homebridge-mi-aqara


sudo npm install -g homebridge-mi-aqara


  • 多功能网关 - 安防

https://github.com/YinHangCode/homebridge-mi-gateway-security


sudo npm install -g homebridge-mi-gateway-security


  • 多功能网关 - FM收音机

https://github.com/YinHangCode/homebridge-mi-gateway-fm


sudo npm install -g homebridge-mi-gateway-fm


  • 米家空调伴侣(使用网关功能 请安装多功能网关插件)

https://github.com/LASER-Yi/homebridge-mi-acPartner


sudo npm install -g homebridge-mi-acpartner


  • eeLight (极客模式)

https://github.com/vvpossible/homebridge_yeelight


sudo npm install -g homebridge-yeelight


  • 空气净化器

https://github.com/YinHangCode/homebridge-mi-airpurifier


sudo npm install -g homebridge-mi-airpurifier


  • 小米插线板

https://github.com/YinHangCode/homebridge-mi-outlet


sudo npm install -g homebridge-mi-outlet


  • 小米万能遥控

https://github.com/Zzm317/homebridge-mi-ir-remote


sudo npm install -g homebridge-mi-ir-remote




评论

Instagram @dingdangnao