Skip to content

Commit

Permalink
Merge pull request #76 from benderl/dev
Browse files Browse the repository at this point in the history
add more device and component configuration pages
  • Loading branch information
benderl authored Feb 15, 2022
2 parents b3cf02a + 5281b6e commit e38c7cb
Show file tree
Hide file tree
Showing 10 changed files with 314 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/components/devices/sma_shm/counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="device-smahm-counter">
<openwb-base-heading>
Einstellungen für SMA-HM/EM Zähler
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-text-input
title="Seriennummer"
:model-value="configuration.serials"
@update:model-value="
updateConfiguration($event, 'configuration.serials')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceSmahmCounter",
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>
27 changes: 27 additions & 0 deletions src/components/devices/sma_shm/device.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div class="device-smahm">
<openwb-base-heading>
Einstellungen für SMA Home Manager / Energy Meter
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-alert subtype="info">
Dieses Gerät benötigt keine Einstellungen.
</openwb-base-alert>
</div>
</template>

<script>
export default {
name: "DeviceSmaHm",
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>
32 changes: 32 additions & 0 deletions src/components/devices/sma_shm/inverter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="device-smahm-inverter">
<openwb-base-heading>
Einstellungen für SMA-HM/EM Wechselrichter
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-text-input
title="Seriennummer"
:model-value="configuration.serials"
@update:model-value="
updateConfiguration($event, 'configuration.serials')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceSmahmInverter",
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/solax/bat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-solax-bat">
<openwb-base-heading>
Einstellungen für Solax 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: "DeviceSolaxBat",
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/solax/counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-solax-counter">
<openwb-base-heading>
Einstellungen für Solax 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: "DeviceSolaxCounter",
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/solax/device.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="device-solax">
<openwb-base-heading>
Einstellungen für Solax
<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: "DeviceSolax",
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/solax/inverter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-solax-inverter">
<openwb-base-heading>
Einstellungen für Solax 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: "DeviceSolaxInverter",
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/studer/bat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="device-studer-bat">
<openwb-base-heading>
Einstellungen für Studer 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: "DeviceStuderBat",
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/studer/device.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="device-studer">
<openwb-base-heading>
Einstellungen für Studer
<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: "DeviceStuder",
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>
47 changes: 47 additions & 0 deletions src/components/devices/studer/inverter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<template>
<div class="device-studer-inverter">
<openwb-base-heading>
Einstellungen für Studer Wechselrichter
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-button-group-input
title="Typ der MPPT Solarladeregler"
:buttons="[
{ buttonValue: 'VT', text: 'VT' },
{ buttonValue: 'VS', text: 'VS' },
]"
:model-value="configuration.vc_type"
@update:model-value="
updateConfiguration($event, 'configuration.vc_type')
"
>
<template #help>Hilfetext</template>
</openwb-base-button-group-input>
<openwb-base-number-input
title="Anzahl MPPT Solarladeregler"
:model-value="configuration.vc_count"
min="1"
max="9"
@update:model-value="
updateConfiguration($event, 'configuration.vc_count')
"
/>
</div>
</template>

<script>
export default {
name: "DeviceStuderInverter",
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>

0 comments on commit e38c7cb

Please sign in to comment.