diff --git a/webapp/src/components/BatteryView.vue b/webapp/src/components/BatteryView.vue
new file mode 100644
index 00000000..52516c62
--- /dev/null
+++ b/webapp/src/components/BatteryView.vue
@@ -0,0 +1,364 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | {{ $t('battery.Property') }} |
+ {{ $t('battery.Value') }} |
+ {{ $t('battery.Unit') }} |
+
+
+
+
+ | {{ $t('battery.stateOfCharge') }} |
+ {{ formatNumber(batteryData.stateOfCharge.v) }} |
+ {{ batteryData.stateOfCharge.u }} |
+
+
+ | {{ $t('battery.stateOfHealth') }} |
+ {{ formatNumber(batteryData.stateOfHealth.v) }} |
+ {{ batteryData.stateOfHealth.u }} |
+
+
+ | {{ $t('battery.voltage') }} |
+ {{ formatNumber(batteryData.voltage.v) }} |
+ {{ batteryData.voltage.u }} |
+
+
+ | {{ $t('battery.current') }} |
+ {{ Math.round(batteryData.current.v) }} |
+ {{ batteryData.current.u }} |
+
+
+ | {{ $t('battery.temperature') }} |
+ {{ batteryData.temperature.v }} |
+ {{ batteryData.temperature.u }} |
+
+
+ | {{ $t('battery.chargeVoltage') }} |
+ {{ batteryData.chargeVoltage.v }} |
+ {{ batteryData.chargeVoltage.u }} |
+
+
+ | {{ $t('battery.chargeCurrentLimitation') }} |
+ {{ batteryData.chargeCurrentLimitation.v }} |
+ {{ batteryData.chargeCurrentLimitation.u }} |
+
+
+ | {{ $t('battery.dischargeCurrentLimitation') }} |
+ {{ batteryData.dischargeCurrentLimitation.v }} |
+ {{ batteryData.dischargeCurrentLimitation.u }} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | {{ $t('battery.Property') }} |
+ {{ $t('battery.alarm') }} |
+ {{ $t('battery.warning') }} |
+
+
+
+
+ | {{ $t('battery.dischargeCurrent') }} |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.alarm') }}
+
+ |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.warning') }}
+
+ |
+
+
+ | {{ $t('battery.chargeCurrent') }} |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.alarm') }}
+
+ |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.warning') }}
+
+ |
+
+
+ | {{ $t('battery.lowTemperature') }} |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.alarm') }}
+
+ |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.warning') }}
+
+ |
+
+
+ | {{ $t('battery.highTemperature') }} |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.alarm') }}
+
+ |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.warning') }}
+
+ |
+
+
+ | {{ $t('battery.lowVoltage') }} |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.alarm') }}
+
+ |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.warning') }}
+
+ |
+
+
+ | {{ $t('battery.highVoltage') }} |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.alarm') }}
+
+ |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.warning') }}
+
+ |
+
+
+ | {{ $t('battery.bmsInternal') }} |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.alarm') }}
+
+ |
+
+
+ {{ $t('battery.ok') }}
+ {{ $t('battery.warning') }}
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/webapp/src/locales/de.json b/webapp/src/locales/de.json
index 99d81290..9377c087 100644
--- a/webapp/src/locales/de.json
+++ b/webapp/src/locales/de.json
@@ -10,6 +10,7 @@
"DTUSettings": "DTU",
"DeviceManager": "Hardware",
"VedirectSettings": "Ve.direct",
+ "PowerMeterSettings": "Power Meter",
"BatterySettings": "Batterie",
"AcChargerSettings": "AC Ladegerät",
"ConfigManagement": "Konfigurationsverwaltung",
@@ -666,5 +667,33 @@
"EnableHuawei": "Huawei R4850G2 an CAN Bus Interface aktiv",
"Seconds": "@:dtuadmin.Seconds",
"Save": "@:dtuadmin.Save"
+ },
+ "battery": {
+ "battery": "Batterie",
+ "DataAge": "letzte Aktualisierung: ",
+ "Seconds": "vor {val} Sekunden",
+ "Status": "Status",
+ "Property": "Eigenschaft",
+ "Value": "Wert",
+ "Unit": "Einheit",
+ "stateOfCharge": "Ladezustand (SOC)",
+ "stateOfHealth": "Batteriezustand (SOH)",
+ "voltage": "Spannung",
+ "current": "Strom",
+ "temperature": "Temperatur",
+ "chargeVoltage": "Gewünschte Ladespannung (BMS)",
+ "chargeCurrentLimitation": "Ladestromlimit",
+ "dischargeCurrentLimitation": "Entladestromlimit",
+ "warn_alarm": "Warnungen und Alarme",
+ "ok": "OK",
+ "alarm": "Alarm",
+ "warning": "Warnung",
+ "dischargeCurrent": "Entladestrom",
+ "chargeCurrent": "Ladestrom",
+ "lowTemperature": "Temperatur niedrig",
+ "highTemperature": "Temperatur hoch",
+ "lowVoltage": "Spannung niedrig",
+ "highVoltage": "Spannung hoch",
+ "bmsInternal": "BMS intern"
}
}
diff --git a/webapp/src/locales/en.json b/webapp/src/locales/en.json
index fba77ae5..4f3edef9 100644
--- a/webapp/src/locales/en.json
+++ b/webapp/src/locales/en.json
@@ -671,5 +671,33 @@
"EnableHuawei": "Enable Huawei R4850G2 on CAN Bus Interface",
"Seconds": "@:dtuadmin.Seconds",
"Save": "@:dtuadmin.Save"
+ },
+ "battery": {
+ "battery": "battery",
+ "DataAge": "Data Age: ",
+ "Seconds": " {val} seconds",
+ "Status": "Status",
+ "Property": "Property",
+ "Value": "Value",
+ "Unit": "Unit",
+ "stateOfCharge": "State of charge",
+ "stateOfHealth": "State of health",
+ "voltage": "Voltage",
+ "current": "Current",
+ "temperature": "Temperature",
+ "chargeVoltage": "Requested charge voltage",
+ "chargeCurrentLimitation": "Charge current limit",
+ "dischargeCurrentLimitation": "Discharge current limit",
+ "warn_alarm": "Alarms and warnings",
+ "ok": "OK",
+ "alarm": "Alarm",
+ "warning": "Warning",
+ "dischargeCurrent": "Discharge current",
+ "chargeCurrent": "Charge current",
+ "lowTemperature": "Low temperature",
+ "highTemperature": "High temperature",
+ "lowVoltage": "Low voltage",
+ "highVoltage": "High voltage",
+ "bmsInternal": "BMS internal"
}
}
\ No newline at end of file
diff --git a/webapp/src/locales/fr.json b/webapp/src/locales/fr.json
index 89b10d4b..b69ab2cc 100644
--- a/webapp/src/locales/fr.json
+++ b/webapp/src/locales/fr.json
@@ -10,6 +10,7 @@
"DTUSettings": "DTU",
"DeviceManager": "Périphériques",
"VedirectSettings": "Ve.direct",
+ "PowerMeterSettings": "Power Meter",
"BatterySettings": "Battery",
"AcChargerSettings": "AC Charger",
"ConfigManagement": "Gestion de la configuration",
@@ -608,5 +609,33 @@
"EnableHuawei": "Enable Huawei R4850G2 on CAN Bus Interface",
"Seconds": "@:dtuadmin.Seconds",
"Save": "@:dtuadmin.Save"
+ },
+ "battery": {
+ "battery": "battery",
+ "DataAge": "Data Age: ",
+ "Seconds": " {val} seconds",
+ "Status": "Status",
+ "Property": "Property",
+ "Value": "Value",
+ "Unit": "Unit",
+ "stateOfCharge": "State of charge",
+ "stateOfHealth": "State of health",
+ "voltage": "Voltage",
+ "current": "Current",
+ "temperature": "Temperature",
+ "chargeVoltage": "Requested charge voltage",
+ "chargeCurrentLimitation": "Charge current limit",
+ "dischargeCurrentLimitation": "Discharge current limit",
+ "warn_alarm": "Alarms and warnings",
+ "ok": "OK",
+ "alarm": "Alarm",
+ "warning": "Warning",
+ "dischargeCurrent": "Discharge current",
+ "chargeCurrent": "Charge current",
+ "lowTemperature": "Low temperature",
+ "highTemperature": "High temperature",
+ "lowVoltage": "Low voltage",
+ "highVoltage": "High voltage",
+ "bmsInternal": "BMS internal"
}
}
\ No newline at end of file
diff --git a/webapp/src/types/BatteryDataStatus.ts b/webapp/src/types/BatteryDataStatus.ts
new file mode 100644
index 00000000..71439615
--- /dev/null
+++ b/webapp/src/types/BatteryDataStatus.ts
@@ -0,0 +1,32 @@
+import type { ValueObject } from '@/types/LiveDataStatus';
+
+interface flags {
+ dischargeCurrent: boolean;
+ chargeCurrent: boolean;
+ lowTemperature: boolean;
+ highTemperature: boolean;
+ lowVoltage: boolean;
+ highVoltage: boolean;
+ bmsInternal: boolean;
+}
+
+
+// Battery
+export interface Battery {
+ data_age: 0;
+ chargeVoltage: ValueObject;
+ chargeCurrentLimitation: ValueObject;
+ dischargeCurrentLimitation: ValueObject;
+ stateOfCharge: ValueObject;
+ stateOfChargeLastUpdate: ValueObject;
+ stateOfHealth: ValueObject;
+ voltage: ValueObject;
+ current: ValueObject;
+ temperature: ValueObject;
+ warnings: flags;
+ alarms: flags;
+ manufacturer: string;
+ chargeEnabled: boolean;
+ dischargeEnabled: boolean;
+ chargeImmediately: boolean;
+}
\ No newline at end of file
diff --git a/webapp/src/types/LiveDataStatus.ts b/webapp/src/types/LiveDataStatus.ts
index e7ab5b7e..9501b34b 100644
--- a/webapp/src/types/LiveDataStatus.ts
+++ b/webapp/src/types/LiveDataStatus.ts
@@ -54,10 +54,15 @@ export interface Huawei {
enabled: boolean;
}
+export interface Battery {
+ enabled: boolean;
+}
+
export interface LiveData {
inverters: Inverter[];
total: Total;
hints: Hints;
vedirect: Vedirect;
huawei: Huawei;
+ battery: Battery;
}
diff --git a/webapp/src/views/HomeView.vue b/webapp/src/views/HomeView.vue
index 7bb0cb3a..28546f0b 100644
--- a/webapp/src/views/HomeView.vue
+++ b/webapp/src/views/HomeView.vue
@@ -114,6 +114,9 @@
+
+
+
@@ -329,6 +332,7 @@ import InverterChannelInfo from "@/components/InverterChannelInfo.vue";
import InverterTotalInfo from '@/components/InverterTotalInfo.vue';
import VedirectView from '@/components/VedirectView.vue';
import HuaweiView from '@/components/HuaweiView.vue'
+import BatteryView from '@/components/BatteryView.vue'
import type { DevInfoStatus } from '@/types/DevInfoStatus';
import type { EventlogItems } from '@/types/EventlogStatus';
import type { LimitConfig } from '@/types/LimitConfig';
@@ -370,7 +374,8 @@ export default defineComponent({
BIconToggleOn,
BIconXCircleFill,
VedirectView,
- HuaweiView
+ HuaweiView,
+ BatteryView
},
data() {
return {
diff --git a/webapp/vite.config.ts b/webapp/vite.config.ts
index 28f520dc..73b2f5f1 100644
--- a/webapp/vite.config.ts
+++ b/webapp/vite.config.ts
@@ -52,20 +52,20 @@ export default defineConfig({
server: {
proxy: {
'^/api': {
- target: 'http://192.168.178.78/'
+ target: 'http://192.168.178.151/'
},
'^/livedata': {
- target: 'ws://192.168.178.78/',
+ target: 'ws://192.168.178.151/',
ws: true,
changeOrigin: true
},
'^/vedirectlivedata': {
- target: 'ws://192.168.178.78/',
+ target: 'ws://192.168.178.151/',
ws: true,
changeOrigin: true
},
'^/console': {
- target: 'ws://192.168.20.110/',
+ target: 'ws://192.168.178.151/',
ws: true,
changeOrigin: true
}