homematic-manager 3.0.0-beta.26 → 3.0.0-beta.28

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.
@@ -392,6 +392,14 @@ export class Backend {
392
392
  return this.#setInstallMode(p[0], p[1], p[2]);
393
393
  case 'devices.installMode.get':
394
394
  return Number(await this.#read(p[0], 'getInstallMode', []));
395
+ case 'devices.installMode.keyMismatch': {
396
+ // rfd answers the serial as a string; anything else means "none"
397
+ const serial = await this.#read(p[0], 'getKeyMismatchDevice', [true]);
398
+ return typeof serial === 'string' ? serial : '';
399
+ }
400
+ case 'devices.installMode.tempKey':
401
+ await this.#write(p[0], 'setTempKey', [p[1]]);
402
+ return null;
395
403
  case 'devices.replaceable':
396
404
  return asDescriptions(await this.#read(p[0], 'listReplaceableDevices', [p[1]]));
397
405
  case 'names.get':
@@ -1976,6 +1984,8 @@ export const API_METHOD_NAMES = [
1976
1984
  'devices.installFirmware',
1977
1985
  'devices.installMode.set',
1978
1986
  'devices.installMode.get',
1987
+ 'devices.installMode.keyMismatch',
1988
+ 'devices.installMode.tempKey',
1979
1989
  'devices.replaceable',
1980
1990
  'names.get',
1981
1991
  'names.set',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homematic-manager/backend",
3
- "version": "3.0.0-beta.26",
3
+ "version": "3.0.0-beta.28",
4
4
  "type": "module",
5
5
  "description": "Homematic Manager backend: XML-RPC/BIN-RPC clients and callback servers, caches, optional ReGa",
6
6
  "license": "AGPL-3.0-or-later",
@@ -748,7 +748,10 @@ export interface InstallModeOptions {
748
748
  * seconds)` with exactly two arguments, `hmipKey` ignored.
749
749
  */
750
750
  hmipKeyMode?: 'KEY' | 'SGTIN' | 'ANY';
751
- /** BidCos: temporary key for `setTempKey`. */
751
+ /**
752
+ * BidCos: temporary key for `setTempKey` - the security key (passphrase) of the system the
753
+ * device was paired to, sent before the install mode or `addDevice`.
754
+ */
752
755
  tempKey?: string;
753
756
  /** Restrict to a device address (BidCos `setInstallMode` with address). */
754
757
  address?: string;
@@ -899,6 +902,25 @@ export interface ApiMethods {
899
902
  params: [interfaceName: string];
900
903
  result: number;
901
904
  };
905
+ /**
906
+ * Task 76: the serial of the last BidCos device rfd refused to pair because it holds a security
907
+ * key this system does not have (`getKeyMismatchDevice(true)`: read once, then cleared in the
908
+ * interface process), or `''` when there is none. rfd reports it to nobody, so a client polls
909
+ * it while its install mode is open, as the CCU WebUI does every five seconds.
910
+ */
911
+ 'devices.installMode.keyMismatch': {
912
+ params: [interfaceName: string];
913
+ result: string;
914
+ };
915
+ /**
916
+ * Task 76: `setTempKey(passphrase)` on its own - the security key of the system a device was
917
+ * paired to, which rfd uses for the pairings that follow; `''` clears it, so a mistyped key does
918
+ * not linger for the next pairing. `devices.installMode.set` sends it too when `tempKey` is set.
919
+ */
920
+ 'devices.installMode.tempKey': {
921
+ params: [interfaceName: string, key: string];
922
+ result: null;
923
+ };
902
924
  'devices.replaceable': {
903
925
  params: [interfaceName: string, address: string];
904
926
  result: DeviceDescription[];
@@ -80,14 +80,25 @@ export class TranslationLookup {
80
80
  return undefined;
81
81
  }
82
82
  }
83
- /** `CHANNEL_TYPE|SUFFIX` before `SUFFIX`, each as given and upper-cased. */
83
+ /**
84
+ * `CHANNEL_TYPE|SUFFIX` before `SUFFIX`, each as given and upper-cased - and then the same two
85
+ * again without a `SHORT_` or `LONG_` prefix (B-75). The string tables label a link's parameters
86
+ * by the name behind the key press: `ON_TIME`, `JT_ON`, `PROFILE_ACTION_TYPE` are in them,
87
+ * `SHORT_ON_TIME` and `LONG_ON_TIME` are not - 2.7.1 stripped the prefix for a link's help
88
+ * texts (homematic-manager.js:3475), and a MASTER parameter that happens to start with one
89
+ * (`LONG_PRESS_TIME`) still finds its own entry first.
90
+ */
84
91
  function keys(suffix, channelType) {
85
- const bare = identifiers(suffix);
86
- if (channelType === undefined || channelType === '') {
87
- return bare;
88
- }
89
- const qualified = identifiers(channelType).map((type) => `${type}|${suffix}`);
90
- return dedupe([...qualified, ...qualified.map((key) => key.toUpperCase()), ...bare]);
92
+ const stripped = suffix.replace(/^(?:SHORT|LONG)_/i, '');
93
+ const forms = stripped === suffix ? [suffix] : [suffix, stripped];
94
+ return dedupe(forms.flatMap((form) => {
95
+ const bare = identifiers(form);
96
+ if (channelType === undefined || channelType === '') {
97
+ return bare;
98
+ }
99
+ const qualified = identifiers(channelType).map((type) => `${type}|${form}`);
100
+ return [...qualified, ...qualified.map((key) => key.toUpperCase()), ...bare];
101
+ }));
91
102
  }
92
103
  /** The key as it was given, plus its upper-case form where that differs. */
93
104
  function identifiers(value) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homematic-manager/core",
3
- "version": "3.0.0-beta.26",
3
+ "version": "3.0.0-beta.28",
4
4
  "type": "module",
5
5
  "description": "Pure domain logic of the Homematic Manager: no I/O, no DOM",
6
6
  "license": "AGPL-3.0-or-later",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homematic-manager",
3
- "version": "3.0.0-beta.26",
3
+ "version": "3.0.0-beta.28",
4
4
  "type": "module",
5
5
  "description": "Configure and administer Homematic and HomematicIP devices - devices and channels, direct links, paramsets, RSSI, service messages, events and an RPC console - from a local HTTP/WebSocket server that also serves the web UI",
6
6
  "keywords": [
@@ -67,8 +67,8 @@
67
67
  "hm-simulator": "^1.0.0"
68
68
  },
69
69
  "dependencies": {
70
- "@homematic-manager/backend": "3.0.0-beta.26",
71
- "@homematic-manager/core": "3.0.0-beta.26",
70
+ "@homematic-manager/backend": "3.0.0-beta.28",
71
+ "@homematic-manager/core": "3.0.0-beta.28",
72
72
  "binrpc": "^4.2.0",
73
73
  "homematic-rega": "^2.0.0",
74
74
  "homematic-xmlrpc": "^2.0.0",