hm-simulator 1.3.2 → 1.5.0
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 +37 -6
- package/README.md +93 -15
- package/data/fixtures/hmip-wired.json +25645 -0
- package/data/paramset-ids.json +1 -0
- package/index.js +5 -4
- package/lib/control.js +3 -0
- package/lib/method-help.js +2 -0
- package/lib/sim.js +263 -4
- package/package.json +1 -1
- package/sim.d.ts +48 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
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.5.0 — 2026-10-30
|
|
7
|
+
|
|
8
|
+
- `getParamsetId(address, paramset)`, which answered the unknown-method fault: hmipserver's id
|
|
9
|
+
built from the device type, channel index and key (`hmipw-drbl4_2_link`), and on rfd and
|
|
10
|
+
BidCos-Wired the id the device file gives the paramset (`cc_tc_ch_wsr_link`), from the new
|
|
11
|
+
`data/paramset-ids.json` (261 BidCos device types, generated by `tools/paramset-ids.js` from
|
|
12
|
+
OpenCCU-Base's device files), with rfd's `-3 Unknown paramset` and its reading of any other key
|
|
13
|
+
as a peer address - all measured on 3.89.11. The option `paramsetIds` answers first.
|
|
14
|
+
- The fixture `data/fixtures/hmip-wired.json`: an HmIPW-DRBL4 blind actuator, HmIPW-DRI32 and
|
|
15
|
+
HmIPW-DRI16 input modules and an HmIPW-WRC6 wall button with their real descriptions (MASTER,
|
|
16
|
+
VALUES, LINK, SERVICE), and five links to the actuator whose LINK paramsets hold what the CCU's
|
|
17
|
+
WebUI writes for the shutter profile chosen (one of them as the WebUI of firmware 3.87 wrote it,
|
|
18
|
+
with the long press's `LONG_PROFILE_ACTION_TYPE` 5 the current WebUI no longer writes).
|
|
19
|
+
- The option `paramsets` (and the fixture property of that name for `--devices`): the stored
|
|
20
|
+
values MASTER, VALUES, SERVICE and link paramsets start with, on top of the defaults.
|
|
21
|
+
- The interface option `stickyWriteEvents` (default `true`, as before): with `false`, a client's
|
|
22
|
+
`setValue` or `putParamset(VALUES)` on a sticky datapoint (`FLAGS & 16`, the acknowledgement of
|
|
23
|
+
`STICKY_UNREACH`) changes the value and sends no event. A registered client on rfd 3.89.11 got
|
|
24
|
+
none when another client acknowledged the message, so a client that waits for the event shows
|
|
25
|
+
the device as "was unreachable" until its next read; a consumer's test can now ask for that
|
|
26
|
+
(found through occulited's service messages).
|
|
27
|
+
|
|
28
|
+
## 1.4.0 — 2026-10-03
|
|
29
|
+
|
|
30
|
+
- `setInstallModeWithWhitelist(on, time, [{ADDRESS, KEY_MODE, KEY}])` on hmipserver, which answered
|
|
31
|
+
the unknown-method fault: it opens the install mode for the listed SGTINs (Homematic Manager's
|
|
32
|
+
pairing with the key from the sticker), `on: false` closes it. The scenario call `scriptInclusion`
|
|
33
|
+
puts an HmIP device in reach of the next install mode: it joins, or - with a whitelist `LOCAL` key
|
|
34
|
+
that is not its own - is declined, nothing joins and the device stays in reach; `getInclusions`
|
|
35
|
+
answers every request with its result (`paired`, `declined`, `ignored`), `getInstallWhitelist` the
|
|
36
|
+
open install mode's list. The simulator's model, not a measurement.
|
|
37
|
+
|
|
6
38
|
## 1.3.2
|
|
7
39
|
|
|
8
40
|
- `getParamsetDescription` of an address the interface does not know answers the `unknownInstance`
|
|
@@ -10,12 +42,11 @@ GitHub release notes.
|
|
|
10
42
|
as both interface processes do on 3.89.11; it answered `''`. A paramset the channel does not list
|
|
11
43
|
answers the new table entry `unknownParamsetDescription` (`-3 Unknown Paramset` / `-3 Unknown
|
|
12
44
|
paramset`, measured); a paramset the channel has but the description set lacks still answers `''`
|
|
13
|
-
(
|
|
45
|
+
(found through node-red-contrib-ccu's handling of the fault on a real CCU).
|
|
14
46
|
- `getLinkPeers` of a device address faults on `rfd` with the `notSupported` entry (`-1 Failure`
|
|
15
47
|
under rfd's table, as rfd 3.89.11 answers; `-1 Generic error` under the default one), where it
|
|
16
48
|
answered the peers of all channels; on hmipserver and the other interfaces it answers the channels'
|
|
17
|
-
lists one after the other, a peer linked with two of the channels twice, as hmipserver 3.89.11 does
|
|
18
|
-
(B-4).
|
|
49
|
+
lists one after the other, a peer linked with two of the channels twice, as hmipserver 3.89.11 does.
|
|
19
50
|
|
|
20
51
|
## 1.3.1
|
|
21
52
|
|
|
@@ -23,14 +54,14 @@ paramset`, measured); a paramset the channel has but the description set lacks s
|
|
|
23
54
|
`rfd` - a relay's own button on the relay, a dimmer's channel on its virtual channels - as rfd
|
|
24
55
|
3.89.11 does although such a link works; filtered by an address the link carries its stored flags,
|
|
25
56
|
0, as rfd answers there too. A test that shows a client how it handles rfd's flag can now make the
|
|
26
|
-
link with `addLink` instead of seeding it (
|
|
57
|
+
link with `addLink` instead of seeding it (found through Homematic Manager's links list).
|
|
27
58
|
- `replaceDevice` answers `true`, as the specification's `bool` says, where it answered `''` (a
|
|
28
59
|
client that takes the answer as the success saw a replacement that did happen as failed).
|
|
29
60
|
- rfd's `listReplaceableDevices` names only the devices of the same type that are unreachable
|
|
30
61
|
(`setReachable(iface, address, false)`); a device that still answers is not replaced.
|
|
31
62
|
- The declarations gain `clients` (the registered logic layers per interface, read-only, `Client`),
|
|
32
63
|
`dispatch` with its `DispatchContext` (the servers' entry, which a test may wrap to record calls),
|
|
33
|
-
and `replaceDevice`'s `true` (
|
|
64
|
+
and `replaceDevice`'s `true` (found through Homematic Manager's tests on 1.3.0).
|
|
34
65
|
|
|
35
66
|
## 1.3.0
|
|
36
67
|
|
|
@@ -113,7 +144,7 @@ paramset`, measured); a paramset the channel has but the description set lacks s
|
|
|
113
144
|
the members in `TEAM_CHANNELS`; `setTeam(channel, team)` moves it and deletes a team nobody is
|
|
114
145
|
left in, `setTeam(channel, '')` puts it back into a team of its own, created like the one it
|
|
115
146
|
left (`newDevices`, `deleteDevices`, `updateDevice` to the logic layers). The shape is rfd's
|
|
116
|
-
as Homematic Manager
|
|
147
|
+
as Homematic Manager read it from a CCU3; when rfd deletes and creates the team devices
|
|
117
148
|
is the simulator's model, not a measurement.
|
|
118
149
|
|
|
119
150
|
## 1.0.0
|
package/README.md
CHANGED
|
@@ -122,17 +122,17 @@ that starts with the bytes `Bin` is BIN-RPC, anything else XML-RPC over HTTP.
|
|
|
122
122
|
|
|
123
123
|
**Incoming RPC methods.**
|
|
124
124
|
|
|
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)
|
|
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`, `setInstallModeWithWhitelist` (hmipserver), `getInstallMode`, `addDevice` (BidCos only), `getKeyMismatchDevice` (rfd, hmipserver) |
|
|
129
|
+
| paramsets | `getParamsetDescription`, `getParamsetId`, `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) |
|
|
136
136
|
|
|
137
137
|
Every write is checked against the paramset description (type, range, `VALUE_LIST`,
|
|
138
138
|
`OPERATIONS`) and answered the way the interface process answers it - see
|
|
@@ -196,6 +196,8 @@ UTF-8. BIN-RPC strings go out as ISO-8859-1, as rfd sends them.
|
|
|
196
196
|
| `newDevices` | `{}` | devices that appear when the install mode is switched on, `{<iface>: {devices, delay}}` |
|
|
197
197
|
| `defaultRssi` | `-65` | what `rssiInfo` answers where a device has no RSSI datapoint |
|
|
198
198
|
| `metadata` | `{}` | what `getMetadata` answers before any `setMetadata`, `{<iface>: {<address>: {<key>: value}}}` |
|
|
199
|
+
| `paramsets` | `{}` | stored values to start with, `{<iface>: {<address>: {<MASTER\|VALUES\|SERVICE\|peer>: {}}}}` |
|
|
200
|
+
| `paramsetIds` | `{}` | what `getParamsetId` answers first, `{<iface>: {<address>: {<paramset>: id}}}` |
|
|
199
201
|
| `config.listenAddress` | all interfaces | `'127.0.0.1'` in tests |
|
|
200
202
|
| `config.binrpcListenPort` | – | rfd |
|
|
201
203
|
| `config.xmlrpcListenPort` | – | hmipserver |
|
|
@@ -226,6 +228,7 @@ UTF-8. BIN-RPC strings go out as ISO-8859-1, as rfd sends them.
|
|
|
226
228
|
| `pingDelay` | `0` | milliseconds between `ping` and its `PONG` |
|
|
227
229
|
| `startDelay` | `0` | milliseconds after `whenReady()` until the port accepts connections: a process that starts late (`sim.ports` knows the port from the start) |
|
|
228
230
|
| `unreachWrites` | `'accept'` | what `setValue`/`putParamset` to an unreachable device answer: `'accept'`, or `'fault'` (`notReachable`). The simulator's model, not a measurement |
|
|
231
|
+
| `stickyWriteEvents` | `true` | `false`: a client's `setValue`/`putParamset` on a sticky datapoint (`FLAGS & 16`, the acknowledgement of `STICKY_UNREACH`) sends no event, see [Device and radio health](#device-and-radio-health) |
|
|
229
232
|
| `firmwareUpdateDelay` | `0` | milliseconds per step of a firmware update |
|
|
230
233
|
| `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
234
|
| `version` | `'2.6.0'` for `rfd` and `wired`, `'3.89.11.20260919'` for `hmip` | what `getVersion` answers; the rest has no `getVersion` |
|
|
@@ -246,6 +249,14 @@ sim.getDevice('rfd', 'LAB0000002:1'); // the description, false when unknown
|
|
|
246
249
|
// a device that holds another system's key: the next install mode hears it (getKeyMismatchDevice
|
|
247
250
|
// names it) until setTempKey('their-key') lets it pair; addDevice('LAB0000009') does the same
|
|
248
251
|
sim.scriptKeyMismatch('rfd', 'LAB0000009', {key: 'their-key', devices: [device, channel0, channel1]});
|
|
252
|
+
// an HmIP device in factory state asks the next install mode to join; with a whitelist whose LOCAL
|
|
253
|
+
// key is not its key it is declined, and stays in reach for the next one
|
|
254
|
+
sim.scriptInclusion('hmip', '3014F711A000000000000088', {
|
|
255
|
+
key: '00112233445566778899AABBCCDDEEFF',
|
|
256
|
+
devices: [hmipDevice],
|
|
257
|
+
});
|
|
258
|
+
sim.getInclusions('hmip'); // [{sgtin, result: 'paired' | 'declined' | 'ignored', ts}]
|
|
259
|
+
sim.getInstallWhitelist('hmip'); // the open install mode's [{ADDRESS, KEY_MODE, KEY}], [] without one
|
|
249
260
|
```
|
|
250
261
|
|
|
251
262
|
**Values and events**
|
|
@@ -311,6 +322,13 @@ sim.regaSim.scripts; // every script the ReGa mock received
|
|
|
311
322
|
with `setServiceMessage`. `STICKY_UNREACH` stays after the device is back until a client writes
|
|
312
323
|
it `false`, as rfd does. A write to an unreachable device is accepted unless `unreachWrites` is
|
|
313
324
|
`'fault'`.
|
|
325
|
+
- That acknowledgement is answered with the channel's events, like every other write. On rfd
|
|
326
|
+
3.89.11 a registered client got **no** event when another client wrote `STICKY_UNREACH` `false`
|
|
327
|
+
(observed once, from the receiving client's log; a second measurement is pending): the
|
|
328
|
+
interface option `stickyWriteEvents: false` models that - a client's write to a datapoint with
|
|
329
|
+
the sticky flag (`FLAGS & 16`) changes the value and sends nothing, so only a read finds it
|
|
330
|
+
acknowledged. Use it to test that a client does not wait for an event that never comes. The
|
|
331
|
+
default stays `true` until the measurement is repeated.
|
|
314
332
|
- The radio module is the HmIP device whose address is the last 14 characters of the interface's
|
|
315
333
|
address in `listBidcosInterfaces` (its SGTIN), or a device of a radio module's type
|
|
316
334
|
(`RPI-RF-MOD`, `HmIP-RFUSB`); without one only `listBidcosInterfaces` changes.
|
|
@@ -412,6 +430,7 @@ HMIP-PS, HMIP-SWDO, HMIP-WTH, HmIP-SMI and a radio module). Without `paramsetDes
|
|
|
412
430
|
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
413
431
|
| `data/fixtures/lab-2026-09.json` | real devices of four test systems with the descriptions of their exact firmware, links and radio modules - the recommended one |
|
|
414
432
|
| `data/fixtures/devices.json` | generated from node-red-contrib-ccu's `paramsets.json`: real descriptions, synthesised channel indexes - HmIP-PDT, HmIPW-DRS8, HmIPW-DRI16, HmIPW-DRAP, HM-LC-Sw1-Pl, HM-CC-RT-DN |
|
|
433
|
+
| `data/fixtures/hmip-wired.json` | an HmIP-Wired distribution board: HmIPW-DRBL4, HmIPW-DRI32, HmIPW-DRI16, HmIPW-WRC6, links to the DRBL4 with the LINK paramsets the WebUI writes |
|
|
415
434
|
| `data/fixtures/lab-devices.json` | a real `listDevices` of two CCUs on firmware 3.89.8 (2026-09-05), no descriptions of its own - pass the ones of `devices.json` or the bundled set alongside |
|
|
416
435
|
|
|
417
436
|
**`data/fixtures/lab-2026-09.json`**: four test systems (openccu-lite, the interface processes of
|
|
@@ -435,6 +454,30 @@ Real hardware's oddities stay: the CCU's own `HmIP-RCV-50` sends a trailing **em
|
|
|
435
454
|
`CHILDREN`, for instance. The file is also a device file for the command line (`--devices`; add
|
|
436
455
|
`--wired-port 0` or a port for BidCos-Wired).
|
|
437
456
|
|
|
457
|
+
**`data/fixtures/hmip-wired.json`**: a wired blind actuator HmIPW-DRBL4 (firmware 1.6.0, four
|
|
458
|
+
channels run as shutters), the input modules HmIPW-DRI32 (1.2.2) and HmIPW-DRI16 (1.4.6, as in
|
|
459
|
+
`lab-2026-09.json`) with their inputs in key mode, and the wall button HmIPW-WRC6 (1.0.8). The
|
|
460
|
+
descriptions of the DRBL4, DRI32 and WRC6 are hmipserver's answers as
|
|
461
|
+
[pydevccu](https://github.com/danielperna84/pydevccu) (MIT) recorded them. Five links go to the
|
|
462
|
+
DRBL4, and their `paramsets` hold what the CCU's WebUI writes for the profile chosen - the presets
|
|
463
|
+
of its easymode file (`SHUTTER_VIRTUAL_RECEIVER/MULTI_MODE_INPUT_TRANSMITTER_1.tcl` and
|
|
464
|
+
`…/KEY_TRANSCEIVER.tcl`, the first value where it lists several) on the description's defaults. The
|
|
465
|
+
WebUI is eQ-3's current source, except for one link made the way the WebUI of firmware 3.87 made it:
|
|
466
|
+
its shutter profiles still wrote `LONG_PROFILE_ACTION_TYPE` 5 for the long press, where the current
|
|
467
|
+
one writes 1 (changed in June 2026), so a CCU keeps links of both kinds.
|
|
468
|
+
|
|
469
|
+
| Sender | Receiver | Profile |
|
|
470
|
+
| ---------- | ----------- | ------------------------------------------- |
|
|
471
|
+
| DRI32 `:1` | DRBL4 `:2` | 3, "open / closed & up / down" |
|
|
472
|
+
| DRI32 `:2` | DRBL4 `:3` | 3, "open / closed & up / down" (WebUI 3.87) |
|
|
473
|
+
| DRI16 `:1` | DRBL4 `:6` | 1, "open / up" |
|
|
474
|
+
| WRC6 `:1` | DRBL4 `:10` | 3, "open / closed & up / down" |
|
|
475
|
+
| WRC6 `:2` | DRBL4 `:14` | 4, "move to position" |
|
|
476
|
+
|
|
477
|
+
Pass the four properties (`devices`, `paramsetDescriptions`, `links`, `paramsets`) to the
|
|
478
|
+
constructor, or the file to `--devices`. `tools/fixture-hmip-wired.js` builds it from a pydevccu
|
|
479
|
+
package and an OpenCCU-Base checkout.
|
|
480
|
+
|
|
438
481
|
**How descriptions are found.** A description is looked up by
|
|
439
482
|
`<interface>/<type>/<firmware>/<version>/<channel type>/<paramset>`, and a device reports the
|
|
440
483
|
firmware it runs - which a description set often does not have. Such a device uses the description
|
|
@@ -484,7 +527,7 @@ a run of the generator, or, better, by dumping a CCU that has one.
|
|
|
484
527
|
## Interface behaviour, measured
|
|
485
528
|
|
|
486
529
|
Where the simulator imitates an interface process, this says whether the shape was measured on a
|
|
487
|
-
CCU or is the simulator's model. The measurements were made for Homematic Manager
|
|
530
|
+
CCU or is the simulator's model. The measurements were made for Homematic Manager
|
|
488
531
|
on CCUs with firmware 3.89.8 and 3.89.x.
|
|
489
532
|
|
|
490
533
|
### Direct links
|
|
@@ -535,6 +578,29 @@ What a `putParamset MASTER` does, per interface (`interfaces.<iface>.configPendi
|
|
|
535
578
|
The two models are the explanations that competed before the measurement (Homematic Manager issue
|
|
536
579
|
#98); they stay for applications that want to test against them.
|
|
537
580
|
|
|
581
|
+
### Paramset ids
|
|
582
|
+
|
|
583
|
+
`getParamsetId(address, paramset)` is the CCU's own name of a paramset; its WebUI picks the form of a
|
|
584
|
+
channel or a link side by it (`easymodes/<id>.tcl`). Measured 2026-10-30 on firmware 3.89.11:
|
|
585
|
+
|
|
586
|
+
- **hmipserver builds it** from the device type, the channel index and the key, lower case and
|
|
587
|
+
joined by `_`: `hmipw-drbl4_2_link`, `hmipw-dri16_1_master`, `hmipw-dri16_master` for a device
|
|
588
|
+
address. It does that for any key - `VALUES`, `SERVICE`, a peer address
|
|
589
|
+
(`hmipw-dri16_1_00000000000102:1`), a name the channel does not have, `null` without one - and
|
|
590
|
+
for a channel without a LINK paramset as well. The simulator does the same on `hmip`, `virtual`
|
|
591
|
+
and `cuxd` (VirtualDevices and CUxD not measured).
|
|
592
|
+
- **rfd and hs485d answer the `id` of the `<paramset>` in the device file** (`firmware/rftypes`,
|
|
593
|
+
`firmware/hs485types`): `cc_tc_dev_master` for a device address (MASTER only), `maint_ch_master`,
|
|
594
|
+
`cc_tc_ch_wsr_link`, `hmw_input_ch_values` for a channel. Another key on a channel is taken as a
|
|
595
|
+
peer address and answers the LINK id; a paramset the address does not have - LINK or VALUES of a
|
|
596
|
+
device, LINK of a maintenance channel, any other key there - is `-3 Unknown paramset`. The
|
|
597
|
+
simulator answers from `data/paramset-ids.json` (261 device types, by type and the device file's
|
|
598
|
+
version, which is the description's `VERSION`; built by `tools/paramset-ids.js` from
|
|
599
|
+
OpenCCU-Base), the `unknownParamsetDescription` entry of the fault table for a paramset the
|
|
600
|
+
address does not list, and `''` for a type the files do not describe.
|
|
601
|
+
- An unknown address is `unknownInstance` on all of them. `paramsetIds` in the constructor options
|
|
602
|
+
answers before the rules above.
|
|
603
|
+
|
|
538
604
|
### Fault codes
|
|
539
605
|
|
|
540
606
|
The default table is **hmipserver's**, because that is the one an application has to survive
|
|
@@ -649,6 +715,17 @@ knows only its own addresses; `setInterfaceClock` is recorded, not measured (it
|
|
|
649
715
|
devices get). `addDevice(serial)` pairs only the device of `scriptKeyMismatch`, with the right
|
|
650
716
|
temporary key; any other serial is `unknownInstance`, the mismatch a `notSupported` fault.
|
|
651
717
|
|
|
718
|
+
`setInstallModeWithWhitelist(on, time, [{ADDRESS, KEY_MODE, KEY}])` (hmipserver only; the others
|
|
719
|
+
answer the unknown-method fault) opens the install mode for the listed SGTINs, as Homematic Manager
|
|
720
|
+
sends it for a device paired with the key from its sticker (`KEY_MODE: 'LOCAL'`, `KEY` the 32 hex
|
|
721
|
+
digits of the QR code), and `on: false` closes it; a list that is not an array of structs with an
|
|
722
|
+
`ADDRESS` is `invalidArguments`. Which devices it admits is the simulator's model, not a
|
|
723
|
+
measurement: a device of `scriptInclusion` joins when it is on the list and the entry's `LOCAL` key
|
|
724
|
+
is its own (or the entry names another key mode, the key server's), is **declined** when the `LOCAL`
|
|
725
|
+
key is another - nothing joins, no RPC client is told, `getInclusions` records it, the device stays
|
|
726
|
+
in reach - and is not admitted (`ignored`) when it is not on the list. Opened with `setInstallMode`,
|
|
727
|
+
the device joins.
|
|
728
|
+
|
|
652
729
|
## ReGa mock
|
|
653
730
|
|
|
654
731
|
`rega: {port: 8181, ...}` starts an HTTP server that answers `POST /<name>.exe` as the CCU's
|
|
@@ -710,8 +787,8 @@ Usage: hm-simulator [options]
|
|
|
710
787
|
as one line to stdout with "-" (the log then goes to stderr)
|
|
711
788
|
--config <file> constructor options as a .json or .js file; the flags override it
|
|
712
789
|
--devices <file> a device file: {devices: {rfd, hmip, ...}, paramsetDescriptions, links,
|
|
713
|
-
bidcosInterfaces}, such as data/fixtures/lab-2026-09.json;
|
|
714
|
-
the bundled rfd and hmip lists
|
|
790
|
+
bidcosInterfaces, paramsets}, such as data/fixtures/lab-2026-09.json;
|
|
791
|
+
default: the bundled rfd and hmip lists
|
|
715
792
|
--tls serve the XML-RPC servers over TLS with a generated certificate
|
|
716
793
|
--tls-cert-out <file> write that certificate (PEM) to the file
|
|
717
794
|
--auth <user:password> HTTP basic auth for the XML-RPC servers and ReGa
|
|
@@ -760,7 +837,8 @@ there. The flags win over the file:
|
|
|
760
837
|
arguments. The answer is `{"result": ...}`; a fault is `400` with `faultCode` and `faultString`, an
|
|
761
838
|
unknown call `404`. `GET /ports` answers the ports. The calls: `addDevice`, `removeDevice`,
|
|
762
839
|
`fireEvent`, `fireEvents`, `setValue` (the device reporting a value, as a behaviour script does),
|
|
763
|
-
`setServiceMessage`, `scriptNewDevices`, `scriptKeyMismatch`, `
|
|
840
|
+
`setServiceMessage`, `scriptNewDevices`, `scriptKeyMismatch`, `scriptInclusion`, `getInclusions`,
|
|
841
|
+
`getInstallWhitelist`, `dropConnection`, `stopInterface`, `startInterface`,
|
|
764
842
|
`restartInterface`, `injectFault`, `clearFaults`, `setReachable`, `setLowBattery`, `setDutyCycle`,
|
|
765
843
|
`setCarrierSense`, `offerFirmware`, `schedule`, `getDevice`, `getWriteLog`, `getConfigPending`,
|
|
766
844
|
`getPoisonedChannels`, `getMissingParamsetDescriptions`, `getCallbackLog`, `getTempKey`,
|