Homebridge 外掛 - 用瀏覽器就能管理外掛程式

by 1月 04, 2018 1 意見            


覺得用 SSH 連線到 Raspbery Pi,然後下一大堆指令很麻煩嗎? 那你就不應該錯過這個外掛。

安裝好之後,只要直接打開瀏覽器,直接搜尋、新增、移除外掛程式,加入設定值到對應的欄位,重新啟動服務,再觀察日誌檔是否有異常,就能輕鬆的管理 Homebridge 的運作了。

不過,使用時請小心,因為沒有任何安全管控機制,任何人都可以輕易修改 homebridge 的設定值。


事前準備

  • Raspberry Pi,安裝 Raspbian Stretch 發行版,並做好 基本設定

開始安裝


先依照 HomeKit 讓我們的家電更智慧,更像我們的家人 的步驟,完成 Homebridge 的安裝,並且確認 iPhone/iPad 的家庭 App 裡已經加入了這個 HomeKit 配件。

homebridge-server 就只有一個功能:管理外掛程式。

安裝指令就一行。
sudo npm -g --unsafe-perm install homebridge-server

安裝過程大概要跑個二~三分鐘,請稍等一下。


進行設定


打開 Homebridge 的主設定檔。
sudo vi /etc/homebridge/config.json

把 homebridge-server 外掛的設定值加進去,通訊埠不一定要用 8765,可以自行修改。

"platforms": [
  {
    "platform": "Server",
    "port"    : 8765,
    "name"    : "Homebridge Server",
    "log"     : "/var/log/daemon.log",
    "restart" : "sudo systemctl restart homebridge.service"
  }
]

最後,重新啟動 Homebridge 服務。
sudo systemctl restart homebridge


實際使用


在家庭 App 裡不會有任何圖示出現,而是要用瀏覽器打開 http://raspberrypi.local:8765

主畫面非常的陽春,就只是單純的把 Homebridge 主設定檔內容分類顯示而已。
  • Name: 在家庭 App 裡,Homebridge 顯示的名稱。
  • Username: Raspberry Pi 網路介面的 MAC Address。
  • Pin: 加入 HomeKit 配件用的代碼。
  • Platforms: 啟用中的平台外掛設定值。
  • Accessories: 啟用中的配件外掛設定值。

右上角有四個按鈕可以用。
  • Backup: 將主設定檔備份,放在主設定檔同一個目錄裡的 config.json.bak。
  • Log: 顯示日誌檔的內容。
  • Plugins: 新增、移除外掛程式。
  • Restart: 重新啟動 Homebridge 服務。


參考資料

圖片來源
  • https://pixabay.com

更新紀錄
  • 2018/01/04 撰文。

Heracles Jam,江湖人稱「海公公」

IT 技術家 - 創站部落客

一個常用 Windows、慣用 macOS、愛用 Linux 的 3C 阿宅
現職 MIS / 業界講師 / 資訊顧問 / 部落客

1 則留言 :

  1. This will increase the house edge, however usually reduces internet betmove income for the casino as gamers expertise much less "play time" on the machine, busting out of their buy-in at an earlier point. Casinos that scale back paytables usually have to extend promotions to compensate and appeal to customers. Progressive jackpots are one of many better ways to benefit play video poker in markets the place there are no full pay machines. Casinos in remote areas with little or no competitors usually supply progressive jackpots on a royal flush to entice gamers to provide action to machines which might be} otherwise give poor returns. These don't all the time hit when they should to} and can run up properly into optimistic expectation, especially when mixed with different promotions.

    回覆刪除