homematic-manager 3.0.0-beta.0 → 3.0.0-beta.2

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.
@@ -43,6 +43,7 @@ export class Backend {
43
43
  #config;
44
44
  #queue;
45
45
  #writeLog;
46
+ #unknownMethodsSeen = new Set();
46
47
  #writer;
47
48
  #repair;
48
49
  #files;
@@ -542,8 +543,17 @@ export class Backend {
542
543
  this.events.emit('devices.changed', { interfaceName, kind: 'refreshed', addresses: [address] });
543
544
  },
544
545
  listDevices: (interfaceName) => listDevicesAnswer(interfaceName, this.#caches.devices.list(interfaceName)),
546
+ readyConfig: () => {
547
+ // documented, harmless, and not worth a toast
548
+ },
545
549
  unknownMethod: (methodName) => {
546
- this.#notice('info', `an interface called the unknown method ${methodName}`);
550
+ // once per method and session: the CCU repeats such calls on every init, and a
551
+ // toast per repeat was the first thing a beta tester saw
552
+ if (this.#unknownMethodsSeen.has(methodName)) {
553
+ return;
554
+ }
555
+ this.#unknownMethodsSeen.add(methodName);
556
+ this.#notice('info', `an interface called ${methodName}, which this program does not use`);
547
557
  },
548
558
  };
549
559
  }
@@ -27,6 +27,12 @@ export interface CallbackHandler {
27
27
  /** The answer to `listDevices`, from the device cache. */
28
28
  listDevices(interfaceName: string): RpcValue[];
29
29
  /** A method we do not implement; answered with an empty string anyway. */
30
+ /**
31
+ * `setReadyConfig(interface_id)`: the interface process tells its client that the
32
+ * configuration it announced with `init` is in place. Nothing to do with it, but it is a
33
+ * documented callback and not an unknown method (the first beta toasted it on every start).
34
+ */
35
+ readyConfig?(interfaceName: string): void;
30
36
  unknownMethod?(method: string, params: RpcValue[]): void;
31
37
  }
32
38
  /** The callback methods this server answers, in the order `system.listMethods` returns them. */
@@ -30,6 +30,7 @@ export const CALLBACK_METHODS = [
30
30
  'readdedDevice',
31
31
  'updateDevice',
32
32
  'listDevices',
33
+ 'setReadyConfig',
33
34
  ];
34
35
  /**
35
36
  * The subset of a device description hmipserver needs in the `listDevices` answer, exactly as 2.x
@@ -159,6 +160,9 @@ export class CallbackServer {
159
160
  case 'updateDevice':
160
161
  this.#handler.updateDevice(this.#interfaceOf(params), asString(params[1]), typeof params[2] === 'number' ? params[2] : 0);
161
162
  return '';
163
+ case 'setReadyConfig':
164
+ this.#handler.readyConfig?.(this.#interfaceOf(params));
165
+ return '';
162
166
  default:
163
167
  this.#handler.unknownMethod?.(method, [...params]);
164
168
  return '';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homematic-manager/backend",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homematic-manager/core",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
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.0",
3
+ "version": "3.0.0-beta.2",
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.0",
71
- "@homematic-manager/core": "3.0.0-beta.0",
70
+ "@homematic-manager/backend": "3.0.0-beta.2",
71
+ "@homematic-manager/core": "3.0.0-beta.2",
72
72
  "binrpc": "^4.2.0",
73
73
  "homematic-rega": "^2.0.0",
74
74
  "homematic-xmlrpc": "^2.0.0",