Added device emit option for debugging purposes

This commit is contained in:
watsonb8
2020-01-01 23:29:44 -05:00
parent 588205e507
commit 020a2fc240
10 changed files with 132 additions and 90 deletions

View File

@ -1,4 +1,4 @@
import { IDeviceSetupItem } from './DeviceSetupItem';
import { IDeviceSetupItem } from './IDeviceSetupItem';
export interface IActivity {
OutputDevice: string;

View File

@ -1,6 +1,6 @@
import { IMatrix } from "./Matrix";
import { IActivity } from "./Activity";
import { IDeviceButton } from "./DeviceButton";
import { IMatrix } from "./IMatrix";
import { IActivity } from "./IActivity";
import { IDeviceButton } from "./IDeviceButton";
export interface IControlUnit {
DisplayName: string;
@ -9,6 +9,7 @@ export interface IControlUnit {
export interface IConfig {
hubIp: string;
EmitDevicesOnStartup: boolean,
Matrix: IMatrix
ControlUnits: Array<IControlUnit>
DeviceButtons: Array<IDeviceButton>

View File

@ -1,5 +1,6 @@
export interface IDeviceButton {
DeviceName: string;
ButtonName: string;
DisplayName: string;
IsStateful: boolean;
}

14
src/Models/IDevice.ts Normal file
View File

@ -0,0 +1,14 @@
export interface ICommand {
command?: string,
deviceId?: string,
type?: string
}
export interface IDevice {
id: string,
name: string,
supportsCommand(commandName: string): boolean,
getCommand(commandName: string): ICommand,
commands: { [name: string]: ICommand };
on: boolean;
}