@camstack/addon-provider-reolink 1.2.233 → 1.2.234
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/CHANGELOG.md +6 -0
- package/dist/addon.js +40 -10
- package/dist/addon.mjs +40 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.234] - 2026-11-08
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Its integration-instances provider declares its instance kind and stamps it on every instance.
|
|
15
|
+
|
|
10
16
|
## [1.2.233] - 2026-11-08
|
|
11
17
|
|
|
12
18
|
### Changed
|
package/dist/addon.js
CHANGED
|
@@ -106701,7 +106701,7 @@ var ZodIssueCode = {
|
|
|
106701
106701
|
var ZodFirstPartyTypeKind;
|
|
106702
106702
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
106703
106703
|
//#endregion
|
|
106704
|
-
//#region ../types/dist/sleep-
|
|
106704
|
+
//#region ../types/dist/sleep-CGPZyzB5.mjs
|
|
106705
106705
|
/**
|
|
106706
106706
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
106707
106707
|
* window to float samples (D455).
|
|
@@ -107933,6 +107933,7 @@ var RecordIntegrationInstances = class {
|
|
|
107933
107933
|
this.secretKeys = topLevelSecretKeys(kind.declaration.secretPaths);
|
|
107934
107934
|
this.secretMaps = secretMapKeys(kind.declaration.secretPaths);
|
|
107935
107935
|
this.nameField = kind.declaration.entry?.nameField ?? "name";
|
|
107936
|
+
if (hooks.kindOf === void 0 && hooks.description.kinds.length !== 1) throw new Error(`record kind '${kind.name}': describe().kinds has ${hooks.description.kinds.length} entries, so kindOf is required to say which one an instance is`);
|
|
107936
107937
|
}
|
|
107937
107938
|
/**
|
|
107938
107939
|
* One instance read for the addon's own runtime; null when absent. When the keychain is
|
|
@@ -107974,10 +107975,21 @@ var RecordIntegrationInstances = class {
|
|
|
107974
107975
|
}
|
|
107975
107976
|
return out;
|
|
107976
107977
|
}
|
|
107978
|
+
/** The kind an instance body is of: the provider's `kindOf`, else its one declared kind. */
|
|
107979
|
+
kindOfBody(body) {
|
|
107980
|
+
if (this.hooks.kindOf !== void 0) {
|
|
107981
|
+
const id = this.hooks.kindOf(body);
|
|
107982
|
+
if (!this.hooks.description.kinds.some((declared) => declared.id === id)) throw new Error(`record kind '${this.kind.name}': kindOf returned '${id}', which describe().kinds does not declare (D1013)`);
|
|
107983
|
+
return id;
|
|
107984
|
+
}
|
|
107985
|
+
const only = this.hooks.description.kinds[0];
|
|
107986
|
+
if (only === void 0) throw new Error(`record kind '${this.kind.name}' declares no kinds`);
|
|
107987
|
+
return only.id;
|
|
107988
|
+
}
|
|
107977
107989
|
viewOf(record) {
|
|
107978
107990
|
const shown = secretViewsOf(this.records.owner, this.kind.name, record.id, this.kind.declaration, record.data);
|
|
107979
107991
|
const rawName = record.data[this.nameField];
|
|
107980
|
-
const kind = this.
|
|
107992
|
+
const kind = this.kindOfBody(record.data);
|
|
107981
107993
|
const health = this.hooks.health?.(record.data, record.id);
|
|
107982
107994
|
return {
|
|
107983
107995
|
id: record.id,
|
|
@@ -107985,7 +107997,7 @@ var RecordIntegrationInstances = class {
|
|
|
107985
107997
|
configured: this.hooks.configured(record.data),
|
|
107986
107998
|
enabled: isInstanceEnabled(record.data),
|
|
107987
107999
|
formValues: shown,
|
|
107988
|
-
|
|
108000
|
+
kind,
|
|
107989
108001
|
...health?.status !== void 0 ? { status: health.status } : {},
|
|
107990
108002
|
...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
|
|
107991
108003
|
};
|
|
@@ -151650,7 +151662,7 @@ var mediaPlayerCapability = {
|
|
|
151650
151662
|
isMuted: { kind: "boolean" }
|
|
151651
151663
|
} }
|
|
151652
151664
|
};
|
|
151653
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater;
|
|
151665
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
|
|
151654
151666
|
var NUMBER = {
|
|
151655
151667
|
kind: "fixed",
|
|
151656
151668
|
result: ["number"]
|
|
@@ -158357,10 +158369,11 @@ var IntegrationInstanceDescriptionSchema = object({
|
|
|
158357
158369
|
/** True when `testInstance` really probes the remote. */
|
|
158358
158370
|
canTest: boolean(),
|
|
158359
158371
|
/**
|
|
158360
|
-
* The kinds an instance can be of
|
|
158361
|
-
* Add flow asks which first and sends it as
|
|
158372
|
+
* The kinds an instance can be of (D1013 rule 1), each naming its `functionCap`. One entry:
|
|
158373
|
+
* nothing to choose; more than one: the Add flow asks which first and sends it as
|
|
158374
|
+
* `createInstance.kind`. Never empty: every instance belongs to exactly one kind.
|
|
158362
158375
|
*/
|
|
158363
|
-
kinds: array(IntegrationInstanceKindSchema).
|
|
158376
|
+
kinds: array(IntegrationInstanceKindSchema).min(1),
|
|
158364
158377
|
/**
|
|
158365
158378
|
* The provider accepts `createInstance.id` for an id that once existed (an adopted id, because
|
|
158366
158379
|
* devices carry it). The UI then offers "restore under its old id" on Add. Absent means no.
|
|
@@ -158396,8 +158409,8 @@ var IntegrationInstanceSchema = object({
|
|
|
158396
158409
|
* the body is the one store, `setInstanceEnabled` the one writer (epic #440, step 3).
|
|
158397
158410
|
*/
|
|
158398
158411
|
enabled: boolean().optional(),
|
|
158399
|
-
/** The kind of this instance
|
|
158400
|
-
kind: string().
|
|
158412
|
+
/** The kind of this instance: exactly one of `describe().kinds[].id` (D1013 rule 2). */
|
|
158413
|
+
kind: string().min(1),
|
|
158401
158414
|
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
158402
158415
|
formValues: record(string(), unknown()),
|
|
158403
158416
|
status: IntegrationInstanceStatusSchema.optional(),
|
|
@@ -177413,6 +177426,16 @@ var RemoteLayoutComponentSchema = object({
|
|
|
177413
177426
|
method(object({}), array(RemoteLayoutComponentSchema), { auth: "protected" });
|
|
177414
177427
|
var RUNNING_POWER_START_DELAY_MS = 3e4;
|
|
177415
177428
|
var RUNNING_POWER_STOP_DELAY_MS = 18e4;
|
|
177429
|
+
/**
|
|
177430
|
+
* Per-type overrides of the dwell defaults. A media player draws power the
|
|
177431
|
+
* moment it is on and stops drawing the moment it is off, so it needs neither
|
|
177432
|
+
* a long dwell nor a second sample. A type absent here keeps the global values.
|
|
177433
|
+
*/
|
|
177434
|
+
var RUNNING_POWER_DEFAULTS_BY_TYPE = { [DeviceType.MediaPlayer]: {
|
|
177435
|
+
startDwellMs: 1e4,
|
|
177436
|
+
stopDwellMs: 1e4,
|
|
177437
|
+
minSamples: 1
|
|
177438
|
+
} };
|
|
177416
177439
|
var RunningStateSourceSchema = _enum(["native", "assigned"]);
|
|
177417
177440
|
var RunningStateStatusSchema = object({
|
|
177418
177441
|
/** null = unknown — never coerced to false (D393). */
|
|
@@ -177505,6 +177528,7 @@ var runningStateCapability = {
|
|
|
177505
177528
|
defaultThreshold: 5,
|
|
177506
177529
|
defaultStartDwellMs: RUNNING_POWER_START_DELAY_MS,
|
|
177507
177530
|
defaultStopDwellMs: RUNNING_POWER_STOP_DELAY_MS,
|
|
177531
|
+
deviceTypeDefaults: RUNNING_POWER_DEFAULTS_BY_TYPE,
|
|
177508
177532
|
thresholdUnit: "W"
|
|
177509
177533
|
}]
|
|
177510
177534
|
}
|
|
@@ -221371,7 +221395,13 @@ function buildReolinkInstances(records, deps) {
|
|
|
221371
221395
|
},
|
|
221372
221396
|
instanceMode: "multiple",
|
|
221373
221397
|
kind: "connection",
|
|
221374
|
-
canTest: false
|
|
221398
|
+
canTest: false,
|
|
221399
|
+
kinds: [{
|
|
221400
|
+
id: "connection",
|
|
221401
|
+
label: "Reolink",
|
|
221402
|
+
functionCap: "device-provider",
|
|
221403
|
+
role: "devices"
|
|
221404
|
+
}]
|
|
221375
221405
|
},
|
|
221376
221406
|
formSchema: () => buildHubInstanceSchema(),
|
|
221377
221407
|
initialBody: (name) => ({ name }),
|
package/dist/addon.mjs
CHANGED
|
@@ -106693,7 +106693,7 @@ var ZodIssueCode = {
|
|
|
106693
106693
|
var ZodFirstPartyTypeKind;
|
|
106694
106694
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
106695
106695
|
//#endregion
|
|
106696
|
-
//#region ../types/dist/sleep-
|
|
106696
|
+
//#region ../types/dist/sleep-CGPZyzB5.mjs
|
|
106697
106697
|
/**
|
|
106698
106698
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
106699
106699
|
* window to float samples (D455).
|
|
@@ -107925,6 +107925,7 @@ var RecordIntegrationInstances = class {
|
|
|
107925
107925
|
this.secretKeys = topLevelSecretKeys(kind.declaration.secretPaths);
|
|
107926
107926
|
this.secretMaps = secretMapKeys(kind.declaration.secretPaths);
|
|
107927
107927
|
this.nameField = kind.declaration.entry?.nameField ?? "name";
|
|
107928
|
+
if (hooks.kindOf === void 0 && hooks.description.kinds.length !== 1) throw new Error(`record kind '${kind.name}': describe().kinds has ${hooks.description.kinds.length} entries, so kindOf is required to say which one an instance is`);
|
|
107928
107929
|
}
|
|
107929
107930
|
/**
|
|
107930
107931
|
* One instance read for the addon's own runtime; null when absent. When the keychain is
|
|
@@ -107966,10 +107967,21 @@ var RecordIntegrationInstances = class {
|
|
|
107966
107967
|
}
|
|
107967
107968
|
return out;
|
|
107968
107969
|
}
|
|
107970
|
+
/** The kind an instance body is of: the provider's `kindOf`, else its one declared kind. */
|
|
107971
|
+
kindOfBody(body) {
|
|
107972
|
+
if (this.hooks.kindOf !== void 0) {
|
|
107973
|
+
const id = this.hooks.kindOf(body);
|
|
107974
|
+
if (!this.hooks.description.kinds.some((declared) => declared.id === id)) throw new Error(`record kind '${this.kind.name}': kindOf returned '${id}', which describe().kinds does not declare (D1013)`);
|
|
107975
|
+
return id;
|
|
107976
|
+
}
|
|
107977
|
+
const only = this.hooks.description.kinds[0];
|
|
107978
|
+
if (only === void 0) throw new Error(`record kind '${this.kind.name}' declares no kinds`);
|
|
107979
|
+
return only.id;
|
|
107980
|
+
}
|
|
107969
107981
|
viewOf(record) {
|
|
107970
107982
|
const shown = secretViewsOf(this.records.owner, this.kind.name, record.id, this.kind.declaration, record.data);
|
|
107971
107983
|
const rawName = record.data[this.nameField];
|
|
107972
|
-
const kind = this.
|
|
107984
|
+
const kind = this.kindOfBody(record.data);
|
|
107973
107985
|
const health = this.hooks.health?.(record.data, record.id);
|
|
107974
107986
|
return {
|
|
107975
107987
|
id: record.id,
|
|
@@ -107977,7 +107989,7 @@ var RecordIntegrationInstances = class {
|
|
|
107977
107989
|
configured: this.hooks.configured(record.data),
|
|
107978
107990
|
enabled: isInstanceEnabled(record.data),
|
|
107979
107991
|
formValues: shown,
|
|
107980
|
-
|
|
107992
|
+
kind,
|
|
107981
107993
|
...health?.status !== void 0 ? { status: health.status } : {},
|
|
107982
107994
|
...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
|
|
107983
107995
|
};
|
|
@@ -151642,7 +151654,7 @@ var mediaPlayerCapability = {
|
|
|
151642
151654
|
isMuted: { kind: "boolean" }
|
|
151643
151655
|
} }
|
|
151644
151656
|
};
|
|
151645
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater;
|
|
151657
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
|
|
151646
151658
|
var NUMBER = {
|
|
151647
151659
|
kind: "fixed",
|
|
151648
151660
|
result: ["number"]
|
|
@@ -158349,10 +158361,11 @@ var IntegrationInstanceDescriptionSchema = object({
|
|
|
158349
158361
|
/** True when `testInstance` really probes the remote. */
|
|
158350
158362
|
canTest: boolean(),
|
|
158351
158363
|
/**
|
|
158352
|
-
* The kinds an instance can be of
|
|
158353
|
-
* Add flow asks which first and sends it as
|
|
158364
|
+
* The kinds an instance can be of (D1013 rule 1), each naming its `functionCap`. One entry:
|
|
158365
|
+
* nothing to choose; more than one: the Add flow asks which first and sends it as
|
|
158366
|
+
* `createInstance.kind`. Never empty: every instance belongs to exactly one kind.
|
|
158354
158367
|
*/
|
|
158355
|
-
kinds: array(IntegrationInstanceKindSchema).
|
|
158368
|
+
kinds: array(IntegrationInstanceKindSchema).min(1),
|
|
158356
158369
|
/**
|
|
158357
158370
|
* The provider accepts `createInstance.id` for an id that once existed (an adopted id, because
|
|
158358
158371
|
* devices carry it). The UI then offers "restore under its old id" on Add. Absent means no.
|
|
@@ -158388,8 +158401,8 @@ var IntegrationInstanceSchema = object({
|
|
|
158388
158401
|
* the body is the one store, `setInstanceEnabled` the one writer (epic #440, step 3).
|
|
158389
158402
|
*/
|
|
158390
158403
|
enabled: boolean().optional(),
|
|
158391
|
-
/** The kind of this instance
|
|
158392
|
-
kind: string().
|
|
158404
|
+
/** The kind of this instance: exactly one of `describe().kinds[].id` (D1013 rule 2). */
|
|
158405
|
+
kind: string().min(1),
|
|
158393
158406
|
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
158394
158407
|
formValues: record(string(), unknown()),
|
|
158395
158408
|
status: IntegrationInstanceStatusSchema.optional(),
|
|
@@ -177405,6 +177418,16 @@ var RemoteLayoutComponentSchema = object({
|
|
|
177405
177418
|
method(object({}), array(RemoteLayoutComponentSchema), { auth: "protected" });
|
|
177406
177419
|
var RUNNING_POWER_START_DELAY_MS = 3e4;
|
|
177407
177420
|
var RUNNING_POWER_STOP_DELAY_MS = 18e4;
|
|
177421
|
+
/**
|
|
177422
|
+
* Per-type overrides of the dwell defaults. A media player draws power the
|
|
177423
|
+
* moment it is on and stops drawing the moment it is off, so it needs neither
|
|
177424
|
+
* a long dwell nor a second sample. A type absent here keeps the global values.
|
|
177425
|
+
*/
|
|
177426
|
+
var RUNNING_POWER_DEFAULTS_BY_TYPE = { [DeviceType.MediaPlayer]: {
|
|
177427
|
+
startDwellMs: 1e4,
|
|
177428
|
+
stopDwellMs: 1e4,
|
|
177429
|
+
minSamples: 1
|
|
177430
|
+
} };
|
|
177408
177431
|
var RunningStateSourceSchema = _enum(["native", "assigned"]);
|
|
177409
177432
|
var RunningStateStatusSchema = object({
|
|
177410
177433
|
/** null = unknown — never coerced to false (D393). */
|
|
@@ -177497,6 +177520,7 @@ var runningStateCapability = {
|
|
|
177497
177520
|
defaultThreshold: 5,
|
|
177498
177521
|
defaultStartDwellMs: RUNNING_POWER_START_DELAY_MS,
|
|
177499
177522
|
defaultStopDwellMs: RUNNING_POWER_STOP_DELAY_MS,
|
|
177523
|
+
deviceTypeDefaults: RUNNING_POWER_DEFAULTS_BY_TYPE,
|
|
177500
177524
|
thresholdUnit: "W"
|
|
177501
177525
|
}]
|
|
177502
177526
|
}
|
|
@@ -221363,7 +221387,13 @@ function buildReolinkInstances(records, deps) {
|
|
|
221363
221387
|
},
|
|
221364
221388
|
instanceMode: "multiple",
|
|
221365
221389
|
kind: "connection",
|
|
221366
|
-
canTest: false
|
|
221390
|
+
canTest: false,
|
|
221391
|
+
kinds: [{
|
|
221392
|
+
id: "connection",
|
|
221393
|
+
label: "Reolink",
|
|
221394
|
+
functionCap: "device-provider",
|
|
221395
|
+
role: "devices"
|
|
221396
|
+
}]
|
|
221367
221397
|
},
|
|
221368
221398
|
formSchema: () => buildHubInstanceSchema(),
|
|
221369
221399
|
initialBody: (name) => ({ name }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-reolink",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.234",
|
|
4
4
|
"description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"werift"
|
|
97
97
|
],
|
|
98
98
|
"requires": {
|
|
99
|
-
"server": ">=1.2.
|
|
99
|
+
"server": ">=1.2.810"
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"files": [
|