Removed submodule for HAP-NodeJS and moved to NPM

It seemed to be easier all around to use NPM to manage the dependancy on HAP-NodeJS.

This PR removes the submodule, and adjusts the paths of all checked in shims to reference the NPM module instead.

I also updated the documentation to reflect the simpler install ;)
This commit is contained in:
Alistair Galbraith
2015-07-03 21:29:35 -07:00
parent 4332af6f93
commit c1f1613763
21 changed files with 23 additions and 30 deletions

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "lib/HAP-NodeJS"]
path = lib/HAP-NodeJS
url = https://github.com/KhaosT/HAP-NodeJS.git

View File

@@ -53,17 +53,13 @@ Additionally, the shims I've created implement the bare minimum of HomeKit neede
# Getting Started
OK, if you're still excited enough about ordering Siri to make your coffee (which, who wouldn't be!) then here's how to set things up. First, clone this repo and also init submodules to grab the [HAP-NodeJS](https://github.com/KhaosT/HAP-NodeJS) project which isn't in npm. You'll also need to run `npm install` on HAP-NodeJS:
OK, if you're still excited enough about ordering Siri to make your coffee (which, who wouldn't be!) then here's how to set things up. First, clone this repo:
$ git clone https://github.com/nfarina/homebridge.git
$ cd homebridge
$ git submodule init
$ git submodule update
$ npm install
$ cd lib/HAP-NodeJS
$ npm install
**Node**: You'll need to have NodeJS version 0.12.x or better installed for `HAP-NodeJS` to load.
**Node**: You'll need to have NodeJS version 0.12.x or better installed for required submodule `HAP-NodeJS` to load.
Now you should be able to run the homebridge server:

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var AD2USB = require('ad2usb');
var CUSTOM_PANEL_LCD_TEXT_CTYPE = "A3E7B8F9-216E-42C1-A21C-97D4E3BE52C8";

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var carwings = require("carwingsjs");
function CarwingsAccessory(log, config) {

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var elkington = require("elkington");
function ElkM1Accessory(log, config) {

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
function HomeMatic(log, config) {

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
function HttpAccessory(log, config) {

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
// This seems to be the "id" of the official LiftMaster iOS app

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
function LockitronAccessory(log, config) {

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var sonos = require('sonos');
function SonosAccessory(log, config) {

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var wemo = require('wemo');
// extend our search timeout from 5 seconds to 60

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
function X10(log, config) {

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
var xmldoc = require("xmldoc");

8
app.js
View File

@@ -101,10 +101,10 @@ function loadPlatforms() {
//
// Pull in required HAP-NodeJS stuff
var accessory_Factor = new require("./lib/HAP-NodeJS/Accessory.js");
var accessoryController_Factor = new require("./lib/HAP-NodeJS/AccessoryController.js");
var service_Factor = new require("./lib/HAP-NodeJS/Service.js");
var characteristic_Factor = new require("./lib/HAP-NodeJS/Characteristic.js");
var accessory_Factor = new require("HAP-NodeJS/Accessory.js");
var accessoryController_Factor = new require("HAP-NodeJS/AccessoryController.js");
var service_Factor = new require("HAP-NodeJS/Service.js");
var characteristic_Factor = new require("HAP-NodeJS/Characteristic.js");
// Each accessory has its own little server. We'll need to allocate some ports for these servers
var nextPort = 51826;

Submodule lib/HAP-NodeJS deleted from bb7f620d9a

View File

@@ -10,6 +10,7 @@
"url": "git://github.com/nfarina/homebridge.git"
},
"dependencies": {
"hap-nodejs": "git+https://github.com/khaost/HAP-NodeJS",
"ad2usb": "git+https://github.com/alistairg/node-ad2usb.git#local",
"request": "2.49.x",
"node-persist": "0.0.x",

View File

@@ -25,7 +25,7 @@
// When you attempt to add a device, it will ask for a "PIN code".
// The default code for all HomeBridge accessories is 031-45-154.
//
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
function DomoticzPlatform(log, config){

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var xml2js = require('xml2js');
var request = require('request');
var util = require('util');

View File

@@ -33,7 +33,7 @@ var hue = require("node-hue-api"),
HueApi = hue.HueApi,
lightState = hue.lightState;
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
function PhilipsHuePlatform(log, config) {
this.log = log;

View File

@@ -1,7 +1,7 @@
// SmartThings JSON API SmartApp required
// https://github.com/jnewland/SmartThings/blob/master/JSON.groovy
//
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var request = require("request");
function SmartThingsPlatform(log, config){

View File

@@ -1,4 +1,4 @@
var types = require("../lib/HAP-NodeJS/accessories/types.js");
var types = require("HAP-NodeJS/accessories/types.js");
var wink = require('wink-js');
var model = {