node-red-contrib-homekit-bridged 2.0.0-dev.1 → 2.0.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/HAPHostNode.js +185 -146
- package/build/lib/HAPServiceNode.js +200 -177
- package/build/lib/HAPServiceNode2.js +208 -177
- package/build/lib/NRCHKBError.js +23 -2
- package/build/lib/PairingQRCode.js +62 -0
- package/build/lib/Storage.js +152 -90
- package/build/lib/api.js +654 -290
- package/build/lib/camera/CameraControl.js +125 -0
- package/build/lib/camera/CameraDelegate.js +507 -0
- package/build/lib/camera/MP4StreamingServer.js +159 -0
- package/build/lib/hap/HAPCharacteristic.js +25 -4
- package/build/lib/hap/HAPService.js +25 -4
- package/build/lib/hap/eve-app/EveCharacteristics.js +124 -81
- package/build/lib/hap/eve-app/EveServices.js +50 -17
- package/build/lib/hap/hap-nodejs.js +32 -0
- package/build/lib/migration/HomeKitService2Migration.js +34 -0
- package/build/lib/migration/NodeMigration.js +75 -0
- package/build/lib/types/AccessoryInformationType.js +15 -1
- package/build/lib/types/CameraConfigType.js +15 -1
- package/build/lib/types/CustomCharacteristicType.js +15 -1
- package/build/lib/types/HAPHostConfigType.js +15 -1
- package/build/lib/types/HAPHostNodeType.js +15 -1
- package/build/lib/types/HAPService2ConfigType.js +15 -1
- package/build/lib/types/HAPService2NodeType.js +15 -1
- package/build/lib/types/HAPServiceConfigType.js +15 -1
- package/build/lib/types/HAPServiceNodeType.js +15 -1
- package/build/lib/types/HAPStatusConfigType.js +15 -1
- package/build/lib/types/HAPStatusNodeType.js +15 -1
- package/build/lib/types/HostType.js +28 -7
- package/build/lib/types/NodeType.js +15 -1
- package/build/lib/types/PublishTimersType.js +15 -1
- package/build/lib/types/UniFiControllerConfigType.js +16 -0
- package/build/lib/types/hap-nodejs/HapAdaptiveLightingControllerMode.js +28 -7
- package/build/lib/types/hap-nodejs/HapCategories.js +64 -43
- package/build/lib/types/storage/SerializedHostType.js +15 -1
- package/build/lib/types/storage/StorageType.js +34 -10
- package/build/lib/unifi/ProtectDiscovery.js +80 -0
- package/build/lib/utils/AccessoryUtils.js +152 -112
- package/build/lib/utils/BridgeUtils.js +95 -39
- package/build/lib/utils/CharacteristicUtils.js +5 -49
- package/build/lib/utils/CharacteristicUtils2.js +5 -49
- package/build/lib/utils/CharacteristicUtilsBase.js +81 -0
- package/build/lib/utils/NodeStatusUtils.js +89 -40
- package/build/lib/utils/ServiceUtils.js +433 -368
- package/build/lib/utils/ServiceUtils2.js +519 -304
- package/build/lib/utils/index.js +11 -12
- package/build/nodes/bridge.html +206 -168
- package/build/nodes/bridge.js +27 -9
- package/build/nodes/locales/en-US/node-red-contrib-homekit-bridged.json +22 -0
- package/build/nodes/nrchkb.html +1753 -117
- package/build/nodes/nrchkb.js +66 -88
- package/build/nodes/plugin-instance.html +509 -0
- package/build/nodes/plugin-instance.js +46 -0
- package/build/nodes/service.html +557 -306
- package/build/nodes/service.js +5 -6
- package/build/nodes/service2.html +1735 -455
- package/build/nodes/service2.js +5 -8
- package/build/nodes/standalone.html +208 -176
- package/build/nodes/standalone.js +27 -9
- package/build/nodes/status.html +51 -18
- package/build/nodes/status.js +47 -41
- package/build/nodes/unifi-controller.html +92 -0
- package/build/nodes/unifi-controller.js +20 -0
- package/build/plugins/embedded/homebridge-camera-ffmpeg/index.js +479 -0
- package/build/plugins/embedded/homebridge-unifi-protect/index.js +521 -0
- package/build/plugins/embedded/index.js +58 -0
- package/build/plugins/nrchkb-homekit-plugins.js +17 -0
- package/build/plugins/registry/index.js +203 -0
- package/build/plugins/registry/types.js +16 -0
- package/build/scripts/migrate-homekit-service-flows.js +47 -0
- package/examples/demo/01 - ALL Demos single import.json +1885 -1885
- package/examples/demo/02 - Air Purifier.json +279 -279
- package/examples/demo/03 - Air Quality sensor with Battery.json +254 -254
- package/examples/demo/04 - Dimmable Bulb.json +172 -172
- package/examples/demo/05 - Color Bulb (HSV).json +195 -195
- package/examples/demo/06 - Fan (simple, 3 speeds).json +240 -240
- package/examples/demo/07 - Fan (with speed, oscillate, rotation direction).json +175 -175
- package/examples/demo/08 - CO2 detector.json +224 -224
- package/examples/demo/09 - CO (carbon monoxide) example.json +255 -255
- package/examples/demo/10 - Door window contact sensor.json +234 -234
- package/examples/demos (advanced)/01 - Television with inputs and speaker.json +541 -541
- package/examples/switch/01 - Plain Switch.json +178 -178
- package/package.json +95 -82
- package/build/lib/HAPHostNode.d.ts +0 -1
- package/build/lib/HAPServiceNode.d.ts +0 -1
- package/build/lib/HAPServiceNode2.d.ts +0 -1
- package/build/lib/NRCHKBError.d.ts +0 -3
- package/build/lib/Storage.d.ts +0 -30
- package/build/lib/api.d.ts +0 -1
- package/build/lib/hap/HAPCharacteristic.d.ts +0 -9
- package/build/lib/hap/HAPService.d.ts +0 -6
- package/build/lib/hap/eve-app/EveCharacteristics.d.ts +0 -20
- package/build/lib/hap/eve-app/EveServices.d.ts +0 -5
- package/build/lib/types/AccessoryInformationType.d.ts +0 -11
- package/build/lib/types/CameraConfigType.d.ts +0 -24
- package/build/lib/types/CustomCharacteristicType.d.ts +0 -6
- package/build/lib/types/HAPHostConfigType.d.ts +0 -22
- package/build/lib/types/HAPHostNodeType.d.ts +0 -14
- package/build/lib/types/HAPService2ConfigType.d.ts +0 -6
- package/build/lib/types/HAPService2NodeType.d.ts +0 -7
- package/build/lib/types/HAPServiceConfigType.d.ts +0 -26
- package/build/lib/types/HAPServiceNodeType.d.ts +0 -38
- package/build/lib/types/HAPStatusConfigType.d.ts +0 -5
- package/build/lib/types/HAPStatusNodeType.d.ts +0 -12
- package/build/lib/types/HostType.d.ts +0 -5
- package/build/lib/types/NodeType.d.ts +0 -3
- package/build/lib/types/PublishTimersType.d.ts +0 -4
- package/build/lib/types/hap-nodejs/HapAdaptiveLightingControllerMode.d.ts +0 -5
- package/build/lib/types/hap-nodejs/HapCategories.d.ts +0 -41
- package/build/lib/types/storage/SerializedHostType.d.ts +0 -5
- package/build/lib/types/storage/StorageType.d.ts +0 -8
- package/build/lib/utils/AccessoryUtils.d.ts +0 -1
- package/build/lib/utils/BridgeUtils.d.ts +0 -1
- package/build/lib/utils/CharacteristicUtils.d.ts +0 -1
- package/build/lib/utils/CharacteristicUtils2.d.ts +0 -1
- package/build/lib/utils/NodeStatusUtils.d.ts +0 -17
- package/build/lib/utils/ServiceUtils.d.ts +0 -1
- package/build/lib/utils/ServiceUtils2.d.ts +0 -1
- package/build/lib/utils/index.d.ts +0 -1
- package/build/nodes/bridge.d.ts +0 -1
- package/build/nodes/nrchkb.d.ts +0 -1
- package/build/nodes/service.d.ts +0 -1
- package/build/nodes/service2.d.ts +0 -1
- package/build/nodes/standalone.d.ts +0 -1
- package/build/nodes/status.d.ts +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import CustomCharacteristicType from '../../types/CustomCharacteristicType';
|
|
2
|
-
import HAPCharacteristic from '../HAPCharacteristic';
|
|
3
|
-
declare const EveCharacteristics: CustomCharacteristicType[];
|
|
4
|
-
export declare class EveS2R1 extends HAPCharacteristic {
|
|
5
|
-
static readonly UUID: string;
|
|
6
|
-
constructor();
|
|
7
|
-
}
|
|
8
|
-
export declare class EveS2R2 extends HAPCharacteristic {
|
|
9
|
-
static readonly UUID: string;
|
|
10
|
-
constructor();
|
|
11
|
-
}
|
|
12
|
-
export declare class EveS2W1 extends HAPCharacteristic {
|
|
13
|
-
static readonly UUID: string;
|
|
14
|
-
constructor();
|
|
15
|
-
}
|
|
16
|
-
export declare class EveS2W2 extends HAPCharacteristic {
|
|
17
|
-
static readonly UUID: string;
|
|
18
|
-
constructor();
|
|
19
|
-
}
|
|
20
|
-
export default EveCharacteristics;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
type CameraConfigType = {
|
|
2
|
-
cameraConfigVideoProcessor: string;
|
|
3
|
-
cameraConfigSource: string;
|
|
4
|
-
cameraConfigStillImageSource?: string;
|
|
5
|
-
cameraConfigMaxStreams: number;
|
|
6
|
-
cameraConfigMaxWidth: number;
|
|
7
|
-
cameraConfigMaxHeight: number;
|
|
8
|
-
cameraConfigMaxFPS: number;
|
|
9
|
-
cameraConfigMaxBitrate: number;
|
|
10
|
-
cameraConfigVideoCodec: string;
|
|
11
|
-
cameraConfigAudioCodec: string;
|
|
12
|
-
cameraConfigAudio: string;
|
|
13
|
-
cameraConfigPacketSize: number;
|
|
14
|
-
cameraConfigVerticalFlip: boolean;
|
|
15
|
-
cameraConfigHorizontalFlip: boolean;
|
|
16
|
-
cameraConfigMapVideo: string;
|
|
17
|
-
cameraConfigMapAudio: string;
|
|
18
|
-
cameraConfigVideoFilter: string;
|
|
19
|
-
cameraConfigAdditionalCommandLine: string;
|
|
20
|
-
cameraConfigDebug: boolean;
|
|
21
|
-
cameraConfigSnapshotOutput: string;
|
|
22
|
-
cameraConfigInterfaceName: string;
|
|
23
|
-
};
|
|
24
|
-
export default CameraConfigType;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MDNSAdvertiser } from '@homebridge/hap-nodejs';
|
|
2
|
-
import { NodeDef } from 'node-red';
|
|
3
|
-
import { SemVer } from 'semver';
|
|
4
|
-
import HapCategories from './hap-nodejs/HapCategories';
|
|
5
|
-
type HAPHostConfigType = NodeDef & {
|
|
6
|
-
bridgeName: string;
|
|
7
|
-
pinCode: string;
|
|
8
|
-
port?: number;
|
|
9
|
-
allowInsecureRequest: boolean;
|
|
10
|
-
manufacturer: string;
|
|
11
|
-
model: string;
|
|
12
|
-
serialNo: string;
|
|
13
|
-
firmwareRev: SemVer;
|
|
14
|
-
hardwareRev: SemVer;
|
|
15
|
-
softwareRev: SemVer;
|
|
16
|
-
bind?: string;
|
|
17
|
-
bindType?: 'json' | 'str';
|
|
18
|
-
allowMessagePassthrough: boolean;
|
|
19
|
-
accessoryCategory: HapCategories;
|
|
20
|
-
advertiser: MDNSAdvertiser;
|
|
21
|
-
};
|
|
22
|
-
export default HAPHostConfigType;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Accessory, Categories } from '@homebridge/hap-nodejs';
|
|
2
|
-
import HAPHostConfigType from './HAPHostConfigType';
|
|
3
|
-
import HostType from './HostType';
|
|
4
|
-
import NodeType from './NodeType';
|
|
5
|
-
type HAPHostNodeType = NodeType & {
|
|
6
|
-
config: HAPHostConfigType;
|
|
7
|
-
accessoryCategory: Categories;
|
|
8
|
-
published: boolean;
|
|
9
|
-
bridgeUsername: string;
|
|
10
|
-
publish: () => boolean;
|
|
11
|
-
hostType: HostType;
|
|
12
|
-
host: Accessory;
|
|
13
|
-
};
|
|
14
|
-
export default HAPHostNodeType;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import HAPService2ConfigType from './HAPService2ConfigType';
|
|
2
|
-
import HAPServiceNodeType from './HAPServiceNodeType';
|
|
3
|
-
import NodeType from './NodeType';
|
|
4
|
-
type HAPService2NodeType = NodeType & HAPServiceNodeType & {
|
|
5
|
-
config: HAPService2ConfigType;
|
|
6
|
-
};
|
|
7
|
-
export default HAPService2NodeType;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AdaptiveLightingControllerMode } from '@homebridge/hap-nodejs/dist/lib/controller/AdaptiveLightingController';
|
|
2
|
-
import { NodeDef } from 'node-red';
|
|
3
|
-
import CameraConfigType from './CameraConfigType';
|
|
4
|
-
type HAPServiceConfigType = NodeDef & {
|
|
5
|
-
isParent: boolean;
|
|
6
|
-
hostType: number;
|
|
7
|
-
bridge: string;
|
|
8
|
-
accessoryId: string;
|
|
9
|
-
parentService: string;
|
|
10
|
-
name: string;
|
|
11
|
-
serviceName: string;
|
|
12
|
-
topic: string;
|
|
13
|
-
filter: boolean;
|
|
14
|
-
manufacturer: string;
|
|
15
|
-
model: string;
|
|
16
|
-
serialNo: string;
|
|
17
|
-
firmwareRev?: string;
|
|
18
|
-
hardwareRev?: string;
|
|
19
|
-
softwareRev?: string;
|
|
20
|
-
characteristicProperties: string;
|
|
21
|
-
waitForSetupMsg: boolean;
|
|
22
|
-
adaptiveLightingOptionsEnable?: boolean;
|
|
23
|
-
adaptiveLightingOptionsMode?: AdaptiveLightingControllerMode;
|
|
24
|
-
adaptiveLightingOptionsCustomTemperatureAdjustment?: number;
|
|
25
|
-
} & CameraConfigType;
|
|
26
|
-
export default HAPServiceConfigType;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Accessory, AdaptiveLightingController, Characteristic, CharacteristicChange, CharacteristicGetCallback, CharacteristicProps, CharacteristicSetCallback, CharacteristicValue, Service } from '@homebridge/hap-nodejs';
|
|
2
|
-
import { CharacteristicContext } from '@homebridge/hap-nodejs/dist/lib/Characteristic';
|
|
3
|
-
import { HAPConnection } from '@homebridge/hap-nodejs/dist/lib/util/eventedhttp';
|
|
4
|
-
import { NodeAPI } from 'node-red';
|
|
5
|
-
import { NodeStatusUtils } from '../utils/NodeStatusUtils';
|
|
6
|
-
import HAPHostNodeType from './HAPHostNodeType';
|
|
7
|
-
import HAPService2NodeType from './HAPService2NodeType';
|
|
8
|
-
import HAPServiceConfigType from './HAPServiceConfigType';
|
|
9
|
-
import NodeType from './NodeType';
|
|
10
|
-
import PublishTimersType from './PublishTimersType';
|
|
11
|
-
type HAPServiceNodeType = NodeType & {
|
|
12
|
-
config: HAPServiceConfigType;
|
|
13
|
-
RED: NodeAPI;
|
|
14
|
-
setupDone: boolean;
|
|
15
|
-
configured: boolean;
|
|
16
|
-
handleWaitForSetup: (msg: any) => any;
|
|
17
|
-
onIdentify: (paired: boolean, callback: () => any) => void;
|
|
18
|
-
hostNode: HAPHostNodeType;
|
|
19
|
-
childNodes?: (HAPService2NodeType | HAPServiceNodeType)[];
|
|
20
|
-
service: Service;
|
|
21
|
-
parentService: Service;
|
|
22
|
-
parentNode?: HAPService2NodeType | HAPServiceNodeType;
|
|
23
|
-
accessory: Accessory;
|
|
24
|
-
characteristicProperties: {
|
|
25
|
-
[key: string]: CharacteristicProps;
|
|
26
|
-
};
|
|
27
|
-
supported: string[];
|
|
28
|
-
publishTimers: PublishTimersType;
|
|
29
|
-
topic_in: string;
|
|
30
|
-
onCharacteristicGet: (this: Characteristic, callback: CharacteristicGetCallback, context: CharacteristicContext, connection?: HAPConnection) => void;
|
|
31
|
-
onCharacteristicSet: (this: Characteristic, value: CharacteristicValue, callback: CharacteristicSetCallback, context: CharacteristicContext, connection?: HAPConnection) => void;
|
|
32
|
-
onCharacteristicChange: (this: Characteristic, change: CharacteristicChange) => void;
|
|
33
|
-
uniqueIdentifier: string;
|
|
34
|
-
reachable?: boolean;
|
|
35
|
-
nodeStatusUtils: NodeStatusUtils;
|
|
36
|
-
adaptiveLightingController?: AdaptiveLightingController;
|
|
37
|
-
};
|
|
38
|
-
export default HAPServiceNodeType;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NodeAPI } from 'node-red';
|
|
2
|
-
import { NodeStatusUtils } from '../utils/NodeStatusUtils';
|
|
3
|
-
import HAPServiceNodeType from './HAPServiceNodeType';
|
|
4
|
-
import HAPStatusConfigType from './HAPStatusConfigType';
|
|
5
|
-
import NodeType from './NodeType';
|
|
6
|
-
type HAPStatusNodeType = NodeType & {
|
|
7
|
-
config: HAPStatusConfigType;
|
|
8
|
-
RED: NodeAPI;
|
|
9
|
-
serviceNode?: HAPServiceNodeType;
|
|
10
|
-
nodeStatusUtils: NodeStatusUtils;
|
|
11
|
-
};
|
|
12
|
-
export default HAPStatusNodeType;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
declare enum HapCategories {
|
|
2
|
-
OTHER = 1,
|
|
3
|
-
BRIDGE = 2,
|
|
4
|
-
FAN = 3,
|
|
5
|
-
GARAGE_DOOR_OPENER = 4,
|
|
6
|
-
LIGHTBULB = 5,
|
|
7
|
-
DOOR_LOCK = 6,
|
|
8
|
-
OUTLET = 7,
|
|
9
|
-
SWITCH = 8,
|
|
10
|
-
THERMOSTAT = 9,
|
|
11
|
-
SENSOR = 10,
|
|
12
|
-
ALARM_SYSTEM = 11,
|
|
13
|
-
SECURITY_SYSTEM = 11,
|
|
14
|
-
DOOR = 12,
|
|
15
|
-
WINDOW = 13,
|
|
16
|
-
WINDOW_COVERING = 14,
|
|
17
|
-
PROGRAMMABLE_SWITCH = 15,
|
|
18
|
-
RANGE_EXTENDER = 16,
|
|
19
|
-
CAMERA = 17,
|
|
20
|
-
IP_CAMERA = 17,
|
|
21
|
-
VIDEO_DOORBELL = 18,
|
|
22
|
-
AIR_PURIFIER = 19,
|
|
23
|
-
AIR_HEATER = 20,
|
|
24
|
-
AIR_CONDITIONER = 21,
|
|
25
|
-
AIR_HUMIDIFIER = 22,
|
|
26
|
-
AIR_DEHUMIDIFIER = 23,
|
|
27
|
-
APPLE_TV = 24,
|
|
28
|
-
HOMEPOD = 25,
|
|
29
|
-
SPEAKER = 26,
|
|
30
|
-
AIRPORT = 27,
|
|
31
|
-
SPRINKLER = 28,
|
|
32
|
-
FAUCET = 29,
|
|
33
|
-
SHOWER_HEAD = 30,
|
|
34
|
-
TELEVISION = 31,
|
|
35
|
-
TARGET_CONTROLLER = 32,
|
|
36
|
-
ROUTER = 33,
|
|
37
|
-
AUDIO_RECEIVER = 34,
|
|
38
|
-
TV_SET_TOP_BOX = 35,
|
|
39
|
-
TV_STREAMING_STICK = 36
|
|
40
|
-
}
|
|
41
|
-
export default HapCategories;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { NodeStatus } from '@node-red/registry';
|
|
2
|
-
import NodeType from '../types/NodeType';
|
|
3
|
-
type StatusType = 'NO_RESPONSE' | 'MSG';
|
|
4
|
-
type NodeStatusWithType = NodeStatus & {
|
|
5
|
-
type?: StatusType;
|
|
6
|
-
};
|
|
7
|
-
type Status = string | NodeStatusWithType;
|
|
8
|
-
export declare class NodeStatusUtils {
|
|
9
|
-
private node;
|
|
10
|
-
protected lastStatusId?: number;
|
|
11
|
-
protected lastStatusType?: StatusType;
|
|
12
|
-
constructor(node: Pick<NodeType, 'status'>);
|
|
13
|
-
setStatus(status: Status, timeout?: number): number;
|
|
14
|
-
clearStatusByType(type: StatusType): void;
|
|
15
|
-
clearStatus(statusId?: number, timeout?: number): void;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/build/nodes/bridge.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/build/nodes/nrchkb.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/build/nodes/service.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/build/nodes/status.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|