node-red-contrib-velbus-2026 0.8.1 → 0.9.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_FORUM.md +81 -0
- package/HANDOVER.md +906 -0
- package/README.md +6 -2
- package/lib/energy-types-20.js +29 -0
- package/nodes/velbus-blind/velbus-blind.html +1 -1
- package/nodes/velbus-blind-20/velbus-blind-20.html +1 -1
- package/nodes/velbus-blind-s/velbus-blind-s.html +1 -1
- package/nodes/velbus-button/velbus-button.html +1 -1
- package/nodes/velbus-energy/velbus-energy.html +167 -0
- package/nodes/velbus-energy/velbus-energy.js +365 -0
- package/nodes/velbus-glass-panel/velbus-glass-panel.html +1 -1
- package/nodes/velbus-meteo/velbus-meteo.html +1 -1
- package/nodes/velbus-pir/velbus-pir.html +1 -1
- package/nodes/velbus-pir-20/velbus-pir-20.html +1 -1
- package/nodes/velbus-sensor/velbus-sensor.html +1 -1
- package/nodes/velbus-sensor-20/velbus-sensor-20.html +1 -1
- package/nodes/velbus-thermostat/velbus-thermostat.html +1 -1
- package/package.json +3 -2
- package/velbus-2026-repo.bundle +0 -0
package/CHANGELOG_FORUM.md
CHANGED
|
@@ -14,6 +14,87 @@ All feedback via GitHub issues, with examples and debug captures where possible.
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
## v0.9.1 — 08/07/2026
|
|
18
|
+
|
|
19
|
+
### Address validation bug — 12 of 19 node types, any address ≥100 decimal
|
|
20
|
+
|
|
21
|
+
- **Reported by Stuart:** adding a velbus-sensor node and selecting VMB4AN
|
|
22
|
+
from the scan dropdown showed a red "not configured correctly" triangle
|
|
23
|
+
no matter what was selected.
|
|
24
|
+
- **Root cause:** every node using the `address` field (as opposed to
|
|
25
|
+
`moduleAddr`, used by relay/dimmer nodes, which were unaffected) validated
|
|
26
|
+
it against `/^(0x)?[0-9a-fA-F]{1,2}$/` — a pattern that only ever made
|
|
27
|
+
sense if `address` were stored as a 1-2 character hex string. But
|
|
28
|
+
`oneditsave` on every one of these nodes stores it as a plain decimal
|
|
29
|
+
**number** instead (`parseInt(...)`). Since regex `.test()` coerces its
|
|
30
|
+
argument to a string first, any address whose decimal representation is
|
|
31
|
+
1-2 digits (1-99) happened to accidentally still match — every digit
|
|
32
|
+
0-9 is also a valid hex character — masking the bug for low addresses.
|
|
33
|
+
Any address **100 or higher** (`0x64`+) produces a 3-digit decimal string,
|
|
34
|
+
which cannot match a `{1,2}`-length pattern, so validation always failed.
|
|
35
|
+
100-254 is a very ordinary real-world address range — this was a live,
|
|
36
|
+
fully user-facing bug, not an edge case.
|
|
37
|
+
- **Affected nodes (12):** velbus-blind, velbus-blind-s, velbus-blind-20,
|
|
38
|
+
velbus-button, velbus-energy, velbus-glass-panel, velbus-meteo,
|
|
39
|
+
velbus-pir, velbus-pir-20, velbus-sensor, velbus-sensor-20,
|
|
40
|
+
velbus-thermostat. Confirmed relay/dimmer/relay-20/dimmer-20 (which use
|
|
41
|
+
`moduleAddr`, no custom validate function) and velbus-clock (no fixed
|
|
42
|
+
address at all) were never affected.
|
|
43
|
+
- **Fix:** replaced the regex with a direct numeric range check
|
|
44
|
+
(`parseInt(v)` between 1 and 254 inclusive) — correct regardless of
|
|
45
|
+
whether the stored value is a number, a decimal string, or a legacy hex
|
|
46
|
+
string (`parseInt` auto-detects a `0x` prefix), so old saved flows keep
|
|
47
|
+
working unchanged.
|
|
48
|
+
- Verified: syntax-checked the extracted JS from all 12 files, and
|
|
49
|
+
confirmed the corrected logic against the actual failing range (50/80/99
|
|
50
|
+
→ true both before and after; 100/150/254 → **false before, true after**;
|
|
51
|
+
0/255/empty/non-numeric → false, correctly rejected as invalid addresses
|
|
52
|
+
both before and after).
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## v0.9.0 — 08/07/2026
|
|
57
|
+
|
|
58
|
+
### velbus-energy — new node (19th node), VMBPSUMNGR-20
|
|
59
|
+
|
|
60
|
+
- **Closes the last "not yet built" item on the module registry** —
|
|
61
|
+
VMBPSUMNGR-20 (0x04), the power-supply-manager module, following the same
|
|
62
|
+
V2 architectural pattern as `velbus-sensor-20` (firmware/type check, name
|
|
63
|
+
auto-retrieval, standard startup RTR).
|
|
64
|
+
- Handles: `0xED` module status (PSU load %ages, alarm bitmasks, shared
|
|
65
|
+
program/clock-alarm/sunrise/sunset byte), `0x00` real-time alarm events
|
|
66
|
+
(arrives via primary address as one bitmask, via sub-address1 as a second
|
|
67
|
+
bitmask — same command, discriminated by source address, merged into
|
|
68
|
+
running alarm state so a partial update never discards the other half),
|
|
69
|
+
`0xA1` warranty counter (31-bit hours-in-operation + expired flag, packed
|
|
70
|
+
across 4 bytes), `0xA2` PSU load status (mode + 3 load percentages), `0xA3`
|
|
71
|
+
PSU values (wattage/voltage/amperage per rail, one message per PSU/PSUOut).
|
|
72
|
+
- **Does not reimplement the shared V2 "system" commands** (real-time clock,
|
|
73
|
+
date, DST, sunrise/sunset, clock alarm) present throughout this PDF —
|
|
74
|
+
`velbus-clock` already owns broadcasting those; duplicating them here
|
|
75
|
+
would just be dead weight.
|
|
76
|
+
- **Two real errors found in Velbus's own protocol PDF while implementing
|
|
77
|
+
this, both documented in the node's source comments:**
|
|
78
|
+
- The document header reads "VMB8IN-20 PROTOCOL" throughout — an
|
|
79
|
+
un-retitled template artifact from a different module's document.
|
|
80
|
+
- The `0xA3` (PSU values status) section labels three different byte
|
|
81
|
+
positions all as "DATABYTE6" (voltage high, amperage high, amperage
|
|
82
|
+
low) — internally inconsistent with its own stated 8-byte length.
|
|
83
|
+
Reconstructed from the byte count as DATABYTE5/6 = voltage hi/lo,
|
|
84
|
+
DATABYTE7/8 = amperage hi/lo. Same category as the temperature-divisor
|
|
85
|
+
and build-number-mislabelling issues already known elsewhere in this
|
|
86
|
+
project — worth remembering if re-checking against the source PDF.
|
|
87
|
+
- Verified with the mock-RED harness: every packet type (module type
|
|
88
|
+
identification, both alarm bitmask sources, module status, warranty
|
|
89
|
+
counter, PSU load, PSU values, name assembly across all three name-part
|
|
90
|
+
commands) exercised with hand-checked checksums; outgoing commands
|
|
91
|
+
(`get_status`, `get_warranty`, `get_name`) checksum-verified by hand
|
|
92
|
+
against the actual bytes produced. **Not yet sent to a real bus** — no
|
|
93
|
+
VMBPSUMNGR-20 has been confirmed present on a scanned bus yet (see the
|
|
94
|
+
handover's outstanding-verification notes).
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
17
98
|
## v0.8.1 — 07/07/2026
|
|
18
99
|
|
|
19
100
|
### velbus-clock — set_alarm command (global + local, one command)
|