戴森akadyson
(音近似呆僧),是一個有錢人的家裡常用的電風扇品牌,很貴的,但他不支援apple的homekit功能,還要用一台樹莓派來把它變得具有homekit功能,這就是本篇文章要做的事情
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
],
上面的serialNumber
跟password
在使用者說明書裡面會寫,這裡不贅述
若是比較新的機型,例如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就可以囉!