-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathindex.js
18 lines (14 loc) · 828 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var Noble, Accessory, Service, Characteristic, UUIDGen;
module.exports = function (homebridge) {
console.log("Homebridge API version: " + homebridge.version);
Noble = require('noble');
Accessory = homebridge.platformAccessory;
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
UUIDGen = homebridge.hap.uuid;
BluetoothCharacteristic = require("./source/characteristic.js")(Characteristic);
BluetoothService = require("./source/service.js")(Service, BluetoothCharacteristic);
BluetoothAccessory = require("./source/accessory.js")(Accessory, BluetoothService);
BluetoothPlatform = require("./source/platform.js")(Noble, UUIDGen, Accessory, BluetoothAccessory);
homebridge.registerPlatform("homebridge-bluetooth", "Bluetooth", BluetoothPlatform, true);
};