Homebridge plugin

那买过这一代没有 HomeKit 的基友可以优惠购买吗→_→

可以申请加入我们的内测用户群,可以免费领取测试样品。但需要签个保密协议,并针对产品提出意见。

I’m not an expert but if I remove all the lines that contain console.log or this.log doesn’t this action break the script?

no, it won’t break any normal function. You can backup the script file before you do that if you want to be able to rollback.

Sorry I am quite new…I install Homebridge on Raspberry PI3…and the plungi with npm install -g homebridge-yeelight but I am not be able to use it for 2 problem:

  1. When I start the HomeBridge give me this error
    Error: bind EADDRINUSE 0.0.0.0:1982
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at dgram.js:214:18
    at nextTickCallbackWith3Args (node.js:448:9)
    at process._tickCallback (node.js:354:17)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:134:18)
    at node.js:962:3

  2. I do not where to configure the accessory ( I have 2 Color Bulb connected on WiFi… they work perfectly on yeelight.app)

Please help me…

The error indicates a homebridge process / instance is already running which occupied 1982 port. If you are using systemd, please try following command:

sudo systemctl restart homebridge

If you had already enabled the developer mode and the homebridge is running properly on your PI, then your Home App will show these bulbs automatically.

Hi
I have some problems in setting up Homebridge.
Could you please help me?

Please give more information of your issue, paste some error log and specify your environment so we can help.

Failed to start the homebridge.
Here are the logs

bash: Homebridge: No such file or directory
pi@raspberrypi:~ $ homebridge
module.js:472
throw err;
^

Error: Cannot find module ‘…/build/Release/dns_sd_bindings’
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:32:22)
at Module._compile (module.js:571:32)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)

It seems you failed to install some library (mdns). Did you see some error when you following below installation guide?

NO ERROR but some WARN.
I use the latest NodeJs 7.2.0 IS that OK?

I followed the guide to set up the home bridge

Could you try following again?

sudo npm install -g --unsafe-perm homebridge hap-nodejs node-gyp
cd /usr/local/lib/node_modules/homebridge/
sudo npm install --unsafe-perm bignum
cd /usr/local/lib/node_modules/hap-nodejs/node_modules/mdns
sudo node-gyp BUILDTYPE=Release rebuild

Also this one:

sudo apt-get install libavahi-compat-libdnssd-dev

I separately setup the homebridge hap-nodes node-gyp like:
sudo npm install -g --unsafe-perm homebridge
sudo npm install -g --unsafe-perm hap-nodejs
sudo npm install -g --unsafe-perm node-gyp

just now I run sudo npm install -g --unsafe-perm homebridge hap-nodejs node-gyp.
Then I got these:

pi@raspberrypi:~ $ sudo npm install -g --unsafe-perm homebridge hap-nodejs node-gyp
/usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge
/usr/local/bin/node-gyp -> /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js
/usr/local/lib
├── hap-nodejs@0.4.17
├── homebridge@0.4.11
└── node-gyp@3.4.0

pi@raspberrypi:/usr/local/lib/node_modules/homebridge $ sudo npm install --unsafe-perm bignum

bignum@0.12.5 install /usr/local/lib/node_modules/homebridge/node_modules/bignum
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://rvagg-node.s3-us-west-2.amazonaws.com/bignum/v0.12.5/bignum-v0.12.5-node-v51-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bignum@0.12.5 and node@7.2.0 (node-v51 ABI) (falling back to source compile with node-gyp)

How about this one?

sudo apt-get install libavahi-compat-libdnssd-dev

After that, please start your homebridge and try again.

For this is OK.

pi@raspberrypi:/usr/local/lib/node_modules/homebridge $ sudo apt-get install libavahi-compat-libdnssd-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libavahi-compat-libdnssd-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 183 not upgraded.

I can’t find /home/pi/.homebridge