Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wake-Up #8

Open
rochoje opened this issue Jan 7, 2019 · 1 comment
Open

Wake-Up #8

rochoje opened this issue Jan 7, 2019 · 1 comment

Comments

@rochoje
Copy link

rochoje commented Jan 7, 2019

Im having an issue with waking up the car. I know you haven't updated this in a while, so maybe tesla changed something?

I have tried multiple things including Invoke-teslavechiclewakeup -vehicle -token and always receive the same errors.

*note if i wake the car up via the tesla app then all the rest of the commands work just fine

Any suggestions would be greatly appreciated

Invoke-RestMethod : {"response":null,"error":"vehicle unavailable: {:error=\u003e"vehicle unavailable:"}","error_description":""}
At C:\Users\rochonj\Documents\WindowsPowerShell\Modules\Tesla\Tesla.psm1:85 char:29

  • ... laCommand = Invoke-RestMethod -Uri "$ApiUri/vehicles/$($Vehicle.Id)/c ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
      Write-Verbose : Cannot bind argument to parameter 'Message' because it is null.
      At C:\Users\rochonj\Documents\WindowsPowerShell\Modules\Tesla\Tesla.psm1:88 char:23
  •     Write-Verbose $TeslaCommand
    
  •                   ~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Write-Verbose], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.WriteVerboseCommand

Invoke-TeslaVehicleCommand : Exception of type 'Microsoft.PowerShell.Commands.WriteErrorException' was thrown.
At C:\Users\rochonj\Documents\WindowsPowerShell\Modules\Tesla\Tesla.psm1:1960 char:9

  •     Invoke-TeslaVehicleCommand -Vehicle $Vehicle -Token $Token -C ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-TeslaVehicleCommand
@gescarra
Copy link

gescarra commented Jan 18, 2019

I'm having the same issue and it seems to be the way that v9 API works now.
https://tesla-api.timdorr.com/vehicle/commands/wake.

Working on a fix for the Invoke-TeslaVehicleWakeUp to not use the parent Invoke-TeslaVehicleCommand function and just be independent.

EDIT: Just submitted a pull request after making some quick changes to the code. wake_up works as expected.

Maybe in future code, the script can query if the car is in "asleep" state before sending any API commands. If it's asleep, then send wake_up until it's online, then send command. That way no commands fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants