diff --git a/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.cpp b/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.cpp index 7c0d6f530..a21975f38 100644 --- a/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.cpp +++ b/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.cpp @@ -198,6 +198,40 @@ void MeterModbusTCP::setup(const Config &ephemeral_config) break; + case MeterModbusTCPTableID::DeyeHybridInverter: + generic_read_request.register_type = TAddress::RegType::HREG; + generic_read_request.start_address_offset = 0; // register address mode + deye_hybrid_inverter_virtual_meter = ephemeral_config.get("table")->get()->get("virtual_meter")->asEnum(); + device_address = static_cast(ephemeral_config.get("table")->get()->get("device_address")->asUint()); + + switch (deye_hybrid_inverter_virtual_meter) { + case DeyeHybridInverterVirtualMeterID::None: + logger.printfln("No Deye Hybrid Inverter Virtual Meter selected"); + return; + + case DeyeHybridInverterVirtualMeterID::Inverter: + table = &deye_hybrid_inverter_table; + break; + + case DeyeHybridInverterVirtualMeterID::Grid: + table = &deye_hybrid_inverter_grid_table; + break; + + case DeyeHybridInverterVirtualMeterID::Battery: + table = &deye_hybrid_inverter_battery_table; + break; + + case DeyeHybridInverterVirtualMeterID::Load: + table = &deye_hybrid_inverter_load_table; + break; + + default: + logger.printfln("Unknown Deye Hybrid Inverter Virtual Meter: %u", static_cast(deye_hybrid_inverter_virtual_meter)); + return; + } + + break; + default: logger.printfln("Unknown table: %u", static_cast(table_id)); return; diff --git a/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.h b/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.h index 91e372afa..2d39f168f 100644 --- a/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.h +++ b/software/src/modules/meters_modbus_tcp/meter_modbus_tcp.h @@ -97,13 +97,16 @@ class MeterModbusTCP final : protected GenericModbusTCPClient, public IMeter uint16_t register_buffer[2]; + // Sungrow SungrowHybridInverterVirtualMeterID sungrow_hybrid_inverter_virtual_meter; SungrowStringInverterVirtualMeterID sungrow_string_inverter_virtual_meter; int sungrow_inverter_output_type = -1; uint16_t sungrow_hybrid_inverter_running_state; + // Solarmax SolarmaxMaxStorageVirtualMeterID solarmax_max_storage_virtual_meter; + // Victron Energy VictronEnergyColorControlGXVirtualMeterID victron_energy_color_control_gx_virtual_meter; float victron_energy_color_control_gx_ac_coupled_pv_on_output_l1_power; float victron_energy_color_control_gx_ac_coupled_pv_on_output_l2_power; @@ -114,6 +117,9 @@ class MeterModbusTCP final : protected GenericModbusTCPClient, public IMeter float victron_energy_color_control_gx_ac_consumption_l1_power; float victron_energy_color_control_gx_ac_consumption_l2_power; float victron_energy_color_control_gx_ac_consumption_l3_power; + + // Deye + DeyeHybridInverterVirtualMeterID deye_hybrid_inverter_virtual_meter; }; #if defined(__GNUC__) diff --git a/software/src/modules/meters_modbus_tcp/meters_modbus_tcp.cpp b/software/src/modules/meters_modbus_tcp/meters_modbus_tcp.cpp index 195d65425..221588f7b 100644 --- a/software/src/modules/meters_modbus_tcp/meters_modbus_tcp.cpp +++ b/software/src/modules/meters_modbus_tcp/meters_modbus_tcp.cpp @@ -52,6 +52,11 @@ void MetersModbusTCP::pre_setup() {"device_address", Config::Uint(100, 1, 247)}, })}); + table_prototypes.push_back({MeterModbusTCPTableID::DeyeHybridInverter, Config::Object({ + {"virtual_meter", Config::Uint8(static_cast(SungrowHybridInverterVirtualMeterID::None))}, + {"device_address", Config::Uint(1, 1, 247)}, + })}); + Config table_union = Config::Union( *Config::Null(), MeterModbusTCPTableID::None, diff --git a/software/src/modules/meters_modbus_tcp/prepare.py b/software/src/modules/meters_modbus_tcp/prepare.py index b595f3045..3424cbb10 100644 --- a/software/src/modules/meters_modbus_tcp/prepare.py +++ b/software/src/modules/meters_modbus_tcp/prepare.py @@ -26,6 +26,7 @@ def create_software_module(): ('Sungrow String Inverter', 3), ('Solarmax Max Storage', 4), ('Victron Energy Color Control GX', 5), + ('Deye Hybrid Inverter', 6), ] enums = [ @@ -71,6 +72,17 @@ def create_software_module(): ('Load', 4), ], }, + { + 'name': 'Deye Hybrid Inverter Virtual Meter ID', + # NEVER EVER EDIT OR REMOVE IDS. Only append new ones. Changing or removing IDs is a breaking API and config change! + 'values': [ + ('None', 0), + ('Inverter', 1), + ('Grid', 2), + ('Battery', 3), + ('Load', 4), + ], + }, ] table_values = [] @@ -799,6 +811,509 @@ def create_software_module(): }, ], }, + { + 'name': 'Deye Hybrid Inverter', + 'values': [ + { + 'name': 'Device Type', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 0, + 'value_type': 'U16', + 'scale_factor': 1.0, + }, + { + 'name': 'Rated Power [0.1 W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 20, + 'value_type': 'U32', + 'scale_factor': 1.0, + }, + { + 'name': 'Total Active Power Generation [0.1 kWh]', + 'value_id': 'EnergyActiveLSumExport', + 'start_address': 504, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Total Reactive Power Generation [0.1 kWh]', + 'value_id': 'EnergyReactiveLSumIndCapSum', # FIXME: sum vs diff? + 'start_address': 506, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Total PV Power [0.1 kWh]', + 'value_id': 'EnergyDCExport', + 'start_address': 534, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Transformer Temperature [0.1 °C]', + 'value_id': 'TemperatureTransformer', + 'start_address': 540, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Heat sink Temperature [0.1 °C]', + 'value_id': 'TemperatureHeatSink', + 'start_address': 541, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Output Phase Voltage A [0.1 V]', + 'value_id': 'VoltageL1N', + 'start_address': 627, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Output Phase Voltage B [0.1 V]', + 'value_id': 'VoltageL2N', + 'start_address': 628, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Output Phase Voltage C [0.1 V]', + 'value_id': 'VoltageL3N', + 'start_address': 629, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Output Phase Current A [0.01 A]', + 'value_id': 'CurrentL1ImExDiff', # FIXME: direction? + 'start_address': 630, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Output Phase Current B [0.01 A]', + 'value_id': 'CurrentL2ImExDiff', # FIXME: direction? + 'start_address': 631, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Output Phase Current C [0.01 A]', + 'value_id': 'CurrentL3ImExDiff', # FIXME: direction? + 'start_address': 632, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Output Phase Power A [W]', + 'value_id': 'PowerActiveL1ImExDiff', # FIXME: direction? + 'start_address': 633, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Output Phase Power B [W]', + 'value_id': 'PowerActiveL2ImExDiff', # FIXME: direction? + 'start_address': 634, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Output Phase Power C [W]', + 'value_id': 'PowerActiveL3ImExDiff', # FIXME: direction? + 'start_address': 635, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Output Total Active Power [W]', + 'value_id': 'PowerActiveLSumImExDiff', # FIXME: direction? + 'start_address': 636, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Output Total Apparent Power [VA]', + 'value_id': 'PowerApparentLSumImExDiff', # FIXME: direction? + 'start_address': 637, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Frequency [0.01 Hz]', + 'value_id': 'FrequencyLAvg', + 'start_address': 638, + 'value_type': 'U16', + 'scale_factor': 0.01, + }, + ], + }, + { + 'name': 'Deye Hybrid Inverter Grid', + 'values': [ + { + 'name': 'Total Grid Buy [0.1 kWh]', + 'value_id': 'EnergyActiveLSumImport', + 'start_address': 522, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Total Grid Sell [0.1 kWh]', + 'value_id': 'EnergyActiveLSumExport', + 'start_address': 524, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Grid Side Phase Voltage A [0.1 V]', + 'value_id': 'VoltageL1N', + 'start_address': 598, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Grid Side Phase Voltage B [0.1 V]', + 'value_id': 'VoltageL2N', + 'start_address': 599, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Grid Side Phase Voltage C [0.1 V]', + 'value_id': 'VoltageL3N', + 'start_address': 600, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Grid Side Line Voltage A-B [0.1 V]', + 'value_id': 'VoltageL1L2', + 'start_address': 601, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Grid Side Line Voltage B-C [0.1 V]', + 'value_id': 'VoltageL2L3', + 'start_address': 602, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Grid Side Line Voltage C-A [0.1 V]', + 'value_id': 'VoltageL3L1', + 'start_address': 603, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Grid Side Inside Power A [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 604, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Inside Power B [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 605, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Inside Power C [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 606, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Inner Total Active Power [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 607, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Inner Total Apparent Power [VA]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 608, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Frequency [0.01 Hz]', + 'value_id': 'FrequencyLAvg', + 'start_address': 609, + 'value_type': 'U16', + 'scale_factor': 0.01, # FIXME: undocumented + }, + { + 'name': 'Grid Side Inner Current A [0.01 A]', + 'value_id': 'CurrentL1ImExDiff', # FIXME: direction? + 'start_address': 610, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Grid Side Inner Current B [0.01 A]', + 'value_id': 'CurrentL2ImExDiff', # FIXME: direction? + 'start_address': 611, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Grid Side Inner Current C [0.01 A]', + 'value_id': 'CurrentL3ImExDiff', # FIXME: direction? + 'start_address': 612, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Current A [0.01 A]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 613, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Current B [0.01 A]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 614, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Current C [0.01 A]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 615, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Power A [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 616, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Power B [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 617, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Power C [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 618, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Total Active Power [W]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 619, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Outer Total Apparent Power [VA]', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 620, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Power Factor', + 'value_id': VALUE_ID_DEBUG, + 'start_address': 621, + 'value_type': 'U16', + 'scale_factor': 0.001, + }, + { + 'name': 'Grid Side Phase A Power [W]', + 'value_id': 'PowerActiveL1ImExDiff', # FIXME: direction? + 'start_address': 622, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Phase B Power [W]', + 'value_id': 'PowerActiveL2ImExDiff', # FIXME: direction? + 'start_address': 623, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Phase C Power [W]', + 'value_id': 'PowerActiveL3ImExDiff', # FIXME: direction? + 'start_address': 624, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Grid Side Total Active Power [W]', + 'value_id': 'PowerActiveLSumImExDiff', # FIXME: direction? + 'start_address': 625, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + ], + }, + { + 'name': 'Deye Hybrid Inverter Battery', + 'values': [ + { + 'name': 'Total Battery Charge [0.1 kWh]', + 'value_id': 'EnergyDCCharge', + 'start_address': 516, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Total Battery Discharge [0.1 kWh]', + 'value_id': 'EnergyDCDischarge', + 'start_address': 518, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Battery Temperature [0.1 °C]', + 'value_id': 'Temperature', + 'start_address': 586, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Battery Voltage [0.01 V]', + 'value_id': 'VoltageDC', + 'start_address': 587, + 'value_type': 'U16', + 'scale_factor': 0.01, + }, + { + 'name': 'Battery Capacity [%]', + 'value_id': 'StateOfCharge', + 'start_address': 588, + 'value_type': 'U16', + 'scale_factor': 1.0, + }, + { + 'name': 'Battery Power [W]', + 'value_id': 'PowerDCChaDisDiff', + 'start_address': 590, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Battery Current [0.01 A]', + 'value_id': 'CurrentDCChaDisDiff', + 'start_address': 591, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + ], + }, + { + 'name': 'Deye Hybrid Inverter Load', + 'values': [ + { + 'name': 'Total Load Power [0.1 kWh]', + 'value_id': 'EnergyActiveLSumImport', + 'start_address': 527, + 'value_type': 'U32', + 'scale_factor': 0.1, + }, + { + 'name': 'Load Phase Voltage A [0.1 V]', + 'value_id': 'VoltageL1N', + 'start_address': 644, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Load Phase Voltage B [0.1 V]', + 'value_id': 'VoltageL2N', + 'start_address': 645, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Load Phase Voltage C [0.1 V]', + 'value_id': 'VoltageL3N', + 'start_address': 646, + 'value_type': 'U16', + 'scale_factor': 0.1, + }, + { + 'name': 'Load Phase Current A [0.01 A]', + 'value_id': 'CurrentL1ImExDiff', # FIXME: direction? + 'start_address': 647, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Load Phase Current B [0.01 A]', + 'value_id': 'CurrentL2ImExDiff', # FIXME: direction? + 'start_address': 648, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Load Phase Current C [0.01 A]', + 'value_id': 'CurrentL3ImExDiff', # FIXME: direction? + 'start_address': 649, + 'value_type': 'S16', + 'scale_factor': 0.01, # FIXME: sign? + }, + { + 'name': 'Load Phase Power A [W]', + 'value_id': 'PowerActiveL1ImExDiff', # FIXME: direction? + 'start_address': 650, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Load Phase Power B [W]', + 'value_id': 'PowerActiveL2ImExDiff', # FIXME: direction? + 'start_address': 651, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Load Phase Power C [W]', + 'value_id': 'PowerActiveL3ImExDiff', # FIXME: direction? + 'start_address': 652, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Load Total Active Power [W]', + 'value_id': 'PowerActiveLSumImExDiff', # FIXME: direction? + 'start_address': 653, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Load Total Apparent Power [VA]', + 'value_id': 'PowerApparentLSumImExDiff', # FIXME: direction? + 'start_address': 654, + 'value_type': 'S16', + 'scale_factor': 1.0, # FIXME: sign? + }, + { + 'name': 'Load Frequency [0.01 Hz]', + 'value_id': 'FrequencyLAvg', + 'start_address': 655, + 'value_type': 'U16', + 'scale_factor': 0.01, + }, + ], + }, ] spec_values = [] diff --git a/software/web/src/modules/meters_modbus_tcp/plugin_meters_config.tsx b/software/web/src/modules/meters_modbus_tcp/plugin_meters_config.tsx index 5628ae77e..2703cbba6 100644 --- a/software/web/src/modules/meters_modbus_tcp/plugin_meters_config.tsx +++ b/software/web/src/modules/meters_modbus_tcp/plugin_meters_config.tsx @@ -26,7 +26,8 @@ import { MeterModbusTCPTableID, SungrowHybridInverterVirtualMeterID, SungrowStringInverterVirtualMeterID, SolarmaxMaxStorageVirtualMeterID, - VictronEnergyColorControlGXVirtualMeterID } from "./meters_modbus_tcp_defs"; + VictronEnergyColorControlGXVirtualMeterID, + DeyeHybridInverterVirtualMeterID } from "./meters_modbus_tcp_defs"; import { InputText } from "../../ts/components/input_text"; import { InputNumber } from "../../ts/components/input_number"; import { InputSelect } from "../../ts/components/input_select"; @@ -69,11 +70,20 @@ type TableConfigVictronEnergyColorControlGX = [ }, ]; +type TableConfigDeyeHybridInverter = [ + MeterModbusTCPTableID.DeyeHybridInverter, + { + virtual_meter: number; + device_address: number; + }, +]; + type TableConfig = TableConfigNone | TableConfigSungrowHybridInverter | TableConfigSungrowStringInverter | TableConfigSolarmaxMaxStorage | - TableConfigVictronEnergyColorControlGX; + TableConfigVictronEnergyColorControlGX | + TableConfigDeyeHybridInverter; export type ModbusTCPMetersConfig = [ MeterClassID.ModbusTCP, @@ -99,6 +109,9 @@ function new_table_config(table: MeterModbusTCPTableID): TableConfig { case MeterModbusTCPTableID.VictronEnergyColorControlGX: return [MeterModbusTCPTableID.VictronEnergyColorControlGX, {virtual_meter: null, device_address: 100}]; + case MeterModbusTCPTableID.DeyeHybridInverter: + return [MeterModbusTCPTableID.DeyeHybridInverter, {virtual_meter: null, device_address: 1}]; + default: return [MeterModbusTCPTableID.None, {}]; } @@ -116,6 +129,7 @@ export function init() { [MeterModbusTCPTableID.SungrowStringInverter.toString(), __("meters_modbus_tcp.content.config_table_sungrow_string_inverter")], [MeterModbusTCPTableID.SolarmaxMaxStorage.toString(), __("meters_modbus_tcp.content.config_table_solarmax_max_storage")], [MeterModbusTCPTableID.VictronEnergyColorControlGX.toString(), __("meters_modbus_tcp.content.config_table_victron_energy_color_control_gx")], + [MeterModbusTCPTableID.DeyeHybridInverter.toString(), __("meters_modbus_tcp.content.config_table_deye_hybrid_inverter")], ]; let edit_children = [ @@ -165,7 +179,8 @@ export function init() { && (config[1].table[0] == MeterModbusTCPTableID.SungrowHybridInverter || config[1].table[0] == MeterModbusTCPTableID.SungrowStringInverter || config[1].table[0] == MeterModbusTCPTableID.SolarmaxMaxStorage - || config[1].table[0] == MeterModbusTCPTableID.VictronEnergyColorControlGX)) { + || config[1].table[0] == MeterModbusTCPTableID.VictronEnergyColorControlGX + || config[1].table[0] == MeterModbusTCPTableID.DeyeHybridInverter)) { let items: [string, string][] = []; let device_address_default: number = 1; @@ -201,6 +216,14 @@ export function init() { device_address_default = 100; } + else if (config[1].table[0] == MeterModbusTCPTableID.DeyeHybridInverter) { + items = [ + [DeyeHybridInverterVirtualMeterID.Inverter.toString(), __("meters_modbus_tcp.content.config_virtual_meter_inverter")], + [DeyeHybridInverterVirtualMeterID.Grid.toString(), __("meters_modbus_tcp.content.config_virtual_meter_grid")], + [DeyeHybridInverterVirtualMeterID.Battery.toString(), __("meters_modbus_tcp.content.config_virtual_meter_battery")], + [DeyeHybridInverterVirtualMeterID.Load.toString(), __("meters_modbus_tcp.content.config_virtual_meter_load")], + ]; + } edit_children.push( diff --git a/software/web/src/modules/meters_modbus_tcp/translation_de.tsx b/software/web/src/modules/meters_modbus_tcp/translation_de.tsx index e8750f1f6..a8ae1732e 100644 --- a/software/web/src/modules/meters_modbus_tcp/translation_de.tsx +++ b/software/web/src/modules/meters_modbus_tcp/translation_de.tsx @@ -20,6 +20,7 @@ let x = { "config_table_sungrow_string_inverter": "Sungrow String Wechselrichter (SG...)", "config_table_solarmax_max_storage": "Solarmax Max.Storage", "config_table_victron_energy_color_control_gx": "Victron Energy Color Control GX", + "config_table_deye_hybrid_inverter": "Deye Hybrid Wechselrichter", "config_virtual_meter": "Virtueller Zähler", "config_virtual_meter_select": "Auswählen...", "config_virtual_meter_inverter": "Wechselrichter", diff --git a/software/web/src/modules/meters_modbus_tcp/translation_en.tsx b/software/web/src/modules/meters_modbus_tcp/translation_en.tsx index 5f25ec71f..f3f007633 100644 --- a/software/web/src/modules/meters_modbus_tcp/translation_en.tsx +++ b/software/web/src/modules/meters_modbus_tcp/translation_en.tsx @@ -20,6 +20,7 @@ let x = { "config_table_sungrow_string_inverter": "Sungrow String Inverter (SG...)", "config_table_solarmax_max_storage": "Solarmax Max.Storage", "config_table_victron_energy_color_control_gx": "Victron Energy Color Control GX", + "config_table_deye_hybrid_inverter": "Deye Hybrid Inverter", "config_virtual_meter": "Virtual meter", "config_virtual_meter_select": "Select...", "config_virtual_meter_inverter": "Inverter",