Monday, July 9, 2018

Implementation - HomeBridge - It's the answer to Impatient HomeKit Enthusiast

Enabling incompatible Accessories to HomeKit using Homebridge

Before we start we must all bear in mind that Apple is known for its robustness of security. Hence a handful of products are HomeKit enabled as it has to go through those rigorous rounds of testing. The process shown in this blog will help you in making a device HomeKit enabled but it might not have that security feature hence you will always be at risk. Again, Homebridge and its accessory plugins are created and maintained by a community of developers and it's not a commercial company hence don't expect it to be up to date and provide support as it would have been in the case of a company. So, yes, lots of risk factors involved. But an impatient HomeKit enthusiast or an apple fanboy won't care.

If you are not the geeky type then refrain from this blog as you will have to get your hands dirty by working on the terminal and changing codes.

Homebridge on Mac

For this exercise, I will be using:
My usual:
MacBook Pro





After you have installed XCode and Node.js you will have to set up a Node.js server. This is your HomeBridge server:


Open terminal and type:
sudo npm install -g --unsafe-perm homebridge
Homebridge will be installed using the NPM package manager. Wait until the process is complete.

Last login: Sat Jul  7 23:47:24 on console
~ kinshukdutta$ sudo npm install -g --unsafe-perm homebridge
Password:
/usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge

> curve25519-n@1.4.0 install /usr/local/lib/node_modules/homebridge/node_modules/curve25519-n
> node-gyp rebuild

  CXX(target) Release/obj.target/curve/node_curve.o
  SOLINK_MODULE(target) Release/curve.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

> ed25519-hap@0.0.5 install /usr/local/lib/node_modules/homebridge/node_modules/ed25519-hap
> node-gyp rebuild

  CC(target) Release/obj.target/ed25519/src/ed25519/keypair.o
  CC(target) Release/obj.target/ed25519/src/ed25519/sign.o
  CC(target) Release/obj.target/ed25519/src/ed25519/open.o
  CC(target) Release/obj.target/ed25519/src/ed25519/crypto_verify_32.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_double_scalarmult.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_frombytes.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_scalarmult_base.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_precomp_0.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p2_0.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p2_dbl.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_0.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_dbl.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_to_p2.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_to_cached.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_tobytes.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_madd.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_add.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_msub.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_sub.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p1p1_to_p3.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_p1p1_to_p2.o
  CC(target) Release/obj.target/ed25519/src/ed25519/ge_tobytes.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_0.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_1.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_cmov.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_copy.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_neg.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_add.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_sub.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_mul.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_sq.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_sq2.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_invert.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_tobytes.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_isnegative.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_isnonzero.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_frombytes.o
  CC(target) Release/obj.target/ed25519/src/ed25519/fe_pow22523.o
  CC(target) Release/obj.target/ed25519/src/ed25519/sc_reduce.o
  CC(target) Release/obj.target/ed25519/src/ed25519/sc_muladd.o
  CXX(target) Release/obj.target/ed25519/src/ed25519.o
  SOLINK_MODULE(target) Release/ed25519.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
/usr/local/lib
└─┬ homebridge@0.4.44 
  ├─┬ chalk@1.1.3 
  │ ├── ansi-styles@2.2.1 
  │ ├── escape-string-regexp@1.0.5 
  │ ├─┬ has-ansi@2.0.0 
  │ │ └── ansi-regex@2.1.1 
  │ ├── strip-ansi@3.0.1 
  │ └── supports-color@2.0.0 
  ├─┬ commander@2.8.1 
  │ └── graceful-readlink@1.0.1 
  ├─┬ hap-nodejs@0.4.47 
  │ ├─┬ bonjour-hap@3.5.1 
  │ │ ├── array-flatten@2.1.1 
  │ │ ├── deep-equal@1.0.1 
  │ │ ├── dns-equal@1.0.0 
  │ │ ├─┬ dns-txt@2.0.2 
  │ │ │ └── buffer-indexof@1.1.1 
  │ │ ├─┬ multicast-dns@6.2.3 
  │ │ │ ├─┬ dns-packet@1.3.1 
  │ │ │ │ └── safe-buffer@5.1.2 
  │ │ │ └── thunky@1.0.2 
  │ │ └── multicast-dns-service-types@1.1.0 
  │ ├── buffer-shims@1.0.0 
  │ ├─┬ curve25519-n@1.4.0 
  │ │ ├── bindings@1.3.0 
  │ │ └── nan@2.10.0 
  │ ├─┬ debug@2.6.9 
  │ │ └── ms@2.0.0 
  │ ├── decimal.js@7.5.1 
  │ ├── ed25519-hap@0.0.5 
  │ ├── fast-srp-hap@1.0.1 
  │ ├── ip@1.1.5 
  │ └─┬ node-persist@0.0.11 
  │   └─┬ mkdirp@0.5.1 
  │     └── minimist@0.0.8 
  ├─┬ node-persist@0.0.8 
  │ ├── mkdirp@0.3.5 
  │ └── q@1.1.2 
  ├── qrcode-terminal@0.11.0 
  └── semver@5.0.3 


Type homebridge into Terminal to launch it.


kinshukdutta$ homebridge



You should see the following message:
[7/9/2018, 9:57:53 AM] config.json (/Users/kinshukdutta/.homebridge/config.json) not found.

[7/9/2018, 9:57:53 AM] No plugins found. See the README for information on installing plugins.

Add Homebridge to HomeKit




Kinshuk Dutta
New York

Scala & Spark for Managing & Analyzing Big Data (Using Machine Learning)

Managing & Analyzing Big Data using Apache Scala & Apache Spark In this blog we will see how to use Scala and Spark to analyze Big D...