Documentation ¶
Index ¶
- Constants
- type AccessTokens
- type EMobilityProvider
- func (v *EMobilityProvider) Climater() (active bool, outsideTemp float64, targetTemp float64, err error)
- func (v *EMobilityProvider) FinishTime() (time.Time, error)
- func (v *EMobilityProvider) Range() (int64, error)
- func (v *EMobilityProvider) SoC() (float64, error)
- func (v *EMobilityProvider) Status() (api.ChargeStatus, error)
- type EmobilityResponse
- type Identity
- type Provider
- type StatusResponse
- type Vehicle
- type VehicleResponse
Constants ¶
View Source
const ( ClientID = "4mPO3OE5Srjb1iaUGWsbqKBvvesya8oA" EmobilityClientID = "gZLSI7ThXFB4d2ld9t8Cx2DBRvGr1zN2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokens ¶
type EMobilityProvider ¶
EMobilityProvider is an api.Vehicle implementation for Porsche Taycan cars
func NewEMobilityProvider ¶
func NewEMobilityProvider(log *util.Logger, identity *Identity, token oauth2.Token, vin string, cache time.Duration) *EMobilityProvider
NewEMobilityProvider creates a new vehicle
func (*EMobilityProvider) Climater ¶
func (v *EMobilityProvider) Climater() (active bool, outsideTemp float64, targetTemp float64, err error)
Climater implements the api.VehicleClimater interface
func (*EMobilityProvider) FinishTime ¶
func (v *EMobilityProvider) FinishTime() (time.Time, error)
FinishTime implements the api.VehicleFinishTimer interface
func (*EMobilityProvider) Range ¶
func (v *EMobilityProvider) Range() (int64, error)
Range implements the api.VehicleRange interface
func (*EMobilityProvider) SoC ¶
func (v *EMobilityProvider) SoC() (float64, error)
SoC implements the api.Vehicle interface
func (*EMobilityProvider) Status ¶
func (v *EMobilityProvider) Status() (api.ChargeStatus, error)
Status implements the api.ChargeState interface
type EmobilityResponse ¶
type EmobilityResponse struct { BatteryChargeStatus struct { ChargeRate struct { Unit string Value float64 ValueInKmPerHour int64 } ChargingInDCMode bool ChargingMode string ChargingPower float64 ChargingReason string ChargingState string ChargingTargetDateTime string ExternalPowerSupplyState string PlugState string RemainingChargeTimeUntil100PercentInMinutes int64 StateOfChargeInPercentage int64 RemainingERange struct { OriginalUnit string OriginalValue int64 Unit string Value int64 ValueInKilometers int64 } } ChargingStatus string DirectCharge struct { Disabled bool IsActive bool } DirectClimatisation struct { ClimatisationState string RemainingClimatisationTime int64 } }
type Identity ¶
Identity is the Porsche Identity client
func NewIdentity ¶
NewIdentity creates a new Identity client
func (*Identity) FindVehicle ¶
func (v *Identity) FindVehicle(accessTokens AccessTokens, vin string) (Vehicle, error)
func (*Identity) Login ¶
func (v *Identity) Login() (AccessTokens, error)
type Provider ¶
Provider is an api.Vehicle implementation for Porsche PHEV cars
func NewProvider ¶
func NewProvider(log *util.Logger, identity *Identity, token oauth2.Token, vin string, cache time.Duration) *Provider
NewProvider creates a new vehicle
type StatusResponse ¶
type VehicleResponse ¶
Click to show internal directories.
Click to hide internal directories.