From 95e8d6008197522feaca0836f0213d0abfa7ff16 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 23 Nov 2021 17:24:29 +0100 Subject: [PATCH] use hardware energy counters --- tasmota/xnrg_15_teleinfo.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasmota/xnrg_15_teleinfo.ino b/tasmota/xnrg_15_teleinfo.ino index dc940d502..37b16084f 100755 --- a/tasmota/xnrg_15_teleinfo.ino +++ b/tasmota/xnrg_15_teleinfo.ino @@ -357,6 +357,7 @@ void DataCallback(struct _ValueList * me, uint8_t flags) Energy.import_active[0] = total/1000.0f; EnergyUpdateTotal(); + AddLog (LOG_LEVEL_INFO, PSTR ("TIC: Total counter updated to %u Wh"), total); } // Wh total index (standard) @@ -568,6 +569,9 @@ void TInfoDrvInit(void) { TasmotaGlobal.energy_driver = XNRG_15; Energy.voltage_available = false; Energy.phase_count = 1; + // init hardware energy counters + Settings->flag3.hardware_energy_total = true; + Settings->energy_kWhtotal = 0; } }