Mac環境安裝hb
1 、安裝XCODE 務必在appstore搜索下載,文件比較大。
2 、安裝nodejs (https://nodejs.org/en/download/)
3、安裝homebridge
sudo npm -g install homebridge
4、 安裝homebridge-homeassistant插件
sudo npm install -g homebridge-homeassistant
5 運行一次homebridge
homebridge
然后鍵盤輸入Ctrl+C停止homebridge運行,將再次出現命令提示符
6 創建和編輯Homebridge配置文件
cd /Users/你的用戶名/.homebridge
sudo nano config.json
################鼠標右鍵粘貼如下內容######################
{
"bridge": {
"name": "Homebridge",
"username": "6D:19:E0:E7:83:62",
"port": 51826,
"pin": "123-45-678"
},
"platforms": [
{
"platform": "HomeAssistant",
"name": "HomeAssistant",
"host": "http://192.168.123.28:8123",
"password": "raspberry",
"supported_types": ["fan", "garage_door", "input_boolean", "light", "lock", "media_player", "rollershutter", "scene", "switch"]
}
]
}
粘貼完畢后,按鍵盤上的Ctrl+X鍵,輸入 Y,保存退出
"username": "CC:22:3D:E3:CE:30", ###這個MAC地址,可以修改成自己電腦的MAC地址###MAC必須大寫
"host": "http://192.168.1.200:8123", 其中的192.168.1.200是你的電腦的局域網IP地址####
7 運行homebridge
Mac環境安裝ha
1、先安裝python (百度python官網下載目前穩定版本3.6)
2、打開終端輸入
sudo pip3 install homeassistant
3、彈出提示框點擊 not now
4、hass --open-ui
5、設置顯示隱藏文件,查找configuration.yaml文件進行數據配置。
(審核編輯: 林靜)
分享