[teslascope] Provide additional functionality (#18612)

* Add additional channels
* Fix setChargeLimit
* Reduce minimum refreshInterval to 10s
* charge_amps is not an int, change it to a float
* Recognise Starting or Charging as being cases where Charging is enabled

Signed-off-by: Paul Smedley <paul@smedley.id.au>
This commit is contained in:
Paul Smedley
2025-04-29 12:38:13 +02:00
committed by GitHub
parent 88f150a7d3
commit 75f0e893b3
12 changed files with 345 additions and 85 deletions
@@ -25,32 +25,42 @@ As a minimum, the apiKey and publicID are needed:
All vehicles support a huge number of channels - the following list shows the standard ones:
| Channel ID | Item Type | Label | Description |
|-------------------|----------------------|--------------------|---------------------------------------------------------------------------------------------|
| auto-conditioning | Switch | Auto Conditioning | Turns on auto-conditioning (a/c or heating) |
| battery-level | Number:Dimensionless | Battery Level | State of the battery in % |
| charging-state | String | Charging State | “Starting”, “Complete”, “Charging”, “Disconnected”, “Stopped”, “NoPower” |
| charge-port | Switch | Charge Port | Open the Charge Port (ON) or indicates the state of the Charge Port (ON/OFF if Open/Closed) |
| climate | Switch | Climate | Climate status indicator |
| door-lock | Switch | Door Lock | Lock or unlock the car |
| inside-temp | Number:Temperature | Inside Temperature | Indicates the inside temperature of the vehicle |
| location | Location | Location | The actual position of the vehicle |
| odometer | Number:Length | Odometer | Odometer of the vehicle |
| speed | Number:Speed | Speed | Vehicle speed |
| vin | String | VIN | Vehicle Identification Number |
| vehicle-name | String | Name | Vehicle Name |
| vehicle-state | String | Vehicle State | Vehicle State |
| Channel ID | Item Type | Label | Description |
|---------------------|----------------------|---------------------|---------------------------------------------------------------------------------------------|
| auto-conditioning | Switch | Auto Conditioning | Turns on auto-conditioning (a/c or heating) |
| battery-level | Number:Dimensionless | Battery Level | State of the battery in % |
| charging-state | String | Charging State | “Starting”, “Complete”, “Charging”, “Disconnected”, “Stopped”, “NoPower” |
| charge-port | Switch | Charge Port | Open the Charge Port (ON) or indicates the state of the Charge Port (ON/OFF if Open/Closed) |
| climate | Switch | Climate | Climate status indicator |
| door-lock | Switch | Door Lock | Lock or unlock the car |
| inside-temp | Number:Temperature | Inside Temperature | Indicates the inside temperature of the vehicle |
| located-at-home | Switch | Located at Home | Indicates if the vehicle is located at the address set as Home |
| located-at-work | Switch | Located at Work | Indicates if the vehicle is located at the address set as Work |
| located-at-favorite | Switch | Located at Favorite | Indicates if the vehicle is located at an address set as a Favorite |
| location | Location | Location | The actual position of the vehicle |
| odometer | Number:Length | Odometer | Odometer of the vehicle |
| speed | Number:Speed | Speed | Vehicle speed |
| vin | String | VIN | Vehicle Identification Number |
| vehicle-name | String | Name | Vehicle Name |
| vehicle-state | String | Vehicle State | Vehicle State |
Additionally, these advanced channels are available (not all are available on all vehicle types, e.g., the sunroof):
| Channel ID | Item Type | Label | Description |
|-----------------------------|--------------------------|-------------------------------|----------------------------------------------------------------------------------------------------------|
| battery-range | Number:Length | Battery Range | Range of the battery |
| car-version | String | Car Version | Current software version of the car |
| center-rear-seat-heater | Switch | Center Rear Seat Heater | Indicates if the center rear seat heater is switched on |
| charge | Switch | Charge | Start (ON) or stop (OFF) charging |
| charge-amps | Number:ElectricCurrent | Charger Current | Current actually delivered by the charger |
| charge-current-request | Number:ElectricCurrent | Charger Current Requested | Current requested from the charger |
| charge-current-request-max | Number:ElectricCurrent | Max Charger Current Supported | Maximuum current supported by the charger |
| charge-energy-added | Number:Energy | Charge Energy Added | Energy added, in kWh, during the last charging session |
| charge-limit-soc-standard | Dimmer | Charge Limit SOC Standard | Standard charging limit of the vehicle, in % |
| charge-port-latch | Switch | Charge Port Latch | Indicate the Charge Port Latch status, (ON/OFF if latched/unlatched) |
| charge-limit-soc | Number:Dimensionless | Charge Limit SOC | Current charging limit of the vehicle, in % |
| charge-limit-soc-min | Number:Dimensionless | Charge Limit SOC Min | Minimum charging limit of the vehicle, in % |
| charge-limit-soc-max | Number:Dimensionless | Charge Limit SOC Max | Maximum charging limit of the vehicle, in % |
| charge-limit-soc-standard | Number:Dimensionless | Charge Limit SOC Standard | Standard charging limit of the vehicle, in % |
| charge-port-latch | Switch | Charge Port Latch | Indicate the Charge Port Latch status, (ON/OFF if latched/unlatched) |
| charge-rate | Number:Speed | Charge Rate | Distance per hour charging rate |
| charger-power | Number:Power | Charger Power | Power actually delivered by the charger |
| charger-voltage | Number:ElectricPotential | Charger Voltage | Voltage (V) actually presented by the charger |
@@ -127,19 +137,30 @@ Number TeslaSpeed {channel="teslascope:vehicle:mod
String TeslaShiftState {channel="teslascope:vehicle:model3:shift-state"}
Number TeslaOdometer {channel="teslascope:vehicle:model3:odometer"}
Number TeslaRange {channel="teslascope:vehicle:model3:range"}
Switch TeslaHome {channel="teslascope:vehicle:model3:located-at-home"}
Switch TeslaWork {channel="teslascope:vehicle:model3:located-at-work"}
Switch TeslaFavorite {channel="teslascope:vehicle:model3:located-at-favorite"}
Number TeslaBatteryLevel {channel="teslascope:vehicle:model3:battery-level"}
Number TeslaPower {channel="teslascope:vehicle:model3:power"}
Number TeslaBatteryRange {channel="teslascope:vehicle:model3:battery-range"}
Number TeslaEstBatteryRange {channel="teslascope:vehicle:model3:estimated-battery-range"}
Switch TeslaPreconditioning {channel="teslascope:vehicle:model3:preconditioning"}
String TeslaCurrentVersion {channel="teslascope:vehicle:model3:car-version"}
Switch TeslaCharge {channel="teslascope:vehicle:model3:charge"}
Dimmer TeslaChargeLimit {channel="teslascope:vehicle:model3:charge-limit"}
Number TeslaChargeAmps {channel="teslascope:vehicle:model3:charge-amps"}
Number TeslaChargeCurrRequest {channel="teslascope:vehicle:model3:charge-current-request"}
Number TeslaChargeCurrRequestMax {channel="teslascope:vehicle:model3:charge-current-request-max"}
Number TeslaChargeLimitSOC {channel="teslascope:vehicle:model3:charge-limit-soc"}
Number TeslaChargeLimitSOCMin {channel="teslascope:vehicle:model3:charge-limit-soc-min"}
Number TeslaChargeLimitSOCMax {channel="teslascope:vehicle:model3:charge-limit-soc-max"}
Number TeslaChargeLimitSOCStd {channel="teslascope:vehicle:model3:charge-limit-soc-std"}
Number TeslaChargeRate {channel="teslascope:vehicle:model3:charge-rate"}
String TeslaChargingState {channel="teslascope:vehicle:model3:charging-state"}
String TeslaChargePortLatch {channel="teslascope:vehicle:model3:charge-port-latch"}
Switch TeslaChargePort {channel="teslascope:vehicle:model3:charge-port"}
Switch TeslaChargePortLatch {channel="teslascope:vehicle:model3:charge-port-latch"}
Number TeslaChargerPower {channel="teslascope:vehicle:model3:charger-power"}
Number TeslaTimeToFullCharge {channel="teslascope:vehicle:model3:time-to-full-charge"}
@@ -195,6 +216,10 @@ sitemap main label="Main"
Text item=TeslaShiftState
Text item=TeslaOdometer label="Odometer [%.1f miles]"
Text item=TeslaRange
Text item=TeslaCurrentVersion
Switch item=TeslaHome label="Vehicle at Home?"
Switch item=TeslaWork label="Vehicle at Work?"
Switch item=TeslaFavorite label="Vehicle at Favorite?"
}
Frame
{
@@ -213,9 +238,16 @@ sitemap main label="Main"
Frame
{
Switch item=TeslaCharge label="Charge"
Slider item=TeslaChargeLimit label="Charge Limit [%.1f]"
Text item=TeslaChargeAmps label="Current Charging rate in A"
Text item=TeslaChargeCurrRequest label="Current Requested Charging rate in A"
Text item=TeslaChargeCurrRequestMax label="Maximum Supported Charging Current in A"
Slider item=TeslaChargeLimitSOC label="Charge Limit [%.0f]"
Text item=TeslaChargeLimitSOCMin label="Minimum Charge Limit [%.0f]"
Text item=TeslaChargeLimitSOCMax label="Maximum Charge Limit [%.0f]"
Text item=TeslaChargeLimitSOCStd label="Standard Charge Limit [%.0f]"
Text item=TeslaChargingState label="Charging State [%s]" icon=""
Text item=TeslaChargePortLatch label="Charge Port Status"
Switch item=TeslaChargePort label="Charge Port Door Status"
Switch item=TeslaChargePortLatch label="Charge Port Latch Status"
Text item=TeslaTimeToFullCharge label="Time To Full Charge [%.1f hours]"
Text item=TeslaPreconditioning label="Preconditioning [%s]" icon=""
Text item=TeslaChargeRate label="Charge Rate [%d miles/hr]"
@@ -52,6 +52,12 @@ public class TeslascopeBindingConstants {
public static final String CHANNEL_CENTER_REAR_SEAT_HEATER = "center-rear-seat-heater";
public static final String CHANNEL_CHARGE = "charge";
public static final String CHANNEL_CHARGE_ENERGY_ADDED = "charge-energy-added";
public static final String CHANNEL_CHARGE_AMPS = "charge-amps";
public static final String CHANNEL_CHARGE_CURRENT_REQUEST = "charge-current-request";
public static final String CHANNEL_CHARGE_CURRENT_REQUEST_MAX = "charge-current-request-max";
public static final String CHANNEL_CHARGE_LIMIT_SOC = "charge-limit-soc";
public static final String CHANNEL_CHARGE_LIMIT_SOC_MIN = "charge-limit-soc-min";
public static final String CHANNEL_CHARGE_LIMIT_SOC_MAX = "charge-limit-soc-max";
public static final String CHANNEL_CHARGE_LIMIT_SOC_STANDARD = "charge-limit-soc-standard";
public static final String CHANNEL_CHARGE_PORT = "charge-port";
public static final String CHANNEL_CHARGE_PORT_LATCH = "charge-port-latch";
@@ -75,6 +81,9 @@ public class TeslascopeBindingConstants {
public static final String CHANNEL_LEFT_REAR_SEAT_HEATER = "left-rear-seat-heater";
public static final String CHANNEL_LEFT_SEAT_HEATER = "left-seat-heater";
public static final String CHANNEL_LEFT_TEMP_DIRECTION = "left-temp-direction";
public static final String CHANNEL_LOCATED_AT_HOME = "located-at-home";
public static final String CHANNEL_LOCATED_AT_WORK = "located-at-work";
public static final String CHANNEL_LOCATED_AT_FAVORITE = "located-at-favorite";
public static final String CHANNEL_LOCATION = "location";
public static final String CHANNEL_MIN_AVAILABLE_TEMP = "min-available-temp";
public static final String CHANNEL_MAX_AVAILABLE_TEMP = "max-available-temp";
@@ -14,6 +14,7 @@ package org.openhab.binding.teslascope.internal;
import static org.openhab.binding.teslascope.internal.TeslascopeBindingConstants.*;
import java.util.Map;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
@@ -79,6 +80,11 @@ public class TeslascopeHandler extends BaseThingHandler {
charge(onOffCommand == OnOffType.ON);
}
break;
case TeslascopeBindingConstants.CHANNEL_CHARGE_LIMIT_SOC:
if (command instanceof QuantityType quantityCommand) {
setChargeLimit(quantityCommand);
}
break;
case TeslascopeBindingConstants.CHANNEL_CHARGE_PORT:
if (command instanceof OnOffType onOffCommand) {
chargeDoor(onOffCommand == OnOffType.ON);
@@ -185,6 +191,12 @@ public class TeslascopeHandler extends BaseThingHandler {
updateState(TeslascopeBindingConstants.CHANNEL_VIN, new StringType(detailedInformation.vin));
updateState(TeslascopeBindingConstants.CHANNEL_VEHICLE_NAME, new StringType(detailedInformation.name));
updateState(TeslascopeBindingConstants.CHANNEL_VEHICLE_STATE, new StringType(detailedInformation.state));
updateState(TeslascopeBindingConstants.CHANNEL_LOCATED_AT_HOME,
OnOffType.from(1 == detailedInformation.locatedAtHome));
updateState(TeslascopeBindingConstants.CHANNEL_LOCATED_AT_WORK,
OnOffType.from(1 == detailedInformation.locatedAtWork));
updateState(TeslascopeBindingConstants.CHANNEL_LOCATED_AT_FAVORITE,
OnOffType.from(1 == detailedInformation.locatedAtFavorite));
// charge state
updateState(TeslascopeBindingConstants.CHANNEL_BATTERY_LEVEL,
@@ -196,12 +208,20 @@ public class TeslascopeHandler extends BaseThingHandler {
updateState(TeslascopeBindingConstants.CHANNEL_ESTIMATED_BATTERY_RANGE,
new QuantityType<>(detailedInformation.chargeState.estBatteryRange, ImperialUnits.MILE));
// charge_enable_request isn't the right flag to determine if car is charging or not
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE, OnOffType
.from("DetailedChargeStateCharging".equals(detailedInformation.chargeState.detailedChargeState)));
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE,
OnOffType.from(
("DetailedChargeStateCharging".equals(detailedInformation.chargeState.detailedChargeState))
|| "DetailedChargeStateStarting"
.equals(detailedInformation.chargeState.detailedChargeState)));
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE_ENERGY_ADDED,
new QuantityType<>(detailedInformation.chargeState.chargeEnergyAdded, Units.KILOWATT_HOUR));
updateState(CHANNEL_CHARGE_LIMIT_SOC, new DecimalType(detailedInformation.chargeState.chargeLimitSoc));
updateState(CHANNEL_CHARGE_LIMIT_SOC_MIN,
new DecimalType(detailedInformation.chargeState.chargeLimitSocMin));
updateState(CHANNEL_CHARGE_LIMIT_SOC_MAX,
new DecimalType(detailedInformation.chargeState.chargeLimitSocMax));
updateState(CHANNEL_CHARGE_LIMIT_SOC_STANDARD,
new DecimalType(detailedInformation.chargeState.chargeLimitSoc / 100));
new DecimalType(detailedInformation.chargeState.chargeLimitSocStd));
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE_PORT,
OnOffType.from(1 == detailedInformation.chargeState.chargePortDoorOpen));
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE_PORT_LATCH,
@@ -220,6 +240,12 @@ public class TeslascopeHandler extends BaseThingHandler {
OnOffType.from(1 == detailedInformation.chargeState.scheduledChargingPending));
updateState(TeslascopeBindingConstants.CHANNEL_SCHEDULED_CHARGING_START,
new StringType(detailedInformation.chargeState.scheduledChargingStartTime));
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE_AMPS,
new DecimalType(detailedInformation.chargeState.chargeAmps));
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE_CURRENT_REQUEST,
new DecimalType(detailedInformation.chargeState.chargeCurrentRequest));
updateState(TeslascopeBindingConstants.CHANNEL_CHARGE_CURRENT_REQUEST_MAX,
new DecimalType(detailedInformation.chargeState.chargeCurrentRequestMax));
// climate state
updateState(TeslascopeBindingConstants.CHANNEL_AUTOCONDITIONING,
@@ -282,6 +308,9 @@ public class TeslascopeHandler extends BaseThingHandler {
new QuantityType<>(detailedInformation.driveState.speed, ImperialUnits.MILES_PER_HOUR));
// vehicle state
Map<String, String> properties = editProperties();
properties.put("version", detailedInformation.vehicleState.carVersion);
updateProperties(properties);
updateState(TeslascopeBindingConstants.CHANNEL_DOOR_LOCK,
OnOffType.from(detailedInformation.vehicleState.locked));
updateState(TeslascopeBindingConstants.CHANNEL_ODOMETER,
@@ -339,15 +368,15 @@ public class TeslascopeHandler extends BaseThingHandler {
protected void setAutoConditioning(boolean b)
throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
webTargets.sendCommand(config.publicID, config.apiKey, b ? "startAC" : "stopAC");
webTargets.sendCommand(config.publicID, config.apiKey, b ? "startAC" : "stopAC", "");
}
protected void charge(boolean b) throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
webTargets.sendCommand(config.publicID, config.apiKey, b ? "startCharging" : "stopCharging");
webTargets.sendCommand(config.publicID, config.apiKey, b ? "startCharging" : "stopCharging", "");
}
protected void chargeDoor(boolean b) throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
webTargets.sendCommand(config.publicID, config.apiKey, b ? "openChargeDoor" : "closeChargeDoor");
webTargets.sendCommand(config.publicID, config.apiKey, b ? "openChargeDoor" : "closeChargeDoor", "");
}
protected void flashLights() throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
@@ -375,4 +404,10 @@ public class TeslascopeHandler extends BaseThingHandler {
protected void sentry(boolean b) throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
webTargets.sendCommand(config.publicID, config.apiKey, b ? "enableSentryMode" : "disableSentryMode");
}
protected void setChargeLimit(QuantityType chargeLimit)
throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
webTargets.sendCommand(config.publicID, config.apiKey, "setChargeLimit",
"&limit=" + chargeLimit.toString().replace(" %", ""));
}
}
@@ -53,6 +53,12 @@ public class TeslascopeWebTargets {
return;
}
public void sendCommand(String publicID, String apiKey, String command, String params)
throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
invoke(BASE_URI + publicID + "/command/" + command + "?api_key=" + apiKey + params);
return;
}
private String invoke(String uri) throws TeslascopeCommunicationException, TeslascopeAuthenticationException {
logger.debug("Calling url: {}", uri);
String jsonResponse = "";
@@ -45,15 +45,21 @@ public class ChargeState {
@SerializedName("charge_limit_soc")
public int chargeLimitSoc;
@SerializedName("charge_limit_soc_max")
public int chargeLimitSocMax;
@SerializedName("charge_limit_soc_min")
public int chargeLimitSocMin;
@SerializedName("charge_limit_soc_std")
public int chargeLimitSocStd;
@SerializedName("charge_port_door_open")
public int chargePortDoorOpen;
@SerializedName("charge_port_latch")
public String chargePortLatch = "";
@SerializedName("charge_amps")
public float chargeAmps;
@SerializedName("charge_rate")
public float chargeRate;
@@ -75,6 +81,15 @@ public class ChargeState {
@SerializedName("scheduled_charging_start_time")
public String scheduledChargingStartTime = " ";
@SerializedName("charge_amps")
public float chargeAmps;
@SerializedName("charge_current_request")
public int chargeCurrentRequest;
@SerializedName("charge_current_request_max")
public int chargeCurrentRequestMax;
@SerializedName("detailed_charge_state")
public String detailedChargeState = "";
@@ -25,6 +25,27 @@ import com.google.gson.annotations.SerializedName;
@NonNullByDefault
public class ClimateState {
// climate_state
@SerializedName("driver_temp_setting")
public float driverTempSetting;
@SerializedName("passenger_temp_setting")
public float passengerTempSetting;
@SerializedName("fan_status")
public float fanStatus;
@SerializedName("inside_temp")
public float insideTemp;
@SerializedName("outside_temp")
public float outsideTemp;
@SerializedName("max_avail_temp")
public float maxAvailTemp;
@SerializedName("min_avail_temp")
public float minAvailTemp;
@SerializedName("is_auto_conditioning_on")
public int isAutoConditioningOn;
@@ -34,15 +55,30 @@ public class ClimateState {
@SerializedName("is_front_defroster_on")
public int isFrontDefrosterOn;
@SerializedName("is_preconditioning")
public int isPreconditioning;
@SerializedName("is_rear_defroster_on")
public int isRearDefrosterOn;
@SerializedName("is_preconditioning")
public int isPreconditioning;
@SerializedName("smart_preconditioning")
public int smartPreconditioning;
@SerializedName("left_temp_direction")
public int leftTempDirection;
@SerializedName("right_temp_direction")
public int rightTempDirection;
@SerializedName("steering_wheel_heater")
public int steeringWheelHeater;
@SerializedName("seat_heater_left")
public int seatHeaterLeft;
@SerializedName("seat_heater_right")
public int seatHeaterRight;
@SerializedName("seat_heater_rear_center")
public int seatHeaterRearCenter;
@@ -52,48 +88,12 @@ public class ClimateState {
@SerializedName("seat_heater_rear_right")
public int seatHeaterRearRight;
@SerializedName("seat_heater_right")
public int seatHeaterRight;
@SerializedName("side_mirror_heaters")
public int sideMirrorHeaters;
@SerializedName("smart_preconditioning")
public int smartPreconditioning;
@SerializedName("steering_wheel_heater")
public int steeringWheelHeater;
@SerializedName("wiper_blade_heater")
public int wiperBladeHeater;
@SerializedName("driver_temp_setting")
public float driverTempSetting;
@SerializedName("inside_temp")
public float insideTemp;
@SerializedName("outside_temp")
public float outsideTemp;
@SerializedName("passenger_temp_setting")
public float passengerTempSetting;
@SerializedName("fan_status")
public float fanStatus;
@SerializedName("left_temp_direction")
public int leftTempDirection;
@SerializedName("max_avail_temp")
public float maxAvailTemp;
@SerializedName("min_avail_temp")
public float minAvailTemp;
@SerializedName("right_temp_direction")
public int rightTempDirection;
private ClimateState() {
}
}
@@ -29,6 +29,15 @@ public class DetailedInformation {
public String name = "";
public String state = "";
@SerializedName("located_at_home")
public int locatedAtHome;
@SerializedName("located_at_work")
public int locatedAtWork;
@SerializedName("located_at_favorite")
public int locatedAtFavorite;
@SerializedName("vehicle_state")
public @NonNullByDefault({}) VehicleState vehicleState;
@@ -28,11 +28,11 @@ public class DriveState {
public int heading;
public float latitude;
public float longitude;
public float power;
@SerializedName("shift_state")
public String shiftState = "";
public float power;
public float speed = 0;
private DriveState() {
@@ -25,13 +25,16 @@ import com.google.gson.annotations.SerializedName;
@NonNullByDefault
public class VehicleState {
// vehicle_state
@SerializedName("car_version")
public String carVersion = "";
public boolean locked;
public double odometer;
@SerializedName("sentry_mode")
public boolean sentryMode;
public double odometer;
@SerializedName("valet_mode")
public int valetMode;
@@ -53,15 +56,6 @@ public class VehicleState {
@SerializedName("rp_window")
public int rpWindow;
@SerializedName("sun_roof_state")
public String sunRoofState = "";
@SerializedName("sunRoofPercentOpen")
public int sunRoofPercentOpen;
@SerializedName("homelink_nearby")
public int homelinkNearby;
@SerializedName("tpms_pressure_fl")
public double tpmsPressureFL;
@@ -74,6 +68,15 @@ public class VehicleState {
@SerializedName("tpms_pressure_rr")
public double tpmsPressureRR;
@SerializedName("sun_roof_state")
public String sunRoofState = "";
@SerializedName("sunRoofPercentOpen")
public int sunRoofPercentOpen;
@SerializedName("homelink_nearby")
public int homelinkNearby;
@SerializedName("tpms_soft_warning_fl")
public int tpmsSoftWarningFL;
@@ -27,10 +27,24 @@ channel-type.teslascope.battery-range.label = Battery Range
channel-type.teslascope.battery-range.description = Range of the battery
channel-type.teslascope.center-rear-seat-heater.label = Center Rear Seat Heater
channel-type.teslascope.center-rear-seat-heater.description = Indicates if the center rear seat heater is switched on
channel-type.teslascope.charge-amps.label = Charger Current
channel-type.teslascope.charge-amps.description = Current actually delivered by the charger
channel-type.teslascope.charge-current-request-max.label = Charger Current Max
channel-type.teslascope.charge-current-request-max.description = Maximum current supported by the charger
channel-type.teslascope.charge-current-request.label = Charger Current Requested
channel-type.teslascope.charge-current-request.description = Current requested from the charger
channel-type.teslascope.charge-energy-added.label = Charge Energy Added
channel-type.teslascope.charge-energy-added.description = Energy added, in kWh, during the last charging session
channel-type.teslascope.charge-limit-soc-max.label = Charge Limit SOC Max
channel-type.teslascope.charge-limit-soc-max.description = Maximum charging limit of the vehicle, in %
channel-type.teslascope.charge-limit-soc-min.label = Charge Limit SOC Min
channel-type.teslascope.charge-limit-soc-min.description = Minimum charging limit of the vehicle, in %
channel-type.teslascope.charge-limit-soc-standard.label = Charge Limit SOC Standard
channel-type.teslascope.charge-limit-soc-standard.description = Standard charging limit of the vehicle, in %
channel-type.teslascope.charge-limit-soc.label = Charge Limit SOC
channel-type.teslascope.charge-limit-soc.description = Current charging limit of the vehicle, in %
channel-type.teslascope.charge-port-latch.label = Charge Port Latch
channel-type.teslascope.charge-port-latch.description = Indicate the Charge Port Latch status, (ON/OFF if latched/unlatched)
channel-type.teslascope.charge-port.label = Charge Port
channel-type.teslascope.charge-port.description = Open the Charge Port (ON) or indicates the state of the Charge Port (ON/OFF if Open/Closed)
channel-type.teslascope.charge-rate.label = Charge Rate
@@ -77,6 +91,12 @@ channel-type.teslascope.left-seat-heater.label = Left Seat Heater
channel-type.teslascope.left-seat-heater.description = Indicates if the left seat heater is switched on
channel-type.teslascope.left-temp-direction.label = Left Temperature Direction
channel-type.teslascope.left-temp-direction.description = Not documented / To be defined
channel-type.teslascope.located-at-favorite.label = At Favorite?
channel-type.teslascope.located-at-favorite.description = Car located at Address listed in favorites
channel-type.teslascope.located-at-home.label = At Home?
channel-type.teslascope.located-at-home.description = Car located at Home Address
channel-type.teslascope.located-at-work.label = At Work?
channel-type.teslascope.located-at-work.description = Car located at Work Address
channel-type.teslascope.location.label = Location
channel-type.teslascope.location.description = The actual position of the vehicle
channel-type.teslascope.max-available-temp.label = Maximum Temperature
@@ -19,7 +19,13 @@
<channel id="battery-range" typeId="battery-range"/>
<channel id="center-rear-seat-heater" typeId="center-rear-seat-heater"/>
<channel id="charge" typeId="charge"/>
<channel id="charge-amps" typeId="charge-amps"/>
<channel id="charge-current-request" typeId="charge-current-request"/>
<channel id="charge-current-request-max" typeId="charge-current-request-max"/>
<channel id="charge-energy-added" typeId="charge-energy-added"/>
<channel id="charge-limit-soc" typeId="charge-limit-soc"/>
<channel id="charge-limit-soc-min" typeId="charge-limit-soc-min"/>
<channel id="charge-limit-soc-max" typeId="charge-limit-soc-max"/>
<channel id="charge-limit-soc-standard" typeId="charge-limit-soc-standard"/>
<channel id="charge-port" typeId="charge-port"/>
<channel id="charge-port-latch" typeId="charge-port-latch"/>
@@ -43,6 +49,9 @@
<channel id="left-rear-seat-heater" typeId="left-rear-seat-heater"/>
<channel id="left-seat-heater" typeId="left-seat-heater"/>
<channel id="left-temp-direction" typeId="left-temp-direction"/>
<channel id="located-at-home" typeId="located-at-home"/>
<channel id="located-at-work" typeId="located-at-work"/>
<channel id="located-at-favorite" typeId="located-at-favorite"/>
<channel id="location" typeId="location"/>
<channel id="min-available-temp" typeId="min-available-temp"/>
<channel id="max-available-temp" typeId="max-available-temp"/>
@@ -85,7 +94,7 @@
</channels>
<properties>
<property name="thingTypeVersion">1</property>
<property name="thingTypeVersion">2</property>
</properties>
<config-description>
@@ -97,7 +106,7 @@
<label>Vehicle Public ID</label>
<description>Vehicle public ID listed in Teslascope</description>
</parameter>
<parameter name="refreshInterval" type="integer" unit="s" min="60">
<parameter name="refreshInterval" type="integer" unit="s" min="10">
<label>Refresh Interval</label>
<description>Interval the API is polled in sec.</description>
<default>60</default>
@@ -188,11 +197,41 @@
<description>Energy added, in kWh, during the last charging session</description>
<state pattern="%d kWh" readOnly="true"></state>
</channel-type>
<channel-type id="charge-limit-soc" advanced="true">
<item-type unitHint="%">Number:Dimensionless</item-type>
<label>Charge Limit SOC</label>
<description>Current charging limit of the vehicle, in %</description>
<tags>
<tag>Setpoint</tag>
<tag>Level</tag>
</tags>
<state pattern="%.0f %%"></state>
</channel-type>
<channel-type id="charge-limit-soc-min" advanced="true">
<item-type unitHint="%">Number:Dimensionless</item-type>
<label>Charge Limit SOC Min</label>
<description>Minimum charging limit of the vehicle, in %</description>
<tags>
<tag>Status</tag>
<tag>Level</tag>
</tags>
<state pattern="%.0f %%" readOnly="true"></state>
</channel-type>
<channel-type id="charge-limit-soc-max" advanced="true">
<item-type unitHint="%">Number:Dimensionless</item-type>
<label>Charge Limit SOC Max</label>
<description>Maximum charging limit of the vehicle, in %</description>
<tags>
<tag>Status</tag>
<tag>Level</tag>
</tags>
<state pattern="%.0f %%" readOnly="true"></state>
</channel-type>
<channel-type id="charge-limit-soc-standard" advanced="true">
<item-type>Dimmer</item-type>
<item-type unitHint="%">Number:Dimensionless</item-type>
<label>Charge Limit SOC Standard</label>
<description>Standard charging limit of the vehicle, in %</description>
<state pattern="%.1f %%" readOnly="true"></state>
<state pattern="%.0f %%" readOnly="true"></state>
</channel-type>
<channel-type id="charge-port">
<item-type>Switch</item-type>
@@ -210,6 +249,36 @@
<description>Distance per hour charging rate</description>
<state pattern="%d %unit%" readOnly="true"></state>
</channel-type>
<channel-type id="charge-amps" advanced="true">
<item-type>Number:ElectricCurrent</item-type>
<label>Charger Current</label>
<description>Current actually delivered by the charger</description>
<tags>
<tag>Measurement</tag>
<tag>Current</tag>
</tags>
<state pattern="%.1f %unit%" readOnly="true"></state>
</channel-type>
<channel-type id="charge-current-request" advanced="true">
<item-type>Number:ElectricCurrent</item-type>
<label>Charger Current Requested</label>
<description>Current requested from the charger</description>
<tags>
<tag>Setpoint</tag>
<tag>Current</tag>
</tags>
<state pattern="%.1f %unit%"></state>
</channel-type>
<channel-type id="charge-current-request-max" advanced="true">
<item-type>Number:ElectricCurrent</item-type>
<label>Charger Current Max</label>
<description>Maximum current supported by the charger</description>
<tags>
<tag>Status</tag>
<tag>Current</tag>
</tags>
<state pattern="%.1f %unit%" readOnly="true"></state>
</channel-type>
<channel-type id="charger-power" advanced="true">
<item-type>Number:Power</item-type>
<label>Charger Power</label>
@@ -307,6 +376,36 @@
<description>Not documented / To be defined</description>
<state readOnly="true"></state>
</channel-type>
<channel-type id="located-at-home">
<item-type>Switch</item-type>
<label>At Home?</label>
<description>Car located at Home Address</description>
<tags>
<tag>Status</tag>
<tag>GeoLocation</tag>
</tags>
<state readOnly="true"></state>
</channel-type>
<channel-type id="located-at-work">
<item-type>Switch</item-type>
<label>At Work?</label>
<description>Car located at Work Address</description>
<tags>
<tag>Status</tag>
<tag>GeoLocation</tag>
</tags>
<state readOnly="true"></state>
</channel-type>
<channel-type id="located-at-favorite">
<item-type>Switch</item-type>
<label>At Favorite?</label>
<description>Car located at Address listed in favorites</description>
<tags>
<tag>Status</tag>
<tag>GeoLocation</tag>
</tags>
<state readOnly="true"></state>
</channel-type>
<channel-type id="location" advanced="false">
<item-type>Location</item-type>
<label>Location</label>
@@ -10,6 +10,38 @@
<type>teslascope:charge-port-latch</type>
</add-channel>
</instruction-set>
<instruction-set targetVersion="2">
<add-channel id="charge-amps">
<type>teslascope:charge-amps</type>
</add-channel>
<add-channel id="charge-current-request">
<type>teslascope:charge-current-request</type>
</add-channel>
<add-channel id="charge-current-request-max">
<type>teslascope:charge-current-request-max</type>
</add-channel>
<add-channel id="charge-limit-soc">
<type>teslascope:charge-limit-soc</type>
</add-channel>
<add-channel id="charge-limit-soc-min">
<type>teslascope:charge-limit-soc-min</type>
</add-channel>
<add-channel id="charge-limit-soc-max">
<type>teslascope:charge-limit-soc-max</type>
</add-channel>
<add-channel id="located-at-home">
<type>teslascope:located-at-home</type>
</add-channel>
<add-channel id="located-at-work">
<type>teslascope:located-at-work</type>
</add-channel>
<add-channel id="located-at-favorite">
<type>teslascope:located-at-favorite</type>
</add-channel>
<update-channel id="charge-limit-soc-std">
<type>teslascope:charge-limit-soc-std</type>
</update-channel>
</instruction-set>
</thing-type>