Merge branch 'feature/transport' into develop

This commit is contained in:
Alistair Galbraith
2015-07-04 11:35:33 -07:00
2 changed files with 5 additions and 5 deletions

8
app.js
View File

@@ -54,7 +54,7 @@ function loadAccessories() {
var services = accessory.getServices(); var services = accessory.getServices();
// Create the HAP server for this accessory // Create the HAP server for this accessory
createHAPServer(name, services); createHAPServer(name, services, accessory.transportCategory);
} }
} }
@@ -89,7 +89,7 @@ function loadPlatforms() {
// hooks in and out of HomeKit for the HAP-NodeJS server. // hooks in and out of HomeKit for the HAP-NodeJS server.
var services = accessory.getServices(); var services = accessory.getServices();
// Create the HAP server for this accessory // Create the HAP server for this accessory
createHAPServer(accessory.name, services); createHAPServer(accessory.name, services, accessory.transportCategory);
} }
accessories.push.apply(accessories, foundAccessories); accessories.push.apply(accessories, foundAccessories);
}) })
@@ -113,7 +113,7 @@ var accessoryServers = [];
var accessoryControllers = []; var accessoryControllers = [];
var usernames = {}; var usernames = {};
function createHAPServer(name, services) { function createHAPServer(name, services, transportCategory) {
var accessoryController = new accessoryController_Factor.AccessoryController(); var accessoryController = new accessoryController_Factor.AccessoryController();
//loop through services //loop through services
@@ -163,7 +163,7 @@ function createHAPServer(name, services) {
// hardcode the PIN to something random (same PIN as HAP-NodeJS sample accessories) // hardcode the PIN to something random (same PIN as HAP-NodeJS sample accessories)
var pincode = "031-45-154"; var pincode = "031-45-154";
var accessory = new accessory_Factor.Accessory(name, username, storage, parseInt(nextPort), pincode, accessoryController); var accessory = new accessory_Factor.Accessory(name, username, storage, parseInt(nextPort), pincode, accessoryController, transportCategory);
accessoryServers[nextServer] = accessory; accessoryServers[nextServer] = accessory;
accessoryControllers[nextServer] = accessoryController; accessoryControllers[nextServer] = accessoryController;
accessory.publishAccessory(); accessory.publishAccessory();

View File

@@ -11,7 +11,7 @@
}, },
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"hap-nodejs": "git+https://github.com/khaost/HAP-NodeJS#ff5d9f11deae7daf599723d8e2f350553a10645c", "hap-nodejs": "git+https://github.com/khaost/HAP-NodeJS#2a1bc8d99a2009317ab5da93faebea34c89f197c",
"ad2usb": "git+https://github.com/alistairg/node-ad2usb.git#local", "ad2usb": "git+https://github.com/alistairg/node-ad2usb.git#local",
"request": "2.49.x", "request": "2.49.x",
"node-persist": "0.0.x", "node-persist": "0.0.x",