iT邦幫忙

第 11 屆 iThome 鐵人賽

DAY 28
0
IoT

homekit+pixhawk系列 第 28

homebridge 控制戴森電風扇

戴森akadyson(音近似呆僧),是一個有錢人的家裡常用的電風扇品牌,很貴的,但他不支援apple的homekit功能,還要用一台樹莓派來把它變得具有homekit功能,這就是本篇文章要做的事情

安裝homebridge-dyson-link

homebridge的安裝方式可以參考之前的文章,以下就不再贅述

npm install -g homebridge-dyson-link

接著設定config.json檔案

"platforms": [
    // This is the config for this plugin  
    {
      "platform": "DysonPlatform",
      "name": "DysonPlatform",
      "accessories": [
        {
          "ip": "ip of your device",
          "displayName": "Name to be shown on Home App",
          "serialNumber": "DYSON-XXX-XX-XXXXXXXX-XXX",
          "password": "password of your device"
        },
        {
          "ip": "ip of your second device",
          "displayName": "Name to be shown on Home App",
          "serialNumber": "DYSON-XXX-XX-XXXXXXXX-XXX",
          "password": "password of your second device"
        }
        // If you have more than one device(s), just add the same config below
      ]
    }
    // End of the config
  ],

上面的serialNumberpassword在使用者說明書裡面會寫,這裡不贅述
若是比較新的機型,例如TP04或是DP04,則需要註冊,註冊會使用到信箱,因此下面就是叫新機種的config.json檔案

"platforms": [
    // This is the config for this plugin  
    {
      "platform": "DysonPlatform",
      "name": "DysonPlatform",
      "email": "dysonuser@dyson.com", // or set DYSON_EMAIL="email"
      "password": "password",         // or set DYSON_PASSWORD="password"
      "country": "US"                 // be sure to change if not US
      "accessories": [
        {
          "ip": "ip of your device",
          "displayName": "Name to be shown on Home App",
          "serialNumber": "XXX-XX-XXXXXXXX"
          // No device password needed if TP04 or DP04
        },
        {
          "ip": "ip of your second device",
          "displayName": "Name to be shown on Home App",
          "serialNumber": "DYSON-XXX-XX-XXXXXXXX-XXX",
          "password": "password of your second device"
          // Password may be used with other models
        }
      ]
    }
  ],

當然會發現,這裡所用的IP都是DHCP的,有可能會浮動,因此可以藉由設定wifi路由器綁定MACaddress以及IP來讓戴森的機器的IP保持不變,就不會出現問題了,又或者可以結合用raspberry pi當wifi ap的文章一起使用,讓raspberry pi派發專屬於dyson機器的wifi就可以囉!


上一篇
用esp8266做一個MQTT broker吧!
下一篇
QMK加上旋轉編碼器吧!
系列文
homekit+pixhawk30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

0
阿展展展
iT邦好手 1 級 ‧ 2020-01-25 14:40:43

DYSON耶 好酷

我要留言

立即登入留言