VT_VACATIONPROG: hard-coded enable_byte=6 rejected by Siemens RVS21 — should be 1#812
Closed
remidebette wants to merge 1 commit into
Closed
VT_VACATIONPROG: hard-coded enable_byte=6 rejected by Siemens RVS21 — should be 1#812remidebette wants to merge 1 commit into
enable_byte=6 rejected by Siemens RVS21 — should be 1#812remidebette wants to merge 1 commit into
Conversation
Owner
|
As mentioned in your other bug report, please do not use AI for anything BSB-LAN specific (other than general C++ coding issues). AI has absolutely no clue about the protocol and starts to hallucinate at some point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclosure: done with the help of Claude Code
Relates to #811
Publishing as a draft because I am not sure this is the right fix, and anyways it does not fully work yet (active vacation mode works after this fix, but not inactive vacation mode)
Summary
BSB_LAN_defs.hdeclaresenable_byte=6forVT_VACATIONPROG. On a Siemens RVS21.831F/127 controller, this causes every SET attempt against vacation parameters (642/643 and CC2 equivalents 652/653) to be rejected by the heater — the BSB-LAN web UI / MQTT writes never propagate to the heater, even though the device reports the SET as successful (because the optimistic re-query path also misreads the response). Reading vacation values that were configured via the heater's hardware screen also fails to render correctly: BSB-LAN shows---for active periods.Changing the table entry from
6to1fixes both reads and writes for the active path:The
enable_bytefield's own documentation inBSB_LAN_defs.h:596notes both1and6are valid conventions across heaters;VT_VACATIONPROGis the only "date-shaped" type currently set to6. All sibling types in the same block (VT_DATETIME,VT_YEAR,VT_DAYMONTH,VT_TIME) use1, which is consistent with the validity-byte convention checked byprintDateTime()ininclude/print_telegram.h.Reproduction
programWriteMode = 1(Standard) — params 642/643 haveDEFAULT_FLAG, so writable.Symptoms before the fix
07.05., got---.GET /S642!0=15.07.. BSB-LAN reports success and re-renders15.07., but the heater hardware screen still shows the old date and the period is never engaged.Bus traces
Reading a hardware-configured period (heater answers, BSB-LAN displays
---):The heater returned a valid value (byte 0 = 0).
printDateTime()correctly renders this as07.05.. Earlier observations where this came back as01 00 05 09 …were caused by prior failed SET attempts that left the heater in a transient state — see "Pre-fix corrupted-state observation" below.Attempting an active SET before the fix (
enable_byte=6):After the fix (
enable_byte=1):Heater ACKs the SET; the subsequent QUR returns the new date with byte 0 = 0;
printDateTime()renders08.05.correctly.Root cause
The
enable_bytefield is used by the SET path atBSB_LAN.ino:3256-3258:Siemens RVS21 expects the SET telegram's first payload byte to be
0x01to activate a vacation period. Withenable_byte=6, BSB-LAN was sending0x06, which the controller rejects (or silently mishandles in some firmware revisions).The display path at
include/print_telegram.h:532checksif (msg[bus->getPl_start()]==0)for value validity. After a successful SET via the fixed path, the heater's QUR response contains0x00in byte 0 — so the display path correctly renders the date. No change is needed inprint_telegram.h— the convention there is already correct; only theenable_bytetable entry was inconsistent.Caveat: clear-via-SET (
---payload) is unrelated and remains unsolvedSetting
---to disable a vacation period still NACKs on RVS21 with error code0x06, regardless of payload shape. Tested:00 00 05 07 00 00 00 00 17(enable=0, dates carried over — currentset()behavior atBSB_LAN.ino:3351-3357)00 00 00 00 00 00 00 00 17(enable=0, dates zeroed, date_flag=0x17 preserved)00 00 00 00 00 00 00 00 00(everything zero)The RVS21 appears not to support disabling a vacation period through the BSB write path — its hardware UI must use a separate "delete" mechanism. This is not an issue with BSB-LAN; the existing carry-over-and-flip-byte logic in
set()is correct for controllers that accept disable-via-SET. Users on RVS21 who want to "clear" a vacation period via HA/MQTT can soft-clear by writing both 642 and 643 to a date in the past (e.g.01.01.). I'm flagging this here only so anyone reading the PR doesn't expect---to start working as a side-effect of theenable_bytechange.Pre-fix corrupted-state observation
Before fixing
enable_byte, repeated failed SET attempts (sendingenable=6orenable=5) appear to leave the heater in a transient state where reads return01 00 dd mm 00 00 00 00 17rather than00 00 dd mm 00 00 00 00 17. In that stateprintDateTime()correctly identifies the response as "invalid" (byte 0 ≠ 0) and renders---, even though the heater's hardware screen continues to display the configured dates. After theenable_bytefix and a clean SET cycle from BSB-LAN, the byte-0 field returns to0x00and rendering works. This was a red herring during initial investigation but worth knowing about for anyone bisecting similar reports.Risk to other controllers
enable_byte=6was the upstream value on day one — anyone whose controller was actually acceptingenable=6forVT_VACATIONPROGwould regress with this change. Mitigations:enable_bytefield is documented (BSB_LAN_defs.h:596) as taking either1or6for "regular commands", with the choice depending on the controller. We don't know the population split.VT_DATETIME,VT_YEAR,VT_DAYMONTH,VT_TIME) use1and are known to work across many controllers including Siemens RVS — strong evidence that1is the more common convention.1is the minimal-risk first step.I've been running with
enable_byte=1for several days on the RVS21.831F/127 with no observed regressions to other date-handling parameters.Hardware / firmware tested