Compare commits
5 Commits
feature/ne
...
1.0.1
Author | SHA1 | Date | |
---|---|---|---|
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": {
|
||||
"name": "Homebridge",
|
||||
"username": "CC:22:3D:E3:CE:42",
|
||||
"username": "CC:22:3D:E3:CE:74",
|
||||
"port": 51826,
|
||||
"pin": "031-45-154"
|
||||
},
|
||||
@ -58,11 +58,11 @@
|
||||
"DeviceSetupList": [
|
||||
{
|
||||
"DeviceName": "LG TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "JVC AV Receiver",
|
||||
"Input": "DVD"
|
||||
"Input": "Dvd"
|
||||
},
|
||||
{
|
||||
"DeviceName": "Chromecast",
|
||||
@ -83,11 +83,11 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "LG TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "JVC AV Receiver",
|
||||
"Input": "DVD"
|
||||
"Input": "Dvd"
|
||||
}
|
||||
],
|
||||
"VolumeDevice": "JVC AV Receiver",
|
||||
@ -104,11 +104,11 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "LG TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "JVC AV Receiver",
|
||||
"Input": "DVD"
|
||||
"Input": "Dvd"
|
||||
}
|
||||
],
|
||||
"VolumeDevice": "JVC AV Receiver",
|
||||
@ -125,11 +125,11 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "LG TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "JVC AV Receiver",
|
||||
"Input": "DVD"
|
||||
"Input": "Dvd"
|
||||
}
|
||||
],
|
||||
"VolumeDevice": "JVC AV Receiver",
|
||||
@ -142,7 +142,7 @@
|
||||
"DeviceSetupList": [
|
||||
{
|
||||
"DeviceName": "JVC AV Receiver",
|
||||
"Input": "DVD"
|
||||
"Input": "CD"
|
||||
}
|
||||
],
|
||||
"VolumeDevice": "JVC AV Receiver",
|
||||
@ -160,7 +160,7 @@
|
||||
"DeviceSetupList": [
|
||||
{
|
||||
"DeviceName": "Vizio TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "Harman Kardon AV Receiver",
|
||||
@ -185,7 +185,7 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "Vizio TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "Harman Kardon AV Receiver",
|
||||
@ -206,11 +206,11 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "Vizio TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "Harman Kardon AV Receiver",
|
||||
"Input": "DVD"
|
||||
"Input": "Dvd"
|
||||
}
|
||||
],
|
||||
"VolumeDevice": "Harman Kardon AV Receiver",
|
||||
@ -227,7 +227,7 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "Vizio TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "Harman Kardon AV Receiver",
|
||||
@ -253,7 +253,7 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "Westinghouse TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
}
|
||||
],
|
||||
"VolumeDevice": "Westinghouse TV",
|
||||
@ -270,7 +270,7 @@
|
||||
},
|
||||
{
|
||||
"DeviceName": "Westinghouse TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
}
|
||||
],
|
||||
"VolumeDevice": "Westinghouse TV",
|
||||
@ -283,7 +283,7 @@
|
||||
"DeviceSetupList": [
|
||||
{
|
||||
"DeviceName": "Westinghouse TV",
|
||||
"Input": "HDMI1"
|
||||
"Input": "Hdmi1"
|
||||
},
|
||||
{
|
||||
"DeviceName": "Microsoft Xbox One",
|
||||
|
21
deploy.sh
Executable file
21
deploy.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
remote_user="bmw"
|
||||
remote_server="192.168.1.31"
|
||||
deploy_location="/home/bmw/homebridge-harmony-control"
|
||||
homebridge_location="/var/lib/homebridge/"
|
||||
|
||||
#copy files to remote machine
|
||||
scp -r bin $remote_user@$remote_server:$deploy_location
|
||||
scp -r src $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
|
@ -142,8 +142,10 @@ class HarmonyDataProvider {
|
||||
|
||||
//Route hdmi
|
||||
if (matrixDevice.supportsCommand(inputCommandName) && matrixDevice.supportsCommand(outputCommandName)) {
|
||||
await this.sendCommand(matrixDevice.getCommand(outputCommandName));
|
||||
await this.sendCommand(matrixDevice.getCommand(inputCommandName));
|
||||
await this.sendCommand(matrixDevice.getCommand(outputCommandName));
|
||||
await this.sendCommand(matrixDevice.getCommand(inputCommandName));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ class HarmonyMatrixPlatform {
|
||||
controlDeviceId: configActivity["ControlDevice"],
|
||||
outputDeviceId: configActivity["OutputDevice"],
|
||||
displayName: configActivity["DisplayName"],
|
||||
useMatrix: configActivity["UseMatrix"],
|
||||
useMatrix: configActivity["UseMatrix"] === "true" ? true : false,
|
||||
deviceList: devices
|
||||
}));
|
||||
this.log(`INFO - Added activity '${configActivity["DisplayName"]}'`);
|
||||
|
@ -5,6 +5,7 @@
|
||||
"declaration": true,
|
||||
"outDir": "./bin",
|
||||
"strict": true,
|
||||
"sourceMap": true,
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
|
Reference in New Issue
Block a user