From 35d5b786727265d45de200e381f3a403e4a4e514 Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sat, 28 Oct 2023 12:03:23 +0200 Subject: [PATCH 01/13] [tesla] Add value holders for Software Update state Signed-off-by: Hakan Tandogan --- .../internal/protocol/SoftwareUpdate.java | 31 +++++++++++++++++++ .../tesla/internal/protocol/VehicleState.java | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/SoftwareUpdate.java diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/SoftwareUpdate.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/SoftwareUpdate.java new file mode 100644 index 0000000000000..d6139c5a5a492 --- /dev/null +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/SoftwareUpdate.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2010-2023 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.binding.tesla.internal.protocol; + +/** + * The {@link SoftwareUpdate} is a datastructure to capture + * variables sent by the Tesla Vehicle + * + * @author Hakan Tandogan - Initial contribution + */ +public class SoftwareUpdate { + + public int download_perc; + public int expected_duration_sec; + public int install_perc; + public String status; + public String version; + + SoftwareUpdate() { + } +} diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/VehicleState.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/VehicleState.java index b4fe8b8c1042c..98f66a7367ca8 100644 --- a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/VehicleState.java +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/VehicleState.java @@ -57,6 +57,8 @@ public class VehicleState { public String vehicle_name; public String wheel_type; + public SoftwareUpdate software_update; + VehicleState() { } } From 66442d0d1360ce69ca2140a2b8acf7803449610d Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sat, 28 Oct 2023 12:19:49 +0200 Subject: [PATCH 02/13] [tesla] Add channels for software update, including a switch for availability Signed-off-by: Hakan Tandogan --- .../tesla/internal/TeslaBindingConstants.java | 2 ++ .../internal/TeslaChannelSelectorProxy.java | 4 +++- .../internal/handler/TeslaVehicleHandler.java | 12 ++++++++++ .../resources/OH-INF/i18n/tesla.properties | 8 +++++++ .../main/resources/OH-INF/thing/channels.xml | 24 +++++++++++++++++++ .../main/resources/OH-INF/thing/model3.xml | 4 ++++ .../main/resources/OH-INF/thing/models.xml | 4 ++++ .../main/resources/OH-INF/thing/modelx.xml | 4 ++++ .../main/resources/OH-INF/thing/modely.xml | 4 ++++ 9 files changed, 65 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaBindingConstants.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaBindingConstants.java index 09c1cf3d3d351..c752c8ea0846d 100644 --- a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaBindingConstants.java +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaBindingConstants.java @@ -101,6 +101,8 @@ public enum EventKeys { public static final String CHANNEL_COMBINED_TEMP = "combinedtemp"; public static final String CHANNEL_EVENTSTAMP = "eventstamp"; + public static final String CHANNEL_SOFTWARE_UPDATE_AVAILABLE = "softwareupdateavailable"; + // thing configurations public static final String CONFIG_ALLOWWAKEUP = "allowWakeup"; public static final String CONFIG_ALLOWWAKEUPFORCOMMANDS = "allowWakeupForCommands"; diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java index 69ed9afc50e3d..268d409a8038c 100644 --- a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java @@ -160,7 +160,6 @@ public State getState(String s, TeslaChannelSelectorProxy proxy, Map properties) { diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java index 440b5e6da2a50..88ce230ee6e1b 100644 --- a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java @@ -48,6 +48,7 @@ import org.openhab.binding.tesla.internal.protocol.DriveState; import org.openhab.binding.tesla.internal.protocol.Event; import org.openhab.binding.tesla.internal.protocol.GUIState; +import org.openhab.binding.tesla.internal.protocol.SoftwareUpdate; import org.openhab.binding.tesla.internal.protocol.Vehicle; import org.openhab.binding.tesla.internal.protocol.VehicleData; import org.openhab.binding.tesla.internal.protocol.VehicleState; @@ -111,6 +112,7 @@ public class TeslaVehicleHandler extends BaseThingHandler { protected VehicleState vehicleState; protected ChargeState chargeState; protected ClimateState climateState; + protected SoftwareUpdate softwareUpdate; protected boolean allowWakeUp; protected boolean allowWakeUpForCommands; @@ -922,6 +924,8 @@ public void parseAndUpdate(String request, String payLoad, String result) { (climateState.driver_temp_setting + climateState.passenger_temp_setting) / 2.0f)); updateState(CHANNEL_COMBINED_TEMP, new QuantityType<>(avgtemp, SIUnits.CELSIUS)); + softwareUpdate = vehicleState.software_update; + try { lock.lock(); @@ -932,6 +936,8 @@ public void parseAndUpdate(String request, String payLoad, String result) { entrySet.addAll(gson.toJsonTree(vehicleState, VehicleState.class).getAsJsonObject().entrySet()); entrySet.addAll(gson.toJsonTree(chargeState, ChargeState.class).getAsJsonObject().entrySet()); entrySet.addAll(gson.toJsonTree(climateState, ClimateState.class).getAsJsonObject().entrySet()); + entrySet.addAll( + gson.toJsonTree(softwareUpdate, SoftwareUpdate.class).getAsJsonObject().entrySet()); for (Map.Entry entry : entrySet) { try { @@ -966,6 +972,12 @@ public void parseAndUpdate(String request, String payLoad, String result) { e.getMessage(), e); } } + + if (softwareUpdate.version == null || softwareUpdate.version.isBlank()) { + updateState(CHANNEL_SOFTWARE_UPDATE_AVAILABLE, OnOffType.OFF); + } else { + updateState(CHANNEL_SOFTWARE_UPDATE_AVAILABLE, OnOffType.ON); + } } finally { lock.unlock(); } diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties index ce45237ac0e3c..1556ac956e6f6 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties @@ -322,6 +322,14 @@ channel-type.tesla.smartpreconditioning.label = Smart Preconditioning channel-type.tesla.smartpreconditioning.description = Indicates if smart preconditioning is switched on channel-type.tesla.soc.label = State of Charge channel-type.tesla.soc.description = State of Charge, in % +channel-type.tesla.softwareupdateavailable.label = Update Available +channel-type.tesla.softwareupdateavailable.description = Car Software available +channel-type.tesla.softwareupdatestatus.label = Update Status +channel-type.tesla.softwareupdatestatus.description = Car Software update status +channel-type.tesla.softwareupdateversion.label = Update version +channel-type.tesla.softwareupdateversion.description = Car software version to update to +channel-type.tesla.softwareversion.label = Software version +channel-type.tesla.softwareversion.description = Current software version of the car channel-type.tesla.speed.label = Speed channel-type.tesla.speed.description = Vehicle speed channel-type.tesla.state.label = State diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml index a24c283e18980..2c8cf6297af88 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml @@ -4,6 +4,30 @@ xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0" xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd"> + + Switch + + Car Software available + + + + String + + Car Software update status + + + + String + + Car software version to update to + + + + String + + Current software version of the car + + String diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml index 2a892589c9344..d0591eabb1c3f 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml @@ -112,6 +112,10 @@ + + + + diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml index 2251bdc60477c..fdffb0462c74b 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml @@ -115,6 +115,10 @@ + + + + diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml index 6d3074a987260..3b144c7e2f022 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml @@ -115,6 +115,10 @@ + + + + diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml index 647d592b928e5..b9328bebf6752 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml @@ -115,6 +115,10 @@ + + + + From 514310783e710e4f803e05413e92c6b7196b4eae Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sat, 28 Oct 2023 12:38:45 +0200 Subject: [PATCH 03/13] [tesla] Update instructions for software update channels Signed-off-by: Hakan Tandogan --- .../main/resources/OH-INF/thing/model3.xml | 2 +- .../main/resources/OH-INF/thing/models.xml | 2 +- .../main/resources/OH-INF/thing/modelx.xml | 2 +- .../main/resources/OH-INF/thing/modely.xml | 2 +- .../resources/OH-INF/update/instructions.xml | 60 +++++++++++++++++++ 5 files changed, 64 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml index d0591eabb1c3f..fbafe1d85d654 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml @@ -130,7 +130,7 @@ - 1 + 2 diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml index fdffb0462c74b..4c7e5c470b2e7 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml @@ -136,7 +136,7 @@ - 1 + 2 diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml index 3b144c7e2f022..88ef88683038b 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml @@ -136,7 +136,7 @@ - 1 + 2 diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml index b9328bebf6752..e4fad608435c6 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml @@ -132,7 +132,7 @@ - 1 + 2 diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml index e21eda2f56dd6..e341696afdf6c 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml @@ -21,6 +21,21 @@ tesla:trafficminutesdelay + + + + tesla:softwareupdateavailable + + + tesla:softwareupdatestatus + + + tesla:softwareupdateversion + + + tesla:softwareversion + + @@ -41,6 +56,21 @@ tesla:trafficminutesdelay + + + + tesla:softwareupdateavailable + + + tesla:softwareupdatestatus + + + tesla:softwareupdateversion + + + tesla:softwareversion + + @@ -61,6 +91,21 @@ tesla:trafficminutesdelay + + + + tesla:softwareupdateavailable + + + tesla:softwareupdatestatus + + + tesla:softwareupdateversion + + + tesla:softwareversion + + @@ -81,5 +126,20 @@ tesla:trafficminutesdelay + + + + tesla:softwareupdateavailable + + + tesla:softwareupdatestatus + + + tesla:softwareupdateversion + + + tesla:softwareversion + + From bd6ad9332ac8f000b0a80236d3129e9992383fb9 Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sat, 28 Oct 2023 13:01:18 +0200 Subject: [PATCH 04/13] [tesla] Update documentation for software update channels Signed-off-by: Hakan Tandogan --- bundles/org.openhab.binding.tesla/README.md | 6 +++++- .../src/main/resources/OH-INF/i18n/tesla.properties | 2 +- .../src/main/resources/OH-INF/thing/channels.xml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.tesla/README.md b/bundles/org.openhab.binding.tesla/README.md index 86bf7825256f6..9788d714cc96f 100644 --- a/bundles/org.openhab.binding.tesla/README.md +++ b/bundles/org.openhab.binding.tesla/README.md @@ -182,9 +182,13 @@ Additionally, these advanced channels are available (not all are available on al | shiftstate | String | Shift State | Indicates the state of the transmission, “P”, “D”, “R”, or “N” | | sidemirrorheaters | Switch | Side Mirror Heaters | Indicates if the side mirror heaters are switched on | | smartpreconditioning | Switch | Smart Preconditioning | Indicates if smart preconditioning is switched on | +| softwareupdateavailable | Switch | Update Available | Car Software update available, automatically generated comparing "version" to "update version" | +| softwareupdatestatus | String | Update Status | Car Software update status, e.g. "downloading_wifi_wait", "installing" | +| softwareupdateversion | String | Update version | Car software version to update to, e.g. "2023.32.9" or empty | +| softwareversion | String | Software version | Software version, e.g. "2023.32.6 93d75c736e0c" | | soc | Number | State of Charge | State of Charge, in % | | state | String | State | “online”, “asleep”, “waking” | -| steeringwheelheater | Switch | Steering Wheel Heater | Turns On/Off the steering wheel heater | +| steeringwheelheater | Switch | Steering Wheel Heater | Turns On/Off the steering wheel heater | | sunroofstate | String | Sunroof State | Valid states are “unknown”, “open”, “closed”, “vent”, “comfort”. Accepts commands "close" and "vent". | | sunroof | Dimmer | Sunroof | Indicates the opening state of the sunroof (0% closed, 100% fully open) | | temperature | Number:Temperature | Temperature | Set the temperature of the autoconditioning system. The temperature for the driver and passenger will be synced. | diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties index 1556ac956e6f6..ec4aff18eebac 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties @@ -323,7 +323,7 @@ channel-type.tesla.smartpreconditioning.description = Indicates if smart precond channel-type.tesla.soc.label = State of Charge channel-type.tesla.soc.description = State of Charge, in % channel-type.tesla.softwareupdateavailable.label = Update Available -channel-type.tesla.softwareupdateavailable.description = Car Software available +channel-type.tesla.softwareupdateavailable.description = Car Software update available channel-type.tesla.softwareupdatestatus.label = Update Status channel-type.tesla.softwareupdatestatus.description = Car Software update status channel-type.tesla.softwareupdateversion.label = Update version diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml index 2c8cf6297af88..d81c1670ff4dd 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml @@ -7,7 +7,7 @@ Switch - Car Software available + Car Software update available From 05ad0e2a8db2ad6f4cdaf1eb7c545b6b99968db2 Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sat, 28 Oct 2023 20:41:26 +0200 Subject: [PATCH 05/13] [tesla] Review comment - keep 'version' as a property, not channel Signed-off-by: Hakan Tandogan --- bundles/org.openhab.binding.tesla/README.md | 3 +-- .../tesla/internal/TeslaChannelSelectorProxy.java | 2 +- .../src/main/resources/OH-INF/i18n/tesla.properties | 7 +++++-- .../src/main/resources/OH-INF/thing/channels.xml | 6 ------ .../src/main/resources/OH-INF/thing/model3.xml | 1 - .../src/main/resources/OH-INF/thing/models.xml | 1 - .../src/main/resources/OH-INF/thing/modelx.xml | 1 - .../src/main/resources/OH-INF/thing/modely.xml | 1 - .../main/resources/OH-INF/update/instructions.xml | 12 ------------ 9 files changed, 7 insertions(+), 27 deletions(-) diff --git a/bundles/org.openhab.binding.tesla/README.md b/bundles/org.openhab.binding.tesla/README.md index 9788d714cc96f..f63de1e68e61a 100644 --- a/bundles/org.openhab.binding.tesla/README.md +++ b/bundles/org.openhab.binding.tesla/README.md @@ -182,10 +182,9 @@ Additionally, these advanced channels are available (not all are available on al | shiftstate | String | Shift State | Indicates the state of the transmission, “P”, “D”, “R”, or “N” | | sidemirrorheaters | Switch | Side Mirror Heaters | Indicates if the side mirror heaters are switched on | | smartpreconditioning | Switch | Smart Preconditioning | Indicates if smart preconditioning is switched on | -| softwareupdateavailable | Switch | Update Available | Car Software update available, automatically generated comparing "version" to "update version" | +| softwareupdateavailable | Switch | Update Available | Car Software update available, automatically generated on non-empty "update version" | | softwareupdatestatus | String | Update Status | Car Software update status, e.g. "downloading_wifi_wait", "installing" | | softwareupdateversion | String | Update version | Car software version to update to, e.g. "2023.32.9" or empty | -| softwareversion | String | Software version | Software version, e.g. "2023.32.6 93d75c736e0c" | | soc | Number | State of Charge | State of Charge, in % | | state | String | State | “online”, “asleep”, “waking” | | steeringwheelheater | Switch | Steering Wheel Heater | Turns On/Off the steering wheel heater | diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java index 268d409a8038c..8b0bec3bad449 100644 --- a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java @@ -160,6 +160,7 @@ public State getState(String s, TeslaChannelSelectorProxy proxy, MapCar software version to update to - - String - - Current software version of the car - - String diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml index fbafe1d85d654..ff1c073d4d981 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/model3.xml @@ -115,7 +115,6 @@ - diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml index 4c7e5c470b2e7..b6d6394fdf86f 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/models.xml @@ -118,7 +118,6 @@ - diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml index 88ef88683038b..4440b6e4fa9ad 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modelx.xml @@ -118,7 +118,6 @@ - diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml index e4fad608435c6..781bc6a6fcc72 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/modely.xml @@ -118,7 +118,6 @@ - diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml index e341696afdf6c..ef59ce2a2a5fb 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/update/instructions.xml @@ -32,9 +32,6 @@ tesla:softwareupdateversion - - tesla:softwareversion - @@ -67,9 +64,6 @@ tesla:softwareupdateversion - - tesla:softwareversion - @@ -102,9 +96,6 @@ tesla:softwareupdateversion - - tesla:softwareversion - @@ -137,9 +128,6 @@ tesla:softwareupdateversion - - tesla:softwareversion - From a8d58fcc69404a4f14f74a853a2c6939fee7a449 Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sun, 29 Oct 2023 11:57:12 +0100 Subject: [PATCH 06/13] Update bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml Co-authored-by: lsiepel Signed-off-by: Hakan Tandogan --- .../src/main/resources/OH-INF/thing/channels.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml index e6d69bc337674..a1baa8d13d1ca 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml @@ -18,7 +18,7 @@ String - + Car software version to update to From 2d5cbdc05203bfb63a3f6857b82ad194a09edf2a Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sun, 29 Oct 2023 11:57:25 +0100 Subject: [PATCH 07/13] Update bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml Co-authored-by: lsiepel Signed-off-by: Hakan Tandogan --- .../src/main/resources/OH-INF/thing/channels.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml index a1baa8d13d1ca..7761b1c5901cd 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml @@ -7,7 +7,7 @@ Switch - Car Software update available + Car software update available From 3225f852d5233d062c0f4b644eeb79097d3f4421 Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sun, 29 Oct 2023 11:57:37 +0100 Subject: [PATCH 08/13] Update bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml Co-authored-by: lsiepel Signed-off-by: Hakan Tandogan --- .../src/main/resources/OH-INF/thing/channels.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml index 7761b1c5901cd..5facdaffb60fe 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/thing/channels.xml @@ -13,7 +13,7 @@ String - Car Software update status + Car software update status From 2a0fb83aff2df1802c066e25dc89b5a7b1b661ee Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sun, 29 Oct 2023 12:01:06 +0100 Subject: [PATCH 09/13] [tesla] regenerated i18n files after review comments Signed-off-by: Hakan Tandogan --- .../src/main/resources/OH-INF/i18n/tesla.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties index 1cea32ddc11d8..dc6e5ce62ea14 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties @@ -323,10 +323,10 @@ channel-type.tesla.smartpreconditioning.description = Indicates if smart precond channel-type.tesla.soc.label = State of Charge channel-type.tesla.soc.description = State of Charge, in % channel-type.tesla.softwareupdateavailable.label = Update Available -channel-type.tesla.softwareupdateavailable.description = Car Software update available +channel-type.tesla.softwareupdateavailable.description = Car software update available channel-type.tesla.softwareupdatestatus.label = Update Status -channel-type.tesla.softwareupdatestatus.description = Car Software update status -channel-type.tesla.softwareupdateversion.label = Update version +channel-type.tesla.softwareupdatestatus.description = Car software update status +channel-type.tesla.softwareupdateversion.label = Update Version channel-type.tesla.softwareupdateversion.description = Car software version to update to channel-type.tesla.speed.label = Speed channel-type.tesla.speed.description = Vehicle speed From 3b78b2201eea557c35f8563cf78bf3ecdac07a2a Mon Sep 17 00:00:00 2001 From: Hakan Tandogan Date: Sun, 29 Oct 2023 12:40:29 +0100 Subject: [PATCH 10/13] [tesla] Removed superflous softwareversion channel description, as it is a property again Signed-off-by: Hakan Tandogan --- .../src/main/resources/OH-INF/i18n/tesla.properties | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties index dc6e5ce62ea14..cdf0ab7d8c8a3 100644 --- a/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties +++ b/bundles/org.openhab.binding.tesla/src/main/resources/OH-INF/i18n/tesla.properties @@ -358,8 +358,3 @@ channel-type.tesla.wakeup.label = Wake Up channel-type.tesla.wakeup.description = Wake up the vehicle from a (deep) sleep channel-type.tesla.wiperbladeheater.label = Wiperblade Heater channel-type.tesla.wiperbladeheater.description = Indicates if the wiperblade heater is switched on - -# channel types - -channel-type.tesla.softwareversion.label = Software version -channel-type.tesla.softwareversion.description = Current software version of the car From 0132d1d80f281c113350eae1ba2ee70ca302367d Mon Sep 17 00:00:00 2001 From: Kai Kreuzer Date: Wed, 1 Nov 2023 21:23:53 +0100 Subject: [PATCH 11/13] Update bundles/org.openhab.binding.tesla/README.md Signed-off-by: Kai Kreuzer --- bundles/org.openhab.binding.tesla/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/README.md b/bundles/org.openhab.binding.tesla/README.md index f63de1e68e61a..17916dc0a4225 100644 --- a/bundles/org.openhab.binding.tesla/README.md +++ b/bundles/org.openhab.binding.tesla/README.md @@ -184,7 +184,7 @@ Additionally, these advanced channels are available (not all are available on al | smartpreconditioning | Switch | Smart Preconditioning | Indicates if smart preconditioning is switched on | | softwareupdateavailable | Switch | Update Available | Car Software update available, automatically generated on non-empty "update version" | | softwareupdatestatus | String | Update Status | Car Software update status, e.g. "downloading_wifi_wait", "installing" | -| softwareupdateversion | String | Update version | Car software version to update to, e.g. "2023.32.9" or empty | +| softwareupdateversion | String | Update Version | Car software version to update to, e.g. "2023.32.9" or empty | | soc | Number | State of Charge | State of Charge, in % | | state | String | State | “online”, “asleep”, “waking” | | steeringwheelheater | Switch | Steering Wheel Heater | Turns On/Off the steering wheel heater | From 3e1ad6c6ad29ee64b3eea54cd96720251458a879 Mon Sep 17 00:00:00 2001 From: Kai Kreuzer Date: Wed, 1 Nov 2023 21:24:00 +0100 Subject: [PATCH 12/13] Update bundles/org.openhab.binding.tesla/README.md Signed-off-by: Kai Kreuzer --- bundles/org.openhab.binding.tesla/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/README.md b/bundles/org.openhab.binding.tesla/README.md index 17916dc0a4225..1242bcf83822f 100644 --- a/bundles/org.openhab.binding.tesla/README.md +++ b/bundles/org.openhab.binding.tesla/README.md @@ -182,7 +182,7 @@ Additionally, these advanced channels are available (not all are available on al | shiftstate | String | Shift State | Indicates the state of the transmission, “P”, “D”, “R”, or “N” | | sidemirrorheaters | Switch | Side Mirror Heaters | Indicates if the side mirror heaters are switched on | | smartpreconditioning | Switch | Smart Preconditioning | Indicates if smart preconditioning is switched on | -| softwareupdateavailable | Switch | Update Available | Car Software update available, automatically generated on non-empty "update version" | +| softwareupdateavailable | Switch | Update Available | Car software update available, automatically generated on non-empty "update version" | | softwareupdatestatus | String | Update Status | Car Software update status, e.g. "downloading_wifi_wait", "installing" | | softwareupdateversion | String | Update Version | Car software version to update to, e.g. "2023.32.9" or empty | | soc | Number | State of Charge | State of Charge, in % | From a050024fbc60408ee7ee892797fa1b4443df8a28 Mon Sep 17 00:00:00 2001 From: Kai Kreuzer Date: Wed, 1 Nov 2023 21:24:06 +0100 Subject: [PATCH 13/13] Update bundles/org.openhab.binding.tesla/README.md Signed-off-by: Kai Kreuzer --- bundles/org.openhab.binding.tesla/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.tesla/README.md b/bundles/org.openhab.binding.tesla/README.md index 1242bcf83822f..4387fdc0b51aa 100644 --- a/bundles/org.openhab.binding.tesla/README.md +++ b/bundles/org.openhab.binding.tesla/README.md @@ -183,7 +183,7 @@ Additionally, these advanced channels are available (not all are available on al | sidemirrorheaters | Switch | Side Mirror Heaters | Indicates if the side mirror heaters are switched on | | smartpreconditioning | Switch | Smart Preconditioning | Indicates if smart preconditioning is switched on | | softwareupdateavailable | Switch | Update Available | Car software update available, automatically generated on non-empty "update version" | -| softwareupdatestatus | String | Update Status | Car Software update status, e.g. "downloading_wifi_wait", "installing" | +| softwareupdatestatus | String | Update Status | Car software update status, e.g. "downloading_wifi_wait", "installing" | | softwareupdateversion | String | Update Version | Car software version to update to, e.g. "2023.32.9" or empty | | soc | Number | State of Charge | State of Charge, in % | | state | String | State | “online”, “asleep”, “waking” |