Skip to content

Package updates and code/text cleanup #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 146 additions & 140 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
"build-prod": "vite build --out-dir=/var/www/html/openWB/web/settings --emptyOutDir"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-regular-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fortawesome/vue-fontawesome": "^3.0.8",
"@popperjs/core": "^2.11.8",
"axios": "^1.7.7",
"axios": "^1.7.9",
"bootstrap": "^4.6.2",
"browserify": "^17.0.1",
"buffer": "^6.0.3",
"chart.js": "^4.4.6",
"chart.js": "^4.4.7",
"chartjs-adapter-luxon": "^1.3.1",
"chartjs-plugin-zoom": "^2.0.1",
"core-js": "^3.39.0",
"chartjs-plugin-zoom": "^2.2.0",
"core-js": "^3.40.0",
"crypto-browserify": "^3.12.1",
"hammerjs": "^2.0.8",
"jquery": "^3.7.1",
Expand All @@ -37,29 +37,29 @@
"stream-browserify": "^3.0.0",
"url": "^0.11.4",
"urlsafe-base64": "^1.0.0",
"vue": "^3.5.12",
"vue": "^3.5.13",
"vue-axios": "^3.5.2",
"vue-chartjs": "^5.3.2",
"vue-router": "^4.4.5",
"vue3-table-lite": "^1.4.0",
"vue-router": "^4.5.0",
"vue3-table-lite": "^1.4.2",
"vuedraggable": "^4.1.0",
"vuex": "^4.1.0"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.10.4",
"@rushstack/eslint-patch": "^1.10.5",
"@vitejs/plugin-vue": "^4.6.2",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/test-utils": "^2.4.6",
"eslint": "^9.14.0",
"eslint": "^9.19.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.31.0",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-vue": "^9.32.0",
"jsdom": "^24.1.3",
"postcss": "^8.4.47",
"postcss": "^8.5.1",
"postcss-preset-env": "^9.6.0",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"rollup-plugin-node-polyfills": "^0.2.1",
"vite": "^4.5.5",
"vite": "^4.5.9",
"vite-plugin-node-polyfills": "^0.9.0",
"vitest": "^1.6.0"
}
Expand Down
8 changes: 0 additions & 8 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export default {
return new Promise((resolve) => setTimeout(resolve, milliseconds));
}

console.debug("saving values...");
this.$store.state.local.savingData = true;
// collect data
let topics = {};
Expand All @@ -102,7 +101,6 @@ export default {
console.error("expected array, got ", typeof topicsToSave);
}
}
// console.debug("topics", topics);
for (const [topic, payload] of Object.entries(topics)) {
let setTopic = topic.replace("openWB/", "openWB/set/");
console.debug("saving data:", setTopic, payload);
Expand All @@ -111,7 +109,6 @@ export default {
// This may change with newer versions.
await sleep(100);
}
console.debug("done saving data");
this.$store.state.local.savingData = false;
},
/**
Expand Down Expand Up @@ -167,9 +164,6 @@ export default {
console.error("Connection failed", error);
});
this.client.on("message", (topic, message) => {
// console.debug(
// `Received message "${message}" from topic "${topic}"`
// );
if (message.toString().length > 0) {
let myPayload = undefined;
try {
Expand All @@ -192,7 +186,6 @@ export default {
});
},
doSubscribe(topics) {
console.debug("doSubscribe", topics);
topics.forEach((topic) => {
this.$store.commit("addSubscription", topic);
if (this.$store.getters.subscriptionCount(topic) == 1) {
Expand All @@ -216,7 +209,6 @@ export default {
});
},
doUnsubscribe(topics) {
console.debug("doUnsubscribe", topics);
topics.forEach((topic) => {
this.$store.commit("removeSubscription", topic);
if (this.$store.getters.subscriptionCount(topic) == 0) {
Expand Down
5 changes: 1 addition & 4 deletions src/components/OpenwbBaseCopyToClipboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default {
methods: {
click() {
// event.target may be our icon, so we use a ref here
console.debug(this.$refs["slot-wrapper"].innerText);
if (this.clipboardApiAvailable) {
navigator.clipboard.writeText(this.$refs["slot-wrapper"].innerText).then(
() => {
Expand All @@ -48,9 +47,8 @@ export default {
},
);
} else {
console.debug("clipboard api not supported/enabled, fallback to select");
console.debug("clipboard api not supported/enabled, fallback to selection or text range");
if (window.getSelection) {
console.debug("using 'window.getSelection'");
const selection = window.getSelection();
const range = document.createRange();
range.selectNodeContents(this.$refs["slot-wrapper"]);
Expand All @@ -59,7 +57,6 @@ export default {
return;
}
if (document.body.createTextRange) {
console.debug("using 'document.body.createTextRange'");
const range = document.body.createTextRange();
range.moveToElementText(this.$refs["slot-wrapper"]);
range.select();
Expand Down
2 changes: 1 addition & 1 deletion src/components/OpenwbBaseTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default {
get() {
if (this.subtype == "json") {
if (this.inputInvalid) {
console.debug("returning invalid String");
console.debug("returning invalid JSON as String");
return this.tempValue;
} else {
return JSON.stringify(this.tempValue, undefined, 2);
Expand Down
3 changes: 0 additions & 3 deletions src/components/OpenwbNestedList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ export default {
return undefined;
}
},
// elementEdit(id) {
// console.log("edit Element:", id);
// },
},
};
</script>
Expand Down
1 change: 0 additions & 1 deletion src/components/OpenwbSortableList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default {
return this.modelValue;
},
set(newValue) {
console.debug("update in sortableList", newValue);
this.$emit("update:modelValue", newValue);
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/backup_clouds/OpenwbBackupCloudProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
emits: ["update:configuration", "sendCommand"],
computed: {
myComponent() {
console.debug(`loading backup cloud: ${this.backupCloud.type}`);
console.debug(`loading backup cloud: ${this.backupCloud.name} (${this.backupCloud.type})`);
return defineAsyncComponent({
loader: () => import(`./${this.backupCloud.type}/backup_cloud.vue`),
errorComponent: OpenwbBackupCloudFallback,
Expand Down
4 changes: 2 additions & 2 deletions src/components/charge_points/OpenwbChargePointProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export default {
emits: ["update:configuration"],
computed: {
myChargePointSettingsComponent() {
console.debug(`loading charge point settings: ${this.chargePoint.type}`);
console.debug(`loading charge point settings: ${this.chargePoint.name} (${this.chargePoint.type})`);
return defineAsyncComponent({
loader: () => import(`./${this.chargePoint.type}/chargePoint.vue`),
errorComponent: OpenwbChargePointConfigFallback,
});
},
myChargePointCommandsComponent() {
console.debug(`loading charge point commands: ${this.chargePoint.type}`);
console.debug(`loading charge point commands: ${this.chargePoint.name} (${this.chargePoint.type})`);
return defineAsyncComponent({
loader: () => import(`./${this.chargePoint.type}/commands.vue`),
errorComponent: OpenwbChargePointCommandsFallback,
Expand Down
1 change: 0 additions & 1 deletion src/components/charge_points/openwb_pro/commands.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default {
formData.append("data", '{"ip_address":"' + this.chargePoint.configuration.ip_address + '"}');
const startedMessage = "Die Aktualisierung der openWB Pro wird gestartet...";
this.$root.postClientMessage(startedMessage, "info");
console.debug(location);
this.axios
.post(
location.protocol +
Expand Down
4 changes: 3 additions & 1 deletion src/components/devices/OpenwbConfigProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export default {
emits: ["update:configuration"],
computed: {
myComponent() {
console.debug(`loading component: ${this.device.type} / ${this.component?.type}`);
console.debug(
`loading component: ${this.device.name} (${this.device.type}) / ${this.component?.name} (${this.component?.type})`,
);
if (this.component !== undefined) {
return defineAsyncComponent({
loader: () => import(`./${this.device.vendor}/${this.device.type}/${this.component.type}.vue`),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="device-carlogavazzi">
<div class="device-carlo-gavazzi">
<openwb-base-heading> Einstellungen für Carlo Gavazzi </openwb-base-heading>
<openwb-base-text-input
title="IP oder Hostname"
Expand Down
8 changes: 4 additions & 4 deletions src/components/devices/huawei/huawei/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
not-selected="Bitte auswählen"
:options="[
{ value: 's_dongle', text: 'SDongle' },
{ value: 'modbus_rtu', text: 'Modbus RTU (bspw via Protoss)' },
{ value: 'modbus_rtu', text: 'Modbus RTU (mit Modbus/TCP Adapter)' },
]"
:model-value="device.configuration.type"
required
@update:model-value="updateConfiguration($event, 'configuration.type')"
>
<template #help>
Die Anbindung über den Huawei SDongle erfordert die Regelgeschwindigkeit "sehr langsam". Alternativ kann Huawei
auch mittels Wandler (z.B. Protoss) über den Modbus RTU Ausgang des Wechselrichters abgefragt werden. Hier gibt
es keine Einschränkungen der Regelgeschwindigkeit. Eine gleichzeitige Nutzung von SDongle und Modbus RTU ist
nicht möglich.
auch mittels Modbus/TCP Adapter (z.B. Protoss oder Elfin) über den Modbus RTU Ausgang des Wechselrichters
abgefragt werden. Hier gibt es keine Einschränkungen der Regelgeschwindigkeit. Eine gleichzeitige Nutzung von
SDongle und Modbus RTU ist nicht möglich.
</template>
</openwb-base-select-input>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/devices/kostal/kostal_plenticore/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="device-kostal-plenticore">
<openwb-base-heading> Einstellungen für Kostal Plenticore </openwb-base-heading>
<openwb-base-alert subtype="info">
Wenn am Kostal Plenticore-Wechselrichter ein EM300 oder Kostal Energy Smart Meter (KSEM) angeschlossen ist, muss
Wenn am Kostal Plenticore-Wechselrichter ein EM300 oder Kostal Smart Energy Meter (KSEM) angeschlossen ist, muss
eine Zähler-und eine Wechselrichter-Komponente angelegt werden.
</openwb-base-alert>
<openwb-base-text-input
Expand Down
2 changes: 1 addition & 1 deletion src/components/devices/shelly/shelly/counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</openwb-base-heading>
<openwb-base-alert subtype="info">
<span class="text-danger">
Als EVU-Zähler werden nur dreiphasige Shellys unterstützt (z.B. Shelly 3EM, Shelly Pro 3EM)</span
Als EVU-Zähler werden nur dreiphasige Shelly unterstützt (z.B. Shelly 3EM, Shelly Pro 3EM)</span
><br />
Diese Komponente benötigt keine Einstellungen.
</openwb-base-alert>
Expand Down
4 changes: 2 additions & 2 deletions src/components/devices/shelly/shelly/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="device-shelly">
<openwb-base-heading> Einstellungen für Shelly </openwb-base-heading>
<openwb-base-alert subtype="info">
Unterstützt werden theoretisch alle ein- und dreiphasigen Shellys der Generation 1-3. Getestete Modelle sind
Shelly 1pm, 1pm plus, Pro Pro 3EM, Plug S.
Unterstützt werden theoretisch alle ein- und dreiphasigen Shelly der Generation 1-3. Getestete Modelle sind Shelly
1pm, 1pm plus, Pro Pro 3EM, Plug S.
</openwb-base-alert>
<openwb-base-text-input
title="IP oder Hostname"
Expand Down
2 changes: 1 addition & 1 deletion src/components/devices/solaredge/solaredge/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<openwb-base-heading> Einstellungen für SolarEdge </openwb-base-heading>
<openwb-base-alert subtype="info">
ModbusTCP muss im Wechselrichter aktiviert werden und der Wechselrichter per LAN angebunden sein.<br />
SolarEdge lässt nur eine ModbusTCP-Verbindung zu. Wenn Sie mit einem weiteren Smarthome-System, wie z.B. ioBroker
SolarEdge lässt nur eine ModbusTCP-Verbindung zu. Wenn Sie mit einem weiteren SmartHome-System, wie z.B. ioBroker
oder openHAB, den SolarEdge-Wechselrichter abfragen, kann dies die Abfrage durch die openWB stören oder
verhindern.
</openwb-base-alert>
Expand Down
2 changes: 1 addition & 1 deletion src/components/display_themes/OpenwbDisplayThemeProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
emits: ["update:configuration"],
computed: {
myComponent() {
console.debug(`loading display theme: ${this.displayTheme.type}`);
console.debug(`loading display theme: ${this.displayTheme.name} (${this.displayTheme.type})`);
return defineAsyncComponent({
loader: () => import(`./${this.displayTheme.type}/displayTheme.vue`),
errorComponent: OpenwbDisplayThemeFallback,
Expand Down
1 change: 0 additions & 1 deletion src/components/display_themes/colors/displayTheme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
>
<template #help> Der PIN muss aus 4 bis 10 Zahlen bestehen. </template>
</openwb-base-text-input>

</div>
</template>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
emits: ["update:configuration"],
computed: {
myComponent() {
console.debug(`loading electricity tariff cloud: ${this.electricityTariff.type}`);
console.debug(`loading electricity tariff: ${this.electricityTariff.name} (${this.electricityTariff.type})`);
return defineAsyncComponent({
loader: () => import(`./${this.electricityTariff.type}/electricity_tariff.vue`),
errorComponent: OpenwbElectricityTariffFallback,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="electricity-tariff-energycharts">
<div class="electricity-tariff-energy-charts">
<openwb-base-alert subtype="info">
Börsenstrompreise von Energy Charts (energy-charts.info)<br />
Die Rohdaten werden von Wissenschaftlern des Fraunhofer-Instituts für Solare Energiesysteme ISE aus zahlreichen
Expand Down
2 changes: 1 addition & 1 deletion src/components/monitoring/OpenwbMonitoringProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
emits: ["update:configuration"],
computed: {
myComponent() {
console.debug(`loading monitoring: ${this.monitoring.type}`);
console.debug(`loading monitoring: ${this.monitoring.name} (${this.monitoring.type})`);
return defineAsyncComponent({
loader: () => import(`./${this.monitoring.type}/monitoring.vue`),
errorComponent: OpenwbMonitoringFallback,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export default {
emits: ["update:configuration", "sendCommand"],
computed: {
myComponent() {
console.debug(`loading backup cloud: ${this.rippleControlReceiver.type}`);
console.debug(
`loading ripple control receiver: ${this.rippleControlReceiver.name} (${this.rippleControlReceiver.type})`,
);
return defineAsyncComponent({
loader: () => import(`./${this.rippleControlReceiver.type}/ripple_control_receiver.vue`),
errorComponent: OpenwbRippleControlReceiverFallback,
Expand Down
2 changes: 1 addition & 1 deletion src/components/vehicles/OpenwbVehicleProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
emits: ["update:configuration"],
computed: {
myComponent() {
console.debug(`loading vehicle: ${this.vehicle.type}`);
console.debug(`loading vehicle: ${this.vehicle.name} (${this.vehicle.type})`);
return defineAsyncComponent({
loader: () => import(`./${this.vehicle.type}/vehicle.vue`),
errorComponent: OpenwbVehicleFallback,
Expand Down
Loading
Loading