I wrote a PowerShell script to query the performance config of the car. If you install the Tesla API Powershell Module from here:
GitHub - JonnMsft/TeslaPSModule: Control your Tesla vehicle from PowerShell
You can run the following script in PowerShell ISE to determine the performance status of the car. This is based on the information I got from Akiron's documentation and assumes that a "perf_config" value of "P1" means uncorked while "P3" mean corked. It's functionally the same as doing the API calls, except the script does all the auth work so you don't have to go back and forth copy/pasting your bearer token:
$MyUserName = "TypeYourUserNameHereBetweenTheQuotes"
$MyPassword = "TypeYourPasswordHereBetweenTheQuotes"
#Check for presense of Tesla API Powershell Module
if((get-module -name Tesla) -eq $null)
{
write-output "Tesla Powershell Module not installed. Please download and install ths module from:
GitHub - JonnMsft/TeslaPSModule: Control your Tesla vehicle from PowerShell and re-run this script"
}
if($Token -eq $null)
{
$SecPasswd = ConvertTo-SecureString $MyPassword -AsPlainText -Force
$MyCreds = New-Object System.Management.Automation.PSCredential ($MyUserName, $SecPasswd)
$Token = Get-TeslaToken -Credential ($MyCreds)
}
$Vehicle = Get-TeslaVehicles -Token $Token
$VehicleSummaryOutput = Get-TeslaVehicleSummary $Vehicle -Token $Token
$VehicleSummaryOutput.vehicle_state
if($VehicleSummaryOutput.vehicle_state.perf_config -eq "P3")
{
write-output "Your vehicle's performance configuration is ""corked"". Your performance configuration flag is set to ""$($VehicleSummaryOutput.vehicle_state.perf_config)""."
}
elseif($VehicleSummaryOutput.vehicle_state.perf_config -eq "P1")
{
write-output "Your vehicle's performance configuration is ""uncorked"" Your performance configuration flag is set to ""$($VehicleSummaryOutput.vehicle_state.perf_config)""."
}
else
{
write-output "Your vehicle's performance configuraion is unknown. The output of your performance configuration is ""$($VehicleSummaryOutput.vehicle_state.perf_config)"", which is not a value this script recognizes"
}