[modbus.lambda] Fix endianness for VdAE and VdAQ 32-bit registers#19749
[modbus.lambda] Fix endianness for VdAE and VdAQ 32-bit registers#19749
Conversation
Co-authored-by: lewie <5707426+lewie@users.noreply.github.com>
|
Cool, Copilot was able to create the changes as a bug fix. I'm amazed; I haven't been here in far too long. |
|
@chilobo FYI |
|
I would like to check this change first. Right now, without the change, the values shown are correct. |
|
@chilobo, first, thanks for this Binding! Are you sure, please check it. |
|
I am confused. The values shown in "my" binding reflected the values shown in the UI of my Lambda. I got the jar of the swap-version from I have the software version V1.1.3 on my lambda. |
|
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/lambda-heat-pump-in-openhab/156799/99 |
Let's wait for answers in: |
|
Okay, we need to test that more thoroughly. Thank you for your feedback @chilobo. Hmm, I have same software version V1.1.3 on my lambda. |
|
@chilobo, I tested too to replace it on my OH now. It seems to be tricky. |
|
I have a Lambda version EU08L. You can temporarily query directly via Modbus. I think the values for your heat pump are correct without word swap. My results: I only get the correct values with Word Swap. |
|
I'm slowly starting to figure out what's going on. To avoid a long wait, I suggest introducing a simple option that reverses the word. What do you think @chilobo?
|
|
I asked two friends to check their Lambdas. Both do not need swapping. |
|
My Lambda went into operation on October 23rd, but it wasn't from the new series because it was reserved 10 months ago. What Lambda says is not so relevant; if both versions are in circulation, then we need to provide a way to swap them. |
|
Up to now you are the only one with this problem. I am still wondering if Lambda configured your Lambda differently: Your UI seems to be different, your serial number does not fit into the usual pattern consisting only of numbers. Why is the port blocked? I never had this problem. I guess you just have to use the same Modbus Bridge for your new poller. |
|
Working with an extra parameter in the configuration is too complicated for me - I don't really know how to get access to the config within HeatPumpBlockParser or I had a similar problem in the E-Manager part with the channel actual-power: Some Lambdas need that value as unsigned, some as signed value. So I defined two channels actual-power and actual-power-signed. What do you think of generating - in addtion to heat-pump-vdae and heat-pump-vdaq - two more channels: I got a working version of this idea: |
|
That's an excellent idea, just have two versions and let the user decide. You can document it and everything is fine. No calculations, no firmware version numbers, etc. And I think that since evcc.io performs a version check and the problem is discussed in forums, it exists and needs to be dealt with. I have now solved the issue for myself by connecting all documented values in native mode, as I needed more flexibility for testing with other values, especially read/write and the duration of validity. I will close the PR in a few days. Ja ich teste... |
|
Perfect @chilobo, works as expected! Thank you! 👍 |
|
I opened a new pull request with the new version in (#19835) |
|
Succeeded by #19835 |












Description
Classification: Bugfix
The
heatpumpVdAEandheatpumpVdAQfields were usingextractInt32()which reads 32-bit registers without word-swapping. These registers require word-swap for correct endianness.Changes:
extractInt32Swap()andextractOptionalInt32Swap()methods toAbstractBaseParserusingValueType.INT32_SWAPHeatpumpBlockParserto useextractInt32Swap()for VdAE (register 20) and VdAQ (register 22)This ensures correct byte/word ordering when parsing these 32-bit Modbus registers.
Guidelines compliance:
Testing
JAR available at: https://openhab.jfrog.io/ui/native/libs-pullrequest-local/org/openhab/addons/bundles/
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
openhab.jfrog.io/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/openhab-addons/openhab-addons org.codehaus.plexus.classworlds.launcher.Launcher clean compile -q(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.