homematic-manager 3.2.1 → 3.2.3

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/README.md CHANGED
@@ -77,7 +77,8 @@ interface processes want - with a five second bound, so a `systemctl restart` ca
77
77
 
78
78
  ## Idle unsubscribe (D-31)
79
79
 
80
- After five minutes with no page open, the backend sends `init(url, '')` to every interface and
80
+ Off by default since 3.2.3 (B-95). With an idle time set and no page open for that long, the
81
+ backend sends `init(url, '')` to every interface and
81
82
  stops its service-message poll: an interface process should not push events at a browser tab that
82
83
  does not exist, and on the CCU those events cost the CCU's own CPU. Nothing else is torn down - the
83
84
  configuration, the names and every cache stay, the sockets stay, and the next page that connects
@@ -88,8 +89,9 @@ until their first `listDevices` sweep is through, because `hmipserver` re-sends
88
89
  The time also runs from the start when no page is opened after it (B-70). The settings dialog
89
90
  offers it (*Unsubscribe when idle*: the default, 15 minutes to 4 hours, or never), saved in the
90
91
  profile. `--idle-unsubscribe <duration>` / `HMM_IDLE_UNSUBSCRIBE` sets it at start instead (`5m`,
91
- `300s`, `90`, `0` for never) and then wins over the dialog, which shows it read-only. It is on by
92
- default for every server install type - npm, Docker and the CCU addon all run unattended for days. The Electron app never does this: its in-process
92
+ `300s`, `90`, `0` for never) and then wins over the dialog, which shows it read-only. Up to 3.2.2 it
93
+ was on by default with five minutes; since 3.2.3 the default is never, because `hmipserver` handles
94
+ every `init` on its single event loop and each page load after the idle time blocked it for seconds. The Electron app never does this: its in-process
93
95
  transport reports no sessions at all, so nothing there can ever be counted as idle.
94
96
 
95
97
  What is **not** replayed after a resubscribe are the events and service messages of the idle
package/dist/options.d.ts CHANGED
@@ -13,11 +13,13 @@ import { type AuthMode } from './server.js';
13
13
  export declare const ENV_PREFIX = "HMM";
14
14
  /**
15
15
  * D-31: how long a server install waits with no page open before it de-registers from the interface
16
- * processes. On by default for every server install type - npm, Docker and the CCU addon all run
17
- * unattended for days, and an interface process pushing events at nobody costs the CCU's own CPU.
18
- * `0` disables it; Electron never gets here (its transport reports no sessions).
16
+ * processes. Off by default since B-95: every page opened after the idle time sent a new `init` to
17
+ * every interface, and hmipserver does that work on its single event loop - 2.4 to 3.4 s blocked on
18
+ * a CCU3 with some 450 devices and channels, for each page load. The registration now stays up, and
19
+ * the ping watchdog re-registers after a restart of an interface as before. A duration turns it on;
20
+ * Electron never gets here (its transport reports no sessions).
19
21
  */
20
- export declare const DEFAULT_IDLE_UNSUBSCRIBE = "5m";
22
+ export declare const DEFAULT_IDLE_UNSUBSCRIBE = "0";
21
23
  /**
22
24
  * D-32/D-40: how a browser is let in. `token` is what every install type but the CCU addon uses, and
23
25
  * stays the default there too - the addon's `settings.cgi` hand-over is the primary path and the
@@ -161,8 +163,8 @@ export declare const OPTIONS: {
161
163
  };
162
164
  readonly 'idle-unsubscribe': {
163
165
  readonly type: "string";
164
- readonly describe: "drop the event subscriptions after this long with no page open (5m, 300s, 0 to disable)";
165
- readonly default: "5m";
166
+ readonly describe: "drop the event subscriptions after this long with no page open (15m, 900s; 0, the default, never)";
167
+ readonly default: "0";
166
168
  };
167
169
  readonly demo: {
168
170
  readonly type: "boolean";
package/dist/options.js CHANGED
@@ -14,11 +14,13 @@ import { DEFAULT_HOST, DEFAULT_PORT } from './server.js';
14
14
  export const ENV_PREFIX = 'HMM';
15
15
  /**
16
16
  * D-31: how long a server install waits with no page open before it de-registers from the interface
17
- * processes. On by default for every server install type - npm, Docker and the CCU addon all run
18
- * unattended for days, and an interface process pushing events at nobody costs the CCU's own CPU.
19
- * `0` disables it; Electron never gets here (its transport reports no sessions).
17
+ * processes. Off by default since B-95: every page opened after the idle time sent a new `init` to
18
+ * every interface, and hmipserver does that work on its single event loop - 2.4 to 3.4 s blocked on
19
+ * a CCU3 with some 450 devices and channels, for each page load. The registration now stays up, and
20
+ * the ping watchdog re-registers after a restart of an interface as before. A duration turns it on;
21
+ * Electron never gets here (its transport reports no sessions).
20
22
  */
21
- export const DEFAULT_IDLE_UNSUBSCRIBE = '5m';
23
+ export const DEFAULT_IDLE_UNSUBSCRIBE = '0';
22
24
  /**
23
25
  * D-32/D-40: how a browser is let in. `token` is what every install type but the CCU addon uses, and
24
26
  * stays the default there too - the addon's `settings.cgi` hand-over is the primary path and the
@@ -161,7 +163,7 @@ export const OPTIONS = {
161
163
  },
162
164
  'idle-unsubscribe': {
163
165
  type: 'string',
164
- describe: 'drop the event subscriptions after this long with no page open (5m, 300s, 0 to disable)',
166
+ describe: 'drop the event subscriptions after this long with no page open (15m, 900s; 0, the default, never)',
165
167
  default: DEFAULT_IDLE_UNSUBSCRIBE,
166
168
  },
167
169
  demo: {
@@ -1168,7 +1168,7 @@ export class Backend {
1168
1168
  ...(pins === undefined ? {} : { callbackPinned: { ...pins } }),
1169
1169
  ...(publish ? { publishCallbackPorts: true } : {}),
1170
1170
  // B-70: only a host that goes idle offers the time; the default of an unpinned host is
1171
- // D-31's five minutes, whatever it was started with, so "the default" means one thing
1171
+ // D-31's default (never, since B-95), whatever it was started with, so "the default" means one thing
1172
1172
  ...(idle === undefined
1173
1173
  ? {}
1174
1174
  : {
@@ -91,9 +91,10 @@ export declare const INIT_TIMEOUT_BACKOFF_MS = 15000;
91
91
  export declare const START_WINDOW_MS = 90000;
92
92
  /**
93
93
  * D-31: the grace period a server install waits, with no UI session connected, before it drops its
94
- * event subscriptions. Five minutes; `0` turns the whole thing off, which is what Electron uses.
94
+ * event subscriptions: never, since B-95 (each page load after the idle time sent an `init` that
95
+ * blocked hmipserver for seconds). A host or a profile can still choose a time.
95
96
  */
96
- export declare const DEFAULT_IDLE_UNSUBSCRIBE_MS = 300000;
97
+ export declare const DEFAULT_IDLE_UNSUBSCRIBE_MS = 0;
97
98
  export interface ManagedInterface {
98
99
  readonly name: string;
99
100
  readonly target: InterfaceTarget;
@@ -98,9 +98,10 @@ export const INIT_TIMEOUT_BACKOFF_MS = 15_000;
98
98
  export const START_WINDOW_MS = 90_000;
99
99
  /**
100
100
  * D-31: the grace period a server install waits, with no UI session connected, before it drops its
101
- * event subscriptions. Five minutes; `0` turns the whole thing off, which is what Electron uses.
101
+ * event subscriptions: never, since B-95 (each page load after the idle time sent an `init` that
102
+ * blocked hmipserver for seconds). A host or a profile can still choose a time.
102
103
  */
103
- export const DEFAULT_IDLE_UNSUBSCRIBE_MS = 300_000;
104
+ export const DEFAULT_IDLE_UNSUBSCRIBE_MS = 0;
104
105
  /**
105
106
  * The address of the first BidCos interface of a `listBidcosInterfaces` answer.
106
107
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homematic-manager/backend",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
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.2.1",
3
+ "version": "3.2.3",
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.2.1",
3
+ "version": "3.2.3",
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.4.0"
68
68
  },
69
69
  "dependencies": {
70
- "@homematic-manager/backend": "3.2.1",
71
- "@homematic-manager/core": "3.2.1",
70
+ "@homematic-manager/backend": "3.2.3",
71
+ "@homematic-manager/core": "3.2.3",
72
72
  "binrpc": "^4.2.0",
73
73
  "homematic-rega": "^2.0.0",
74
74
  "homematic-xmlrpc": "^2.0.0",