Interface TeslaApi

All Known Implementing Classes:
TeslaApiService, TeslaLiveApi

public interface TeslaApi
A thin wrapper around the Tesla API functionality supporting charging.
  • Method Details

    • startCharge

      Boolean startCharge(String id_s)
      Start charging
      Parameters:
      id_s - id of the vehicle
      Returns:
      true if successful
    • stopCharge

      Boolean stopCharge(String id_s)
      Stop charging
      Parameters:
      id_s - id of the vehicle
      Returns:
      true if successful
    • setChargeLimit

      Boolean setChargeLimit(String id_s, int chargeLimit)
      Set the charge limit
      Parameters:
      id_s - id of the vehicle
      chargeLimit - charge limit in percent
      Returns:
      true if successful
    • wakeUp

      Boolean wakeUp(String id_s)
      Wake up the vehicle
      Parameters:
      id_s - id of the vehicle
      Returns:
      true if successful
    • getFullVehicleData

      FullVehicleData getFullVehicleData(String id_s)
      Full vehicle data consists of charge state, drive state, vehicle config vehicle state and general information. Should implement a grace period if the vehicle is parked and locked to give the vehicle a change to sleep.
      Parameters:
      id_s - id of the vehicle
      Returns:
      Full vehicle data or null
    • getVehicles

      VehiclesResponse getVehicles()
      All vehicles associated with the account
      Returns:
      All vehicles associated with the account or null
    • refreshToken

      void refreshToken()
      Refresh the access token.
    • getLiveApi

      static TeslaApi getLiveApi()
      Get the Live API.
      Returns:
      the Live API