From fcfe327e497fb60aa05183a9fe84fd24ad622757 Mon Sep 17 00:00:00 2001 From: Alois Klingler Date: Fri, 2 Aug 2024 16:08:42 +0200 Subject: [PATCH] wrong modbus register leaded to wrong Reactive Power in smartmeter data --- src/ModbusDtu.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ModbusDtu.cpp b/src/ModbusDtu.cpp index bd2b114f8..69ddf130a 100644 --- a/src/ModbusDtu.cpp +++ b/src/ModbusDtu.cpp @@ -186,10 +186,9 @@ void ModbusDtuClass::loop() // mb.Hreg(0x9cae, 0); // mb.Hreg(0x9caf, 0); // mb.Hreg(0x9cb0, 0); - value = (inv->Statistics()->getChannelFieldValue(TYPE_AC, CH0, FLD_Q)); // sometimes irrealistic values + value = (inv->Statistics()->getChannelFieldValue(TYPE_AC, CH0, FLD_Q)); mb.Hreg(0x9cb1, hexbytes[1]); - mb.Hreg(0x9cb1, hexbytes[0]); - // mb.Hreg(0x9cb2, 0); + mb.Hreg(0x9cb2, hexbytes[0]); // mb.Hreg(0x9cb3, 0); // mb.Hreg(0x9cb4, 0); // mb.Hreg(0x9cb5, 0);