homebridge-plugin-utils 1.4.0 → 1.6.0
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/eslint-rules.mjs +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/mqttclient.d.ts +1 -2
- package/dist/rtp.d.ts +10 -3
- package/dist/rtp.js +1 -1
- package/dist/service.d.ts +31 -0
- package/dist/service.js +80 -0
- package/dist/service.js.map +1 -0
- package/dist/{utils.d.ts → util.d.ts} +2 -2
- package/dist/{utils.js → util.js} +11 -6
- package/dist/util.js.map +1 -0
- package/package.json +8 -7
- package/dist/utils.js.map +0 -1
package/build/eslint-rules.mjs
CHANGED
|
@@ -213,9 +213,10 @@ const commonRules = {
|
|
|
213
213
|
"eqeqeq": "warn",
|
|
214
214
|
"no-await-in-loop": "warn",
|
|
215
215
|
"no-console": "warn",
|
|
216
|
+
"no-restricted-syntax": ["warn", "TemplateLiteral"],
|
|
216
217
|
"prefer-arrow-callback": "warn",
|
|
217
218
|
"prefer-const": "warn",
|
|
218
|
-
"quotes": ["warn", "double", { "avoidEscape":
|
|
219
|
+
"quotes": ["warn", "double", { "allowTemplateLiterals": false, "avoidEscape": false }],
|
|
219
220
|
"sort-imports": "warn",
|
|
220
221
|
"sort-keys": "warn",
|
|
221
222
|
"sort-vars": "warn"
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
package/dist/mqttclient.d.ts
CHANGED
package/dist/rtp.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { EventEmitter } from "node:events";
|
|
4
|
-
import { HomebridgePluginLogging } from "./
|
|
2
|
+
import { HomebridgePluginLogging } from "./util.js";
|
|
3
|
+
/**
|
|
4
|
+
* Here's the problem this class solves: FFmpeg doesn't support multiplexing RTP and RTCP data on a single UDP port (RFC 5761). If it did, we wouldn't need this
|
|
5
|
+
* workaround for HomeKit compatibility, which does multiplex RTP and RTCP over a single UDP port.
|
|
6
|
+
*
|
|
7
|
+
* This class inspects all packets coming in from inputPort and demultiplexes RTP and RTCP traffic to rtpPort and rtcpPort, respectively.
|
|
8
|
+
*
|
|
9
|
+
* Credit to @dgreif and @brandawg93 who graciously shared their code as a starting point, and their collaboration in answering the questions needed to bring all this
|
|
10
|
+
* together. A special thank you to @Sunoo for the many hours of discussion and brainstorming on this and other topics.
|
|
11
|
+
*/
|
|
5
12
|
export declare class RtpDemuxer extends EventEmitter {
|
|
6
13
|
private heartbeatTimer;
|
|
7
14
|
private heartbeatMsg;
|
package/dist/rtp.js
CHANGED
|
@@ -8,7 +8,7 @@ import { EventEmitter, once } from "node:events";
|
|
|
8
8
|
import { createSocket } from "node:dgram";
|
|
9
9
|
// How often, in seconds, should we heartbeat FFmpeg in two-way audio sessions. This should be less than 5 seconds, which is FFmpeg's input timeout interval.
|
|
10
10
|
const TWOWAY_HEARTBEAT_INTERVAL = 3;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
12
|
* Here's the problem this class solves: FFmpeg doesn't support multiplexing RTP and RTCP data on a single UDP port (RFC 5761). If it did, we wouldn't need this
|
|
13
13
|
* workaround for HomeKit compatibility, which does multiplex RTP and RTCP over a single UDP port.
|
|
14
14
|
*
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HAP, PlatformAccessory, Service, WithUUID } from "homebridge";
|
|
2
|
+
/**
|
|
3
|
+
* Utility method that either creates a new service on an accessory, if needed, or returns an existing one. It optionally executes a callback to initialize a new
|
|
4
|
+
* instance of a service, if needed. Additionally, the various name characteristics of the service will be set to the specified name, optionally adding them as needed.
|
|
5
|
+
* @param hap - HAP instance associated with the Homebridge plugin.
|
|
6
|
+
* @param accessory - Homebridge accessory to check.
|
|
7
|
+
* @param serviceType - Service type that is being instantiated or retrieved.
|
|
8
|
+
* @param subtype - Service subtype, if needed.
|
|
9
|
+
* @param onServiceCreate - Callback to be used when a new service is created. It is not called when an existing service is found.
|
|
10
|
+
*
|
|
11
|
+
* @returns Returns the created or retrieved service, `null` otherwise.
|
|
12
|
+
*
|
|
13
|
+
* @remarks `onServiceCreate` is called with the newly created service as an argument to allow the caller to optionally configure it.
|
|
14
|
+
*
|
|
15
|
+
* @category Accessory
|
|
16
|
+
*/
|
|
17
|
+
export declare function acquireService(hap: HAP, accessory: PlatformAccessory, serviceType: WithUUID<typeof Service>, name: string, subtype?: string, onServiceCreate?: (svc: Service) => void): Service | null;
|
|
18
|
+
/**
|
|
19
|
+
* Validate whether a service should exist, removing it if needed.
|
|
20
|
+
* @param accessory - Homebridge accessory to check.
|
|
21
|
+
* @param serviceType - Service type that is being instantiated or retrieved.
|
|
22
|
+
* @param validate - Function to be used to test whether a service should exist or not.
|
|
23
|
+
* @param subtype - Service subtype, if needed.
|
|
24
|
+
*
|
|
25
|
+
* @returns Returns `true` if the service is valid, will remove the service and return `false` otherwise.
|
|
26
|
+
*
|
|
27
|
+
* @remarks `validate` is called with an argument of `true` if the service currently exists on the accessory and `false` otherwise.
|
|
28
|
+
*
|
|
29
|
+
* @category Accessory
|
|
30
|
+
*/
|
|
31
|
+
export declare function validService(accessory: PlatformAccessory, serviceType: WithUUID<typeof Service>, validate: (hasService: boolean) => boolean, subtype?: string): boolean;
|
package/dist/service.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility method that either creates a new service on an accessory, if needed, or returns an existing one. It optionally executes a callback to initialize a new
|
|
3
|
+
* instance of a service, if needed. Additionally, the various name characteristics of the service will be set to the specified name, optionally adding them as needed.
|
|
4
|
+
* @param hap - HAP instance associated with the Homebridge plugin.
|
|
5
|
+
* @param accessory - Homebridge accessory to check.
|
|
6
|
+
* @param serviceType - Service type that is being instantiated or retrieved.
|
|
7
|
+
* @param subtype - Service subtype, if needed.
|
|
8
|
+
* @param onServiceCreate - Callback to be used when a new service is created. It is not called when an existing service is found.
|
|
9
|
+
*
|
|
10
|
+
* @returns Returns the created or retrieved service, `null` otherwise.
|
|
11
|
+
*
|
|
12
|
+
* @remarks `onServiceCreate` is called with the newly created service as an argument to allow the caller to optionally configure it.
|
|
13
|
+
*
|
|
14
|
+
* @category Accessory
|
|
15
|
+
*/
|
|
16
|
+
export function acquireService(hap, accessory, serviceType, name, subtype, onServiceCreate) {
|
|
17
|
+
// Services that need the ConfiguredName characteristic added and maintained.
|
|
18
|
+
const configuredNameServices = [hap.Service.ContactSensor, hap.Service.Lightbulb, hap.Service.MotionSensor, hap.Service.OccupancySensor, hap.Service.Switch];
|
|
19
|
+
// Services that need the Name characteristic maintained.
|
|
20
|
+
const nameServices = [hap.Service.Battery, hap.Service.ContactSensor, hap.Service.HumiditySensor, hap.Service.LeakSensor, hap.Service.Lightbulb,
|
|
21
|
+
hap.Service.LightSensor, hap.Service.MotionSensor, hap.Service.TemperatureSensor];
|
|
22
|
+
// Find the service, if it exists.
|
|
23
|
+
let service = subtype ? accessory.getServiceById(serviceType, subtype) : accessory.getService(serviceType);
|
|
24
|
+
// Add the service to the accessory, if needed.
|
|
25
|
+
if (!service) {
|
|
26
|
+
// @ts-expect-error TypeScript tries to associate this with an overloaded version of the addService method. However, Homebridge/HAP-NodeJS isn't exporting
|
|
27
|
+
// a version of the method that implements the unexposed interface that's been defined for each service class (e.g. Lightbulb). The constructor on the
|
|
28
|
+
// service-type-specific version of the service takes the following arguments: constructor(displayName?: string, subtype?: string). We're safe, but because
|
|
29
|
+
// the type definitions are missing, we need to override it here.
|
|
30
|
+
service = new serviceType(name, subtype);
|
|
31
|
+
if (!service) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
accessory.addService(service);
|
|
35
|
+
if (onServiceCreate) {
|
|
36
|
+
onServiceCreate(service);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// Update our name.
|
|
40
|
+
service.displayName = name;
|
|
41
|
+
if (configuredNameServices.includes(serviceType)) {
|
|
42
|
+
// Add the characteristic if we don't already have it. We do this here instead of at service creation to ensure we catch legacy situations where we may have
|
|
43
|
+
// already created the service previously without adding the optional characteristics we want.
|
|
44
|
+
if (!service.optionalCharacteristics.some(x => (x.UUID === hap.Characteristic.ConfiguredName.UUID))) {
|
|
45
|
+
service.addOptionalCharacteristic(hap.Characteristic.ConfiguredName);
|
|
46
|
+
}
|
|
47
|
+
service.updateCharacteristic(hap.Characteristic.ConfiguredName, name);
|
|
48
|
+
}
|
|
49
|
+
if (nameServices.includes(serviceType)) {
|
|
50
|
+
service.updateCharacteristic(hap.Characteristic.Name, name);
|
|
51
|
+
}
|
|
52
|
+
return service;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Validate whether a service should exist, removing it if needed.
|
|
56
|
+
* @param accessory - Homebridge accessory to check.
|
|
57
|
+
* @param serviceType - Service type that is being instantiated or retrieved.
|
|
58
|
+
* @param validate - Function to be used to test whether a service should exist or not.
|
|
59
|
+
* @param subtype - Service subtype, if needed.
|
|
60
|
+
*
|
|
61
|
+
* @returns Returns `true` if the service is valid, will remove the service and return `false` otherwise.
|
|
62
|
+
*
|
|
63
|
+
* @remarks `validate` is called with an argument of `true` if the service currently exists on the accessory and `false` otherwise.
|
|
64
|
+
*
|
|
65
|
+
* @category Accessory
|
|
66
|
+
*/
|
|
67
|
+
export function validService(accessory, serviceType, validate, subtype) {
|
|
68
|
+
// Find the switch service, if it exists.
|
|
69
|
+
const service = subtype ? accessory.getServiceById(serviceType, subtype) : accessory.getService(serviceType);
|
|
70
|
+
// Validate whether we should have the service. If not, remove it.
|
|
71
|
+
if (!validate(!!service)) {
|
|
72
|
+
if (service) {
|
|
73
|
+
accessory.removeService(service);
|
|
74
|
+
}
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
// We have a valid service.
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
/**
|
|
3
2
|
* @internal
|
|
4
3
|
*
|
|
@@ -27,5 +26,6 @@ export interface HomebridgePluginLogging {
|
|
|
27
26
|
info: (message: string, ...parameters: unknown[]) => void;
|
|
28
27
|
warn: (message: string, ...parameters: unknown[]) => void;
|
|
29
28
|
}
|
|
30
|
-
export declare function sleep(sleepTimer: number): Promise<NodeJS.Timeout>;
|
|
31
29
|
export declare function retry(operation: () => Promise<boolean>, retryInterval: number, totalRetries?: number): Promise<boolean>;
|
|
30
|
+
export declare function runWithTimeout<T>(promise: Promise<T>, timeout: number): Promise<T | null>;
|
|
31
|
+
export declare function sleep(sleepTimer: number): Promise<NodeJS.Timeout>;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/* Copyright(C) 2017-2024, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
2
2
|
*
|
|
3
|
-
*
|
|
3
|
+
* util.ts: Useful utility functions when writing TypeScript.
|
|
4
4
|
*/
|
|
5
|
-
// Emulate a sleep function.
|
|
6
|
-
export async function sleep(sleepTimer) {
|
|
7
|
-
return new Promise(resolve => setTimeout(resolve, sleepTimer));
|
|
8
|
-
}
|
|
9
5
|
// Retry an operation until we're successful.
|
|
10
6
|
export async function retry(operation, retryInterval, totalRetries) {
|
|
11
7
|
if ((totalRetries !== undefined) && (totalRetries < 0)) {
|
|
@@ -20,4 +16,13 @@ export async function retry(operation, retryInterval, totalRetries) {
|
|
|
20
16
|
// We were successful - we're done.
|
|
21
17
|
return true;
|
|
22
18
|
}
|
|
23
|
-
|
|
19
|
+
// Run a promise with a guaranteed timeout to complete.
|
|
20
|
+
export async function runWithTimeout(promise, timeout) {
|
|
21
|
+
const timeoutPromise = new Promise((resolve) => setTimeout(() => resolve(null), timeout));
|
|
22
|
+
return Promise.race([promise, timeoutPromise]);
|
|
23
|
+
}
|
|
24
|
+
// Emulate a sleep function.
|
|
25
|
+
export async function sleep(sleepTimer) {
|
|
26
|
+
return new Promise(resolve => setTimeout(resolve, sleepTimer));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqCH,6CAA6C;AAC7C,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,SAAiC,EAAE,aAAqB,EAAE,YAAqB;IAEzG,IAAG,CAAC,YAAY,KAAK,SAAS,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC;QAEtD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,wCAAwC;IACxC,IAAG,CAAC,CAAC,MAAM,SAAS,EAAE,CAAC,EAAE,CAAC;QAExB,4FAA4F;QAC5F,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC;QAE3B,OAAO,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;IACpG,CAAC;IAED,mCAAmC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uDAAuD;AACvD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAI,OAAmB,EAAE,OAAe;IAE1E,MAAM,cAAc,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAEhG,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,4BAA4B;AAC5B,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,UAAkB;IAE5C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-plugin-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"displayName": "Homebridge Plugin Utilities",
|
|
5
5
|
"description": "Opinionated utilities to provide common capabilities and create rich configuration webUI experiences for Homebridge plugins.",
|
|
6
6
|
"author": {
|
|
@@ -33,20 +33,21 @@
|
|
|
33
33
|
"build": "npm run clean && tsc && shx cp dist/featureoptions.js{,.map} dist/ui",
|
|
34
34
|
"build-ui": "shx mkdir -p dist/ui && shx cp ui/**.mjs dist/ui",
|
|
35
35
|
"clean": "shx rm -rf dist && npm run build-ui",
|
|
36
|
-
"lint": "eslint eslint.config.mjs build/**.mjs src/**.ts \"ui/**/*.@(js|mjs)\"",
|
|
36
|
+
"lint": "eslint --max-warnings=${ESLINT_MAX_WARNINGS:-\"-1\"} eslint.config.mjs build/**.mjs src/**.ts \"ui/**/*.@(js|mjs)\"",
|
|
37
37
|
"postpublish": "npm run clean",
|
|
38
38
|
"prepublishOnly": "npm run lint && npm run build"
|
|
39
39
|
},
|
|
40
40
|
"main": "dist/index.js",
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@stylistic/eslint-plugin": "2.
|
|
43
|
-
"@types/node": "20.14.
|
|
42
|
+
"@stylistic/eslint-plugin": "2.3.0",
|
|
43
|
+
"@types/node": "20.14.11",
|
|
44
44
|
"eslint": "8.57.0",
|
|
45
45
|
"shx": "^0.3.4",
|
|
46
|
-
"typescript": "5.
|
|
47
|
-
"typescript-eslint": "^7.
|
|
46
|
+
"typescript": "5.5.3",
|
|
47
|
+
"typescript-eslint": "^7.16.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"
|
|
50
|
+
"homebridge": "^1.8.4",
|
|
51
|
+
"mqtt": "^5.8.1"
|
|
51
52
|
}
|
|
52
53
|
}
|
package/dist/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4CH,4BAA4B;AAC5B,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,UAAkB;IAE5C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,6CAA6C;AAC7C,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,SAAiC,EAAE,aAAqB,EAAE,YAAqB;IAEzG,IAAG,CAAC,YAAY,KAAK,SAAS,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC;QAEtD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,wCAAwC;IACxC,IAAG,CAAC,CAAC,MAAM,SAAS,EAAE,CAAC,EAAE,CAAC;QAExB,4FAA4F;QAC5F,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC;QAE3B,OAAO,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;IACpG,CAAC;IAED,mCAAmC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC"}
|