Squashed commit of the following:
All checks were successful
continuous-integration/drone/push Build is passing

commit 93132ab8684436e48ae05165193d88ee22f40ced
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:40:00 2021 -0400

    excluding publishing on PRs

commit 496dd42cfda82308185eb7cd52a300a7484d9053
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:38:37 2021 -0400

    Only publishing master branch

commit 57e82789fbe3de9a0da2d87a30dd01b3736d1478
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:36:16 2021 -0400

    WIP

commit ecc54ad3c30a0f6e781561787f74bdd2b556fc17
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:35:29 2021 -0400

    WIP

commit 6d3cd651be3a5aeae97a3aa94901c8eb97c05591
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:30:18 2021 -0400

    Attempting to use drone commit in preid

commit c60387a98746f1fb5dbd4244fedfed95e065a1ef
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:16:46 2021 -0400

    Adding sequence file

commit d8a5e7541d437d8208c75a4ba80f34bfc572194a
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:16:11 2021 -0400

    Prettier

commit 34fcc1df1aa2aa954e647e62e3ccfebbc0b9dc9e
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:14:33 2021 -0400

    Updating pre-release command

commit 6c8ce2116477214ba1e09a9a97a190b0b4633dc8
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Mon Jun 7 20:03:41 2021 -0400

    Updating drone config

commit b6d9317a1e4ff2056fb5efd48a8f02a7b1d35a64
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Wed Jun 2 21:58:35 2021 -0400

    Revert "Using email alias"

    This reverts commit d1a3b802938ee213c8d03867730ec260688b20e0.

commit d1a3b802938ee213c8d03867730ec260688b20e0
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Wed Jun 2 21:57:22 2021 -0400

    Using email alias

commit 027d1711ada5485bf7091f217bb5ce6e967c89b4
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Wed Jun 2 21:36:07 2021 -0400

    Removing bash_profile

commit ed06d7ecd0ccf8fb9651c8ba2a879c2abe1d2828
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Wed Jun 2 21:23:46 2021 -0400

    WIP

commit d3c37b18b9576b9d485d80c7923e92dfcb2fe808
Author: Brandon Watson <watsonb8133@gmail.com>
Date:   Wed Jun 2 21:22:35 2021 -0400

    Updating registry path
This commit is contained in:
Brandon Watson 2021-06-07 20:46:30 -04:00
parent 2612f61082
commit 845071c274
6 changed files with 63 additions and 38 deletions

View File

@ -18,7 +18,37 @@ steps:
- npm install - npm install
- npm run build - npm run build
- name: publish - name: version
image: node
commands:
- export version=`node -p "require('./package.json').version"`
- export commit=`echo $DRONE_COMMIT | cut -c1-5`
- npm version prerelease --preid=$commit --git-tag-version=false --allow-same-version=true
when:
event:
exclude:
- tag
- pull_request
include:
- master
- name: publish pre
image: plugins/npm
settings:
username: admin
password:
from_secret: npm_password
email: brandon@watsonlabs.net
registry: "http://linuxhost.me:4873/"
when:
event:
exclude:
- tag
- pull_request
include:
- master
- name: publish tagged version
image: plugins/npm image: plugins/npm
settings: settings:
username: admin username: admin
@ -29,6 +59,8 @@ steps:
when: when:
event: event:
- tag - tag
exclude:
- pull_request
notify: notify:
image: drillster/drone-email image: drillster/drone-email

View File

@ -1,22 +0,0 @@
#!/bin/bash
remote_user="bmw"
remote_server="linuxhost.me"
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

View File

@ -3,5 +3,8 @@
{ {
"path": "." "path": "."
} }
] ],
"settings": {
"editor.tabSize": 2
}
} }

View File

@ -2,19 +2,21 @@ import { IMatrix } from "./IMatrix";
import { IActivity } from "./IActivity"; import { IActivity } from "./IActivity";
import { IDeviceButton } from "./IDeviceButton"; import { IDeviceButton } from "./IDeviceButton";
import { IDeviceConfig } from "./IDeviceConfig"; import { IDeviceConfig } from "./IDeviceConfig";
import { IHub } from './IHub'; import { IHub } from "./IHub";
import { ISequence } from "./ISequence";
export interface IControlUnit { export interface IControlUnit {
DisplayName: string; DisplayName: string;
Activities: Array<IActivity>; Activities: Array<IActivity>;
} }
export interface IConfig { export interface IConfig {
hubIp: string; hubIp: string;
EmitDevicesOnStartup: boolean; EmitDevicesOnStartup: boolean;
Matrix: IMatrix; Matrix: IMatrix;
ControlUnits: Array<IControlUnit>; ControlUnits: Array<IControlUnit>;
DeviceButtons: Array<IDeviceButton>; DeviceButtons: Array<IDeviceButton>;
Devices: Array<IDeviceConfig>; Sequences: Array<ISequence>;
Hubs: Array<IHub>; Devices: Array<IDeviceConfig>;
} Hubs: Array<IHub>;
}

View File

@ -0,0 +1,10 @@
export interface ISequence {
name: string;
steps: Array<IStep>;
}
export interface IStep {
deviceName: string;
deviceCommand: string;
delay: number;
}

View File

@ -22,7 +22,7 @@ export class Platform implements DynamicPlatformPlugin {
) { ) {
this.log.debug("Finished initializing platform:", config.name); this.log.debug("Finished initializing platform:", config.name);
this.config = (config as unknown) as IConfig; this.config = config as unknown as IConfig;
//construct data provider //construct data provider
const dataProvider = new HarmonyDataProvider({ const dataProvider = new HarmonyDataProvider({
hubs: this.config.Hubs, hubs: this.config.Hubs,
@ -70,8 +70,8 @@ export class Platform implements DynamicPlatformPlugin {
} }
public readonly Service: typeof Service = this.api.hap.Service; public readonly Service: typeof Service = this.api.hap.Service;
public readonly Characteristic: typeof Characteristic = this.api.hap public readonly Characteristic: typeof Characteristic =
.Characteristic; this.api.hap.Characteristic;
// this is used to track restored cached accessories // this is used to track restored cached accessories
public readonly accessories: PlatformAccessory[] = []; public readonly accessories: PlatformAccessory[] = [];