Skip to content

Commit

Permalink
wrong modbus register leaded to wrong Reactive Power in smartmeter data
Browse files Browse the repository at this point in the history
  • Loading branch information
Alois Klingler committed Aug 2, 2024
1 parent e341b96 commit fcfe327
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ModbusDtu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fcfe327

Please sign in to comment.