Skip to content

Commit

Permalink
Add new telemetry fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Dec 19, 2024
1 parent 09297db commit 85d387b
Showing 1 changed file with 66 additions and 6 deletions.
72 changes: 66 additions & 6 deletions tesla_fleet_api/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from enum import Enum
import logging

VERSION = "1.0.0"
VERSION = "0.9.0"
LOGGER = logging.getLogger(__package__)
SERVERS = {
"na": "https://fleet-api.prd.na.vn.cloud.tesla.com",
Expand Down Expand Up @@ -160,34 +160,43 @@ class TelemetryField(StrEnum):
AUTO_SEAT_CLIMATE_RIGHT = "AutoSeatClimateRight"
AUTOMATIC_BLIND_SPOT_CAMERA = "AutomaticBlindSpotCamera"
AUTOMATIC_EMERGENCY_BRAKING_OFF = "AutomaticEmergencyBrakingOff"
BMS_STATE = "BMSState"
BATTERY_HEATER_ON = "BatteryHeaterOn"
BATTERY_LEVEL = "BatteryLevel"
BLIND_SPOT_COLLISION_WARNING_CHIME = "BlindSpotCollisionWarningChime"
BMS_FULL_CHARGE_COMPLETE = "BmsFullchargecomplete"
BMS_STATE = "BMSState"
BRAKE_PEDAL = "BrakePedal"
BRAKE_PEDAL_POS = "BrakePedalPos"
BRICK_VOLTAGE_MAX = "BrickVoltageMax"
BRICK_VOLTAGE_MIN = "BrickVoltageMin"
CABIN_OVERHEAT_PROTECTION_MODE = "CabinOverheatProtectionMode"
CABIN_OVERHEAT_PROTECTION_TEMPERATURE_LIMIT = "CabinOverheatProtectionTemperatureLimit"
CAR_TYPE = "CarType"
CENTER_DISPLAY = "CenterDisplay"
CHARGE_AMPS = "ChargeAmps"
CHARGE_CURRENT_REQUEST = "ChargeCurrentRequest"
CHARGE_CURRENT_REQUEST_MAX = "ChargeCurrentRequestMax"
CHARGE_ENABLE_REQUEST = "ChargeEnableRequest"
CHARGE_LIMIT_SOC = "ChargeLimitSoc"
CHARGE_PORT = "ChargePort"
CHARGE_PORT_COLD_WEATHER_MODE = "ChargePortColdWeatherMode"
CHARGE_PORT_DOOR_OPEN = "ChargePortDoorOpen"
CHARGE_PORT_LATCH = "ChargePortLatch"
CHARGE_STATE = "ChargeState"
CHARGER_PHASES = "ChargerPhases"
CHARGING_CABLE_TYPE = "ChargingCableType"
CLIMATE_KEEPER_MODE = "ClimateKeeperMode"
CRUISE_FOLLOW_DISTANCE = "CruiseFollowDistance"
CRUISE_SET_SPEED = "CruiseSetSpeed"
CRUISE_STATE = "CruiseState"
CURRENT_LIMIT_MPH = "CurrentLimitMph"
DC_CHARGING_ENERGY_IN = "DCChargingEnergyIn"
DC_CHARGING_POWER = "DCChargingPower"
DC_DC_ENABLE = "DCDCEnable"
DEFROST_FOR_PRECONDITIONING = "DefrostForPreconditioning"
DEFROST_MODE = "DefrostMode"
DESTINATION_LOCATION = "DestinationLocation"
DETAILED_CHARGE_STATE = "DetailedChargeState"
DI_AXLE_SPEED_F = "DiAxleSpeedF"
DI_AXLE_SPEED_R = "DiAxleSpeedR"
DI_AXLE_SPEED_REL = "DiAxleSpeedREL"
Expand Down Expand Up @@ -222,15 +231,20 @@ class TelemetryField(StrEnum):
DRIVE_RAIL = "DriveRail"
DRIVER_SEAT_BELT = "DriverSeatBelt"
DRIVER_SEAT_OCCUPIED = "DriverSeatOccupied"
EFFICIENCY_PACKAGE = "EfficiencyPackage"
EMERGENCY_LANE_DEPARTURE_AVOIDANCE = "EmergencyLaneDepartureAvoidance"
ENERGY_REMAINING = "EnergyRemaining"
EST_BATTERY_RANGE = "EstBatteryRange"
# EXPERIMENTAL_1 = "Experimental_1"
# EXPERIMENTAL_2 = "Experimental_2"
# EXPERIMENTAL_3 = "Experimental_3"
# EXPERIMENTAL_4 = "Experimental_4"
ESTIMATED_HOURS_TO_CHARGE_TERMINATION = "EstimatedHoursToChargeTermination"
EUROPE_VEHICLE = "EuropeVehicle"
EXPECTED_ENERGY_PERCENT_AT_TRIP_ARRIVAL = "ExpectedEnergyPercentAtTripArrival"
EXPERIMENTAL_1 = "Experimental_1"
EXPERIMENTAL_2 = "Experimental_2"
EXPERIMENTAL_3 = "Experimental_3"
EXPERIMENTAL_4 = "Experimental_4"
EXTERIOR_COLOR = "ExteriorColor"
FAST_CHARGER_PRESENT = "FastChargerPresent"
FAST_CHARGER_TYPE = "FastChargerType"
FD_WINDOW = "FdWindow"
FORWARD_COLLISION_WARNING = "ForwardCollisionWarning"
FP_WINDOW = "FpWindow"
Expand All @@ -239,6 +253,17 @@ class TelemetryField(StrEnum):
GPS_STATE = "GpsState"
GUEST_MODE_ENABLED = "GuestModeEnabled"
GUEST_MODE_MOBILE_ACCESS_STATE = "GuestModeMobileAccessState"
HOMELINK_DEVICE_COUNT = "HomelinkDeviceCount"
HOMELINK_NEARBY = "HomelinkNearby"
HVAC_AC_ENABLED = "HvacACEnabled"
HVAC_AUTO_MODE = "HvacAutoMode"
HVAC_FAN_SPEED = "HvacFanSpeed"
HVAC_FAN_STATUS = "HvacFanStatus"
HVAC_LEFT_TEMPERATURE_REQUEST = "HvacLeftTemperatureRequest"
HVAC_POWER = "HvacPower"
HVAC_RIGHT_TEMPERATURE_REQUEST = "HvacRightTemperatureRequest"
HVAC_STEERING_WHEEL_HEAT_AUTO = "HvacSteeringWheelHeatAuto"
HVAC_STEERING_WHEEL_HEAT_LEVEL = "HvacSteeringWheelHeatLevel"
HVIL = "Hvil"
IDEAL_BATTERY_RANGE = "IdealBatteryRange"
INSIDE_TEMP = "InsideTemp"
Expand All @@ -261,6 +286,7 @@ class TelemetryField(StrEnum):
NUM_MODULE_TEMP_MAX = "NumModuleTempMax"
NUM_MODULE_TEMP_MIN = "NumModuleTempMin"
ODOMETER = "Odometer"
OFFROAD_LIGHTBAR_PRESENT = "OffroadLightbarPresent"
ORIGIN_LOCATION = "OriginLocation"
OUTSIDE_TEMP = "OutsideTemp"
PACK_CURRENT = "PackCurrent"
Expand All @@ -269,12 +295,22 @@ class TelemetryField(StrEnum):
PASSENGER_SEAT_BELT = "PassengerSeatBelt"
PEDAL_POSITION = "PedalPosition"
PIN_TO_DRIVE_ENABLED = "PinToDriveEnabled"
POWERSHARE_HOURS_LEFT = "PowershareHoursLeft"
POWERSHARE_INSTANTANEOUS_POWER_KW = "PowershareInstantaneousPowerKW"
POWERSHARE_STATUS = "PowershareStatus"
POWERSHARE_STOP_REASON = "PowershareStopReason"
POWERSHARE_TYPE = "PowershareType"
PRECONDITIONING_ENABLED = "PreconditioningEnabled"
RATED_RANGE = "RatedRange"
RD_WINDOW = "RdWindow"
REAR_DISPLAY_HVAC_ENABLED = "RearDisplayHvacEnabled"
REAR_SEAT_HEATERS = "RearSeatHeaters"
REMOTE_START_ENABLED = "RemoteStartEnabled"
RIGHT_HAND_DRIVE = "RightHandDrive"
ROOF_COLOR = "RoofColor"
ROUTE_LAST_UPDATED = "RouteLastUpdated"
ROUTE_LINE = "RouteLine"
ROUTE_TRAFFIC_MINUTES_DELAY = "RouteTrafficMinutesDelay"
RP_WINDOW = "RpWindow"
SCHEDULED_CHARGING_MODE = "ScheduledChargingMode"
SCHEDULED_CHARGING_PENDING = "ScheduledChargingPending"
Expand All @@ -288,10 +324,19 @@ class TelemetryField(StrEnum):
SENTRY_MODE = "SentryMode"
SERVICE_MODE = "ServiceMode"
SOC = "Soc"
SOFTWARE_UPDATE_DOWNLOAD_PERCENT_COMPLETE = "SoftwareUpdateDownloadPercentComplete"
SOFTWARE_UPDATE_EXPECTED_DURATION_MINUTES = "SoftwareUpdateExpectedDurationMinutes"
SOFTWARE_UPDATE_INSTALLATION_PERCENT_COMPLETE = "SoftwareUpdateInstallationPercentComplete"
SOFTWARE_UPDATE_SCHEDULED_START_TIME = "SoftwareUpdateScheduledStartTime"
SOFTWARE_UPDATE_VERSION = "SoftwareUpdateVersion"
SPEED_LIMIT_MODE = "SpeedLimitMode"
SPEED_LIMIT_WARNING = "SpeedLimitWarning"
SUPERCHARGER_SESSION_TRIP_PLANNER = "SuperchargerSessionTripPlanner"
TIME_TO_FULL_CHARGE = "TimeToFullCharge"
TONNEAU_OPEN_PERCENT = "TonneauOpenPercent"
TONNEAU_POSITION = "TonneauPosition"
TONNEAU_TENT_MODE = "TonneauTentMode"
TPMS_HARD_WARNINGS = "TpmsHardWarnings"
TPMS_LAST_SEEN_PRESSURE_TIME_FL = "TpmsLastSeenPressureTimeFl"
TPMS_LAST_SEEN_PRESSURE_TIME_FR = "TpmsLastSeenPressureTimeFr"
TPMS_LAST_SEEN_PRESSURE_TIME_RL = "TpmsLastSeenPressureTimeRl"
Expand All @@ -300,10 +345,25 @@ class TelemetryField(StrEnum):
TPMS_PRESSURE_FR = "TpmsPressureFr"
TPMS_PRESSURE_RL = "TpmsPressureRl"
TPMS_PRESSURE_RR = "TpmsPressureRr"
TPMS_SOFT_WARNINGS = "TpmsSoftWarnings"
TRIM = "Trim"
VALET_MODE_ENABLED = "ValetModeEnabled"
VEHICLE_NAME = "VehicleName"
VEHICLE_SPEED = "VehicleSpeed"
VERSION = "Version"
WHEEL_TYPE = "WheelType"
WIPER_HEAT_ENABLED = "WiperHeatEnabled"
LOCATED_AT_HOME = "LocatedAtHome"
LOCATED_AT_WORK = "LocatedAtWork"
LOCATED_AT_FAVORITE = "LocatedAtFavorite"
SETTING_DISTANCE_UNIT = "SettingDistanceUnit"
SETTING_TEMPERATURE_UNIT = "SettingTemperatureUnit"
SETTING_24_HOUR_TIME = "Setting24HourTime"
SETTING_TIRE_PRESSURE_UNIT = "SettingTirePressureUnit"
SETTING_CHARGE_UNIT = "SettingChargeUnit"
CLIMATE_SEAT_COOLING_FRONT_LEFT = "ClimateSeatCoolingFrontLeft"
CLIMATE_SEAT_COOLING_FRONT_RIGHT = "ClimateSeatCoolingFrontRight"



class TelemetryAlert(StrEnum):
Expand Down

0 comments on commit 85d387b

Please sign in to comment.