homebridge 2.0.0-alpha.3 → 2.0.0-alpha.4
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/README.md +16 -17
- package/bin/homebridge +8 -6
- package/config-sample.json +3 -3
- package/dist/childBridgeFork.js +2 -0
- package/dist/childBridgeFork.js.map +7 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +7 -0
- package/dist/index.d.ts +1099 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +7 -0
- package/package.json +49 -46
- package/lib/api.d.ts +0 -210
- package/lib/api.d.ts.map +0 -1
- package/lib/api.js +0 -155
- package/lib/api.js.map +0 -1
- package/lib/bridgeService.d.ts +0 -105
- package/lib/bridgeService.d.ts.map +0 -1
- package/lib/bridgeService.js +0 -432
- package/lib/bridgeService.js.map +0 -1
- package/lib/childBridgeFork.d.ts +0 -37
- package/lib/childBridgeFork.d.ts.map +0 -1
- package/lib/childBridgeFork.js +0 -244
- package/lib/childBridgeFork.js.map +0 -1
- package/lib/childBridgeService.d.ts +0 -199
- package/lib/childBridgeService.d.ts.map +0 -1
- package/lib/childBridgeService.js +0 -428
- package/lib/childBridgeService.js.map +0 -1
- package/lib/cli.d.ts +0 -4
- package/lib/cli.d.ts.map +0 -1
- package/lib/cli.js +0 -115
- package/lib/cli.js.map +0 -1
- package/lib/externalPortService.d.ts +0 -33
- package/lib/externalPortService.d.ts.map +0 -1
- package/lib/externalPortService.js +0 -64
- package/lib/externalPortService.js.map +0 -1
- package/lib/index.d.ts +0 -76
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -72
- package/lib/index.js.map +0 -1
- package/lib/ipcService.d.ts +0 -33
- package/lib/ipcService.d.ts.map +0 -1
- package/lib/ipcService.js +0 -49
- package/lib/ipcService.js.map +0 -1
- package/lib/logger.d.ts +0 -78
- package/lib/logger.d.ts.map +0 -1
- package/lib/logger.js +0 -147
- package/lib/logger.js.map +0 -1
- package/lib/platformAccessory.d.ts +0 -54
- package/lib/platformAccessory.d.ts.map +0 -1
- package/lib/platformAccessory.js +0 -102
- package/lib/platformAccessory.js.map +0 -1
- package/lib/plugin.d.ts +0 -31
- package/lib/plugin.d.ts.map +0 -1
- package/lib/plugin.js +0 -194
- package/lib/plugin.js.map +0 -1
- package/lib/pluginManager.d.ts +0 -77
- package/lib/pluginManager.d.ts.map +0 -1
- package/lib/pluginManager.js +0 -380
- package/lib/pluginManager.js.map +0 -1
- package/lib/server.d.ts +0 -58
- package/lib/server.d.ts.map +0 -1
- package/lib/server.js +0 -457
- package/lib/server.js.map +0 -1
- package/lib/storageService.d.ts +0 -13
- package/lib/storageService.d.ts.map +0 -1
- package/lib/storageService.js +0 -70
- package/lib/storageService.js.map +0 -1
- package/lib/user.d.ts +0 -13
- package/lib/user.d.ts.map +0 -1
- package/lib/user.js +0 -36
- package/lib/user.js.map +0 -1
- package/lib/util/mac.d.ts +0 -4
- package/lib/util/mac.d.ts.map +0 -1
- package/lib/util/mac.js +0 -20
- package/lib/util/mac.js.map +0 -1
- package/lib/version.d.ts +0 -3
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js +0 -21
- package/lib/version.js.map +0 -1
|
@@ -1,428 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ChildBridgeService = exports.ChildBridgeStatus = exports.ChildProcessMessageEventType = void 0;
|
|
7
|
-
const child_process_1 = __importDefault(require("child_process"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
10
|
-
const logger_1 = require("./logger");
|
|
11
|
-
const user_1 = require("./user");
|
|
12
|
-
var ChildProcessMessageEventType;
|
|
13
|
-
(function (ChildProcessMessageEventType) {
|
|
14
|
-
/**
|
|
15
|
-
* Sent from the child process when it is ready to accept config
|
|
16
|
-
*/
|
|
17
|
-
ChildProcessMessageEventType["READY"] = "ready";
|
|
18
|
-
/**
|
|
19
|
-
* Sent to the child process with a ChildProcessLoadEventData payload
|
|
20
|
-
*/
|
|
21
|
-
ChildProcessMessageEventType["LOAD"] = "load";
|
|
22
|
-
/**
|
|
23
|
-
* Sent from the child process once it has loaded the plugin
|
|
24
|
-
*/
|
|
25
|
-
ChildProcessMessageEventType["LOADED"] = "loaded";
|
|
26
|
-
/**
|
|
27
|
-
* Sent to the child process telling it to start
|
|
28
|
-
*/
|
|
29
|
-
ChildProcessMessageEventType["START"] = "start";
|
|
30
|
-
/**
|
|
31
|
-
* Sent from the child process when the bridge is online
|
|
32
|
-
*/
|
|
33
|
-
ChildProcessMessageEventType["ONLINE"] = "online";
|
|
34
|
-
/**
|
|
35
|
-
* Sent from the child when it wants to request port allocation for an external accessory
|
|
36
|
-
*/
|
|
37
|
-
ChildProcessMessageEventType["PORT_REQUEST"] = "portRequest";
|
|
38
|
-
/**
|
|
39
|
-
* Sent from the parent with the port allocation response
|
|
40
|
-
*/
|
|
41
|
-
ChildProcessMessageEventType["PORT_ALLOCATED"] = "portAllocated";
|
|
42
|
-
/**
|
|
43
|
-
* Sent from the child to update its current status
|
|
44
|
-
*/
|
|
45
|
-
ChildProcessMessageEventType["STATUS_UPDATE"] = "status";
|
|
46
|
-
})(ChildProcessMessageEventType || (exports.ChildProcessMessageEventType = ChildProcessMessageEventType = {}));
|
|
47
|
-
var ChildBridgeStatus;
|
|
48
|
-
(function (ChildBridgeStatus) {
|
|
49
|
-
/**
|
|
50
|
-
* When the child bridge is loading, or restarting
|
|
51
|
-
*/
|
|
52
|
-
ChildBridgeStatus["PENDING"] = "pending";
|
|
53
|
-
/**
|
|
54
|
-
* The child bridge is online and has published it's accessory
|
|
55
|
-
*/
|
|
56
|
-
ChildBridgeStatus["OK"] = "ok";
|
|
57
|
-
/**
|
|
58
|
-
* The bridge is shutting down, or the process ended unexpectedly
|
|
59
|
-
*/
|
|
60
|
-
ChildBridgeStatus["DOWN"] = "down";
|
|
61
|
-
})(ChildBridgeStatus || (exports.ChildBridgeStatus = ChildBridgeStatus = {}));
|
|
62
|
-
/**
|
|
63
|
-
* Manages the child processes of platforms/accessories being exposed as separate forked bridges.
|
|
64
|
-
* A child bridge runs a single platform or accessory.
|
|
65
|
-
*/
|
|
66
|
-
class ChildBridgeService {
|
|
67
|
-
type;
|
|
68
|
-
identifier;
|
|
69
|
-
plugin;
|
|
70
|
-
bridgeConfig;
|
|
71
|
-
homebridgeConfig;
|
|
72
|
-
homebridgeOptions;
|
|
73
|
-
api;
|
|
74
|
-
ipcService;
|
|
75
|
-
externalPortService;
|
|
76
|
-
child;
|
|
77
|
-
args = [];
|
|
78
|
-
processEnv = {};
|
|
79
|
-
shuttingDown = false;
|
|
80
|
-
lastBridgeStatus = "pending" /* ChildBridgeStatus.PENDING */;
|
|
81
|
-
pairedStatus = null;
|
|
82
|
-
manuallyStopped = false;
|
|
83
|
-
setupUri = null;
|
|
84
|
-
pluginConfig = [];
|
|
85
|
-
log;
|
|
86
|
-
displayName;
|
|
87
|
-
constructor(type, identifier, plugin, bridgeConfig, homebridgeConfig, homebridgeOptions, api, ipcService, externalPortService) {
|
|
88
|
-
this.type = type;
|
|
89
|
-
this.identifier = identifier;
|
|
90
|
-
this.plugin = plugin;
|
|
91
|
-
this.bridgeConfig = bridgeConfig;
|
|
92
|
-
this.homebridgeConfig = homebridgeConfig;
|
|
93
|
-
this.homebridgeOptions = homebridgeOptions;
|
|
94
|
-
this.api = api;
|
|
95
|
-
this.ipcService = ipcService;
|
|
96
|
-
this.externalPortService = externalPortService;
|
|
97
|
-
this.log = logger_1.Logger.withPrefix(this.plugin.getPluginIdentifier());
|
|
98
|
-
this.api.on("shutdown", () => {
|
|
99
|
-
this.shuttingDown = true;
|
|
100
|
-
this.teardown();
|
|
101
|
-
});
|
|
102
|
-
// make sure we don't hit the max listeners limit
|
|
103
|
-
this.api.setMaxListeners(this.api.getMaxListeners() + 1);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Start the child bridge service
|
|
107
|
-
*/
|
|
108
|
-
start() {
|
|
109
|
-
this.setProcessFlags();
|
|
110
|
-
this.setProcessEnv();
|
|
111
|
-
this.startChildProcess();
|
|
112
|
-
// set display name
|
|
113
|
-
if (this.pluginConfig.length > 1 || this.pluginConfig.length === 0) {
|
|
114
|
-
this.displayName = this.plugin.getPluginIdentifier();
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
this.displayName = this.pluginConfig[0]?.name || this.plugin.getPluginIdentifier();
|
|
118
|
-
}
|
|
119
|
-
// re-configured log with display name
|
|
120
|
-
this.log = logger_1.Logger.withPrefix(this.displayName);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Add a config block to a child bridge.
|
|
124
|
-
* Platform child bridges can only contain one config block.
|
|
125
|
-
* @param config
|
|
126
|
-
*/
|
|
127
|
-
addConfig(config) {
|
|
128
|
-
this.pluginConfig.push(config);
|
|
129
|
-
}
|
|
130
|
-
get bridgeStatus() {
|
|
131
|
-
return this.lastBridgeStatus;
|
|
132
|
-
}
|
|
133
|
-
set bridgeStatus(value) {
|
|
134
|
-
this.lastBridgeStatus = value;
|
|
135
|
-
this.sendStatusUpdate();
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Start the child bridge process
|
|
139
|
-
*/
|
|
140
|
-
startChildProcess() {
|
|
141
|
-
this.bridgeStatus = "pending" /* ChildBridgeStatus.PENDING */;
|
|
142
|
-
this.child = child_process_1.default.fork(path_1.default.resolve(__dirname, "childBridgeFork.js"), this.args, this.processEnv);
|
|
143
|
-
this.child.stdout?.on("data", (data) => {
|
|
144
|
-
process.stdout.write(data);
|
|
145
|
-
});
|
|
146
|
-
this.child.stderr?.on("data", (data) => {
|
|
147
|
-
process.stderr.write(data);
|
|
148
|
-
});
|
|
149
|
-
this.child.on("exit", () => {
|
|
150
|
-
this.log.warn("Child bridge process ended");
|
|
151
|
-
});
|
|
152
|
-
this.child.on("error", (e) => {
|
|
153
|
-
this.bridgeStatus = "down" /* ChildBridgeStatus.DOWN */;
|
|
154
|
-
this.log.error("Child process error", e);
|
|
155
|
-
});
|
|
156
|
-
this.child.once("close", (code, signal) => {
|
|
157
|
-
this.bridgeStatus = "down" /* ChildBridgeStatus.DOWN */;
|
|
158
|
-
this.handleProcessClose(code, signal);
|
|
159
|
-
});
|
|
160
|
-
// handle incoming ipc messages from the child process
|
|
161
|
-
this.child.on("message", (message) => {
|
|
162
|
-
if (typeof message !== "object" || !message.id) {
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
switch (message.id) {
|
|
166
|
-
case "ready" /* ChildProcessMessageEventType.READY */: {
|
|
167
|
-
this.log(`Launched child bridge with PID ${this.child?.pid}`);
|
|
168
|
-
this.loadPlugin();
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
case "loaded" /* ChildProcessMessageEventType.LOADED */: {
|
|
172
|
-
const version = message.data.version;
|
|
173
|
-
if (this.pluginConfig.length > 1) {
|
|
174
|
-
this.log(`Loaded ${this.plugin.getPluginIdentifier()} v${version} child bridge successfully with ${this.pluginConfig.length} accessories`);
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
this.log(`Loaded ${this.plugin.getPluginIdentifier()} v${version} child bridge successfully`);
|
|
178
|
-
}
|
|
179
|
-
this.startBridge();
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
case "online" /* ChildProcessMessageEventType.ONLINE */: {
|
|
183
|
-
this.bridgeStatus = "ok" /* ChildBridgeStatus.OK */;
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
case "portRequest" /* ChildProcessMessageEventType.PORT_REQUEST */: {
|
|
187
|
-
this.handlePortRequest(message.data);
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
case "status" /* ChildProcessMessageEventType.STATUS_UPDATE */: {
|
|
191
|
-
this.pairedStatus = message.data.paired;
|
|
192
|
-
this.setupUri = message.data.setupUri;
|
|
193
|
-
this.sendStatusUpdate();
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Called when the child bridge process exits, if Homebridge is not shutting down, it will restart the process
|
|
201
|
-
* @param code
|
|
202
|
-
* @param signal
|
|
203
|
-
*/
|
|
204
|
-
handleProcessClose(code, signal) {
|
|
205
|
-
this.log(`Process Ended. Code: ${code}, Signal: ${signal}`);
|
|
206
|
-
setTimeout(() => {
|
|
207
|
-
if (!this.shuttingDown) {
|
|
208
|
-
this.log("Restarting Process...");
|
|
209
|
-
this.startChildProcess();
|
|
210
|
-
}
|
|
211
|
-
}, 7000);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Helper function to send a message to the child process
|
|
215
|
-
* @param type
|
|
216
|
-
* @param data
|
|
217
|
-
*/
|
|
218
|
-
sendMessage(type, data) {
|
|
219
|
-
if (this.child && this.child.connected) {
|
|
220
|
-
this.child.send({
|
|
221
|
-
id: type,
|
|
222
|
-
data,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Some plugins may make use of the homebridge process flags
|
|
228
|
-
* These will be passed through to the forked process
|
|
229
|
-
*/
|
|
230
|
-
setProcessFlags() {
|
|
231
|
-
if (this.homebridgeOptions.debugModeEnabled) {
|
|
232
|
-
this.args.push("-D");
|
|
233
|
-
}
|
|
234
|
-
if (this.homebridgeOptions.forceColourLogging) {
|
|
235
|
-
this.args.push("-C");
|
|
236
|
-
}
|
|
237
|
-
if (this.homebridgeOptions.insecureAccess) {
|
|
238
|
-
this.args.push("-I");
|
|
239
|
-
}
|
|
240
|
-
if (this.homebridgeOptions.noLogTimestamps) {
|
|
241
|
-
this.args.push("-T");
|
|
242
|
-
}
|
|
243
|
-
if (this.homebridgeOptions.keepOrphanedCachedAccessories) {
|
|
244
|
-
this.args.push("-K");
|
|
245
|
-
}
|
|
246
|
-
if (this.homebridgeOptions.customStoragePath) {
|
|
247
|
-
this.args.push("-U", this.homebridgeOptions.customStoragePath);
|
|
248
|
-
}
|
|
249
|
-
if (this.homebridgeOptions.customPluginPath) {
|
|
250
|
-
this.args.push("-P", this.homebridgeOptions.customPluginPath);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Set environment variables for the child process
|
|
255
|
-
*/
|
|
256
|
-
setProcessEnv() {
|
|
257
|
-
this.processEnv = {
|
|
258
|
-
env: {
|
|
259
|
-
...process.env,
|
|
260
|
-
DEBUG: `${process.env.DEBUG || ""} ${this.bridgeConfig.env?.DEBUG || ""}`.trim(),
|
|
261
|
-
NODE_OPTIONS: `${process.env.NODE_OPTIONS || ""} ${this.bridgeConfig.env?.NODE_OPTIONS || ""}`.trim(),
|
|
262
|
-
},
|
|
263
|
-
silent: true,
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Tell the child process to load the given plugin
|
|
268
|
-
*/
|
|
269
|
-
loadPlugin() {
|
|
270
|
-
const bridgeConfig = {
|
|
271
|
-
name: this.bridgeConfig.name || this.displayName || this.plugin.getPluginIdentifier(),
|
|
272
|
-
port: this.bridgeConfig.port,
|
|
273
|
-
username: this.bridgeConfig.username,
|
|
274
|
-
advertiser: this.homebridgeConfig.bridge.advertiser,
|
|
275
|
-
pin: this.bridgeConfig.pin || this.homebridgeConfig.bridge.pin,
|
|
276
|
-
bind: this.homebridgeConfig.bridge.bind,
|
|
277
|
-
setupID: this.bridgeConfig.setupID,
|
|
278
|
-
manufacturer: this.bridgeConfig.manufacturer || this.homebridgeConfig.bridge.manufacturer,
|
|
279
|
-
model: this.bridgeConfig.model || this.homebridgeConfig.bridge.model,
|
|
280
|
-
firmwareRevision: this.bridgeConfig.firmwareRevision || this.homebridgeConfig.bridge.firmwareRevision,
|
|
281
|
-
};
|
|
282
|
-
const bridgeOptions = {
|
|
283
|
-
cachedAccessoriesDir: user_1.User.cachedAccessoryPath(),
|
|
284
|
-
cachedAccessoriesItemName: "cachedAccessories." + this.bridgeConfig.username.replace(/:/g, "").toUpperCase(),
|
|
285
|
-
};
|
|
286
|
-
// shallow copy the homebridge options to the bridge options object
|
|
287
|
-
Object.assign(bridgeOptions, this.homebridgeOptions);
|
|
288
|
-
this.sendMessage("load" /* ChildProcessMessageEventType.LOAD */, {
|
|
289
|
-
type: this.type,
|
|
290
|
-
identifier: this.identifier,
|
|
291
|
-
pluginPath: this.plugin.getPluginPath(),
|
|
292
|
-
pluginConfig: this.pluginConfig,
|
|
293
|
-
bridgeConfig,
|
|
294
|
-
bridgeOptions,
|
|
295
|
-
homebridgeConfig: {
|
|
296
|
-
bridge: this.homebridgeConfig.bridge,
|
|
297
|
-
ports: this.homebridgeConfig.ports,
|
|
298
|
-
disabledPlugins: [], // not used by child bridges
|
|
299
|
-
accessories: [], // not used by child bridges
|
|
300
|
-
platforms: [], // not used by child bridges
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Tell the child bridge to start broadcasting
|
|
306
|
-
*/
|
|
307
|
-
startBridge() {
|
|
308
|
-
this.sendMessage("start" /* ChildProcessMessageEventType.START */);
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Handle external port requests from child
|
|
312
|
-
*/
|
|
313
|
-
async handlePortRequest(request) {
|
|
314
|
-
const port = await this.externalPortService.requestPort(request.username);
|
|
315
|
-
this.sendMessage("portAllocated" /* ChildProcessMessageEventType.PORT_ALLOCATED */, {
|
|
316
|
-
username: request.username,
|
|
317
|
-
port: port,
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Send sigterm to the child bridge
|
|
322
|
-
*/
|
|
323
|
-
teardown() {
|
|
324
|
-
if (this.child && this.child.connected) {
|
|
325
|
-
this.bridgeStatus = "down" /* ChildBridgeStatus.DOWN */;
|
|
326
|
-
this.child.kill("SIGTERM");
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Trigger sending child bridge metadata to the process parent via IPC
|
|
331
|
-
*/
|
|
332
|
-
sendStatusUpdate() {
|
|
333
|
-
this.ipcService.sendMessage("childBridgeStatusUpdate" /* IpcOutgoingEvent.CHILD_BRIDGE_STATUS_UPDATE */, this.getMetadata());
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Restarts the child bridge process
|
|
337
|
-
*/
|
|
338
|
-
restartChildBridge() {
|
|
339
|
-
if (this.manuallyStopped) {
|
|
340
|
-
this.startChildBridge();
|
|
341
|
-
}
|
|
342
|
-
else {
|
|
343
|
-
this.log.warn("Restarting child bridge...");
|
|
344
|
-
this.refreshConfig();
|
|
345
|
-
this.teardown();
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Stops the child bridge, not starting it again
|
|
350
|
-
*/
|
|
351
|
-
stopChildBridge() {
|
|
352
|
-
if (!this.shuttingDown) {
|
|
353
|
-
this.log.warn("Stopping child bridge (will not restart)...");
|
|
354
|
-
this.shuttingDown = true;
|
|
355
|
-
this.manuallyStopped = true;
|
|
356
|
-
this.child?.removeAllListeners("close");
|
|
357
|
-
this.teardown();
|
|
358
|
-
}
|
|
359
|
-
else {
|
|
360
|
-
this.log.warn("Bridge already shutting down or stopped.");
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* Starts the child bridge, only if it was manually stopped and is no longer running
|
|
365
|
-
*/
|
|
366
|
-
startChildBridge() {
|
|
367
|
-
if (this.manuallyStopped && this.bridgeStatus === "down" /* ChildBridgeStatus.DOWN */ && (!this.child || !this.child.connected)) {
|
|
368
|
-
this.log.warn("Starting child bridge...");
|
|
369
|
-
this.refreshConfig();
|
|
370
|
-
this.startChildProcess();
|
|
371
|
-
this.shuttingDown = false;
|
|
372
|
-
this.manuallyStopped = false;
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
this.log.warn("Cannot start child bridge, it is still running or was not manually stopped");
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Read the config.json file from disk and refresh the plugin config block for just this plugin
|
|
380
|
-
*/
|
|
381
|
-
async refreshConfig() {
|
|
382
|
-
try {
|
|
383
|
-
const homebridgeConfig = await fs_extra_1.default.readJson(user_1.User.configPath());
|
|
384
|
-
if (this.type === "platform" /* PluginType.PLATFORM */) {
|
|
385
|
-
const config = homebridgeConfig.platforms?.filter(x => x.platform === this.identifier && x._bridge?.username === this.bridgeConfig.username);
|
|
386
|
-
if (config.length) {
|
|
387
|
-
this.pluginConfig = config;
|
|
388
|
-
this.bridgeConfig = this.pluginConfig[0]._bridge || this.bridgeConfig;
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
this.log.warn("Platform config could not be found, using existing config.");
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
else if (this.type === "accessory" /* PluginType.ACCESSORY */) {
|
|
395
|
-
const config = homebridgeConfig.accessories?.filter(x => x.accessory === this.identifier && x._bridge?.username === this.bridgeConfig.username);
|
|
396
|
-
if (config.length) {
|
|
397
|
-
this.pluginConfig = config;
|
|
398
|
-
this.bridgeConfig = this.pluginConfig[0]._bridge || this.bridgeConfig;
|
|
399
|
-
}
|
|
400
|
-
else {
|
|
401
|
-
this.log.warn("Accessory config could not be found, using existing config.");
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
catch (e) {
|
|
406
|
-
this.log.error("Failed to refresh plugin config:", e.message);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Returns metadata about this child bridge
|
|
411
|
-
*/
|
|
412
|
-
getMetadata() {
|
|
413
|
-
return {
|
|
414
|
-
status: this.bridgeStatus,
|
|
415
|
-
paired: this.pairedStatus,
|
|
416
|
-
setupUri: this.setupUri,
|
|
417
|
-
username: this.bridgeConfig.username,
|
|
418
|
-
pin: this.bridgeConfig.pin || this.homebridgeConfig.bridge.pin,
|
|
419
|
-
name: this.bridgeConfig.name || this.displayName || this.plugin.getPluginIdentifier(),
|
|
420
|
-
plugin: this.plugin.getPluginIdentifier(),
|
|
421
|
-
identifier: this.identifier,
|
|
422
|
-
pid: this.child?.pid,
|
|
423
|
-
manuallyStopped: this.manuallyStopped,
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
exports.ChildBridgeService = ChildBridgeService;
|
|
428
|
-
//# sourceMappingURL=childBridgeService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"childBridgeService.js","sourceRoot":"","sources":["../src/childBridgeService.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA0C;AAC1C,gDAAwB;AACxB,wDAA0B;AAY1B,qCAA2C;AAG3C,iCAA8B;AAE9B,IAAkB,4BAwCjB;AAxCD,WAAkB,4BAA4B;IAC5C;;OAEG;IACH,+CAAe,CAAA;IAEf;;OAEG;IACH,6CAAa,CAAA;IAEb;;OAEG;IACH,iDAAiB,CAAA;IAEjB;;OAEG;IACH,+CAAe,CAAA;IAEf;;OAEG;IACH,iDAAiB,CAAA;IAEjB;;OAEG;IACH,4DAA4B,CAAA;IAE5B;;OAEG;IACH,gEAA+B,CAAA;IAE/B;;OAEG;IACH,wDAAwB,CAAA;AAC1B,CAAC,EAxCiB,4BAA4B,4CAA5B,4BAA4B,QAwC7C;AAED,IAAkB,iBAejB;AAfD,WAAkB,iBAAiB;IACjC;;OAEG;IACH,wCAAmB,CAAA;IAEnB;;OAEG;IACH,8BAAS,CAAA;IAET;;OAEG;IACH,kCAAa,CAAA;AACf,CAAC,EAfiB,iBAAiB,iCAAjB,iBAAiB,QAelC;AAgDD;;;GAGG;AACH,MAAa,kBAAkB;IAcpB;IACA;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IArBF,KAAK,C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CAAC,KAAK,EAAE,GAAG;YACpB,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,CAAC;IACJ,CAAC;CAEF;AAnYD,gDAmYC"}
|
package/lib/cli.d.ts
DELETED
package/lib/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;8BAoBZ,IAAI;AAA7B,kBAyFC"}
|
package/lib/cli.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
require("source-map-support/register"); // registering node-source-map-support for typescript stack traces
|
|
26
|
-
const commander_1 = require("commander");
|
|
27
|
-
const hap_nodejs_1 = require("hap-nodejs");
|
|
28
|
-
const semver_1 = require("semver");
|
|
29
|
-
const logger_1 = require("./logger");
|
|
30
|
-
const server_1 = require("./server");
|
|
31
|
-
const user_1 = require("./user");
|
|
32
|
-
const version_1 = __importStar(require("./version"));
|
|
33
|
-
const log = logger_1.Logger.internal;
|
|
34
|
-
const requiredNodeVersion = (0, version_1.getRequiredNodeVersion)();
|
|
35
|
-
if (requiredNodeVersion && !(0, semver_1.satisfies)(process.version, requiredNodeVersion)) {
|
|
36
|
-
log.warn(`Homebridge requires Node.js version of ${requiredNodeVersion} which does \
|
|
37
|
-
not satisfy the current Node.js version of ${process.version}. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF`);
|
|
38
|
-
}
|
|
39
|
-
module.exports = function cli() {
|
|
40
|
-
let insecureAccess = false;
|
|
41
|
-
let hideQRCode = false;
|
|
42
|
-
let keepOrphans = false;
|
|
43
|
-
let customPluginPath = undefined;
|
|
44
|
-
let strictPluginResolution = false;
|
|
45
|
-
let noLogTimestamps = false;
|
|
46
|
-
let debugModeEnabled = false;
|
|
47
|
-
let forceColourLogging = false;
|
|
48
|
-
let customStoragePath = undefined;
|
|
49
|
-
let shuttingDown = false;
|
|
50
|
-
const program = new commander_1.Command();
|
|
51
|
-
program
|
|
52
|
-
.version((0, version_1.default)())
|
|
53
|
-
.option("-C, --color", "force color in logging", () => forceColourLogging = true)
|
|
54
|
-
.option("-D, --debug", "turn on debug level logging", () => debugModeEnabled = true)
|
|
55
|
-
.option("-I, --insecure", "allow unauthenticated requests (for easier hacking)", () => insecureAccess = true)
|
|
56
|
-
.option("-P, --plugin-path [path]", "look for plugins installed at [path] as well as the default locations ([path] can also point to a single plugin)", path => customPluginPath = path)
|
|
57
|
-
.option("-Q, --no-qrcode", "do not issue QRcode in logging", () => hideQRCode = true)
|
|
58
|
-
.option("-R, --remove-orphans", "remove cached accessories for which plugin is not loaded (deprecated)", () => {
|
|
59
|
-
console.warn("The cli option '-R' or '--remove-orphans' is deprecated and has no effect anymore. " +
|
|
60
|
-
"Removing orphans is now the default behavior and can be turned off by supplying '-K' or '--keep-orphans'.");
|
|
61
|
-
})
|
|
62
|
-
.option("-K, --keep-orphans", "keep cached accessories for which the associated plugin is not loaded", () => keepOrphans = true)
|
|
63
|
-
.option("-T, --no-timestamp", "do not issue timestamps in logging", () => noLogTimestamps = true)
|
|
64
|
-
.option("-U, --user-storage-path [path]", "look for homebridge user files at [path] instead of the default location (~/.homebridge)", path => customStoragePath = path)
|
|
65
|
-
.option("--strict-plugin-resolution", "only load plugins from the --plugin-path if set, otherwise from the primary global node_modules", () => strictPluginResolution = true)
|
|
66
|
-
.parse(process.argv);
|
|
67
|
-
if (noLogTimestamps) {
|
|
68
|
-
logger_1.Logger.setTimestampEnabled(false);
|
|
69
|
-
}
|
|
70
|
-
if (debugModeEnabled) {
|
|
71
|
-
logger_1.Logger.setDebugEnabled(true);
|
|
72
|
-
}
|
|
73
|
-
if (forceColourLogging) {
|
|
74
|
-
logger_1.Logger.forceColor();
|
|
75
|
-
}
|
|
76
|
-
if (customStoragePath) {
|
|
77
|
-
user_1.User.setStoragePath(customStoragePath);
|
|
78
|
-
}
|
|
79
|
-
// Initialize HAP-NodeJS with a custom persist directory
|
|
80
|
-
hap_nodejs_1.HAPStorage.setCustomStoragePath(user_1.User.persistPath());
|
|
81
|
-
const options = {
|
|
82
|
-
keepOrphanedCachedAccessories: keepOrphans,
|
|
83
|
-
insecureAccess: insecureAccess,
|
|
84
|
-
hideQRCode: hideQRCode,
|
|
85
|
-
customPluginPath: customPluginPath,
|
|
86
|
-
noLogTimestamps: noLogTimestamps,
|
|
87
|
-
debugModeEnabled: debugModeEnabled,
|
|
88
|
-
forceColourLogging: forceColourLogging,
|
|
89
|
-
customStoragePath: customStoragePath,
|
|
90
|
-
strictPluginResolution: strictPluginResolution,
|
|
91
|
-
};
|
|
92
|
-
const server = new server_1.Server(options);
|
|
93
|
-
const signalHandler = (signal, signalNum) => {
|
|
94
|
-
if (shuttingDown) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
shuttingDown = true;
|
|
98
|
-
log.info("Got %s, shutting down Homebridge...", signal);
|
|
99
|
-
setTimeout(() => process.exit(128 + signalNum), 5000);
|
|
100
|
-
server.teardown();
|
|
101
|
-
};
|
|
102
|
-
process.on("SIGINT", signalHandler.bind(undefined, "SIGINT", 2));
|
|
103
|
-
process.on("SIGTERM", signalHandler.bind(undefined, "SIGTERM", 15));
|
|
104
|
-
const errorHandler = (error) => {
|
|
105
|
-
if (error.stack) {
|
|
106
|
-
log.error(error.stack);
|
|
107
|
-
}
|
|
108
|
-
if (!shuttingDown) {
|
|
109
|
-
process.kill(process.pid, "SIGTERM");
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
process.on("uncaughtException", errorHandler);
|
|
113
|
-
server.start().catch(errorHandler);
|
|
114
|
-
};
|
|
115
|
-
//# sourceMappingURL=cli.js.map
|
package/lib/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAqC,CAAC,kEAAkE;AACxG,yCAAoC;AACpC,2CAAwC;AACxC,mCAAmC;AACnC,qCAAkC;AAClC,qCAAkC;AAElC,iCAA8B;AAC9B,qDAA+D;AAG/D,MAAM,GAAG,GAAG,eAAM,CAAC,QAAQ,CAAC;AAE5B,MAAM,mBAAmB,GAAG,IAAA,gCAAsB,GAAE,CAAC;AACrD,IAAI,mBAAmB,IAAI,CAAC,IAAA,kBAAS,EAAC,OAAO,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,CAAC;IAC5E,GAAG,CAAC,IAAI,CAAC,0CAA0C,mBAAmB;6CAC3B,OAAO,CAAC,OAAO,4FAA4F,CAAC,CAAC;AAC1J,CAAC;AAGD,iBAAS,SAA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IAAI,CAAC,qCAAqC,EAAE,MAAM,CAAC,CAAC;QACxD,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;QAEtD,MAAM,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;IACjE,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC;IAEpE,MAAM,YAAY,GAAG,CAAC,KAAY,EAAQ,EAAE;QAC1C,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;QAED,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACvC,CAAC;IACH,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;IAC9C,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC,CAAA"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { MacAddress } from "hap-nodejs";
|
|
2
|
-
import type { ChildBridgeFork } from "./childBridgeFork";
|
|
3
|
-
export interface ExternalPortsConfiguration {
|
|
4
|
-
start: number;
|
|
5
|
-
end: number;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Allocates ports from the user defined `config.ports` option
|
|
9
|
-
* This service is used to allocate ports for external accessories on the main bridge, and child bridges.
|
|
10
|
-
*/
|
|
11
|
-
export declare class ExternalPortService {
|
|
12
|
-
private externalPorts?;
|
|
13
|
-
private nextExternalPort?;
|
|
14
|
-
private allocatedPorts;
|
|
15
|
-
constructor(externalPorts?: ExternalPortsConfiguration | undefined);
|
|
16
|
-
/**
|
|
17
|
-
* Returns the next available port in the external port config.
|
|
18
|
-
* If the external port is not configured by the user it will return null.
|
|
19
|
-
* If the port range has been exhausted it will return null.
|
|
20
|
-
*/
|
|
21
|
-
requestPort(username: MacAddress): Promise<number | undefined>;
|
|
22
|
-
private getNextFreePort;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* This is the child bridge version of the port allocation service.
|
|
26
|
-
* It requests a free port from the main bridge's port service.
|
|
27
|
-
*/
|
|
28
|
-
export declare class ChildBridgeExternalPortService extends ExternalPortService {
|
|
29
|
-
private childBridge;
|
|
30
|
-
constructor(childBridge: ChildBridgeFork);
|
|
31
|
-
requestPort(username: MacAddress): Promise<number | undefined>;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=externalPortService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"externalPortService.d.ts","sourceRoot":"","sources":["../src/externalPortService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAK5B,OAAO,CAAC,aAAa,CAAC;IAJxB,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,cAAc,CAAkD;gBAG9D,aAAa,CAAC,EAAE,0BAA0B,YAAA;IAGpD;;;;OAIG;IACU,WAAW,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAa3E,OAAO,CAAC,eAAe;CAoBxB;AAED;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,mBAAmB;IAEnE,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,eAAe;IAKzB,WAAW,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAG5E"}
|