From a9747c8e6c54342b24eb06556d78f2ea08ab5da8 Mon Sep 17 00:00:00 2001 From: lgb-this Date: Fri, 3 Nov 2023 12:23:11 +0100 Subject: [PATCH 1/3] added translations --- byd_bat/locale.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/byd_bat/locale.yaml b/byd_bat/locale.yaml index f29ff2617..0d6f17c2b 100644 --- a/byd_bat/locale.yaml +++ b/byd_bat/locale.yaml @@ -33,6 +33,14 @@ plugin_translations: 'Module pro Turm': {'de': '=', 'en': 'Modules per tower'} 'Parameter': {'de': '=', 'en': 'Parameter'} 'Fehler': {'de': '=', 'en': 'Error'} + + 'Batteriespannung': {'de': '=', 'en': 'Batteryvoltage'} + 'Spannung Out': {'de': '=', 'en': 'Voltage Out'} + 'Strom': {'de': '=', 'en': 'Current'} + 'Spannung max (Zelle)': {'de': '=', 'en': 'Voltage max (cell)'} + 'Spannung min (Zelle)': {'de': '=', 'en': 'Voltage min (cell)'} + 'Temperatur Zelle max': {'de': '=', 'en': 'Temperature cell max'} + 'Temperatur Zelle min': {'de': '=', 'en': 'Temperature cell min'} # Alternative format for translations of longer texts: 'Hier kommt der Inhalt des Webinterfaces hin.': From ff91ad6dc79f2ef832524e0cb4672ad66918c5a8 Mon Sep 17 00:00:00 2001 From: lgb-this Date: Fri, 3 Nov 2023 12:24:07 +0100 Subject: [PATCH 2/3] added new parameters Bat-Voltag, V-Out, Current --- byd_bat/webif/__init__.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/byd_bat/webif/__init__.py b/byd_bat/webif/__init__.py index 0bdd656ac..60b1fd383 100644 --- a/byd_bat/webif/__init__.py +++ b/byd_bat/webif/__init__.py @@ -124,34 +124,45 @@ def get_data_html(self, dataSet=None): data['serial'] = self.plugin.byd_serial data['t1_soc'] = f'{self.plugin.byd_diag_soc[1]:.1f}' + " %" + data['t1_bat_voltag'] = f'{self.plugin.byd_diag_bat_voltag[1]:.1f}' + " V" + data['t1_v_out'] = f'{self.plugin.byd_diag_v_out[1]:.1f}' + " V" + data['t1_current'] = f'{self.plugin.byd_diag_current[1]:.1f}' + " A" data['t1_volt_max'] = f'{self.plugin.byd_diag_volt_max[1]:.3f}' + " V (" + str(self.plugin.byd_diag_volt_max_c[1]) + ")" data['t1_volt_min'] = f'{self.plugin.byd_diag_volt_min[1]:.3f}' + " V (" + str(self.plugin.byd_diag_volt_min_c[1]) + ")" data['t1_temp_max_cell'] = str(self.plugin.byd_diag_temp_max_c[1]) data['t1_temp_min_cell'] = str(self.plugin.byd_diag_temp_min_c[1]) if self.plugin.byd_bms_qty > 1: data['t2_soc'] = f'{self.plugin.byd_diag_soc[2]:.1f}' + " %" + data['t2_bat_voltag'] = f'{self.plugin.byd_diag_bat_voltag[2]:.1f}' + " V" + data['t2_v_out'] = f'{self.plugin.byd_diag_v_out[2]:.1f}' + " V" + data['t2_current'] = f'{self.plugin.byd_diag_current[2]:.1f}' + " A" data['t2_volt_max'] = f'{self.plugin.byd_diag_volt_max[2]:.3f}' + " V (" + str(self.plugin.byd_diag_volt_max_c[2]) + ")" data['t2_volt_min'] = f'{self.plugin.byd_diag_volt_min[2]:.3f}' + " V (" + str(self.plugin.byd_diag_volt_min_c[2]) + ")" data['t2_temp_max_cell'] = str(self.plugin.byd_diag_temp_max_c[2]) data['t2_temp_min_cell'] = str(self.plugin.byd_diag_temp_min_c[2]) else: data['t2_soc'] = "-" - data['t2_soc'] = "-" + data['t2_bat_voltag'] = "-" + data['t2_v_out'] = "-" + data['t2_current'] = "-" data['t2_volt_max'] = "-" data['t2_volt_min'] = "-" data['t2_temp_max_cell'] = "-" data['t2_temp_min_cell'] = "-" if self.plugin.byd_bms_qty > 2: data['t3_soc'] = f'{self.plugin.byd_diag_soc[3]:.1f}' + " %" - data['t3_soc'] = f'{self.plugin.byd_diag_soc[3]:.1f}' + " %" + data['t3_bat_voltag'] = f'{self.plugin.byd_diag_bat_voltag[3]:.1f}' + " V" + data['t3_v_out'] = f'{self.plugin.byd_diag_v_out[3]:.1f}' + " V" + data['t3_current'] = f'{self.plugin.byd_diag_current[3]:.1f}' + " A" data['t3_volt_max'] = f'{self.plugin.byd_diag_volt_max[3]:.3f}' + " V (" + str(self.plugin.byd_diag_volt_max_c[3]) + ")" data['t3_volt_min'] = f'{self.plugin.byd_diag_volt_min[3]:.3f}' + " V (" + str(self.plugin.byd_diag_volt_min_c[3]) + ")" data['t3_temp_max_cell'] = str(self.plugin.byd_diag_temp_max_c[3]) data['t3_temp_min_cell'] = str(self.plugin.byd_diag_temp_min_c[3]) else: data['t3_soc'] = "-" - data['t3_soc'] = "-" - data['t3_soc'] = "-" + data['t3_bat_voltag'] = "-" + data['t3_v_out'] = "-" + data['t3_current'] = "-" data['t3_volt_max'] = "-" data['t3_volt_min'] = "-" data['t3_temp_max_cell'] = "-" From b72bf704db6e400509d78c340aa625954f6e12f4 Mon Sep 17 00:00:00 2001 From: lgb-this Date: Fri, 3 Nov 2023 12:24:43 +0100 Subject: [PATCH 3/3] added new parameters Bat-Voltag, V-Out, Current --- byd_bat/webif/templates/index.html | 43 ++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/byd_bat/webif/templates/index.html b/byd_bat/webif/templates/index.html index b8924d9f4..d441d5edf 100644 --- a/byd_bat/webif/templates/index.html +++ b/byd_bat/webif/templates/index.html @@ -100,16 +100,25 @@ shngInsertText('serial',objResponse['serial']); shngInsertText('t1_soc',objResponse['t1_soc']); + shngInsertText('t1_bat_voltag',objResponse['t1_bat_voltag']); + shngInsertText('t1_v_out',objResponse['t1_v_out']); + shngInsertText('t1_current',objResponse['t1_current']); shngInsertText('t1_volt_max',objResponse['t1_volt_max']); shngInsertText('t1_volt_min',objResponse['t1_volt_min']); shngInsertText('t1_temp_max_cell',objResponse['t1_temp_max_cell']); shngInsertText('t1_temp_min_cell',objResponse['t1_temp_min_cell']); shngInsertText('t2_soc',objResponse['t2_soc']); + shngInsertText('t2_bat_voltag',objResponse['t2_bat_voltag']); + shngInsertText('t2_v_out',objResponse['t2_v_out']); + shngInsertText('t2_current',objResponse['t2_current']); shngInsertText('t2_volt_max',objResponse['t2_volt_max']); shngInsertText('t2_volt_min',objResponse['t2_volt_min']); shngInsertText('t2_temp_max_cell',objResponse['t2_temp_max_cell']); shngInsertText('t2_temp_min_cell',objResponse['t2_temp_min_cell']); shngInsertText('t3_soc',objResponse['t3_soc']); + shngInsertText('t3_bat_voltag',objResponse['t3_bat_voltag']); + shngInsertText('t3_v_out',objResponse['t3_v_out']); + shngInsertText('t3_current',objResponse['t3_current']); shngInsertText('t3_volt_max',objResponse['t3_volt_max']); shngInsertText('t3_volt_min',objResponse['t3_volt_min']); shngInsertText('t3_temp_max_cell',objResponse['t3_temp_max_cell']); @@ -407,25 +416,43 @@ - Spannung max (Zelle): + {{ _('Batteriespannung') }}: + + + + + + {{ _('Spannung Out') }}: + + + + + + {{ _('Strom') }}: + + + + + + {{ _('Spannung max (Zelle)') }}: - Spannung min (Zelle): + {{ _('Spannung min (Zelle)') }}: - Temperatur Zelle max: + {{ _('Temperatur Zelle max') }}: - Temperatur Zelle min: + {{ _('Temperatur Zelle min') }}: @@ -442,10 +469,10 @@ {% block bodytab3 %} - + - + @@ -461,10 +488,10 @@ {% block bodytab4 %}
Turm 1 nicht vorhanden
Turm 2 nicht vorhanden
Turm 3 nicht vorhanden
- + - +
Turm 1 nicht vorhanden
Turm 2 nicht vorhanden
Turm 3 nicht vorhanden