IoT|硬體 |樹莓派|實作|Homebridge 結合 MQTT Homebridge-server、Homebridge-config-ui-x、Homebridge-mqtt
安裝 Homebridge-server sudo npm -g --unsafe-perm install homebridge-server 安裝後設定 Config,設定好後重新 Homebridge nano /home/pi/.homebridge/config.json { "bridge": { "name": "控制訊號整合閘道器", "username": "E8:4E:06:35:47:C6", "port": 51826, "pin": "123-45-678" }, "platforms": [ { "platform": "Server", "port" : 8080, "name" : "Homebridge Server", "log" : "/var/log/daemon.log", "restart" : "sudo systemctl restart homebridge.service" } ] } 安裝 Homebridge-config-ui-x、Homebridge-mqtt(安裝前,先確認是否安裝 mosquitto server) sudo npm install -g homebridge-mqtt sudo npm install -g --unsafe-perm homebridge-config-ui-x 因已安裝 Homebridge-server 套件,固可採兩種方式設定 Config 方式一:檔案編輯 nano /home/pi/.homebridge/config.json {