Documentation ¶
Index ¶
- Constants
- Variables
- func NewIdentity(log *util.Logger, token *oauth2.Token) (oauth2.TokenSource, error)
- type CommandResponse
- type Controller
- type Identity
- type Provider
- func (v *Provider) ChargedEnergy() (float64, error)
- func (v *Provider) FinishTime() (time.Time, error)
- func (v *Provider) GetLimitSoc() (int64, error)
- func (v *Provider) Odometer() (float64, error)
- func (v *Provider) Range() (int64, error)
- func (v *Provider) Soc() (float64, error)
- func (v *Provider) Status() (api.ChargeStatus, error)
- func (v *Provider) WakeUp() error
- type Region
- type RegionResponse
- type Vehicle
- type VehicleData
Constants ¶
View Source
const ProxyBaseUrl = "https://tesla.evcc.io"
Variables ¶
View Source
var OAuth2Config = &oauth2.Config{ RedirectURL: "https://auth.tesla.com/void/callback", Endpoint: oauth2.Endpoint{ AuthURL: "https://auth.tesla.com/en_us/oauth2/v3/authorize", TokenURL: "https://auth.tesla.com/oauth2/v3/token", AuthStyle: oauth2.AuthStyleInParams, }, Scopes: []string{"openid", "email", "offline_access"}, }
OAuth2Config is the OAuth2 configuration for authenticating with the Tesla API.
View Source
var TESLA_CLIENT_ID, TESLA_CLIENT_SECRET string
Functions ¶
func NewIdentity ¶
Types ¶
type CommandResponse ¶
type CommandResponse = tesla.CommandResponse
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(vehicle *tesla.Vehicle) *Controller
NewController creates a vehicle current and charge controller
func (*Controller) ChargeEnable ¶
func (v *Controller) ChargeEnable(enable bool) error
ChargeEnable implements the api.ChargeController interface
func (*Controller) MaxCurrent ¶
func (v *Controller) MaxCurrent(current int64) error
MaxCurrent implements the api.CurrentController interface
type Identity ¶
type Identity struct { oauth2.TokenSource // contains filtered or unexported fields }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func (*Provider) ChargedEnergy ¶
ChargedEnergy implements the api.ChargeRater interface
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
func (*Provider) GetLimitSoc ¶
GetLimitSoc implements the api.SocLimiter interface
type RegionResponse ¶
type RegionResponse struct {
Response Region
}
type VehicleData ¶
type VehicleData = tesla.VehicleData
Click to show internal directories.
Click to hide internal directories.