|
贴一下尝试过的配置文件,仅供参考,可能不对,因为刚接触homebridge,所以可能很多地方还不明白
install.sh#!/bin/sh
npm install -g homebridge-harmonyhub
npm install -g homebridge-netatmo
npm install -g homebridge-nukiio
npm install -g homebridge-synology config.json(注意替换中文释义){
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "023-66-678"
},
"accessories": [
{
"accessory": "Synology",
"name": "DSKID",
"ip": "IP地址",
"mac": "00:11:32:12:34:56",
"port": "端口",
"secure": false,
"account": "账户",
"password": "密码",
"version": 5
}
]
}
package.json
{
"name": "DiskStationHomeBridge",
"description": "HomeKit support for the impatient.",
"version": "0.1.1",
"license": "ISC",
"dependencies": {
"homebridge-harmonyhub": "0.2.0-alpha",
"homebridge-netatmo": "^0.0.4",
"homebridge-nukiio": "^0.0.3",
"homebridge-synology": "^0.1.0"
}
}
最后运行报错……`-- homebridge-synology@0.2.2
*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat? ... ServiceRegister>
[4/1/2017, 9:38:30 AM] Loaded plugin: homebridge-harmonyhub
[4/1/2017, 9:38:31 AM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[4/1/2017, 9:38:31 AM] ---
[4/1/2017, 9:38:31 AM] Loaded plugin: homebridge-netatmo
[4/1/2017, 9:38:31 AM] Registering platform 'homebridge-netatmo.netatmo'
[4/1/2017, 9:38:31 AM] ---
[4/1/2017, 9:38:32 AM] Loaded plugin: homebridge-nukiio
[4/1/2017, 9:38:32 AM] Registering platform 'homebridge-nukiio.NukiBridge'
[4/1/2017, 9:38:32 AM] Registering accessory 'homebridge-nukiio.NukiLock'
[4/1/2017, 9:38:32 AM] Registering accessory 'homebridge-nukiio.NukiBridgeMaintainanceSwitch'
[4/1/2017, 9:38:32 AM] ---
[4/1/2017, 9:38:32 AM] Loaded plugin: homebridge-synology
[4/1/2017, 9:38:32 AM] Registering accessory 'homebridge-synology.Synology'
[4/1/2017, 9:38:32 AM] ---
[4/1/2017, 9:38:33 AM] Loaded config.json with 1 accessories and 0 platforms.
[4/1/2017, 9:38:33 AM] ---
[4/1/2017, 9:38:33 AM] Loading 1 accessories...
[4/1/2017, 9:38:33 AM] [DSKID] Initializing Synology accessory...
Load homebridge-harmonyhub.HarmonyHub
[4/1/2017, 9:38:33 AM] [homebridge-harmonyhub.HarmonyHub] Ignoring Harmony Platform setup because it is not configured
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
┌────────────┐
│ 023-66-678 │
└────────────┘
/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56
dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
^
Error: dns service error: unknown
at Error (native)
at new Advertisement (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
at Advertiser.startAdvertising (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
at Bridge.Accessory._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:539:20)
at emitOne (events.js:96:13)
at HAPServer.emit (events.js:188:7)
at HAPServer._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:190:8)
at emitOne (events.js:96:13)
at EventedHTTPServer.emit (events.js:188:7)
at EventedHTTPServer.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:65:10)
at emitNone (events.js:86:13)
at Server.emit (events.js:185:7)
at emitListeningNT (net.js:1278:10)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9) 出现Code之后,会最后Error: dns service error: unknown好像是某个服务地址错误,暂时没去深究!~然后镜像自动停止运行
|
|