From 233e3ed64b8193f46a3cd1b0aed7e4d4f8e569ea Mon Sep 17 00:00:00 2001 From: lsiepel Date: Mon, 9 Sep 2024 19:12:23 +0200 Subject: [PATCH] [senechome] Fix `ArrayIndexOutOfBoundsException` when less than 4 packs (#17299) * Fix issue and warnings * Fix operator Signed-off-by: Leo Siepel Signed-off-by: Ciprian Pascu --- .../senechome/internal/SenecHomeApi.java | 2 +- .../senechome/internal/SenecHomeHandler.java | 150 ++++++++++-------- .../senechome/internal/SenecSystemStatus.java | 3 + .../internal/SenecWallboxStatus.java | 3 + .../{json => dto}/SenecHomeBattery.java | 2 +- .../{json => dto}/SenecHomeEnergy.java | 2 +- .../internal/{json => dto}/SenecHomeGrid.java | 2 +- .../{json => dto}/SenecHomePower.java | 2 +- .../{json => dto}/SenecHomeResponse.java | 2 +- .../{json => dto}/SenecHomeStatistics.java | 2 +- .../{json => dto}/SenecHomeTemperature.java | 2 +- .../{json => dto}/SenecHomeWallbox.java | 2 +- 12 files changed, 98 insertions(+), 76 deletions(-) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomeBattery.java (97%) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomeEnergy.java (97%) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomeGrid.java (97%) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomePower.java (96%) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomeResponse.java (96%) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomeStatistics.java (97%) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomeTemperature.java (96%) rename bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/{json => dto}/SenecHomeWallbox.java (96%) diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeApi.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeApi.java index 9dd66a1dd56..ccb0246e7a9 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeApi.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeApi.java @@ -27,7 +27,7 @@ import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.MimeTypes; -import org.openhab.binding.senechome.internal.json.SenecHomeResponse; +import org.openhab.binding.senechome.internal.dto.SenecHomeResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeHandler.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeHandler.java index 85733e6e870..a5eaf7831b5 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeHandler.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeHandler.java @@ -32,7 +32,7 @@ import javax.measure.Unit; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.jetty.client.HttpClient; -import org.openhab.binding.senechome.internal.json.SenecHomeResponse; +import org.openhab.binding.senechome.internal.dto.SenecHomeResponse; import org.openhab.core.cache.ExpiringCache; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.OnOffType; @@ -67,8 +67,6 @@ public class SenecHomeHandler extends BaseThingHandler { private static final BigDecimal DIVISOR_MILLI_TO_KILO = BigDecimal.valueOf(1000000); // divisor to transform from milli to "iso" UNIT (e.g. mV => V) private static final BigDecimal DIVISOR_MILLI_TO_ISO = BigDecimal.valueOf(1000); - // divisor to transform from "iso" to kilo UNIT (e.g. W => kW) - private static final BigDecimal DIVISOR_ISO_TO_KILO = BigDecimal.valueOf(1000); // ix (x=1,3,8) types => hex encoded integer value private static final String VALUE_TYPE_INT1 = "i1"; public static final String VALUE_TYPE_INT3 = "i3"; @@ -82,7 +80,7 @@ public class SenecHomeHandler extends BaseThingHandler { private @Nullable ScheduledFuture refreshJob; private @Nullable PowerLimitationStatusDTO limitationStatus = null; - private final @Nullable SenecHomeApi senecHomeApi; + private final SenecHomeApi senecHomeApi; private SenecHomeConfigurationDTO config = new SenecHomeConfigurationDTO(); private final ExpiringCache refreshCache = new ExpiringCache<>(Duration.ofSeconds(5), this::refreshState); @@ -133,6 +131,18 @@ public class SenecHomeHandler extends BaseThingHandler { refreshCache.getValue(); } + private > void updateQtyStateIfAvailable(String channel, String @Nullable [] valueArray, + int arrayIndex, int scale, Unit unit) { + updateQtyStateIfAvailable(channel, valueArray, arrayIndex, scale, unit, null); + } + + private > void updateQtyStateIfAvailable(String channel, String @Nullable [] valueArray, + int arrayIndex, int scale, Unit unit, @Nullable BigDecimal divisor) { + if (valueArray != null && valueArray.length > arrayIndex) { + updateQtyState(channel, valueArray[arrayIndex], scale, unit, divisor); + } + } + public @Nullable Boolean refreshState() { SenecHomeResponse response = null; try { @@ -197,65 +207,68 @@ public class SenecHomeHandler extends BaseThingHandler { updateQtyState(CHANNEL_SENEC_GRID_VOLTAGE_PH3, response.grid.currentGridVoltagePerPhase[2], 2, Units.VOLT); updateQtyState(CHANNEL_SENEC_GRID_FREQUENCY, response.grid.currentGridFrequency, 2, Units.HERTZ); - if (response.battery.chargedEnergy != null) { - updateQtyState(CHANNEL_SENEC_CHARGED_ENERGY_PACK1, response.battery.chargedEnergy[0], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - updateQtyState(CHANNEL_SENEC_CHARGED_ENERGY_PACK2, response.battery.chargedEnergy[1], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - updateQtyState(CHANNEL_SENEC_CHARGED_ENERGY_PACK3, response.battery.chargedEnergy[2], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - updateQtyState(CHANNEL_SENEC_CHARGED_ENERGY_PACK4, response.battery.chargedEnergy[3], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - } - if (response.battery.dischargedEnergy != null) { - updateQtyState(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK1, response.battery.dischargedEnergy[0], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - updateQtyState(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK2, response.battery.dischargedEnergy[1], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - updateQtyState(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK3, response.battery.dischargedEnergy[2], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - updateQtyState(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK4, response.battery.dischargedEnergy[3], 2, - Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); - } + updateQtyStateIfAvailable(CHANNEL_SENEC_CHARGED_ENERGY_PACK1, response.battery.chargedEnergy, 0, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + updateQtyStateIfAvailable(CHANNEL_SENEC_CHARGED_ENERGY_PACK2, response.battery.chargedEnergy, 1, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + updateQtyStateIfAvailable(CHANNEL_SENEC_CHARGED_ENERGY_PACK3, response.battery.chargedEnergy, 2, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + updateQtyStateIfAvailable(CHANNEL_SENEC_CHARGED_ENERGY_PACK4, response.battery.chargedEnergy, 3, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + + updateQtyStateIfAvailable(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK1, response.battery.dischargedEnergy, 0, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + updateQtyStateIfAvailable(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK2, response.battery.dischargedEnergy, 1, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + updateQtyStateIfAvailable(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK3, response.battery.dischargedEnergy, 2, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + updateQtyStateIfAvailable(CHANNEL_SENEC_DISCHARGED_ENERGY_PACK4, response.battery.dischargedEnergy, 3, 2, + Units.KILOWATT_HOUR, DIVISOR_MILLI_TO_KILO); + if (response.battery.cycles != null) { - updateDecimalState(CHANNEL_SENEC_CYCLES_PACK1, response.battery.cycles[0]); - updateDecimalState(CHANNEL_SENEC_CYCLES_PACK2, response.battery.cycles[1]); - updateDecimalState(CHANNEL_SENEC_CYCLES_PACK3, response.battery.cycles[2]); - updateDecimalState(CHANNEL_SENEC_CYCLES_PACK4, response.battery.cycles[3]); - } - if (response.battery.current != null) { - updateQtyState(CHANNEL_SENEC_CURRENT_PACK1, response.battery.current[0], 2, Units.AMPERE); - updateQtyState(CHANNEL_SENEC_CURRENT_PACK2, response.battery.current[1], 2, Units.AMPERE); - updateQtyState(CHANNEL_SENEC_CURRENT_PACK3, response.battery.current[2], 2, Units.AMPERE); - updateQtyState(CHANNEL_SENEC_CURRENT_PACK4, response.battery.current[3], 2, Units.AMPERE); - } - if (response.battery.voltage != null) { - updateQtyState(CHANNEL_SENEC_VOLTAGE_PACK1, response.battery.voltage[0], 2, Units.VOLT); - updateQtyState(CHANNEL_SENEC_VOLTAGE_PACK2, response.battery.voltage[1], 2, Units.VOLT); - updateQtyState(CHANNEL_SENEC_VOLTAGE_PACK3, response.battery.voltage[2], 2, Units.VOLT); - updateQtyState(CHANNEL_SENEC_VOLTAGE_PACK4, response.battery.voltage[3], 2, Units.VOLT); - } - if (response.battery.maxCellVoltage != null) { - updateQtyState(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK1, response.battery.maxCellVoltage[0], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); - updateQtyState(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK2, response.battery.maxCellVoltage[1], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); - updateQtyState(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK3, response.battery.maxCellVoltage[2], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); - updateQtyState(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK4, response.battery.maxCellVoltage[3], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); - } - if (response.battery.minCellVoltage != null) { - updateQtyState(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK1, response.battery.minCellVoltage[0], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); - updateQtyState(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK2, response.battery.minCellVoltage[1], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); - updateQtyState(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK3, response.battery.minCellVoltage[2], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); - updateQtyState(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK4, response.battery.minCellVoltage[3], 3, Units.VOLT, - DIVISOR_MILLI_TO_ISO); + int length = response.battery.cycles.length; + if (length > 0) { + updateDecimalState(CHANNEL_SENEC_CYCLES_PACK1, response.battery.cycles[0]); + } + if (length > 1) { + updateDecimalState(CHANNEL_SENEC_CYCLES_PACK2, response.battery.cycles[1]); + } + if (length > 2) { + updateDecimalState(CHANNEL_SENEC_CYCLES_PACK3, response.battery.cycles[2]); + } + if (length > 3) { + updateDecimalState(CHANNEL_SENEC_CYCLES_PACK4, response.battery.cycles[3]); + } } + updateQtyStateIfAvailable(CHANNEL_SENEC_CURRENT_PACK1, response.battery.current, 0, 2, Units.AMPERE); + updateQtyStateIfAvailable(CHANNEL_SENEC_CURRENT_PACK2, response.battery.current, 1, 2, Units.AMPERE); + updateQtyStateIfAvailable(CHANNEL_SENEC_CURRENT_PACK3, response.battery.current, 2, 2, Units.AMPERE); + updateQtyStateIfAvailable(CHANNEL_SENEC_CURRENT_PACK4, response.battery.current, 3, 2, Units.AMPERE); + + updateQtyStateIfAvailable(CHANNEL_SENEC_VOLTAGE_PACK1, response.battery.voltage, 0, 2, Units.VOLT); + updateQtyStateIfAvailable(CHANNEL_SENEC_VOLTAGE_PACK2, response.battery.voltage, 1, 2, Units.VOLT); + updateQtyStateIfAvailable(CHANNEL_SENEC_VOLTAGE_PACK3, response.battery.voltage, 2, 2, Units.VOLT); + updateQtyStateIfAvailable(CHANNEL_SENEC_VOLTAGE_PACK4, response.battery.voltage, 3, 2, Units.VOLT); + + updateQtyStateIfAvailable(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK1, response.battery.maxCellVoltage, 0, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + updateQtyStateIfAvailable(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK2, response.battery.maxCellVoltage, 1, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + updateQtyStateIfAvailable(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK3, response.battery.maxCellVoltage, 2, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + updateQtyStateIfAvailable(CHANNEL_SENEC_MAX_CELL_VOLTAGE_PACK4, response.battery.maxCellVoltage, 3, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + + updateQtyStateIfAvailable(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK1, response.battery.minCellVoltage, 0, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + updateQtyStateIfAvailable(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK2, response.battery.minCellVoltage, 1, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + updateQtyStateIfAvailable(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK3, response.battery.minCellVoltage, 2, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + updateQtyStateIfAvailable(CHANNEL_SENEC_MIN_CELL_VOLTAGE_PACK4, response.battery.minCellVoltage, 3, 3, + Units.VOLT, DIVISOR_MILLI_TO_ISO); + if (response.temperature != null) { updateQtyState(CHANNEL_SENEC_BATTERY_TEMPERATURE, response.temperature.batteryTemperature, 0, SIUnits.CELSIUS); @@ -376,9 +389,10 @@ public class SenecHomeHandler extends BaseThingHandler { } protected void updatePowerLimitationStatus(Channel channel, boolean status, int duration) { - if (this.limitationStatus != null) { - if (this.limitationStatus.state == status) { - long stateSince = new Date().getTime() - this.limitationStatus.time; + PowerLimitationStatusDTO limitationStatus = this.limitationStatus; + if (limitationStatus != null) { + if (limitationStatus.state == status) { + long stateSince = new Date().getTime() - limitationStatus.time; if (((int) (stateSince / 1000)) < duration) { // skip updating state (possible flapping state) @@ -387,15 +401,17 @@ public class SenecHomeHandler extends BaseThingHandler { logger.debug("{} longer than required duration {}", status, duration); } } else { - this.limitationStatus.state = status; - this.limitationStatus.time = new Date().getTime(); + limitationStatus.state = status; + limitationStatus.time = new Date().getTime(); + this.limitationStatus = limitationStatus; // skip updating state (state changed, possible flapping state) return; } } else { - this.limitationStatus = new PowerLimitationStatusDTO(); - this.limitationStatus.state = status; + limitationStatus = new PowerLimitationStatusDTO(); + limitationStatus.state = status; + this.limitationStatus = limitationStatus; } logger.debug("Updating power limitation state {}", status); diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecSystemStatus.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecSystemStatus.java index affed421c29..2f73d76adc5 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecSystemStatus.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecSystemStatus.java @@ -12,6 +12,8 @@ */ package org.openhab.binding.senechome.internal; +import org.eclipse.jdt.annotation.NonNullByDefault; + /** * The {@link SenecSystemStatus} class defines available Senec specific * system states. @@ -19,6 +21,7 @@ package org.openhab.binding.senechome.internal; * @author Steven Schwarznau - Initial contribution * */ +@NonNullByDefault public enum SenecSystemStatus { INITIALSTATE(0, "INITIAL STATE"), diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecWallboxStatus.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecWallboxStatus.java index 3beae458537..63ad27f4a3f 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecWallboxStatus.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecWallboxStatus.java @@ -12,11 +12,14 @@ */ package org.openhab.binding.senechome.internal; +import org.eclipse.jdt.annotation.NonNullByDefault; + /** * Enum with available Senec specific wallbox states. * * @author Erwin Guib - Initial Contribution */ +@NonNullByDefault public enum SenecWallboxStatus { WAIT_FOR_EV(0xA1, "Waiting for EV"), EV_ASKING_CHARGE(0xB1, "EV asking for charge"), diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeBattery.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeBattery.java similarity index 97% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeBattery.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeBattery.java index a2cc9ed57d7..886982baf0f 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeBattery.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeBattery.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; import java.util.Arrays; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeEnergy.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeEnergy.java similarity index 97% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeEnergy.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeEnergy.java index c4c7fbf8c57..f943394127d 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeEnergy.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeEnergy.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeGrid.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeGrid.java similarity index 97% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeGrid.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeGrid.java index 87fd844db47..9955ae9c1cf 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeGrid.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeGrid.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomePower.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomePower.java similarity index 96% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomePower.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomePower.java index b2036702624..85901fa8906 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomePower.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomePower.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; import java.util.Arrays; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeResponse.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeResponse.java similarity index 96% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeResponse.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeResponse.java index 7c23982e0e8..ef828ae600a 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeResponse.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeResponse.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeStatistics.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeStatistics.java similarity index 97% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeStatistics.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeStatistics.java index 25816f8b8c7..3e104a3430a 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeStatistics.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeStatistics.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; import java.util.Arrays; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeTemperature.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeTemperature.java similarity index 96% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeTemperature.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeTemperature.java index d35ec4d2d20..739f38063fd 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeTemperature.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeTemperature.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; diff --git a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeWallbox.java b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeWallbox.java similarity index 96% rename from bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeWallbox.java rename to bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeWallbox.java index 8843678b318..1bf23cf48ee 100644 --- a/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/json/SenecHomeWallbox.java +++ b/bundles/org.openhab.binding.senechome/src/main/java/org/openhab/binding/senechome/internal/dto/SenecHomeWallbox.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.openhab.binding.senechome.internal.json; +package org.openhab.binding.senechome.internal.dto; import java.io.Serializable; import java.util.Arrays;