hm-simulator 1.0.0 → 1.2.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 ADDED
@@ -0,0 +1,106 @@
1
+ # Changelog
2
+
3
+ All notable changes of hm-simulator. The release workflow takes each version's section from here for the
4
+ GitHub release notes.
5
+
6
+ ## 1.2.0
7
+
8
+ - The README is rewritten for the test author (quick start, connecting a client, the scenario API
9
+ grouped, recipes, the fixtures, what is measured and what is the simulator's model), and the
10
+ changelog moved into this file.
11
+ - `data/fixtures/lab-2026-09.json`: the devices of four test systems with the paramset
12
+ descriptions of their exact firmware, their direct links and radio modules - the CCU centrals,
13
+ RPI-RF-MOD, HmIP-RFUSB, HmIP-HAP, HmIP-BBL, HMIP-WRC2, HmIP-PDT, HmIPW-DRAP/-DRI16/-DRS8,
14
+ HM-CC-TC, HM-Sec-SC, HM-LC-Sw1-Pl-2 - anonymised. `tools/dump-ccu.js` makes such a fixture from
15
+ any CCU (read only, anonymised unless told otherwise). A device file given to `--devices` brings
16
+ its `links` and `bidcosInterfaces` along.
17
+ - The calls openccu-lite's daemon makes: `logLevel` (rfd and hs485d answer the level, 5 until set;
18
+ hmipserver an empty string), `changeKey` (rfd, hmipserver; recorded in `sim.keyChanges`) and
19
+ `refreshDeployedDeviceFirmwareList` (rfd, hmipserver; recorded in
20
+ `sim.firmwareListRefreshes`), with the interfaces measured on a CCU with firmware 3.89.x.
21
+ - `init` keeps the path of an XML-RPC callback url (`http://host:port/cb/BidCos-RF`; the path used
22
+ to end up in the port), takes `https://`, and identifies a registration by its url exactly, scheme
23
+ included, as the interface processes do - an `init(url, '')` with another scheme no longer removes
24
+ it. A url that is none is a fault.
25
+ - An XML-RPC request declared ISO-8859-1 is read as ISO-8859-1 instead of UTF-8.
26
+ - Device and radio health: `setReachable` (UNREACH, and STICKY_UNREACH on BidCos until a client
27
+ clears it; `unreachWrites: 'fault'` answers writes with notReachable), `setLowBattery`,
28
+ `setDutyCycle` and `setCarrierSense` (in `listBidcosInterfaces` and, on hmip, as the radio
29
+ module's `DUTY_CYCLE_LEVEL`/`CARRIER_SENSE_LEVEL`), `offerFirmware` with the update states
30
+ `updateFirmware`/`installFirmware` then walk through, and `schedule` for a timeline of scenario
31
+ calls.
32
+ - Interface processes that misbehave: `stopInterface`, `startInterface` and `restartInterface`
33
+ (forgetting the registered clients, or calling them back as rfd does after a restart),
34
+ `interfaces.<iface>.startDelay`, `pong` and `pingDelay`, `injectFault` (delay, hang, fault,
35
+ closed connection, for the next calls of a method) and `clearFaults`, and
36
+ `listenerModel: 'measured'`: what hmipserver and rfd do with a callback server that hangs
37
+ (hmipserver holds every client's events back, rfd stops answering). `getCallbackLog()` records
38
+ every call to a client with its timing, `fireEvents()` sends bursts as `system.multicall` batches.
39
+ - The command line is usable out of process: every port may be `0`, `--ports-json <file|->`
40
+ reports the ports once every server listens, `--config` and `--devices` load options and device
41
+ files, `--wired-port`, `--tls` with `--tls-cert-out`, `--auth`, `--behavior-path`,
42
+ `--no-behaviors`, and `--control-port` serves the scenario API over HTTP on the loopback. A taken
43
+ port exits 1 with the address in the message. `behaviorPath: false` starts no behaviour scripts.
44
+ - An ENUM whose description gives `DEFAULT` as the index (1088 of the 5624 ENUMs in the bundled
45
+ descriptions) started at `-1` instead of that index, so a thermostat's `FAULT_REPORTING` was a
46
+ service message from the start.
47
+ - rfd and BidCos-Wired answer BIN-RPC and XML-RPC on the same port, as on a CCU, so a client
48
+ that talks XML-RPC to rfd can be tested too; the callbacks follow the URL a client registered
49
+ with, whichever protocol it registered over. With `tls` the XML-RPC half is HTTPS, BIN-RPC stays
50
+ plain. `interfaces.<iface>.protocols` narrows a port to one of them.
51
+ - A device whose firmware has no paramset description uses the description of the nearest
52
+ firmware of the same type and `VERSION` instead of answering `-2 Invalid device` for every
53
+ channel `listDevices` reports; the bundled CCU virtual remote (`HM-RCV-50` 2.27.8,
54
+ `BidCoS-RF:1..50`) works again. `paramsetFallback: false` switches it off,
55
+ `sim.getMissingParamsetDescriptions()` lists what is not matched exactly (reported in #1 by
56
+ @Hypnos3, cause found by @foxriver76).
57
+
58
+ ## 1.1.0
59
+
60
+ - `setTempKey` on the BidCos interfaces: the passphrase a device is taught in with, applied to
61
+ the pairings that follow; `sim.getTempKey(iface)` reads back what was set, an empty string
62
+ clears it. No cryptography. hmipserver has no such method, so it faults with unknown-method
63
+ there (Homematic Manager issue #20).
64
+ - Smoke detector teams on the BidCos interfaces: `listTeams` and `setTeam`. A channel with a
65
+ `TEAM_TAG` is in the team its `TEAM` names, a pseudo device `*<serial>` whose team channel lists
66
+ the members in `TEAM_CHANNELS`; `setTeam(channel, team)` moves it and deletes a team nobody is
67
+ left in, `setTeam(channel, '')` puts it back into a team of its own, created like the one it
68
+ left (`newDevices`, `deleteDevices`, `updateDevice` to the logic layers). The shape is rfd's
69
+ as Homematic Manager task 58 read it from a CCU3; when rfd deletes and creates the team devices
70
+ is the simulator's model, not a measurement.
71
+
72
+ ## 1.0.0
73
+
74
+ - Node >= 20.19, `binrpc` ^4.2, `homematic-xmlrpc` ^2.0; `express`, `body-parser`, `request`,
75
+ `async` and `yalm` removed. The ReGa mock runs on `node:http`, the CLI logs through `console`.
76
+ - Paramset state per device and channel for MASTER, VALUES, SERVICE and the link paramsets, with
77
+ type, range, `VALUE_LIST` and `OPERATIONS` checks on every write.
78
+ - `CONFIG_PENDING` semantics, configurable per interface: `'hmip'` and `'bidcos'` are what the
79
+ two interface processes of a CCU on firmware 3.89.8 were measured to do (Homematic Manager task
80
+ 6, 2026-09-05), `'strict'` and `'pending'` are the two hypotheses that measurement replaced.
81
+ `getPoisonedChannels()` for the channel an unknown parameter destroyed.
82
+ - Fault codes and strings measured on the same firmware, hmipserver's as the default table and
83
+ rfd's as `BIDCOS_FAULTS`.
84
+ - `data/fixtures/lab-devices.json`: an anonymised real `listDevices` of two CCUs, and the channel
85
+ layouts in `tools/device-layouts.json` corrected from it.
86
+ - Links: `getLinks`, `getLinkPeers`, `getLinkInfo`, `setLinkInfo`, `addLink`, `removeLink`,
87
+ `activateLinkParamset`, and link paramsets addressed by the peer's address.
88
+ - Interface and service methods: `rssiInfo`, `listBidcosInterfaces`, `setBidcosInterface`,
89
+ `getServiceMessages`, `setInstallMode`/`getInstallMode` with scripted `newDevices`,
90
+ `deleteDevice`, `replaceDevice`, `reportValueUsage`, `updateFirmware`, `installFirmware`,
91
+ `clearConfigCache`, `restoreConfigToDevice`, `determineParameter`, `getDeviceDescription`,
92
+ `getValue`, `system.methodHelp`, `system.multicall`.
93
+ - Fault responses on both transports, with an overridable fault table.
94
+ - VirtualDevices and CUxD servers, BidCos-Wired, optional TLS with a generated certificate and
95
+ optional HTTP basic auth.
96
+ - ReGa mock with `getChannels`, `getValues`, rename/program scripts and a script log.
97
+ - Scenario API: `addDevice`, `removeDevice`, `fireEvent`, `setServiceMessage`, `scriptNewDevices`,
98
+ `dropConnection`, `getWriteLog`, `getConfigPending`.
99
+ - `whenReady()`, port `0` support and `sim.ports`.
100
+ - Fixture generator `tools/fixtures-from-paramsets.js` and generated real device fixtures.
101
+ - ESLint 9 + Prettier, `node --test`, GitHub Actions on Node 20/22/24.
102
+
103
+ ## 0.1.1 and earlier
104
+
105
+ `init`, `ping`, `system.listMethods`, `getParamsetDescription`, `listDevices`, `setValue`, events
106
+ through behaviour scripts, ReGa mock.