hm-simulator 1.2.0 → 1.3.1
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/CHANGELOG.md +33 -0
- package/README.md +98 -34
- package/lib/control.js +1 -0
- package/lib/faults.d.ts +48 -0
- package/lib/method-help.js +14 -0
- package/lib/sim.js +373 -11
- package/package.json +10 -4
- package/sim.d.mts +5 -0
- package/sim.d.ts +481 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes of hm-simulator. The release workflow takes each version's section from here for the
|
|
4
4
|
GitHub release notes.
|
|
5
5
|
|
|
6
|
+
## 1.3.1
|
|
7
|
+
|
|
8
|
+
- `getLinks` without an address reports `FLAGS: 1` (`SENDER_BROKEN`) on every device-internal link of
|
|
9
|
+
`rfd` - a relay's own button on the relay, a dimmer's channel on its virtual channels - as rfd
|
|
10
|
+
3.89.11 does although such a link works; filtered by an address the link carries its stored flags,
|
|
11
|
+
0, as rfd answers there too. A test that shows a client how it handles rfd's flag can now make the
|
|
12
|
+
link with `addLink` instead of seeding it (B-3, found through Homematic Manager's links list).
|
|
13
|
+
- `replaceDevice` answers `true`, as the specification's `bool` says, where it answered `''` (a
|
|
14
|
+
client that takes the answer as the success saw a replacement that did happen as failed).
|
|
15
|
+
- rfd's `listReplaceableDevices` names only the devices of the same type that are unreachable
|
|
16
|
+
(`setReachable(iface, address, false)`); a device that still answers is not replaced.
|
|
17
|
+
- The declarations gain `clients` (the registered logic layers per interface, read-only, `Client`),
|
|
18
|
+
`dispatch` with its `DispatchContext` (the servers' entry, which a test may wrap to record calls),
|
|
19
|
+
and `replaceDevice`'s `true` (B-2, found through Homematic Manager's tests on 1.3.0).
|
|
20
|
+
|
|
21
|
+
## 1.3.0
|
|
22
|
+
|
|
23
|
+
- The calls Homematic Manager makes, measured on rfd and hmipserver of firmware 3.89.11:
|
|
24
|
+
`getKeyMismatchDevice` with the scenario call `scriptKeyMismatch` (a device that holds another
|
|
25
|
+
system's key: heard at the next install mode, paired once `setTempKey` offers its key) and rfd's
|
|
26
|
+
`addDevice(serial)`; `suppressServiceMessages` and `getSuppressedServiceMessages` on hmipserver
|
|
27
|
+
(a suppressed message is left out of `getServiceMessages` and reports the value that raises
|
|
28
|
+
none); `getMetadata`, `setMetadata` and rfd's `getAllMetadata`, seeded with the new `metadata`
|
|
29
|
+
option; `listReplaceableDevices`; `getVersion` (`interfaces.<iface>.version`); `getLGWStatus`
|
|
30
|
+
(only with `interfaces.<iface>.lgwStatus` - rfd 3.89.11 does not know it); `setInterfaceClock`
|
|
31
|
+
(recorded in `sim.interfaceClocks`).
|
|
32
|
+
- TypeScript declarations: `sim.d.ts` (the `types` of the package), `sim.d.mts` for `sim.mjs` and
|
|
33
|
+
`lib/faults.d.ts`, covering the options, the scenario API, the introspection calls and the
|
|
34
|
+
description types. `npm test` type-checks them against a file that uses every export
|
|
35
|
+
(`test/types/`), and a test fails when an option or scenario call is missing from them.
|
|
36
|
+
- `interfaces.<iface>.getServiceMessagesFault: true` answers `getServiceMessages` with
|
|
37
|
+
`Invalid XML-RPC message`, as VirtualDevices, CUxD and hmipserver were seen to on 3.89.x.
|
|
38
|
+
|
|
6
39
|
## 1.2.0
|
|
7
40
|
|
|
8
41
|
- The README is rewritten for the test author (quick start, connecting a client, the scenario API
|
package/README.md
CHANGED
|
@@ -38,6 +38,10 @@ Prerequisites: [Node.js](https://nodejs.org) >= 20.19.
|
|
|
38
38
|
npm install --save-dev hm-simulator
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
TypeScript declarations ship with the package (`sim.d.ts`, `sim.d.mts`, `lib/faults.d.ts`): the
|
|
42
|
+
options, the scenario API, the introspection calls and the description types are under the `HmSim`
|
|
43
|
+
namespace (`HmSim.Options`, `HmSim.DeviceDescription`, `HmSim.ParamsetDescription`, ...).
|
|
44
|
+
|
|
41
45
|
A test file with `node:test` - the same shape works with mocha (`before`/`after`) and vitest
|
|
42
46
|
(`beforeAll`/`afterAll`):
|
|
43
47
|
|
|
@@ -118,15 +122,17 @@ that starts with the bytes `Bin` is BIN-RPC, anything else XML-RPC over HTTP.
|
|
|
118
122
|
|
|
119
123
|
**Incoming RPC methods.**
|
|
120
124
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
| session
|
|
124
|
-
| devices
|
|
125
|
-
| paramsets
|
|
126
|
-
| links
|
|
127
|
-
| interface
|
|
128
|
-
|
|
|
129
|
-
|
|
|
125
|
+
| | |
|
|
126
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
127
|
+
| session | `init` (register and de-register a logic layer), `ping`, `system.listMethods`, `system.methodHelp`, `system.multicall` |
|
|
128
|
+
| devices | `listDevices`, `getDeviceDescription`, `deleteDevice`, `replaceDevice`, `listReplaceableDevices`, `setInstallMode`, `getInstallMode`, `addDevice` (BidCos only), `getKeyMismatchDevice` (rfd, hmipserver) |
|
|
129
|
+
| paramsets | `getParamsetDescription`, `getParamset`, `putParamset`, `getValue`, `setValue`, `determineParameter`, `reportValueUsage` |
|
|
130
|
+
| links | `getLinks`, `getLinkPeers`, `getLinkInfo`, `setLinkInfo`, `addLink`, `removeLink`, `activateLinkParamset` |
|
|
131
|
+
| interface | `rssiInfo`, `listBidcosInterfaces`, `setBidcosInterface`, `getServiceMessages`, `setTempKey` (BidCos only), `changeKey` (rfd, hmipserver), `logLevel`, `getVersion`, `setInterfaceClock` (rfd, hmipserver), `getLGWStatus` (only when configured) |
|
|
132
|
+
| metadata | `getMetadata`, `setMetadata` (rfd, hs485d, hmipserver), `getAllMetadata` (BidCos only) |
|
|
133
|
+
| service messages | `suppressServiceMessages`, `getSuppressedServiceMessages` (hmipserver only) |
|
|
134
|
+
| teams | `listTeams`, `setTeam` (BidCos only): the smoke detector teams as rfd keeps them, pseudo devices `*<serial>` |
|
|
135
|
+
| maintenance | `clearConfigCache`, `restoreConfigToDevice`, `updateFirmware`, `installFirmware`, `refreshDeployedDeviceFirmwareList` (rfd, hmipserver) |
|
|
130
136
|
|
|
131
137
|
Every write is checked against the paramset description (type, range, `VALUE_LIST`,
|
|
132
138
|
`OPERATIONS`) and answered the way the interface process answers it - see
|
|
@@ -179,30 +185,31 @@ UTF-8. BIN-RPC strings go out as ISO-8859-1, as rfd sends them.
|
|
|
179
185
|
|
|
180
186
|
`new HmSim(options)`; everything is optional.
|
|
181
187
|
|
|
182
|
-
| option | default |
|
|
183
|
-
| -------------------------- | ---------------------------------------------------- |
|
|
184
|
-
| `devices` | `{rfd: {devices: []}, hmip: {devices: []}}` | device descriptions per interface, `{<iface>: {devices: [...]}}`
|
|
185
|
-
| `paramsetDescriptions` | the bundled 8.4 MB `data/paramset-descriptions.json` | replaces the bundled descriptions, see [Device data and fixtures](#device-data-and-fixtures)
|
|
186
|
-
| `paramsetFallback` | `true` | a firmware without a description uses the nearest one; `false` for exact keys only
|
|
187
|
-
| `links` | `{}` | links per interface, `[{SENDER, RECEIVER, FLAGS, NAME, DESCRIPTION}]`
|
|
188
|
-
| `bidcosInterfaces` | one per interface | what `listBidcosInterfaces` answers, per interface
|
|
189
|
-
| `serviceMessages` | `{}` | extra service messages per interface, `[[address, datapoint, value]]`
|
|
190
|
-
| `newDevices` | `{}` | devices that appear when the install mode is switched on, `{<iface>: {devices, delay}}`
|
|
191
|
-
| `defaultRssi` | `-65` | what `rssiInfo` answers where a device has no RSSI datapoint
|
|
192
|
-
| `
|
|
193
|
-
| `config.
|
|
194
|
-
| `config.
|
|
195
|
-
| `config.
|
|
196
|
-
| `config.
|
|
197
|
-
| `config.
|
|
198
|
-
| `config.
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
188
|
+
| option | default | |
|
|
189
|
+
| -------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
190
|
+
| `devices` | `{rfd: {devices: []}, hmip: {devices: []}}` | device descriptions per interface, `{<iface>: {devices: [...]}}` |
|
|
191
|
+
| `paramsetDescriptions` | the bundled 8.4 MB `data/paramset-descriptions.json` | replaces the bundled descriptions, see [Device data and fixtures](#device-data-and-fixtures) |
|
|
192
|
+
| `paramsetFallback` | `true` | a firmware without a description uses the nearest one; `false` for exact keys only |
|
|
193
|
+
| `links` | `{}` | links per interface, `[{SENDER, RECEIVER, FLAGS, NAME, DESCRIPTION}]` |
|
|
194
|
+
| `bidcosInterfaces` | one per interface | what `listBidcosInterfaces` answers, per interface |
|
|
195
|
+
| `serviceMessages` | `{}` | extra service messages per interface, `[[address, datapoint, value]]` |
|
|
196
|
+
| `newDevices` | `{}` | devices that appear when the install mode is switched on, `{<iface>: {devices, delay}}` |
|
|
197
|
+
| `defaultRssi` | `-65` | what `rssiInfo` answers where a device has no RSSI datapoint |
|
|
198
|
+
| `metadata` | `{}` | what `getMetadata` answers before any `setMetadata`, `{<iface>: {<address>: {<key>: value}}}` |
|
|
199
|
+
| `config.listenAddress` | all interfaces | `'127.0.0.1'` in tests |
|
|
200
|
+
| `config.binrpcListenPort` | – | rfd |
|
|
201
|
+
| `config.xmlrpcListenPort` | – | hmipserver |
|
|
202
|
+
| `config.wiredListenPort` | – | BidCos-Wired, started when `devices.wired` exists |
|
|
203
|
+
| `config.virtualListenPort` | off | VirtualDevices |
|
|
204
|
+
| `config.virtualPath` | `/groups` | the path VirtualDevices answers on |
|
|
205
|
+
| `config.cuxdListenPort` | off | CUxD |
|
|
206
|
+
| `interfaces` | see below | behaviour per interface, `{<iface>: {...}}` |
|
|
207
|
+
| `faults` | hmipserver's table | overrides for the fault table, see [Fault codes](#fault-codes) |
|
|
208
|
+
| `behaviorPath` | `behaviors/` of the package | directory with [behaviour scripts](#behaviour-scripts), `false` for none |
|
|
209
|
+
| `rega` | off | the [ReGa mock](#rega-mock) |
|
|
210
|
+
| `tls` | off | `true` or `{key, cert}`, see [TLS and basic auth](#tls-and-basic-auth) |
|
|
211
|
+
| `auth` | off | `{username, password}`, HTTP basic auth |
|
|
212
|
+
| `log` | silent | an object with `debug`, `info`, `warn`, `error` (`console` will do) |
|
|
206
213
|
|
|
207
214
|
**Per interface** (`interfaces: {hmip: {...}, rfd: {...}}`):
|
|
208
215
|
|
|
@@ -220,6 +227,9 @@ UTF-8. BIN-RPC strings go out as ISO-8859-1, as rfd sends them.
|
|
|
220
227
|
| `startDelay` | `0` | milliseconds after `whenReady()` until the port accepts connections: a process that starts late (`sim.ports` knows the port from the start) |
|
|
221
228
|
| `unreachWrites` | `'accept'` | what `setValue`/`putParamset` to an unreachable device answer: `'accept'`, or `'fault'` (`notReachable`). The simulator's model, not a measurement |
|
|
222
229
|
| `firmwareUpdateDelay` | `0` | milliseconds per step of a firmware update |
|
|
230
|
+
| `getServiceMessagesFault` | `false` | answer `getServiceMessages` with the unknown-method fault (`Invalid XML-RPC message`), as VirtualDevices, CUxD and hmipserver were seen to on 3.89.x |
|
|
231
|
+
| `version` | `'2.6.0'` for `rfd` and `wired`, `'3.89.11.20260919'` for `hmip` | what `getVersion` answers; the rest has no `getVersion` |
|
|
232
|
+
| `lgwStatus` | – | BidCos only: what `getLGWStatus` answers; without it the method is unknown, as on rfd 3.89.11 |
|
|
223
233
|
|
|
224
234
|
## Scenario API
|
|
225
235
|
|
|
@@ -233,6 +243,9 @@ sim.addDevice('rfd', device, channel0, channel1); // pairs a device: newDevices
|
|
|
233
243
|
sim.removeDevice('rfd', 'LAB0000002'); // deleteDevices, with its values and links
|
|
234
244
|
sim.scriptNewDevices('rfd', [device, channel0, channel1], 500); // appear 500 ms after setInstallMode
|
|
235
245
|
sim.getDevice('rfd', 'LAB0000002:1'); // the description, false when unknown
|
|
246
|
+
// a device that holds another system's key: the next install mode hears it (getKeyMismatchDevice
|
|
247
|
+
// names it) until setTempKey('their-key') lets it pair; addDevice('LAB0000009') does the same
|
|
248
|
+
sim.scriptKeyMismatch('rfd', 'LAB0000009', {key: 'their-key', devices: [device, channel0, channel1]});
|
|
236
249
|
```
|
|
237
250
|
|
|
238
251
|
**Values and events**
|
|
@@ -285,6 +298,8 @@ sim.getTempKey('rfd'); // what setTempKey set
|
|
|
285
298
|
sim.getInstallMode('rfd'); // seconds of install mode left
|
|
286
299
|
sim.keyChanges; // every changeKey: [{iface, key, ts}]
|
|
287
300
|
sim.firmwareListRefreshes; // every refreshDeployedDeviceFirmwareList: [{iface, ts}]
|
|
301
|
+
sim.interfaceClocks; // every setInterfaceClock: [{iface, utc, offset, ts}]
|
|
302
|
+
sim.metadata; // what setMetadata stored: {<iface>: {<address>: {<key>: value}}}
|
|
288
303
|
sim.ports; // {rfd, hmip, wired, virtual, cuxd, ...}: the ports once whenReady() resolved
|
|
289
304
|
sim.regaSim.scripts; // every script the ReGa mock received
|
|
290
305
|
```
|
|
@@ -472,6 +487,18 @@ Where the simulator imitates an interface process, this says whether the shape w
|
|
|
472
487
|
CCU or is the simulator's model. The measurements were made for Homematic Manager (tasks 6 and 58)
|
|
473
488
|
on CCUs with firmware 3.89.8 and 3.89.x.
|
|
474
489
|
|
|
490
|
+
### Direct links
|
|
491
|
+
|
|
492
|
+
rfd (firmware 3.89.11, 2026-09-30) answers `getLinks("", flags)` - the list of all links - with
|
|
493
|
+
`FLAGS: 1` (`SENDER_BROKEN`) on every **device-internal** link: a relay's own button on the relay
|
|
494
|
+
(`:1` → `:1`), a dimmer's channel on its virtual channels. The link works; the bit carries no
|
|
495
|
+
information there. Asked for one address, `getLinks("ABC0000001:1", 0)` and `getLinks("ABC0000001",
|
|
496
|
+
0)` answer the same link with `FLAGS: 0`, and `getLinkPeers` names the own channel once. The simulator
|
|
497
|
+
does the same on `rfd`: `addLink` stores `FLAGS: 0`, the unfiltered list adds bit 1 to internal links
|
|
498
|
+
(seeded flags are kept and or-ed), the filtered one reports what is stored. hmipserver is not
|
|
499
|
+
measured and reports the stored flags. rfd also refuses `getLinkPeers` of a device address (`-1
|
|
500
|
+
Failure`); the simulator answers the peers of all its channels.
|
|
501
|
+
|
|
475
502
|
### CONFIG_PENDING
|
|
476
503
|
|
|
477
504
|
What a `putParamset MASTER` does, per interface (`interfaces.<iface>.configPendingMode`):
|
|
@@ -543,6 +570,20 @@ nothing is pending (measured); `serviceMessagesEmptyAsString: true` does the sam
|
|
|
543
570
|
because it breaks every client that assumes an array, which is why a client should be tested with it
|
|
544
571
|
once. Teams (`listTeams`) have the shape rfd was read to have on a CCU3.
|
|
545
572
|
|
|
573
|
+
**Suppression** (hmipserver only, eQ-3's HmIP addendum): `suppressServiceMessages(channelAddress,
|
|
574
|
+
parameter, suppress)` takes one of the channel's service parameters or `''` for all of them, and
|
|
575
|
+
ignores a parameter without the service flag; `getSuppressedServiceMessages(channelAddress)`
|
|
576
|
+
answers the suppressed ones (`[]` for an address it does not know). Measured on 3.89.11. A
|
|
577
|
+
suppressed message is left out of `getServiceMessages` and its datapoint reports the value that
|
|
578
|
+
raises no message (`false`), in `getValue`, `getParamset` and events, while the stored value stays;
|
|
579
|
+
a new occurrence stays suppressed until the suppression is lifted. That a change of the suppression
|
|
580
|
+
sends that value as an event is the simulator's model.
|
|
581
|
+
|
|
582
|
+
VirtualDevices, CUxD and hmipserver were seen to answer `getServiceMessages` with the fault
|
|
583
|
+
`Invalid XML-RPC message` on 3.89.x (hmipserver answered it on 3.89.11);
|
|
584
|
+
`interfaces.<iface>.getServiceMessagesFault: true` does the same, for a client that has to survive
|
|
585
|
+
it.
|
|
586
|
+
|
|
546
587
|
### A callback server that hangs
|
|
547
588
|
|
|
548
589
|
`interfaces.<iface>.listenerModel: 'measured'`. Measured on firmware 3.89.8 (2026-09-25) with a
|
|
@@ -563,6 +604,29 @@ measurement; so is everything with the default `'isolated'`, where every client
|
|
|
563
604
|
(rfd, hmipserver; recorded in `sim.firmwareListRefreshes`) answer as the interfaces were measured to
|
|
564
605
|
on firmware 3.89.x; the simulator does no cryptography and loads no firmware.
|
|
565
606
|
|
|
607
|
+
### The calls of Homematic Manager
|
|
608
|
+
|
|
609
|
+
Measured on rfd and hmipserver of firmware 3.89.11 (read-only calls, and one suppression set and
|
|
610
|
+
lifted again):
|
|
611
|
+
|
|
612
|
+
| call | rfd | hmipserver |
|
|
613
|
+
| ---------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------- |
|
|
614
|
+
| `getKeyMismatchDevice(reset)` | `''` when no device holds another key | the same |
|
|
615
|
+
| `getMetadata(address, key)`, key not set | fault `-1 Failure`, for an unknown address too | an empty value |
|
|
616
|
+
| `getAllMetadata(address)`, nothing set | fault `-1 Failure` | not in `system.listMethods` |
|
|
617
|
+
| `listReplaceableDevices(address)` | `[]` for its own `BidCoS-RF`, `-2 Unknown instance` for an unknown one | an empty HTTP body, always |
|
|
618
|
+
| `getVersion()` | `2.6.0` | the firmware, `3.89.11.…` |
|
|
619
|
+
| `getLGWStatus()` | `unknown method name`, with and without a LAN gateway in the system | not in `system.listMethods` |
|
|
620
|
+
| `suppressServiceMessages(…)` | not in `system.listMethods` | see [Service messages](#service-messages) |
|
|
621
|
+
|
|
622
|
+
The simulator answers so, with the fault table in force (`-1 Generic error` under hmipserver's
|
|
623
|
+
default table where rfd says `-1 Failure`) and `''` for hmipserver's empty body. Its models:
|
|
624
|
+
`listReplaceableDevices` on rfd lists the other devices of the same `TYPE` that are unreachable
|
|
625
|
+
(`setReachable(iface, address, false)`; a device that still answers is not replaced); `setMetadata` on rfd
|
|
626
|
+
knows only its own addresses; `setInterfaceClock` is recorded, not measured (it sets the clock the
|
|
627
|
+
devices get). `addDevice(serial)` pairs only the device of `scriptKeyMismatch`, with the right
|
|
628
|
+
temporary key; any other serial is `unknownInstance`, the mismatch a `notSupported` fault.
|
|
629
|
+
|
|
566
630
|
## ReGa mock
|
|
567
631
|
|
|
568
632
|
`rega: {port: 8181, ...}` starts an HTTP server that answers `POST /<name>.exe` as the CCU's
|
|
@@ -674,7 +738,7 @@ there. The flags win over the file:
|
|
|
674
738
|
arguments. The answer is `{"result": ...}`; a fault is `400` with `faultCode` and `faultString`, an
|
|
675
739
|
unknown call `404`. `GET /ports` answers the ports. The calls: `addDevice`, `removeDevice`,
|
|
676
740
|
`fireEvent`, `fireEvents`, `setValue` (the device reporting a value, as a behaviour script does),
|
|
677
|
-
`setServiceMessage`, `scriptNewDevices`, `dropConnection`, `stopInterface`, `startInterface`,
|
|
741
|
+
`setServiceMessage`, `scriptNewDevices`, `scriptKeyMismatch`, `dropConnection`, `stopInterface`, `startInterface`,
|
|
678
742
|
`restartInterface`, `injectFault`, `clearFaults`, `setReachable`, `setLowBattery`, `setDutyCycle`,
|
|
679
743
|
`setCarrierSense`, `offerFirmware`, `schedule`, `getDevice`, `getWriteLog`, `getConfigPending`,
|
|
680
744
|
`getPoisonedChannels`, `getMissingParamsetDescriptions`, `getCallbackLog`, `getTempKey`,
|
package/lib/control.js
CHANGED
package/lib/faults.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Type declarations for lib/faults.js (`require('hm-simulator/lib/faults.js')`).
|
|
2
|
+
|
|
3
|
+
/** An XML-RPC fault: what the interface process answers. */
|
|
4
|
+
export interface FaultEntry {
|
|
5
|
+
faultCode: number;
|
|
6
|
+
faultString: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** The names of the fault table's entries. */
|
|
10
|
+
export type FaultName =
|
|
11
|
+
| 'unknownMethod'
|
|
12
|
+
| 'unknownInstance'
|
|
13
|
+
| 'unknownParamset'
|
|
14
|
+
| 'unknownParameter'
|
|
15
|
+
| 'unknownLink'
|
|
16
|
+
| 'readOnly'
|
|
17
|
+
| 'typeError'
|
|
18
|
+
| 'outOfRange'
|
|
19
|
+
| 'invalidValue'
|
|
20
|
+
| 'notSupported'
|
|
21
|
+
| 'notReachable'
|
|
22
|
+
| 'invalidArguments';
|
|
23
|
+
|
|
24
|
+
/** A fault table: every name above, plus whatever an override added. */
|
|
25
|
+
export type FaultTable = Record<FaultName, FaultEntry> & Record<string, FaultEntry>;
|
|
26
|
+
|
|
27
|
+
/** hmipserver 3.89.8, measured 2026-09-05 - the default. */
|
|
28
|
+
export declare const DEFAULT_FAULTS: FaultTable;
|
|
29
|
+
/** rfd 3.89.8, measured 2026-09-05. */
|
|
30
|
+
export declare const BIDCOS_FAULTS: FaultTable;
|
|
31
|
+
/** The measured tables by name, for `new HmSim({faults: FAULT_TABLES.bidcos})`. */
|
|
32
|
+
export declare const FAULT_TABLES: {hmip: FaultTable; bidcos: FaultTable};
|
|
33
|
+
|
|
34
|
+
/** Error carrying an XML-RPC fault. */
|
|
35
|
+
export declare class RpcFault extends Error {
|
|
36
|
+
constructor(faultCode: number, faultString: string, detail?: string);
|
|
37
|
+
faultCode: number;
|
|
38
|
+
faultString: string;
|
|
39
|
+
detail?: string;
|
|
40
|
+
/** The struct a BIN-RPC fault carries as its body. */
|
|
41
|
+
toStruct(): FaultEntry;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** A fault factory bound to a (possibly overridden) table. */
|
|
45
|
+
export declare function createFaults(overrides?: Partial<Record<FaultName | (string & {}), Partial<FaultEntry>>>): {
|
|
46
|
+
table: FaultTable;
|
|
47
|
+
fault: (name: FaultName | (string & {}), detail?: string) => RpcFault;
|
|
48
|
+
};
|
package/lib/method-help.js
CHANGED
|
@@ -55,4 +55,18 @@ module.exports = {
|
|
|
55
55
|
restoreConfigToDevice: 'void restoreConfigToDevice(string address) - write the cached configuration to the device',
|
|
56
56
|
determineParameter:
|
|
57
57
|
'void determineParameter(string address, string paramsetKey, string parameterId) - read a parameter from the device',
|
|
58
|
+
getKeyMismatchDevice:
|
|
59
|
+
'string getKeyMismatchDevice(boolean reset) - the serial of a device that holds another key, reset clears it',
|
|
60
|
+
addDevice: 'struct addDevice(string serialNumber) - pair one device by its serial; BidCos only',
|
|
61
|
+
suppressServiceMessages:
|
|
62
|
+
'void suppressServiceMessages(string channelAddress, string parameter, boolean suppress) - suppress a service message, an empty parameter for all; HmIP only',
|
|
63
|
+
getSuppressedServiceMessages:
|
|
64
|
+
'array getSuppressedServiceMessages(string channelAddress) - the suppressed service parameters of a channel; HmIP only',
|
|
65
|
+
getMetadata: 'ValueType getMetadata(string address, string key) - a stored metadata value',
|
|
66
|
+
setMetadata: 'void setMetadata(string address, string key, ValueType value) - store a metadata value',
|
|
67
|
+
getAllMetadata: 'struct getAllMetadata(string address) - every metadata value of an address; BidCos only',
|
|
68
|
+
listReplaceableDevices: 'array listReplaceableDevices(string address) - the devices a device can replace',
|
|
69
|
+
getVersion: 'string getVersion() - the version of the interface process',
|
|
70
|
+
getLGWStatus: 'struct getLGWStatus() - the state of the LAN gateways',
|
|
71
|
+
setInterfaceClock: 'void setInterfaceClock(int utcSeconds, int offsetMinutes) - set the clock sent to the devices',
|
|
58
72
|
};
|