Skip to content

Commit

Permalink
Merge pull request #74 from benderl/dev
Browse files Browse the repository at this point in the history
add more device and component config pages
  • Loading branch information
benderl authored Feb 15, 2022
2 parents e3913bb + c3cab2d commit b3cf02a
Show file tree
Hide file tree
Showing 32 changed files with 1,052 additions and 149 deletions.
296 changes: 156 additions & 140 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build-prod": "vue-cli-service --mode=production --dest=/var/www/html/openWB/web/settings build"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/fontawesome-svg-core": "^1.3.0",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/free-regular-svg-icons": "^5.15.4",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
Expand All @@ -22,10 +22,10 @@
"core-js": "^3.21.0",
"jquery": "^3.6.0",
"lodash": "^4.17.21",
"mqtt": "^4.3.4",
"mqtt": "^4.3.5",
"popper.js": "^1.16.1",
"vue": "^3.2.29",
"vue-axios": "^3.4.0",
"vue": "^3.2.31",
"vue-axios": "^3.4.1",
"vue-loader": "^15.9.8",
"vue-router": "^4.0.12",
"vuedraggable": "^4.1.0",
Expand All @@ -39,7 +39,7 @@
"@vue/cli-plugin-unit-jest": "^4.5.15",
"@vue/cli-plugin-vuex": "^4.5.15",
"@vue/cli-service": "^4.5.15",
"@vue/compiler-sfc": "^3.2.29",
"@vue/compiler-sfc": "^3.2.31",
"@vue/test-utils": "^2.0.0-rc.18",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
Expand Down
37 changes: 37 additions & 0 deletions src/components/devices/alpha_ess/bat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<div class="device-alphaess-bat">
<openwb-base-heading>
Einstellungen für Alpha ESS Batteriespeicher
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-select-input
title="Version"
notSelected="Bitte auswählen"
:options="[
{ value: 0, text: 'EMS älter als 1.23V' },
{ value: 1, text: 'EMS 1.23V oder neuer' },
]"
:model-value="configuration.version"
@update:model-value="
updateConfiguration($event, 'configuration.version')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceAlphaessBat",
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>
37 changes: 37 additions & 0 deletions src/components/devices/alpha_ess/counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<div class="device-alphaess-counter">
<openwb-base-heading>
Einstellungen für Alpha ESS Zähler
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-select-input
title="Version"
notSelected="Bitte auswählen"
:options="[
{ value: 0, text: 'EMS älter als 1.23V' },
{ value: 1, text: 'EMS 1.23V oder neuer' },
]"
:model-value="configuration.version"
@update:model-value="
updateConfiguration($event, 'configuration.version')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceAlphaessCounter",
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>
31 changes: 31 additions & 0 deletions src/components/devices/alpha_ess/device.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<div class="device-alphaess">
<openwb-base-heading>
Einstellungen für Alpha ESS
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-alert subtype="info">
Für dieses Gerät gibt es keine Einstellungen.
</openwb-base-alert>
<openwb-base-alert subtype="warning">
ToDo: Einstellung "Version" von den Komponenten in das Gerät
verschieben!
</openwb-base-alert>
</div>
</template>

<script>
export default {
name: "DeviceAlphaess",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
deviceId: { default: undefined },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>
37 changes: 37 additions & 0 deletions src/components/devices/alpha_ess/inverter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<div class="device-alphaess-inverter">
<openwb-base-heading>
Einstellungen für Alpha ESS Wechselrichter
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-select-input
title="Version"
notSelected="Bitte auswählen"
:options="[
{ value: 0, text: 'EMS älter als 1.23V' },
{ value: 1, text: 'EMS 1.23V oder neuer' },
]"
:model-value="configuration.version"
@update:model-value="
updateConfiguration($event, 'configuration.version')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceAlphaessInverter",
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>
3 changes: 3 additions & 0 deletions src/components/devices/carlo_gavazzi/counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<openwb-base-alert subtype="info">
Ausgelesen wird ID 1 auf Port 502. ModbusTCP muss aktiviert sein.
</openwb-base-alert>
<openwb-base-alert subtype="warning">
ToDo: Einstellungen für "ID" ergänzen.
</openwb-base-alert>
</div>
</template>

Expand Down
3 changes: 3 additions & 0 deletions src/components/devices/carlo_gavazzi/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
updateConfiguration($event, 'configuration.ip_address')
"
/>
<openwb-base-alert subtype="warning">
ToDo: Einstellungen für "Port" ergänzen.
</openwb-base-alert>
</div>
</template>

Expand Down
28 changes: 28 additions & 0 deletions src/components/devices/fronius/counter_s0.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-fronius-counters0">
<openwb-base-heading>
Einstellungen für Fronius S0 Zähler
<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: "DeviceFroniusCounters0",
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>
54 changes: 54 additions & 0 deletions src/components/devices/fronius/counter_sm.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template>
<div class="device-fronius-countersm">
<openwb-base-heading>
Einstellungen für Fronius SmartMeter
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-select-input
title="Installationsort"
notSelected="Bitte auswählen"
:options="[
{ value: 0, text: 'EVU-Zweig' },
{ value: 1, text: 'Hausverbrauchszweig' },
]"
:model-value="configuration.meter_location"
@update:model-value="
updateConfiguration($event, 'configuration.meter_location')
"
/>
<openwb-base-select-input
title="Kompatibilitätsmodus"
notSelected="Bitte auswählen"
:options="[
{ value: 0, text: 'Aus' },
{ value: 1, text: 'Variante 1' },
{ value: 2, text: 'Variante 2' },
]"
:model-value="configuration.variant"
@update:model-value="
updateConfiguration($event, 'configuration.variant')
"
/>
<openwb-base-alert subtype="warning">
ToDo: Einstellung "Installationsort" entfernen und durch die
Hierarchie festlegen.
</openwb-base-alert>
</div>
</template>

<script>
export default {
name: "DeviceFroniusCountersm",
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>
13 changes: 13 additions & 0 deletions src/components/devices/fronius/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
updateConfiguration($event, 'configuration.ip_address')
"
/>
<openwb-base-number-input
title="Meter ID"
:model-value="configuration.meter_id"
min="0"
max="1"
@update:model-value="
updateConfiguration($event, 'configuration.meter_id')
"
/>
<openwb-base-alert subtype="warning">
ToDo: Einstellung "Meter ID" ist nur für Zähler relevant. In diese
Komponenten verschieben.
</openwb-base-alert>
</div>
</template>

Expand Down
13 changes: 11 additions & 2 deletions src/components/devices/fronius/inverter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
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-text-input
title="IP oder Hostname 2. WR"
subtype="host"
:model-value="configuration.ip_address2"
@update:model-value="
updateConfiguration($event, 'configuration.ip_address2')
"
/>
<openwb-base-alert subtype="warning">
ToDo: Einstellung "IP address 2" entfernen. Stattdessen eine zweite
Komponente anlegen.
</openwb-base-alert>
</div>
</template>
Expand Down
7 changes: 5 additions & 2 deletions src/components/devices/http/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
<openwb-base-select-input
title="Protokoll"
:options="[
{ value: 'http', text: 'http://' },
{ value: 'https', text: 'https://' },
{ value: 'http', text: 'Unverschlüsselt (http://)' },
{ value: 'https', text: 'Verschlüsselt (https://)' },
]"
:model-value="configuration.protocol"
@update:model-value="
updateConfiguration($event, 'configuration.protocol')
"
/>
<openwb-base-alert subtype="warning">
ToDo: Einstellung "Port" ergänzen.
</openwb-base-alert>
</div>
</template>

Expand Down
28 changes: 28 additions & 0 deletions src/components/devices/huawei/bat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-huawei-bat">
<openwb-base-heading>
Einstellungen für Huawei 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: "DeviceHuaweiBat",
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>
28 changes: 28 additions & 0 deletions src/components/devices/huawei/counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-huawei-counter">
<openwb-base-heading>
Einstellungen für Huawei Zähler
<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: "DeviceHuaweiCounter",
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 b3cf02a

Please sign in to comment.