From d1125546246b493b5dc6d05e54f947341f896ddf Mon Sep 17 00:00:00 2001 From: Xavier Beaudouin Date: Thu, 15 Sep 2022 20:48:08 +0200 Subject: [PATCH] Try another kind of counter instead of P1 --- mppt/plugin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mppt/plugin.py b/mppt/plugin.py index 83228fa..05e97cd 100644 --- a/mppt/plugin.py +++ b/mppt/plugin.py @@ -4,8 +4,7 @@ Victron Energy MPPT plugin Author: Xavier Beaudouin Requirements: 1. multiplus + GX - 2. modbus over TCP adapter like PW21 - 3. pymodbus AND pymodbusTCP + 2. pymodbus AND pymodbusTCP """ """ @@ -148,7 +147,8 @@ class BasePlugin: Options = { "Custom": "1;W" } Domoticz.Device(Name="Power", Unit=3, TypeName="Custom", Used=0, Options=Options).Create() if 4 not in Devices: - Domoticz.Device(Name="Total Energy", Unit=4,Type=0xfa, Subtype=0x01, Used=0).Create() + #Domoticz.Device(Name="Total Energy", Unit=4, Type=0xfa, Subtype=0x01, Used=0).Create() + Domoticz.Device(Name="Total Energy", Unit=4, Type=243, Subtype=29, Used=0).Create() return @@ -250,7 +250,8 @@ class BasePlugin: # Do insert data on counters - Devices[4].Update(1, sValue=total_e+";0;0;0;"+power+";0") + #Devices[4].Update(1, sValue=total_e+";0;0;0;"+power+";0") + Devices[4].Update(1, sValue=power+";"+total_e) global _plugin