Compare commits
9 Commits
feature/ne
...
1.0.2
Author | SHA1 | Date | |
---|---|---|---|
fb260c5532 | |||
f903c40f9c | |||
5c69e7b11f | |||
a67674b3d3 | |||
f682c0e380 | |||
14312908bf | |||
152d73e9f9 | |||
727c8ceba7 | |||
39f4a7c1bc |
16
.vscode/launch.json
vendored
Normal file
16
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch Program",
|
||||||
|
"preLaunchTask": "build and install",
|
||||||
|
"program": "/Users/brandonwatson/.npm-global/bin/homebridge",
|
||||||
|
"sourceMaps": true,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
17
.vscode/tasks.json
vendored
Normal file
17
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "build",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "build and install",
|
||||||
|
"command": "npm run build&&sudo npm install -g --unsafe-perm ."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
36
config.json
36
config.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"bridge": {
|
"bridge": {
|
||||||
"name": "Homebridge",
|
"name": "Homebridge",
|
||||||
"username": "CC:22:3D:E3:CE:42",
|
"username": "CC:22:3D:E3:CE:74",
|
||||||
"port": 51826,
|
"port": 51826,
|
||||||
"pin": "031-45-154"
|
"pin": "031-45-154"
|
||||||
},
|
},
|
||||||
@ -58,11 +58,11 @@
|
|||||||
"DeviceSetupList": [
|
"DeviceSetupList": [
|
||||||
{
|
{
|
||||||
"DeviceName": "LG TV",
|
"DeviceName": "LG TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "JVC AV Receiver",
|
"DeviceName": "JVC AV Receiver",
|
||||||
"Input": "DVD"
|
"Input": "Dvd"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Chromecast",
|
"DeviceName": "Chromecast",
|
||||||
@ -83,11 +83,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "LG TV",
|
"DeviceName": "LG TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "JVC AV Receiver",
|
"DeviceName": "JVC AV Receiver",
|
||||||
"Input": "DVD"
|
"Input": "Dvd"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VolumeDevice": "JVC AV Receiver",
|
"VolumeDevice": "JVC AV Receiver",
|
||||||
@ -104,11 +104,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "LG TV",
|
"DeviceName": "LG TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "JVC AV Receiver",
|
"DeviceName": "JVC AV Receiver",
|
||||||
"Input": "DVD"
|
"Input": "Dvd"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VolumeDevice": "JVC AV Receiver",
|
"VolumeDevice": "JVC AV Receiver",
|
||||||
@ -125,11 +125,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "LG TV",
|
"DeviceName": "LG TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "JVC AV Receiver",
|
"DeviceName": "JVC AV Receiver",
|
||||||
"Input": "DVD"
|
"Input": "Dvd"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VolumeDevice": "JVC AV Receiver",
|
"VolumeDevice": "JVC AV Receiver",
|
||||||
@ -142,7 +142,7 @@
|
|||||||
"DeviceSetupList": [
|
"DeviceSetupList": [
|
||||||
{
|
{
|
||||||
"DeviceName": "JVC AV Receiver",
|
"DeviceName": "JVC AV Receiver",
|
||||||
"Input": "DVD"
|
"Input": "CD"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VolumeDevice": "JVC AV Receiver",
|
"VolumeDevice": "JVC AV Receiver",
|
||||||
@ -160,7 +160,7 @@
|
|||||||
"DeviceSetupList": [
|
"DeviceSetupList": [
|
||||||
{
|
{
|
||||||
"DeviceName": "Vizio TV",
|
"DeviceName": "Vizio TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Harman Kardon AV Receiver",
|
"DeviceName": "Harman Kardon AV Receiver",
|
||||||
@ -185,7 +185,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Vizio TV",
|
"DeviceName": "Vizio TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Harman Kardon AV Receiver",
|
"DeviceName": "Harman Kardon AV Receiver",
|
||||||
@ -206,11 +206,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Vizio TV",
|
"DeviceName": "Vizio TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Harman Kardon AV Receiver",
|
"DeviceName": "Harman Kardon AV Receiver",
|
||||||
"Input": "DVD"
|
"Input": "Dvd"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VolumeDevice": "Harman Kardon AV Receiver",
|
"VolumeDevice": "Harman Kardon AV Receiver",
|
||||||
@ -227,7 +227,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Vizio TV",
|
"DeviceName": "Vizio TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Harman Kardon AV Receiver",
|
"DeviceName": "Harman Kardon AV Receiver",
|
||||||
@ -253,7 +253,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Westinghouse TV",
|
"DeviceName": "Westinghouse TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VolumeDevice": "Westinghouse TV",
|
"VolumeDevice": "Westinghouse TV",
|
||||||
@ -270,7 +270,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Westinghouse TV",
|
"DeviceName": "Westinghouse TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VolumeDevice": "Westinghouse TV",
|
"VolumeDevice": "Westinghouse TV",
|
||||||
@ -283,7 +283,7 @@
|
|||||||
"DeviceSetupList": [
|
"DeviceSetupList": [
|
||||||
{
|
{
|
||||||
"DeviceName": "Westinghouse TV",
|
"DeviceName": "Westinghouse TV",
|
||||||
"Input": "HDMI1"
|
"Input": "Hdmi1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DeviceName": "Microsoft Xbox One",
|
"DeviceName": "Microsoft Xbox One",
|
||||||
|
22
deploy.sh
Executable file
22
deploy.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
remote_user="bmw"
|
||||||
|
remote_server="192.168.1.31"
|
||||||
|
deploy_location="/home/bmw/homebridge-harmony-control"
|
||||||
|
homebridge_location="/var/lib/homebridge/"
|
||||||
|
|
||||||
|
#build
|
||||||
|
tsc --build
|
||||||
|
#copy files to remote machine
|
||||||
|
scp -r bin $remote_user@$remote_server:$deploy_location
|
||||||
|
scp package.json $remote_user@$remote_server:$deploy_location
|
||||||
|
|
||||||
|
#install package
|
||||||
|
ssh -t $remote_user@$remote_server "sudo npm install -g --unsafe-perm $deploy_location"
|
||||||
|
|
||||||
|
#restart service
|
||||||
|
ssh -t
|
||||||
|
ssh -t $remote_user@$remote_server "sudo systemctl restart homebridge.service"
|
||||||
|
ssh -t $remote_user@$remote_server "sudo systemctl status homebridge.service"
|
||||||
|
|
||||||
|
echo done
|
||||||
|
exit
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homebridge-harmony-control",
|
"name": "homebridge-harmony-control",
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"description": "Homebridge platform to control smart home equipment by room.",
|
"description": "Homebridge platform to control smart home equipment by room.",
|
||||||
"main": "bin/index.js",
|
"main": "bin/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -39,4 +39,4 @@
|
|||||||
"homebridge": "^0.4.50",
|
"homebridge": "^0.4.50",
|
||||||
"request": "^2.88.0"
|
"request": "^2.88.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,7 +35,6 @@ export interface IControlUnitProps {
|
|||||||
api: any,
|
api: any,
|
||||||
log: any,
|
log: any,
|
||||||
homebridge: any,
|
homebridge: any,
|
||||||
isExternal: boolean,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,7 +47,6 @@ export class ControlUnit implements IAccessory {
|
|||||||
//fields
|
//fields
|
||||||
private log: any = {};
|
private log: any = {};
|
||||||
private displayName: string = "";
|
private displayName: string = "";
|
||||||
private isExternal: boolean = false;
|
|
||||||
|
|
||||||
//Service fields
|
//Service fields
|
||||||
private televisionService: HAPNodeJS.Service | undefined;
|
private televisionService: HAPNodeJS.Service | undefined;
|
||||||
@ -73,8 +71,7 @@ export class ControlUnit implements IAccessory {
|
|||||||
Service = props.api.hap.Service;
|
Service = props.api.hap.Service;
|
||||||
Characteristic = props.api.hap.Characteristic;
|
Characteristic = props.api.hap.Characteristic;
|
||||||
this.name = props.displayName;
|
this.name = props.displayName;
|
||||||
this.displayName = props.isExternal ? `${props.displayName}-Remote` : props.displayName;
|
this.displayName = props.displayName;
|
||||||
this.isExternal = props.isExternal;
|
|
||||||
|
|
||||||
this.activities = props.activities;
|
this.activities = props.activities;
|
||||||
|
|
||||||
@ -134,11 +131,10 @@ export class ControlUnit implements IAccessory {
|
|||||||
.on("get", callbackify(this.onGetAccessoryActive));
|
.on("get", callbackify(this.onGetAccessoryActive));
|
||||||
|
|
||||||
//Set remote characteristics if is external
|
//Set remote characteristics if is external
|
||||||
if (this.isExternal) {
|
this.televisionService.getCharacteristic(Characteristic.RemoteKey)
|
||||||
this.televisionService.getCharacteristic(Characteristic.RemoteKey)
|
//@ts-ignore
|
||||||
//@ts-ignore
|
.on("set", callbackify(this.onSetRemoteKey));
|
||||||
.on("set", callbackify(this.onSetRemoteKey));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.televisionService.getCharacteristic(Characteristic.ActiveIdentifier)
|
this.televisionService.getCharacteristic(Characteristic.ActiveIdentifier)
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -151,12 +147,10 @@ export class ControlUnit implements IAccessory {
|
|||||||
* Event handler for SET active characteristic
|
* Event handler for SET active characteristic
|
||||||
*/
|
*/
|
||||||
private onSetAccessoryActive = async (value: any) => {
|
private onSetAccessoryActive = async (value: any) => {
|
||||||
if (!this.isExternal) {
|
switch (value) {
|
||||||
switch (value) {
|
case 0: this.dataProvider.powerOff(this.name); break;
|
||||||
case 0: this.dataProvider.powerOff(this.name); break;
|
//Turn on with first activity
|
||||||
//Turn on with first activity
|
case 1: this.dataProvider.powerOn(this.name, this.activities[0]); break;
|
||||||
case 1: this.dataProvider.powerOn(this.name, this.activities[0]); break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,33 +159,21 @@ export class ControlUnit implements IAccessory {
|
|||||||
*/
|
*/
|
||||||
private onGetAccessoryActive = async () => {
|
private onGetAccessoryActive = async () => {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
return this.dataProvider.getIsActive() ? Characteristic.Active.Active : Characteristic.Active.Inactive
|
return this.dataProvider.getIsActive(this.name) ? Characteristic.Active.Active : Characteristic.Active.Inactive
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event handler for SET remote key
|
* Event handler for SET remote key
|
||||||
*/
|
*/
|
||||||
private onSetRemoteKey = async (key: any) => {
|
private onSetRemoteKey = async (key: any) => {
|
||||||
if (this.isExternal) {
|
this.dataProvider.sendKeyPress(this.name, key);
|
||||||
//Set the active identifier with every key press
|
|
||||||
// let currentActivity: Activity = this.dataProvider.getIsActive(this.name)!;
|
|
||||||
// let identifier: number = 0;
|
|
||||||
// if (currentActivity) {
|
|
||||||
// identifier = this.activities.findIndex(e => e.displayName === currentActivity.displayName);
|
|
||||||
// }
|
|
||||||
// this.televisionService!.setCharacteristic(Characteristic.ActiveIdentifier, identifier);
|
|
||||||
|
|
||||||
this.dataProvider.sendKeyPress(this.name, key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event handler for SET active identifier characteristic
|
* Event handler for SET active identifier characteristic
|
||||||
*/
|
*/
|
||||||
private onSetActiveIdentifier = async (identifier: any) => {
|
private onSetActiveIdentifier = async (identifier: any) => {
|
||||||
if (!this.isExternal) {
|
this.dataProvider.startActivity(this.name, this.activities[identifier]);
|
||||||
this.dataProvider.startActivity(this.name, this.activities[identifier]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -241,30 +223,12 @@ export class ControlUnit implements IAccessory {
|
|||||||
* Event handler for SET volume characteristic
|
* Event handler for SET volume characteristic
|
||||||
*/
|
*/
|
||||||
private onSetVolumeSelector = async (value: any) => {
|
private onSetVolumeSelector = async (value: any) => {
|
||||||
if (this.isExternal) {
|
switch (value) {
|
||||||
switch (value) {
|
case 0: this.dataProvider.volumeUp(this.name); break;
|
||||||
case 0: this.dataProvider.volumeUp(this.name); break;
|
case 1: this.dataProvider.volumeDown(this.name); break;
|
||||||
case 1: this.dataProvider.volumeDown(this.name); break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************
|
|
||||||
*
|
|
||||||
* Information Service
|
|
||||||
*
|
|
||||||
********************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Configure information service
|
|
||||||
*/
|
|
||||||
private configureAccessoryInformation(): void {
|
|
||||||
this.informationService = new Service.AccessoryInformation(this.displayName, 'information');
|
|
||||||
this.informationService
|
|
||||||
.setCharacteristic(Characteristic.Manufacturer, 'Loftux Carwings')
|
|
||||||
.setCharacteristic(Characteristic.Model, 'Heater-Cooler')
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************
|
/*****************
|
||||||
*
|
*
|
||||||
* Input services
|
* Input services
|
||||||
|
@ -123,8 +123,8 @@ class HarmonyDataProvider {
|
|||||||
activity.deviceSetupItems.map(async (value: DeviceSetupItem) => {
|
activity.deviceSetupItems.map(async (value: DeviceSetupItem) => {
|
||||||
let device: IDevice = this.getDeviceFromName(value.deviceName);
|
let device: IDevice = this.getDeviceFromName(value.deviceName);
|
||||||
|
|
||||||
if (device && device.supportsCommand(`Input ${value.input}`)) {
|
if (device && device.supportsCommand(`Input${value.input}`)) {
|
||||||
let command: string = device.getCommand(`Input ${value.input}`);
|
let command: string = device.getCommand(`Input${value.input}`);
|
||||||
await this.sendCommand(command);
|
await this.sendCommand(command);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -142,8 +142,10 @@ class HarmonyDataProvider {
|
|||||||
|
|
||||||
//Route hdmi
|
//Route hdmi
|
||||||
if (matrixDevice.supportsCommand(inputCommandName) && matrixDevice.supportsCommand(outputCommandName)) {
|
if (matrixDevice.supportsCommand(inputCommandName) && matrixDevice.supportsCommand(outputCommandName)) {
|
||||||
|
await this.sendCommand(matrixDevice.getCommand(outputCommandName));
|
||||||
await this.sendCommand(matrixDevice.getCommand(inputCommandName));
|
await this.sendCommand(matrixDevice.getCommand(inputCommandName));
|
||||||
await this.sendCommand(matrixDevice.getCommand(outputCommandName));
|
await this.sendCommand(matrixDevice.getCommand(outputCommandName));
|
||||||
|
await this.sendCommand(matrixDevice.getCommand(inputCommandName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
26
src/index.ts
26
src/index.ts
@ -26,8 +26,8 @@ class HarmonyMatrixPlatform {
|
|||||||
log: any = {};
|
log: any = {};
|
||||||
config: any = {};
|
config: any = {};
|
||||||
api: any;
|
api: any;
|
||||||
externalAccessories: Array<any> = [];
|
|
||||||
dataProvider: HarmonyDataProvider | null;
|
dataProvider: HarmonyDataProvider | null;
|
||||||
|
controlUnits: Array<ControlUnit> = [];
|
||||||
|
|
||||||
constructor(log: any, config: any, api: any) {
|
constructor(log: any, config: any, api: any) {
|
||||||
this.log = log;
|
this.log = log;
|
||||||
@ -48,7 +48,7 @@ class HarmonyMatrixPlatform {
|
|||||||
this.log(`Publishing external accessories`);
|
this.log(`Publishing external accessories`);
|
||||||
|
|
||||||
//This is required in order to have multiple tv remotes on one platform
|
//This is required in order to have multiple tv remotes on one platform
|
||||||
this.externalAccessories.forEach((accessory: ControlUnit) => {
|
this.controlUnits.forEach((accessory: ControlUnit) => {
|
||||||
this.api.publishExternalAccessories("HarmonyMatrixPlatform", [accessory.platformAccessory]);
|
this.api.publishExternalAccessories("HarmonyMatrixPlatform", [accessory.platformAccessory]);
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ class HarmonyMatrixPlatform {
|
|||||||
|
|
||||||
//Parse control units
|
//Parse control units
|
||||||
let configControlUnits: any = this.config["ControlUnits"];
|
let configControlUnits: any = this.config["ControlUnits"];
|
||||||
let controlUnits: Array<ControlUnit> = [];
|
|
||||||
configControlUnits.forEach((configControlUnit: any) => {
|
configControlUnits.forEach((configControlUnit: any) => {
|
||||||
//Parse activities list
|
//Parse activities list
|
||||||
let configActivities: any = configControlUnit["Activities"];
|
let configActivities: any = configControlUnit["Activities"];
|
||||||
@ -133,7 +133,7 @@ class HarmonyMatrixPlatform {
|
|||||||
controlDeviceId: configActivity["ControlDevice"],
|
controlDeviceId: configActivity["ControlDevice"],
|
||||||
outputDeviceId: configActivity["OutputDevice"],
|
outputDeviceId: configActivity["OutputDevice"],
|
||||||
displayName: configActivity["DisplayName"],
|
displayName: configActivity["DisplayName"],
|
||||||
useMatrix: configActivity["UseMatrix"],
|
useMatrix: configActivity["UseMatrix"] === "true" ? true : false,
|
||||||
deviceList: devices
|
deviceList: devices
|
||||||
}));
|
}));
|
||||||
this.log(`INFO - Added activity '${configActivity["DisplayName"]}'`);
|
this.log(`INFO - Added activity '${configActivity["DisplayName"]}'`);
|
||||||
@ -146,31 +146,17 @@ class HarmonyMatrixPlatform {
|
|||||||
log: this.log,
|
log: this.log,
|
||||||
activities: activities,
|
activities: activities,
|
||||||
homebridge: Homebridge,
|
homebridge: Homebridge,
|
||||||
isExternal: false
|
|
||||||
});
|
|
||||||
|
|
||||||
let controlUnitExternal: ControlUnit = new ControlUnit({
|
|
||||||
dataProvider: this.dataProvider!,
|
|
||||||
displayName: `${configControlUnit["DisplayName"]}`,
|
|
||||||
api: this.api,
|
|
||||||
log: this.log,
|
|
||||||
activities: activities,
|
|
||||||
homebridge: Homebridge,
|
|
||||||
isExternal: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
let accessory = controlUnit as homebridge.platformAccessory;
|
let accessory = controlUnit as homebridge.platformAccessory;
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
let externalAccessory = controlUnitExternal as homebridge.platformAccessory;
|
|
||||||
|
|
||||||
//Add control unit
|
//Add control unit
|
||||||
controlUnits.push(accessory);
|
this.controlUnits.push(accessory);
|
||||||
//Add to list of remotes
|
|
||||||
this.externalAccessories.push(externalAccessory);
|
|
||||||
|
|
||||||
this.log(`INFO - Added ControlUnit`);
|
this.log(`INFO - Added ControlUnit`);
|
||||||
});
|
});
|
||||||
callback(controlUnits);
|
callback(this.controlUnits);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,6 +5,7 @@
|
|||||||
"declaration": true,
|
"declaration": true,
|
||||||
"outDir": "./bin",
|
"outDir": "./bin",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"sourceMap": true,
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
|
Reference in New Issue
Block a user