node-red-contrib-homekit-bridged 2.0.0-dev.4 → 2.0.0-dev.7
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 +183 -141
- package/build/lib/HAPServiceNode.js +199 -172
- package/build/lib/HAPServiceNode2.js +207 -172
- package/build/lib/NRCHKBError.js +23 -2
- package/build/lib/PairingQRCode.js +62 -0
- package/build/lib/Storage.js +157 -92
- package/build/lib/api.js +654 -288
- 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 -110
- package/build/lib/utils/BridgeUtils.js +82 -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 +434 -373
- package/build/lib/utils/ServiceUtils2.js +514 -307
- package/build/lib/utils/index.js +10 -11
- package/build/nodes/bridge.html +184 -166
- 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 +1601 -88
- package/build/nodes/nrchkb.js +66 -88
- package/build/nodes/plugin-instance.html +499 -0
- package/build/nodes/plugin-instance.js +46 -0
- package/build/nodes/service.html +517 -299
- package/build/nodes/service.js +5 -6
- package/build/nodes/service2.html +1683 -460
- package/build/nodes/service2.js +5 -8
- package/build/nodes/standalone.html +187 -174
- package/build/nodes/standalone.js +27 -9
- package/build/nodes/status.html +51 -18
- package/build/nodes/status.js +47 -40
- 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 -84
- 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
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var MP4StreamingServer_exports = {};
|
|
20
|
+
__export(MP4StreamingServer_exports, {
|
|
21
|
+
MP4StreamingServer: () => MP4StreamingServer
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(MP4StreamingServer_exports);
|
|
24
|
+
var import_node_child_process = require("node:child_process");
|
|
25
|
+
var import_node_events = require("node:events");
|
|
26
|
+
var import_node_net = require("node:net");
|
|
27
|
+
var import_logger = require("@nrchkb/logger");
|
|
28
|
+
const log = (0, import_logger.logger)("NRCHKB", "MP4StreamingServer");
|
|
29
|
+
class MP4StreamingServer {
|
|
30
|
+
constructor(ffmpegPath, ffmpegInput, audioOutputArgs, videoOutputArgs) {
|
|
31
|
+
/**
|
|
32
|
+
* This can be configured to output ffmpeg debug output!
|
|
33
|
+
*/
|
|
34
|
+
this.debugMode = false;
|
|
35
|
+
this.destroyed = false;
|
|
36
|
+
this.connectPromise = new Promise((resolve) => {
|
|
37
|
+
this.connectResolve = resolve;
|
|
38
|
+
});
|
|
39
|
+
this.server = (0, import_node_net.createServer)(this.handleConnection.bind(this));
|
|
40
|
+
this.ffmpegPath = ffmpegPath;
|
|
41
|
+
this.args = [];
|
|
42
|
+
this.args.push(...ffmpegInput);
|
|
43
|
+
this.args.push(...audioOutputArgs);
|
|
44
|
+
this.args.push("-f", "mp4");
|
|
45
|
+
this.args.push(...videoOutputArgs);
|
|
46
|
+
this.args.push("-fflags", "+genpts", "-reset_timestamps", "1");
|
|
47
|
+
this.args.push(
|
|
48
|
+
"-movflags",
|
|
49
|
+
"frag_keyframe+empty_moov+default_base_moof"
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
async start() {
|
|
53
|
+
const promise = (0, import_node_events.once)(this.server, "listening");
|
|
54
|
+
this.server.listen();
|
|
55
|
+
await promise;
|
|
56
|
+
if (this.destroyed) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const port = this.server.address().port;
|
|
60
|
+
this.args.push(`tcp://127.0.0.1:${port}`);
|
|
61
|
+
log.debug(`${this.ffmpegPath} ${this.args.join(" ")}`);
|
|
62
|
+
this.childProcess = (0, import_node_child_process.spawn)(this.ffmpegPath, this.args, {
|
|
63
|
+
env: process.env,
|
|
64
|
+
stdio: this.debugMode ? "pipe" : "ignore"
|
|
65
|
+
});
|
|
66
|
+
if (!this.childProcess) {
|
|
67
|
+
log.error("ChildProcess is undefined directly after the init!");
|
|
68
|
+
}
|
|
69
|
+
if (this.debugMode) {
|
|
70
|
+
this.childProcess.stdout?.on(
|
|
71
|
+
"data",
|
|
72
|
+
(data) => log.debug(data.toString())
|
|
73
|
+
);
|
|
74
|
+
this.childProcess.stderr?.on(
|
|
75
|
+
"data",
|
|
76
|
+
(data) => log.debug(data.toString())
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
destroy() {
|
|
81
|
+
this.socket?.destroy();
|
|
82
|
+
this.childProcess?.kill();
|
|
83
|
+
this.socket = void 0;
|
|
84
|
+
this.childProcess = void 0;
|
|
85
|
+
this.destroyed = true;
|
|
86
|
+
}
|
|
87
|
+
handleConnection(socket) {
|
|
88
|
+
this.server.close();
|
|
89
|
+
this.socket = socket;
|
|
90
|
+
this.connectResolve?.();
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Generator for `MP4Atom`s.
|
|
94
|
+
* Throws error to signal EOF when socket is closed.
|
|
95
|
+
*/
|
|
96
|
+
async *generator() {
|
|
97
|
+
await this.connectPromise;
|
|
98
|
+
if (!this.socket || !this.childProcess) {
|
|
99
|
+
log.error(
|
|
100
|
+
"Socket undefined " + !!this.socket + " childProcess undefined " + !!this.childProcess
|
|
101
|
+
);
|
|
102
|
+
throw new Error("Unexpected state!");
|
|
103
|
+
}
|
|
104
|
+
while (true) {
|
|
105
|
+
const header = await this.read(8);
|
|
106
|
+
const length = header.readInt32BE(0) - 8;
|
|
107
|
+
const type = header.subarray(4).toString();
|
|
108
|
+
const data = await this.read(length);
|
|
109
|
+
yield {
|
|
110
|
+
header,
|
|
111
|
+
length,
|
|
112
|
+
type,
|
|
113
|
+
data
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
async read(length) {
|
|
118
|
+
if (!this.socket) {
|
|
119
|
+
throw Error("FFMPEG tried reading from closed socket!");
|
|
120
|
+
}
|
|
121
|
+
if (!length) {
|
|
122
|
+
return Buffer.alloc(0);
|
|
123
|
+
}
|
|
124
|
+
const value = this.socket.read(length);
|
|
125
|
+
if (value) {
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
return new Promise((resolve, reject) => {
|
|
129
|
+
const readHandler = () => {
|
|
130
|
+
const value2 = this.socket?.read(length);
|
|
131
|
+
if (value2) {
|
|
132
|
+
cleanup();
|
|
133
|
+
resolve(value2);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const endHandler = () => {
|
|
137
|
+
cleanup();
|
|
138
|
+
reject(
|
|
139
|
+
new Error(
|
|
140
|
+
`FFMPEG socket closed during read for ${length} bytes!`
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
const cleanup = () => {
|
|
145
|
+
this.socket?.removeListener("readable", readHandler);
|
|
146
|
+
this.socket?.removeListener("close", endHandler);
|
|
147
|
+
};
|
|
148
|
+
if (!this.socket) {
|
|
149
|
+
throw new Error("FFMPEG socket is closed now!");
|
|
150
|
+
}
|
|
151
|
+
this.socket.on("readable", readHandler);
|
|
152
|
+
this.socket.on("close", endHandler);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
157
|
+
0 && (module.exports = {
|
|
158
|
+
MP4StreamingServer
|
|
159
|
+
});
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var HAPCharacteristic_exports = {};
|
|
20
|
+
__export(HAPCharacteristic_exports, {
|
|
21
|
+
default: () => HAPCharacteristic_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(HAPCharacteristic_exports);
|
|
24
|
+
var import_hap_nodejs = require("@homebridge/hap-nodejs");
|
|
25
|
+
class HAPCharacteristic extends import_hap_nodejs.Characteristic {
|
|
5
26
|
}
|
|
6
|
-
|
|
27
|
+
var HAPCharacteristic_default = HAPCharacteristic;
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var HAPService_exports = {};
|
|
20
|
+
__export(HAPService_exports, {
|
|
21
|
+
default: () => HAPService_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(HAPService_exports);
|
|
24
|
+
var import_hap_nodejs = require("@homebridge/hap-nodejs");
|
|
25
|
+
class HAPService extends import_hap_nodejs.Service {
|
|
5
26
|
}
|
|
6
|
-
|
|
27
|
+
var HAPService_default = HAPService;
|
|
@@ -1,89 +1,132 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var EveCharacteristics_exports = {};
|
|
30
|
+
__export(EveCharacteristics_exports, {
|
|
31
|
+
EveS2R1: () => EveS2R1,
|
|
32
|
+
EveS2R2: () => EveS2R2,
|
|
33
|
+
EveS2W1: () => EveS2W1,
|
|
34
|
+
EveS2W2: () => EveS2W2,
|
|
35
|
+
default: () => EveCharacteristics_default
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(EveCharacteristics_exports);
|
|
38
|
+
var import_HAPCharacteristic = __toESM(require("../HAPCharacteristic"));
|
|
39
|
+
var import_hap_nodejs = require("../hap-nodejs");
|
|
8
40
|
const EveCharacteristics = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
{
|
|
42
|
+
UUID: "E863F10A-079E-48FF-8F27-9C2605A29F52",
|
|
43
|
+
name: "Eve-Volt",
|
|
44
|
+
format: import_hap_nodejs.Formats.FLOAT,
|
|
45
|
+
perms: [import_hap_nodejs.Perms.PAIRED_READ],
|
|
46
|
+
description: "Volt (V) value. Used by Eve.app."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
UUID: "E863F126-079E-48FF-8F27-9C2605A29F52",
|
|
50
|
+
name: "Eve-Ampere",
|
|
51
|
+
format: import_hap_nodejs.Formats.FLOAT,
|
|
52
|
+
perms: [import_hap_nodejs.Perms.PAIRED_READ],
|
|
53
|
+
description: "Ampere (A) value. Used by Eve.app."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
UUID: "E863F10D-079E-48FF-8F27-9C2605A29F52",
|
|
57
|
+
name: "Eve-Watt",
|
|
58
|
+
format: import_hap_nodejs.Formats.FLOAT,
|
|
59
|
+
perms: [import_hap_nodejs.Perms.PAIRED_READ],
|
|
60
|
+
description: 'Watt (W) value. Used by Eve.app, reported as "Consumption".'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
UUID: "E863F10C-079E-48FF-8F27-9C2605A29F52",
|
|
64
|
+
name: "Eve-Kilowatt-hour",
|
|
65
|
+
format: import_hap_nodejs.Formats.FLOAT,
|
|
66
|
+
perms: [import_hap_nodejs.Perms.PAIRED_READ],
|
|
67
|
+
description: "Kilowatt-hour (kWh) value. Used by Eve.app, reported as Total Consumption."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
UUID: "E863F110-079E-48FF-8F27-9C2605A29F52",
|
|
71
|
+
name: "Eve-Volt-Ampere",
|
|
72
|
+
format: import_hap_nodejs.Formats.UINT16,
|
|
73
|
+
perms: [import_hap_nodejs.Perms.PAIRED_READ],
|
|
74
|
+
description: "Volt-Ampere (VA) value. Used by Eve.app."
|
|
75
|
+
}
|
|
44
76
|
];
|
|
45
|
-
class EveS2R1 extends
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
77
|
+
class EveS2R1 extends import_HAPCharacteristic.default {
|
|
78
|
+
static {
|
|
79
|
+
this.UUID = "E863F116-079E-48FF-8F27-9C2605A29F52";
|
|
80
|
+
}
|
|
81
|
+
constructor() {
|
|
82
|
+
super("Eve-S2R1", EveS2R1.UUID, {
|
|
83
|
+
format: import_hap_nodejs.Formats.DATA,
|
|
84
|
+
perms: [import_hap_nodejs.Perms.PAIRED_READ, import_hap_nodejs.Perms.NOTIFY, import_hap_nodejs.Perms.HIDDEN]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
52
87
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
88
|
+
import_HAPCharacteristic.default.EveS2R1 = EveS2R1;
|
|
89
|
+
class EveS2R2 extends import_HAPCharacteristic.default {
|
|
90
|
+
static {
|
|
91
|
+
this.UUID = "E863F117-079E-48FF-8F27-9C2605A29F52";
|
|
92
|
+
}
|
|
93
|
+
constructor() {
|
|
94
|
+
super("Eve-S2R2", EveS2R2.UUID, {
|
|
95
|
+
format: import_hap_nodejs.Formats.DATA,
|
|
96
|
+
perms: [import_hap_nodejs.Perms.PAIRED_READ, import_hap_nodejs.Perms.NOTIFY, import_hap_nodejs.Perms.HIDDEN]
|
|
97
|
+
});
|
|
98
|
+
}
|
|
63
99
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
100
|
+
import_HAPCharacteristic.default.EveS2R2 = EveS2R2;
|
|
101
|
+
class EveS2W1 extends import_HAPCharacteristic.default {
|
|
102
|
+
static {
|
|
103
|
+
this.UUID = "E863F11C-079E-48FF-8F27-9C2605A29F52";
|
|
104
|
+
}
|
|
105
|
+
constructor() {
|
|
106
|
+
super("Eve-S2W1", EveS2W1.UUID, {
|
|
107
|
+
format: import_hap_nodejs.Formats.DATA,
|
|
108
|
+
perms: [import_hap_nodejs.Perms.PAIRED_WRITE, import_hap_nodejs.Perms.HIDDEN]
|
|
109
|
+
});
|
|
110
|
+
}
|
|
74
111
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
112
|
+
import_HAPCharacteristic.default.EveS2W1 = EveS2W1;
|
|
113
|
+
class EveS2W2 extends import_HAPCharacteristic.default {
|
|
114
|
+
static {
|
|
115
|
+
this.UUID = "E863F121-079E-48FF-8F27-9C2605A29F52";
|
|
116
|
+
}
|
|
117
|
+
constructor() {
|
|
118
|
+
super("Eve-S2W2", EveS2W2.UUID, {
|
|
119
|
+
format: import_hap_nodejs.Formats.DATA,
|
|
120
|
+
perms: [import_hap_nodejs.Perms.PAIRED_WRITE, import_hap_nodejs.Perms.HIDDEN]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
85
123
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
exports
|
|
124
|
+
import_HAPCharacteristic.default.EveS2W2 = EveS2W2;
|
|
125
|
+
var EveCharacteristics_default = EveCharacteristics;
|
|
126
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
127
|
+
0 && (module.exports = {
|
|
128
|
+
EveS2R1,
|
|
129
|
+
EveS2R2,
|
|
130
|
+
EveS2W1,
|
|
131
|
+
EveS2W2
|
|
132
|
+
});
|
|
@@ -1,20 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var EveServices_exports = {};
|
|
30
|
+
__export(EveServices_exports, {
|
|
31
|
+
EveHistoryData: () => EveHistoryData
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(EveServices_exports);
|
|
34
|
+
var import_HAPCharacteristic = __toESM(require("../HAPCharacteristic"));
|
|
35
|
+
var import_HAPService = __toESM(require("../HAPService"));
|
|
36
|
+
class EveHistoryData extends import_HAPService.default {
|
|
37
|
+
static {
|
|
38
|
+
// Custom service for meta and/or historical information. Characteristics for logging: E863F11C, E863F121, E863F116, E863F117. Used by Eve.app.
|
|
39
|
+
this.UUID = "E863F007-079E-48FF-8F27-9C2605A29F52";
|
|
40
|
+
}
|
|
41
|
+
constructor() {
|
|
42
|
+
super("EveHistoryData", EveHistoryData.UUID);
|
|
43
|
+
this.addCharacteristic(import_HAPCharacteristic.default.EveS2R1);
|
|
44
|
+
this.addCharacteristic(import_HAPCharacteristic.default.EveS2R2);
|
|
45
|
+
this.addCharacteristic(import_HAPCharacteristic.default.EveS2W1);
|
|
46
|
+
this.addCharacteristic(import_HAPCharacteristic.default.EveS2W2);
|
|
47
|
+
}
|
|
17
48
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
49
|
+
import_HAPService.default.EveHistoryData = EveHistoryData;
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
EveHistoryData
|
|
53
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var hap_nodejs_exports = {};
|
|
20
|
+
__export(hap_nodejs_exports, {
|
|
21
|
+
AdaptiveLightingControllerMode: () => import_hap_nodejs.AdaptiveLightingControllerMode,
|
|
22
|
+
Formats: () => import_hap_nodejs.Formats,
|
|
23
|
+
Perms: () => import_hap_nodejs.Perms
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(hap_nodejs_exports);
|
|
26
|
+
var import_hap_nodejs = require("@homebridge/hap-nodejs");
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
AdaptiveLightingControllerMode,
|
|
30
|
+
Formats,
|
|
31
|
+
Perms
|
|
32
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var HomeKitService2Migration_exports = {};
|
|
20
|
+
__export(HomeKitService2Migration_exports, {
|
|
21
|
+
migrateHomeKitServiceFlow: () => migrateHomeKitServiceFlow,
|
|
22
|
+
migrateHomeKitServiceNode: () => migrateHomeKitServiceNode
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(HomeKitService2Migration_exports);
|
|
25
|
+
var import_NodeMigration = require("./NodeMigration");
|
|
26
|
+
const migrateHomeKitServiceNode = (node) => {
|
|
27
|
+
return (0, import_NodeMigration.migrateNode)(node).migrated;
|
|
28
|
+
};
|
|
29
|
+
const migrateHomeKitServiceFlow = (nodes) => (0, import_NodeMigration.migrateFlow)(nodes);
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
migrateHomeKitServiceFlow,
|
|
33
|
+
migrateHomeKitServiceNode
|
|
34
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var NodeMigration_exports = {};
|
|
20
|
+
__export(NodeMigration_exports, {
|
|
21
|
+
migrateFlow: () => migrateFlow,
|
|
22
|
+
migrateNode: () => migrateNode
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(NodeMigration_exports);
|
|
25
|
+
var import_embedded = require("../../plugins/embedded");
|
|
26
|
+
const migrateNode = (node) => {
|
|
27
|
+
const cameraMigrated = node.type === "homekit-service" && node.serviceName === "CameraControl";
|
|
28
|
+
if (node.type !== "homekit-service") {
|
|
29
|
+
return {
|
|
30
|
+
migrated: false,
|
|
31
|
+
cameraMigrated: false,
|
|
32
|
+
node
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
node.type = "homekit-service2";
|
|
36
|
+
if (cameraMigrated) {
|
|
37
|
+
node.serviceName = "Camera";
|
|
38
|
+
node.plugins = [(0, import_embedded.createAutomaticHomebridgeCameraFfmpegPluginEntry)(node)];
|
|
39
|
+
}
|
|
40
|
+
node.outputMode = "legacy";
|
|
41
|
+
node.useEventCallback = false;
|
|
42
|
+
node.outputs = cameraMigrated ? 3 : 2;
|
|
43
|
+
return {
|
|
44
|
+
migrated: true,
|
|
45
|
+
cameraMigrated,
|
|
46
|
+
node
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const migrateFlow = (nodes) => {
|
|
50
|
+
let migrated = 0;
|
|
51
|
+
let cameraMigrated = 0;
|
|
52
|
+
let skipped = 0;
|
|
53
|
+
nodes.forEach((node) => {
|
|
54
|
+
const result = migrateNode(node);
|
|
55
|
+
if (result.migrated) {
|
|
56
|
+
migrated += 1;
|
|
57
|
+
if (result.cameraMigrated) {
|
|
58
|
+
cameraMigrated += 1;
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
skipped += 1;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
migrated,
|
|
66
|
+
cameraMigrated,
|
|
67
|
+
skipped,
|
|
68
|
+
nodes
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
migrateFlow,
|
|
74
|
+
migrateNode
|
|
75
|
+
});
|