@camstack/addon-provider-bosch 0.1.3 → 0.1.5

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/shc/addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  //#endregion
5
- const require_dist = require("../dist-B-Un7bqT.js");
5
+ const require_dist = require("../dist-CIIror0W.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_https = require("node:https");
8
8
  let node_child_process = require("node:child_process");
@@ -1,4 +1,4 @@
1
- import { A as object, C as defineCustomActions, D as array, E as _enum, F as EventCategory, M as string, O as literal, S as customAction, b as errMsg, c as deviceAdoptionCapability, f as heatingValveCapability, g as temperatureSensorCapability, h as switchCapability, i as batteryCapability, k as number, n as BaseDeviceProvider, o as climateControlCapability, s as connectionTestCapability, t as BaseDevice, y as DeviceType } from "../dist-BiZi19Lw.mjs";
1
+ import { A as object, C as defineCustomActions, D as array, E as _enum, F as EventCategory, M as string, O as literal, S as customAction, b as errMsg, c as deviceAdoptionCapability, f as heatingValveCapability, g as temperatureSensorCapability, h as switchCapability, i as batteryCapability, k as number, n as BaseDeviceProvider, o as climateControlCapability, s as connectionTestCapability, t as BaseDevice, y as DeviceType } from "../dist-DNznrlG_.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { request } from "node:https";
package/i18n/en.json CHANGED
@@ -1,5 +1,31 @@
1
1
  {
2
2
  "bosch-shc.name": "Bosch SHC",
3
3
  "bosch-home-connect.name": "Bosch Home Connect",
4
- "bosch-homecom.name": "Bosch HomeCom"
4
+ "bosch-homecom.name": "Bosch HomeCom",
5
+ "homecom.s_account.title": "HomeCom account",
6
+ "homecom.s_account.description": "Create the login link and open it in a browser, then sign in with your SingleKey ID. The browser cannot open the app and stops on an address starting with com.bosch.tt.dashtt.pointt://app/login?code=. Paste that whole address below (or only the code) and press Complete sign-in. The address is shown in Chrome and Edge under DevTools (F12) > Network, with Preserve log ticked before you sign in: select the last redirect and copy its Location header. In Firefox use Network > Headers > Location; in Safari use Develop > Show Web Inspector > Network. A code works once and expires within minutes. Tokens can also be pasted by hand in the fields below.",
7
+ "homecom.s_account.__homecom-begin.label": "HomeCom",
8
+ "homecom.s_account.authorizeUrl.label": "Login link",
9
+ "homecom.s_account.callback.label": "Redirect address or code",
10
+ "homecom.s_account.state.label": "Login state",
11
+ "homecom.s_account.verifier.label": "Login verifier",
12
+ "homecom.s_account.__homecom-finish.label": "Finish",
13
+ "homecom.s_account.username.label": "Account",
14
+ "homecom.s_account.token.label": "Access token (filled by sign-in, or paste one)",
15
+ "homecom.s_account.refresh.label": "Refresh token (filled by sign-in, or paste one)",
16
+ "homecom.s_account.gatewayId.label": "Gateway id",
17
+ "homecom.s_account.gatewayId.description": "Leave empty to use the first gateway of the account; the chosen one is stored here. For a second gateway add another HomeCom account entry and enter its id.",
18
+ "homecom.s_account.brand.label": "Brand",
19
+ "homecom.s_account.region.label": "Region",
20
+ "home-connect.s_gateway.title": "Home Connect",
21
+ "home-connect.s_gateway.description": "Create the login link and open it in a browser, then sign in. The browser cannot open the app and stops on an address starting with hcauth://auth/prod?code=. Paste that whole address below (or only the code) and press Complete sign-in. The address is shown in Chrome and Edge under DevTools (F12) > Network, with Preserve log ticked before you sign in: select the last redirect and copy its Location header. In Firefox use Network > Headers > Location; in Safari use Develop > Show Web Inspector > Network. A code works once and expires within minutes. The appliances are then downloaded and spoken to on the local network.",
22
+ "home-connect.s_gateway.__home-connect-begin.label": "Home Connect",
23
+ "home-connect.s_gateway.authorizeUrl.label": "Login link",
24
+ "home-connect.s_gateway.callback.label": "Redirect address or code",
25
+ "home-connect.s_gateway.state.label": "Login state",
26
+ "home-connect.s_gateway.verifier.label": "Login verifier",
27
+ "home-connect.s_gateway.__home-connect-finish.label": "Finish",
28
+ "home-connect.s_gateway.token.label": "Access token",
29
+ "home-connect.s_gateway.refresh.label": "Refresh token",
30
+ "home-connect.s_gateway.appliances.label": "Appliances"
5
31
  }
package/i18n/it.json CHANGED
@@ -1,5 +1,31 @@
1
1
  {
2
2
  "bosch-shc.name": "Bosch SHC",
3
3
  "bosch-home-connect.name": "Bosch Home Connect",
4
- "bosch-homecom.name": "Bosch HomeCom"
4
+ "bosch-homecom.name": "Bosch HomeCom",
5
+ "homecom.s_account.title": "Account HomeCom",
6
+ "homecom.s_account.description": "Crea il link di accesso, aprilo in un browser e accedi con il tuo SingleKey ID. Il browser non riesce ad aprire l'app e si ferma su un indirizzo che inizia con com.bosch.tt.dashtt.pointt://app/login?code=. Incolla qui sotto l'intero indirizzo (o solo il codice) e premi Completa accesso. L'indirizzo si vede in Chrome ed Edge in DevTools (F12) > Network, con Preserve log attivo prima di accedere: seleziona l'ultimo reindirizzamento e copia l'intestazione Location. In Firefox usa Network > Headers > Location; in Safari usa Sviluppo > Mostra Web Inspector > Network. Un codice vale una sola volta e scade in pochi minuti. I token si possono anche incollare a mano nei campi qui sotto.",
7
+ "homecom.s_account.__homecom-begin.label": "HomeCom",
8
+ "homecom.s_account.authorizeUrl.label": "Link di accesso",
9
+ "homecom.s_account.callback.label": "Indirizzo di reindirizzamento o codice",
10
+ "homecom.s_account.state.label": "Stato dell'accesso",
11
+ "homecom.s_account.verifier.label": "Verificatore dell'accesso",
12
+ "homecom.s_account.__homecom-finish.label": "Termina",
13
+ "homecom.s_account.username.label": "Account",
14
+ "homecom.s_account.token.label": "Token di accesso (compilato dall'accesso, o incollane uno)",
15
+ "homecom.s_account.refresh.label": "Token di rinnovo (compilato dall'accesso, o incollane uno)",
16
+ "homecom.s_account.gatewayId.label": "Id del gateway",
17
+ "homecom.s_account.gatewayId.description": "Lascia vuoto per usare il primo gateway dell'account; quello scelto viene salvato qui. Per un secondo gateway aggiungi un'altra voce account HomeCom e inserisci il suo id.",
18
+ "homecom.s_account.brand.label": "Marchio",
19
+ "homecom.s_account.region.label": "Regione",
20
+ "home-connect.s_gateway.title": "Home Connect",
21
+ "home-connect.s_gateway.description": "Crea il link di accesso, aprilo in un browser e accedi. Il browser non riesce ad aprire l'app e si ferma su un indirizzo che inizia con hcauth://auth/prod?code=. Incolla qui sotto l'intero indirizzo (o solo il codice) e premi Completa accesso. L'indirizzo si vede in Chrome ed Edge in DevTools (F12) > Network, con Preserve log attivo prima di accedere: seleziona l'ultimo reindirizzamento e copia l'intestazione Location. In Firefox usa Network > Headers > Location; in Safari usa Sviluppo > Mostra Web Inspector > Network. Un codice vale una sola volta e scade in pochi minuti. Gli elettrodomestici vengono poi scaricati e usati sulla rete locale.",
22
+ "home-connect.s_gateway.__home-connect-begin.label": "Home Connect",
23
+ "home-connect.s_gateway.authorizeUrl.label": "Link di accesso",
24
+ "home-connect.s_gateway.callback.label": "Indirizzo di reindirizzamento o codice",
25
+ "home-connect.s_gateway.state.label": "Stato dell'accesso",
26
+ "home-connect.s_gateway.verifier.label": "Verificatore dell'accesso",
27
+ "home-connect.s_gateway.__home-connect-finish.label": "Termina",
28
+ "home-connect.s_gateway.token.label": "Token di accesso",
29
+ "home-connect.s_gateway.refresh.label": "Token di rinnovo",
30
+ "home-connect.s_gateway.appliances.label": "Elettrodomestici"
5
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-bosch",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Bosch smart-home device-provider addons for CamStack — SHC, Home Connect, and HomeCom cloud integrations (scaffold)",
5
5
  "keywords": [
6
6
  "camstack",
@@ -1,50 +0,0 @@
1
- const require_dist = require("./dist-B-Un7bqT.js");
2
- //#region src/shared/account-integration-cascade.ts
3
- async function cascadeRemoveDevicesForIntegration(input) {
4
- const { reg, devices, addonId, system, integrationId, logger } = input;
5
- let removed = 0;
6
- for (const d of reg.getAllForAddon(addonId)) {
7
- if (d.parentDeviceId !== null) continue;
8
- const cfg = await devices.loadConfig(d.id).catch(() => ({}));
9
- if (cfg["system"] !== system || cfg["brokerId"] !== integrationId) continue;
10
- try {
11
- await devices.remove(d.id);
12
- removed += 1;
13
- } catch (err) {
14
- logger.warn(`${system}: integration cascade-remove failed`, {
15
- tags: { deviceId: d.id },
16
- meta: {
17
- integrationId,
18
- error: require_dist.errMsg(err)
19
- }
20
- });
21
- }
22
- }
23
- return removed;
24
- }
25
- //#endregion
26
- //#region src/shared/account-integration-offline.ts
27
- function setIntegrationDevicesOnline(devices, system, integrationId, online) {
28
- let count = 0;
29
- for (const dev of devices) {
30
- if (dev.config.get("system") !== system) continue;
31
- if (dev.config.get("brokerId") !== integrationId) continue;
32
- if (dev.online === online) continue;
33
- dev.markOnline(online);
34
- count += 1;
35
- }
36
- return count;
37
- }
38
- //#endregion
39
- Object.defineProperty(exports, "cascadeRemoveDevicesForIntegration", {
40
- enumerable: true,
41
- get: function() {
42
- return cascadeRemoveDevicesForIntegration;
43
- }
44
- });
45
- Object.defineProperty(exports, "setIntegrationDevicesOnline", {
46
- enumerable: true,
47
- get: function() {
48
- return setIntegrationDevicesOnline;
49
- }
50
- });
@@ -1,39 +0,0 @@
1
- import { b as errMsg } from "./dist-BiZi19Lw.mjs";
2
- //#region src/shared/account-integration-cascade.ts
3
- async function cascadeRemoveDevicesForIntegration(input) {
4
- const { reg, devices, addonId, system, integrationId, logger } = input;
5
- let removed = 0;
6
- for (const d of reg.getAllForAddon(addonId)) {
7
- if (d.parentDeviceId !== null) continue;
8
- const cfg = await devices.loadConfig(d.id).catch(() => ({}));
9
- if (cfg["system"] !== system || cfg["brokerId"] !== integrationId) continue;
10
- try {
11
- await devices.remove(d.id);
12
- removed += 1;
13
- } catch (err) {
14
- logger.warn(`${system}: integration cascade-remove failed`, {
15
- tags: { deviceId: d.id },
16
- meta: {
17
- integrationId,
18
- error: errMsg(err)
19
- }
20
- });
21
- }
22
- }
23
- return removed;
24
- }
25
- //#endregion
26
- //#region src/shared/account-integration-offline.ts
27
- function setIntegrationDevicesOnline(devices, system, integrationId, online) {
28
- let count = 0;
29
- for (const dev of devices) {
30
- if (dev.config.get("system") !== system) continue;
31
- if (dev.config.get("brokerId") !== integrationId) continue;
32
- if (dev.online === online) continue;
33
- dev.markOnline(online);
34
- count += 1;
35
- }
36
- return count;
37
- }
38
- //#endregion
39
- export { cascadeRemoveDevicesForIntegration as n, setIntegrationDevicesOnline as t };