From 7c1ea8b2a7468af8107463df9782ac3fd94c39b0 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 30 Jul 2024 16:55:30 +0200 Subject: [PATCH] fix apparent vs active power --- printout.py | 2 +- sdm630_mqtt.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/printout.py b/printout.py index 18febad..4d0a4d6 100644 --- a/printout.py +++ b/printout.py @@ -27,7 +27,7 @@ TABLE_LAYOUT = { }, }, "row2": { - "apparent-power": { + "active-power": { "name": "Apparent Power", "suffix": "W", }, diff --git a/sdm630_mqtt.py b/sdm630_mqtt.py index 293af01..c9ce3c8 100644 --- a/sdm630_mqtt.py +++ b/sdm630_mqtt.py @@ -57,10 +57,14 @@ class SDM630_MQTT: self.modbus.open() for idx, (readable, address) in enumerate( { - "apparent-power/L1": 0x000C, - "apparent-power/L2": 0x000E, - "apparent-power/L3": 0x0010, - "apparent-power/total": 0x0034, + "active-power/L1": 0x000C, + "active-power/L2": 0x000E, + "active-power/L3": 0x0010, + "active-power/total": 0x0034, + "apparent-power/L1": 0x0012, + "apparent-power/L2": 0x0014, + "apparent-power/L3": 0x0016, + "apparent-power/total": 0x0038, "current-demand/L1": 0x0102, "current-demand/L2": 0x0104, "current-demand/L3": 0x0106,