@camstack/addon-provider-homematic 1.1.9 → 1.1.11

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/dist/addon.js CHANGED
@@ -4651,7 +4651,7 @@ function preprocess(fn, schema) {
4651
4651
  });
4652
4652
  }
4653
4653
  //#endregion
4654
- //#region ../types/dist/sleep-B3AOslwX.mjs
4654
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4655
4655
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4656
4656
  EventCategory["SystemBoot"] = "system.boot";
4657
4657
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6219,6 +6219,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6219
6219
  DeviceType["Switch"] = "switch";
6220
6220
  DeviceType["Sensor"] = "sensor";
6221
6221
  DeviceType["Thermostat"] = "thermostat";
6222
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6223
+ * `climate-control` cap surface with `Thermostat` but renders a
6224
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6225
+ * independent vertical/horizontal swing). Sources: native Gree, and
6226
+ * reusable by other AC integrations. */
6227
+ DeviceType["Climate"] = "climate";
6222
6228
  DeviceType["Button"] = "button";
6223
6229
  /** Generic stateless event emitter — carries a device's EXACT declared
6224
6230
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9014,7 +9020,7 @@ var climateControlCapability = {
9014
9020
  scope: "device",
9015
9021
  deviceNative: true,
9016
9022
  mode: "singleton",
9017
- deviceTypes: [DeviceType.Thermostat],
9023
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9018
9024
  methods: {
9019
9025
  setMode: method(object({
9020
9026
  deviceId: number().int().nonnegative(),
@@ -13613,10 +13619,30 @@ var deviceProviderCapability = {
13613
13619
  type: string()
13614
13620
  }))),
13615
13621
  supportsDiscovery: method(object({}), boolean()),
13616
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13622
+ /**
13623
+ * Run a network scan. `params` carries optional provider-specific scan
13624
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13625
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13626
+ * (provider uses its local-network default).
13627
+ */
13628
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13617
13629
  kind: "mutation",
13618
13630
  auth: "admin"
13619
13631
  }),
13632
+ /**
13633
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13634
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13635
+ * `null` when the provider takes no extra scan params — the generic
13636
+ * aggregated scan never renders this; the per-integration scan does.
13637
+ */
13638
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13639
+ /**
13640
+ * The DeviceType this provider creates via manual add (Camera for
13641
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13642
+ * provider does not support manual creation. Lets the Add-Device dialog
13643
+ * pick the right type instead of assuming Camera.
13644
+ */
13645
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13620
13646
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13621
13647
  kind: "mutation",
13622
13648
  auth: "admin"
@@ -13740,9 +13766,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13740
13766
  async supportsDiscovery() {
13741
13767
  return false;
13742
13768
  }
13743
- async discoverDevices() {
13769
+ async discoverDevices(_input) {
13744
13770
  return [];
13745
13771
  }
13772
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13773
+ * Null = no extra params. Override in providers that support scoped scans. */
13774
+ async getDiscoveryParamsSchema() {
13775
+ return null;
13776
+ }
13777
+ /**
13778
+ * The DeviceType this provider creates via manual add — derived from the
13779
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13780
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13781
+ */
13782
+ async getManualCreationType() {
13783
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13784
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13785
+ }
13746
13786
  async adoptDiscoveredDevice(_input) {
13747
13787
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13748
13788
  }
@@ -15653,7 +15693,10 @@ method(object({
15653
15693
  }), FieldProbeResultSchema, {
15654
15694
  kind: "mutation",
15655
15695
  auth: "admin"
15656
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15696
+ }), method(object({
15697
+ addonId: string(),
15698
+ integrationId: string()
15699
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15657
15700
  addonId: string(),
15658
15701
  integrationId: string()
15659
15702
  }), AdoptionStatusSchema, {
@@ -15668,7 +15711,24 @@ method(object({
15668
15711
  }), method(ResyncInputSchema, ResyncResultSchema, {
15669
15712
  kind: "mutation",
15670
15713
  auth: "admin"
15714
+ }), method(object({}), object({ providers: array(object({
15715
+ addonId: string(),
15716
+ label: string()
15717
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15718
+ addonId: string(),
15719
+ label: string(),
15720
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15721
+ error: string().nullable()
15722
+ })).readonly() }), {
15723
+ kind: "mutation",
15724
+ auth: "admin"
15671
15725
  }), method(object({
15726
+ addonId: string(),
15727
+ params: record(string(), unknown()).optional()
15728
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15729
+ kind: "mutation",
15730
+ auth: "admin"
15731
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15672
15732
  deviceId: number(),
15673
15733
  key: string(),
15674
15734
  value: unknown()
@@ -18320,6 +18380,17 @@ var AvailableIntegrationTypeSchema = object({
18320
18380
  iconUrl: string().nullable(),
18321
18381
  color: string(),
18322
18382
  instanceMode: string(),
18383
+ /**
18384
+ * Integration wizard `mode` (LOCKED MODEL): `standalone` (create
18385
+ * immediately then add devices, no config step/button), `account` (config
18386
+ * step), or `broker` (broker step). Derived server-side by
18387
+ * `getAvailableTypes` when the addon manifest omits an explicit `mode`.
18388
+ */
18389
+ mode: _enum([
18390
+ "standalone",
18391
+ "account",
18392
+ "broker"
18393
+ ]),
18323
18394
  discoveryMode: string(),
18324
18395
  /**
18325
18396
  * Which integration-marker cap the addon declared, so the wizard can
@@ -20780,6 +20851,12 @@ Object.freeze({
20780
20851
  addonId: null,
20781
20852
  access: "create"
20782
20853
  },
20854
+ "deviceManager.adoptionListCandidateFilters": {
20855
+ capName: "device-manager",
20856
+ capScope: "system",
20857
+ addonId: null,
20858
+ access: "view"
20859
+ },
20783
20860
  "deviceManager.adoptionListCandidates": {
20784
20861
  capName: "device-manager",
20785
20862
  capScope: "system",
@@ -20828,12 +20905,30 @@ Object.freeze({
20828
20905
  addonId: null,
20829
20906
  access: "create"
20830
20907
  },
20908
+ "deviceManager.discoverAllProviders": {
20909
+ capName: "device-manager",
20910
+ capScope: "system",
20911
+ addonId: null,
20912
+ access: "create"
20913
+ },
20831
20914
  "deviceManager.discoverDevices": {
20832
20915
  capName: "device-manager",
20833
20916
  capScope: "system",
20834
20917
  addonId: null,
20835
20918
  access: "create"
20836
20919
  },
20920
+ "deviceManager.discoverProvider": {
20921
+ capName: "device-manager",
20922
+ capScope: "system",
20923
+ addonId: null,
20924
+ access: "create"
20925
+ },
20926
+ "deviceManager.discoveryProviders": {
20927
+ capName: "device-manager",
20928
+ capScope: "system",
20929
+ addonId: null,
20930
+ access: "view"
20931
+ },
20837
20932
  "deviceManager.enable": {
20838
20933
  capName: "device-manager",
20839
20934
  capScope: "system",
@@ -20984,6 +21079,18 @@ Object.freeze({
20984
21079
  addonId: null,
20985
21080
  access: "create"
20986
21081
  },
21082
+ "deviceManager.providerCreationType": {
21083
+ capName: "device-manager",
21084
+ capScope: "system",
21085
+ addonId: null,
21086
+ access: "view"
21087
+ },
21088
+ "deviceManager.providerDiscoveryParamsSchema": {
21089
+ capName: "device-manager",
21090
+ capScope: "system",
21091
+ addonId: null,
21092
+ access: "view"
21093
+ },
20987
21094
  "deviceManager.registerDevice": {
20988
21095
  capName: "device-manager",
20989
21096
  capScope: "system",
@@ -21200,6 +21307,18 @@ Object.freeze({
21200
21307
  addonId: null,
21201
21308
  access: "view"
21202
21309
  },
21310
+ "deviceProvider.getDiscoveryParamsSchema": {
21311
+ capName: "device-provider",
21312
+ capScope: "system",
21313
+ addonId: null,
21314
+ access: "view"
21315
+ },
21316
+ "deviceProvider.getManualCreationType": {
21317
+ capName: "device-provider",
21318
+ capScope: "system",
21319
+ addonId: null,
21320
+ access: "view"
21321
+ },
21203
21322
  "deviceProvider.getStatus": {
21204
21323
  capName: "device-provider",
21205
21324
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4652,7 +4652,7 @@ function preprocess(fn, schema) {
4652
4652
  });
4653
4653
  }
4654
4654
  //#endregion
4655
- //#region ../types/dist/sleep-B3AOslwX.mjs
4655
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4656
4656
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4657
4657
  EventCategory["SystemBoot"] = "system.boot";
4658
4658
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6220,6 +6220,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6220
6220
  DeviceType["Switch"] = "switch";
6221
6221
  DeviceType["Sensor"] = "sensor";
6222
6222
  DeviceType["Thermostat"] = "thermostat";
6223
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6224
+ * `climate-control` cap surface with `Thermostat` but renders a
6225
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6226
+ * independent vertical/horizontal swing). Sources: native Gree, and
6227
+ * reusable by other AC integrations. */
6228
+ DeviceType["Climate"] = "climate";
6223
6229
  DeviceType["Button"] = "button";
6224
6230
  /** Generic stateless event emitter — carries a device's EXACT declared
6225
6231
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9015,7 +9021,7 @@ var climateControlCapability = {
9015
9021
  scope: "device",
9016
9022
  deviceNative: true,
9017
9023
  mode: "singleton",
9018
- deviceTypes: [DeviceType.Thermostat],
9024
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9019
9025
  methods: {
9020
9026
  setMode: method(object({
9021
9027
  deviceId: number().int().nonnegative(),
@@ -13614,10 +13620,30 @@ var deviceProviderCapability = {
13614
13620
  type: string()
13615
13621
  }))),
13616
13622
  supportsDiscovery: method(object({}), boolean()),
13617
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13623
+ /**
13624
+ * Run a network scan. `params` carries optional provider-specific scan
13625
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13626
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13627
+ * (provider uses its local-network default).
13628
+ */
13629
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13618
13630
  kind: "mutation",
13619
13631
  auth: "admin"
13620
13632
  }),
13633
+ /**
13634
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13635
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13636
+ * `null` when the provider takes no extra scan params — the generic
13637
+ * aggregated scan never renders this; the per-integration scan does.
13638
+ */
13639
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13640
+ /**
13641
+ * The DeviceType this provider creates via manual add (Camera for
13642
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13643
+ * provider does not support manual creation. Lets the Add-Device dialog
13644
+ * pick the right type instead of assuming Camera.
13645
+ */
13646
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13621
13647
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13622
13648
  kind: "mutation",
13623
13649
  auth: "admin"
@@ -13741,9 +13767,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13741
13767
  async supportsDiscovery() {
13742
13768
  return false;
13743
13769
  }
13744
- async discoverDevices() {
13770
+ async discoverDevices(_input) {
13745
13771
  return [];
13746
13772
  }
13773
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13774
+ * Null = no extra params. Override in providers that support scoped scans. */
13775
+ async getDiscoveryParamsSchema() {
13776
+ return null;
13777
+ }
13778
+ /**
13779
+ * The DeviceType this provider creates via manual add — derived from the
13780
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13781
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13782
+ */
13783
+ async getManualCreationType() {
13784
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13785
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13786
+ }
13747
13787
  async adoptDiscoveredDevice(_input) {
13748
13788
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13749
13789
  }
@@ -15654,7 +15694,10 @@ method(object({
15654
15694
  }), FieldProbeResultSchema, {
15655
15695
  kind: "mutation",
15656
15696
  auth: "admin"
15657
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15697
+ }), method(object({
15698
+ addonId: string(),
15699
+ integrationId: string()
15700
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15658
15701
  addonId: string(),
15659
15702
  integrationId: string()
15660
15703
  }), AdoptionStatusSchema, {
@@ -15669,7 +15712,24 @@ method(object({
15669
15712
  }), method(ResyncInputSchema, ResyncResultSchema, {
15670
15713
  kind: "mutation",
15671
15714
  auth: "admin"
15715
+ }), method(object({}), object({ providers: array(object({
15716
+ addonId: string(),
15717
+ label: string()
15718
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15719
+ addonId: string(),
15720
+ label: string(),
15721
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15722
+ error: string().nullable()
15723
+ })).readonly() }), {
15724
+ kind: "mutation",
15725
+ auth: "admin"
15672
15726
  }), method(object({
15727
+ addonId: string(),
15728
+ params: record(string(), unknown()).optional()
15729
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15730
+ kind: "mutation",
15731
+ auth: "admin"
15732
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15673
15733
  deviceId: number(),
15674
15734
  key: string(),
15675
15735
  value: unknown()
@@ -18321,6 +18381,17 @@ var AvailableIntegrationTypeSchema = object({
18321
18381
  iconUrl: string().nullable(),
18322
18382
  color: string(),
18323
18383
  instanceMode: string(),
18384
+ /**
18385
+ * Integration wizard `mode` (LOCKED MODEL): `standalone` (create
18386
+ * immediately then add devices, no config step/button), `account` (config
18387
+ * step), or `broker` (broker step). Derived server-side by
18388
+ * `getAvailableTypes` when the addon manifest omits an explicit `mode`.
18389
+ */
18390
+ mode: _enum([
18391
+ "standalone",
18392
+ "account",
18393
+ "broker"
18394
+ ]),
18324
18395
  discoveryMode: string(),
18325
18396
  /**
18326
18397
  * Which integration-marker cap the addon declared, so the wizard can
@@ -20781,6 +20852,12 @@ Object.freeze({
20781
20852
  addonId: null,
20782
20853
  access: "create"
20783
20854
  },
20855
+ "deviceManager.adoptionListCandidateFilters": {
20856
+ capName: "device-manager",
20857
+ capScope: "system",
20858
+ addonId: null,
20859
+ access: "view"
20860
+ },
20784
20861
  "deviceManager.adoptionListCandidates": {
20785
20862
  capName: "device-manager",
20786
20863
  capScope: "system",
@@ -20829,12 +20906,30 @@ Object.freeze({
20829
20906
  addonId: null,
20830
20907
  access: "create"
20831
20908
  },
20909
+ "deviceManager.discoverAllProviders": {
20910
+ capName: "device-manager",
20911
+ capScope: "system",
20912
+ addonId: null,
20913
+ access: "create"
20914
+ },
20832
20915
  "deviceManager.discoverDevices": {
20833
20916
  capName: "device-manager",
20834
20917
  capScope: "system",
20835
20918
  addonId: null,
20836
20919
  access: "create"
20837
20920
  },
20921
+ "deviceManager.discoverProvider": {
20922
+ capName: "device-manager",
20923
+ capScope: "system",
20924
+ addonId: null,
20925
+ access: "create"
20926
+ },
20927
+ "deviceManager.discoveryProviders": {
20928
+ capName: "device-manager",
20929
+ capScope: "system",
20930
+ addonId: null,
20931
+ access: "view"
20932
+ },
20838
20933
  "deviceManager.enable": {
20839
20934
  capName: "device-manager",
20840
20935
  capScope: "system",
@@ -20985,6 +21080,18 @@ Object.freeze({
20985
21080
  addonId: null,
20986
21081
  access: "create"
20987
21082
  },
21083
+ "deviceManager.providerCreationType": {
21084
+ capName: "device-manager",
21085
+ capScope: "system",
21086
+ addonId: null,
21087
+ access: "view"
21088
+ },
21089
+ "deviceManager.providerDiscoveryParamsSchema": {
21090
+ capName: "device-manager",
21091
+ capScope: "system",
21092
+ addonId: null,
21093
+ access: "view"
21094
+ },
20988
21095
  "deviceManager.registerDevice": {
20989
21096
  capName: "device-manager",
20990
21097
  capScope: "system",
@@ -21201,6 +21308,18 @@ Object.freeze({
21201
21308
  addonId: null,
21202
21309
  access: "view"
21203
21310
  },
21311
+ "deviceProvider.getDiscoveryParamsSchema": {
21312
+ capName: "device-provider",
21313
+ capScope: "system",
21314
+ addonId: null,
21315
+ access: "view"
21316
+ },
21317
+ "deviceProvider.getManualCreationType": {
21318
+ capName: "device-provider",
21319
+ capScope: "system",
21320
+ addonId: null,
21321
+ access: "view"
21322
+ },
21204
21323
  "deviceProvider.getStatus": {
21205
21324
  capName: "device-provider",
21206
21325
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",