-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
173 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,10 @@ | ||
import { NodeDef } from 'node-red' | ||
|
||
import CameraConfigType from './CameraConfigType' | ||
import HAPServiceConfigType from './HAPServiceConfigType' | ||
|
||
type HAPService2ConfigType = NodeDef & { | ||
isParent: boolean | ||
// hostType is number but browser js is passing it as string which may cause same comparison issues | ||
// values are BRIDGE = 0, STANDALONE = 1 | ||
hostType: number | ||
bridge: string | ||
accessoryId: string | ||
parentService: string | ||
name: string | ||
serviceName: string | ||
topic: string | ||
filter: boolean | ||
manufacturer: string | ||
model: string | ||
serialNo: string | ||
firmwareRev?: string | ||
hardwareRev?: string | ||
softwareRev?: string | ||
characteristicProperties: string | ||
waitForSetupMsg: boolean | ||
useEventCallback: boolean | ||
} & CameraConfigType | ||
type HAPService2ConfigType = NodeDef & | ||
HAPServiceConfigType & { | ||
useEventCallback: boolean | ||
} | ||
|
||
export default HAPService2ConfigType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,10 @@ | ||
import { | ||
Accessory, | ||
Characteristic, | ||
CharacteristicChange, | ||
CharacteristicGetCallback, | ||
CharacteristicProps, | ||
CharacteristicSetCallback, | ||
CharacteristicValue, | ||
Service, | ||
} from 'hap-nodejs' | ||
import { HAPConnection } from 'hap-nodejs/dist/lib/util/eventedhttp' | ||
import { NodeAPI } from 'node-red' | ||
|
||
import { NodeStatusUtils } from '../utils/NodeStatusUtils' | ||
import HAPHostNodeType from './HAPHostNodeType' | ||
import HAPService2ConfigType from './HAPService2ConfigType' | ||
import HAPServiceNodeType from './HAPServiceNodeType' | ||
import NodeType from './NodeType' | ||
import PublishTimersType from './PublishTimersType' | ||
|
||
type HAPService2NodeType = NodeType & { | ||
config: HAPService2ConfigType | ||
RED: NodeAPI | ||
setupDone: boolean | ||
configured: boolean | ||
handleWaitForSetup: (msg: any) => any | ||
onIdentify: (paired: boolean, callback: () => any) => void | ||
hostNode: HAPHostNodeType | ||
childNodes?: (HAPService2NodeType | HAPServiceNodeType)[] | ||
service: Service | ||
parentService: Service | ||
parentNode?: HAPService2NodeType | HAPServiceNodeType | ||
accessory: Accessory | ||
characteristicProperties: { [key: string]: CharacteristicProps } | ||
supported: string[] | ||
publishTimers: PublishTimersType | ||
topic_in: string | ||
onCharacteristicGet: ( | ||
this: Characteristic, | ||
callback: CharacteristicGetCallback, | ||
context: any, | ||
connection?: HAPConnection | ||
) => void | ||
onCharacteristicSet: ( | ||
this: Characteristic, | ||
newValue: CharacteristicValue, | ||
callback: CharacteristicSetCallback, | ||
context: any, | ||
connection?: HAPConnection | ||
) => void | ||
onCharacteristicChange: ( | ||
this: Characteristic, | ||
change: CharacteristicChange | ||
) => void | ||
uniqueIdentifier: string | ||
// Is Accessory reachable? On Linked Service it will be undefined. If is not true then NO_RESPONSE | ||
reachable?: boolean | ||
nodeStatusUtils: NodeStatusUtils | ||
} | ||
type HAPService2NodeType = NodeType & | ||
HAPServiceNodeType & { | ||
config: HAPService2ConfigType | ||
} | ||
|
||
export default HAPService2NodeType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/lib/types/hap-nodejs/HapAdaptiveLightingControllerMode.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
enum HapAdaptiveLightingControllerMode { | ||
/** | ||
* In automatic mode pretty much everything from setup to transition scheduling is done by the controller. | ||
*/ | ||
AUTOMATIC = 1, | ||
/** | ||
* In manual mode setup is done by the controller but the actual transition must be done by the user. | ||
* This is useful for lights which natively support transitions. | ||
*/ | ||
MANUAL = 2, | ||
} | ||
|
||
export default HapAdaptiveLightingControllerMode |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.