Draft
Write 32-bit modbus registers high-word-first on S series pumps#316
Conversation
Co-authored-by: yozik04 <2420038+yozik04@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix writable 32-bit registers word order on S-series Modbus TCP
Write 32-bit modbus registers high-word-first on S series pumps
Sep 2, 2026
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.
Pull Request Type
Please select the type of your PR:
Description
Heatpump model: S1256 (all S series)
Firmware version: N/A
S series pumps are asymmetric over modbus: 32-bit read responses come back low-word-first, but FC16 writes must be high-word-first.
word_swapwas applied to both directions, so no setting worked for both — withword_swap: trueevery 32-bit write was ACKed and silently discarded, withfalseevery read decoded garbage.Ground truth for
40012"Degree minutes" (s32, factor 10) at 20.5 °C: the pump reads back[205, 0]and only accepts[0, 205]on write.Changes
CoilDataEncoderModbus: new optionalword_swap_writeoverriding the word order used for encoding only. Unset (None) keepsword_swapfor both directions, so nothing changes for existing callers.Modbus: passesword_swap_write=Falsewhen the pump model isSeries.S, so 32-bit writes always go out high-word-first while reads keep honouringword_swap. F series (Modbus 40, which has the symmetricModbus40 Word Swapregister 48852) and pumps with no model set are unaffected.Checklist