Skip to content

Commit

Permalink
Merge pull request #73 from benderl/dev
Browse files Browse the repository at this point in the history
add device/component config
  • Loading branch information
benderl authored Feb 11, 2022
2 parents 8704ccd + 2d319e8 commit e3913bb
Show file tree
Hide file tree
Showing 18 changed files with 754 additions and 4 deletions.
28 changes: 28 additions & 0 deletions src/components/devices/carlo_gavazzi/counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-carlogavazzi-counter">
<openwb-base-heading>
Einstellungen für Carlo Gavazzi EM24 LAN
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-alert subtype="info">
Ausgelesen wird ID 1 auf Port 502. ModbusTCP muss aktiviert sein.
</openwb-base-alert>
</div>
</template>

<script>
export default {
name: "DeviceCarlogavazziCounter",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
deviceId: { default: undefined },
componentId: { required: true },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
32 changes: 32 additions & 0 deletions src/components/devices/carlo_gavazzi/device.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="device-carlogavazzi">
<openwb-base-heading>
Einstellungen für Carlo Gavazzi
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-text-input
title="IP oder Hostname"
subtype="host"
:model-value="configuration.ip_address"
@update:model-value="
updateConfiguration($event, 'configuration.ip_address')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceCarlogavazzi",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
componentId: { required: true },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
28 changes: 28 additions & 0 deletions src/components/devices/fronius/bat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-fronius-bat">
<openwb-base-heading>
Einstellungen für Fronius Batteriespeicher
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-alert subtype="info">
Diese Komponente erfordert keine Einstellungen.
</openwb-base-alert>
</div>
</template>

<script>
export default {
name: "DeviceFroniusBat",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
deviceId: { default: undefined },
componentId: { required: true },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
32 changes: 32 additions & 0 deletions src/components/devices/fronius/device.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="device-fronius">
<openwb-base-heading>
Einstellungen für Fronius
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-text-input
title="IP oder Hostname"
subtype="host"
:model-value="configuration.ip_address"
@update:model-value="
updateConfiguration($event, 'configuration.ip_address')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceFronius",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
componentId: { required: true },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
28 changes: 28 additions & 0 deletions src/components/devices/fronius/inverter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-fronius-inverter">
<openwb-base-heading>
Einstellungen für Fronius Wechselrichter
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-alert subtype="info">
Diese Komponente erfordert keine Einstellungen.
</openwb-base-alert>
</div>
</template>

<script>
export default {
name: "DeviceFroniusInverter",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
deviceId: { default: undefined },
componentId: { required: true },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
94 changes: 94 additions & 0 deletions src/components/devices/http/bat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<template>
<div class="device-http-bat">
<openwb-base-heading>
Einstellungen für Http Batteriespeicher
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-text-input
title="Pfad für Leistung"
subtype="text"
required
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.power_path"
@update:model-value="
updateConfiguration($event, 'configuration.power_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine ganze Zahl (Integer) erwartet, welche
die aktuelle Leistung in Watt darstellt.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Zählerstand laden"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.imported_path"
@update:model-value="
updateConfiguration($event, 'configuration.imported_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine Zahl (Float) erwartet, welche den
aktuellen absoluten Zählerstand in kWh darstellt.<br />
Wenn dieses Feld leer ist, wird der Zählerstand intern
simuliert.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Zählerstand entladen"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.exported_path"
@update:model-value="
updateConfiguration($event, 'configuration.exported_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine Zahl (Float) erwartet, welche den
aktuellen absoluten Zählerstand in kWh darstellt.<br />
Wenn dieses Feld leer ist, wird der Zählerstand intern
simuliert.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Ladestand"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.soc_path"
@update:model-value="
updateConfiguration($event, 'configuration.soc_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine ganze Zahl (Integer) erwartet, welche
den aktuellen Ladestand (SoC) in Prozent darstellt.
</template>
</openwb-base-text-input>
</div>
</template>

<script>
export default {
name: "DeviceHttpBat",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
deviceId: { default: undefined },
componentId: { required: true },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
132 changes: 132 additions & 0 deletions src/components/devices/http/counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<template>
<div class="device-http-counter">
<openwb-base-heading>
Einstellungen für Http Zähler
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-text-input
title="Pfad für Leistung"
subtype="text"
required
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.power_path"
@update:model-value="
updateConfiguration($event, 'configuration.power_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine ganze Zahl (Integer) erwartet, welche
die aktuelle Leistung in Watt darstellt.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Zählerstand Bezug"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.imported_path"
@update:model-value="
updateConfiguration($event, 'configuration.imported_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine Zahl (Float) erwartet, welche den
aktuellen absoluten Zählerstand in kWh darstellt.<br />
Wenn dieses Feld leer ist, wird der Zählerstand intern
simuliert.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Zählerstand Einspeisung"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.exported_path"
@update:model-value="
updateConfiguration($event, 'configuration.exported_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine Zahl (Float) erwartet, welche den
aktuellen absoluten Zählerstand in kWh darstellt.<br />
Wenn dieses Feld leer ist, wird der Zählerstand intern
simuliert.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Strom Phase 1"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.current_l1_path"
@update:model-value="
updateConfiguration($event, 'configuration.current_l1_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine Zahl (Float) erwartet, welche die
aktuelle Stromstärke der 1. Phase in Ampere darstellt.<br />
Wenn dieses Feld leer ist, kann kein Lastmanagement berechnet
werden!
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Strom Phase 2"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.current_l2_path"
@update:model-value="
updateConfiguration($event, 'configuration.current_l2_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine Zahl (Float) erwartet, welche die
aktuelle Stromstärke der 2. Phase in Ampere darstellt.<br />
Wenn dieses Feld leer ist, kann kein Lastmanagement berechnet
werden!
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Pfad für Strom Phase 3"
subtype="text"
pattern="^/[-a-zA-Z0-9@:%_\+.~#?&/=]*"
:model-value="configuration.current_l3_path"
@update:model-value="
updateConfiguration($event, 'configuration.current_l3_path')
"
>
<template #help>
Diese Angabe wird an die IP bzw. den Hostnamen angehängt und
muss mit einem Schrägstrich "/" beginnen.<br />
Es wird vom Server eine Zahl (Float) erwartet, welche die
aktuelle Stromstärke der 3. Phase in Ampere darstellt.<br />
Wenn dieses Feld leer ist, kann kein Lastmanagement berechnet
werden!
</template>
</openwb-base-text-input>
</div>
</template>

<script>
export default {
name: "DeviceHttpCounter",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
deviceId: { default: undefined },
componentId: { required: true },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
Loading

0 comments on commit e3913bb

Please sign in to comment.