Documentation ¶
Index ¶
- Constants
- Variables
- type API
- type BluelinkVehicleStatus
- type BluelinkVehicleStatusLatest
- type Config
- type DrivingDistance
- type Identity
- type Odometer
- type Provider
- func (v *Provider) FinishTime() (time.Time, error)
- func (v *Provider) GetLimitSoc() (int64, error)
- func (v *Provider) Odometer() (float64, error)
- func (v *Provider) Position() (float64, 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 ReservChargeInfo
- type StatusLatestResponse
- type StatusLatestResponseCCS
- func (d StatusLatestResponseCCS) BluelinkVehicleStatus() BluelinkVehicleStatus
- func (d StatusLatestResponseCCS) FinishTime() (time.Time, error)
- func (d StatusLatestResponseCCS) GetLimitSoc() (int64, error)
- func (d StatusLatestResponseCCS) Odometer() (float64, error)
- func (d StatusLatestResponseCCS) Position() (float64, float64, error)
- func (d StatusLatestResponseCCS) Range() (int64, error)
- func (d StatusLatestResponseCCS) SoC() (float64, error)
- func (d StatusLatestResponseCCS) Status() (api.ChargeStatus, error)
- func (d StatusLatestResponseCCS) Updated() (time.Time, error)
- type StatusResponse
- type TargetSoc
- type Vehicle
- type VehicleLocation
- type VehicleStatus
- func (d VehicleStatus) FinishTime() (time.Time, error)
- func (d VehicleStatus) GetLimitSoc() (int64, error)
- func (d VehicleStatus) Range() (int64, error)
- func (d VehicleStatus) SoC() (float64, error)
- func (d VehicleStatus) Status() (api.ChargeStatus, error)
- func (d VehicleStatus) Updated() (time.Time, error)
- type VehicleStatusCCS
- type VehiclesResponse
Constants ¶
View Source
const ( VehiclesURL = "vehicles" StatusURL = "vehicles/%s/status" StatusLatestURL = "vehicles/%s/status/latest" StatusURLCCS2 = "vehicles/%s/ccs2/carstatus" StatusLatestURLCCS2 = "vehicles/%s/ccs2/carstatus/latest" )
View Source
const ( DeviceIdURL = "/api/v1/spa/notifications/register" IntegrationInfoURL = "/api/v1/user/integrationinfo" SilentSigninURL = "/api/v1/user/silentsignin" LanguageURL = "/api/v1/user/language" LoginURL = "/api/v1/user/signin" TokenURL = "/api/v1/user/oauth2/token" )
View Source
const ( KiaAppID = "a2b8469b-30a3-4361-8e13-6fceea8fbe74" HyundaiAppID = "014d2225-8495-4735-812d-2616334fd15d" )
Variables ¶
View Source
var ErrAuthFail = errors.New("authorization failed")
ErrAuthFail indicates authorization failure
Functions ¶
This section is empty.
Types ¶
type API ¶
API implements the Kia/Hyundai bluelink api.
func (*API) StatusLatest ¶
func (v *API) StatusLatest(vehicle Vehicle) (BluelinkVehicleStatusLatest, error)
StatusLatest retrieves the latest server-side status
func (*API) StatusPartial ¶
func (v *API) StatusPartial(vehicle Vehicle) (BluelinkVehicleStatus, error)
StatusPartial refreshes the status
type BluelinkVehicleStatus ¶
type Config ¶
type Config struct { URI string AuthClientID string // v2 BrandAuthUrl string // v2 BasicToken string CCSPServiceID string CCSPApplicationID string PushType string Cfb string }
Config is the bluelink API configuration
type DrivingDistance ¶
type DrivingDistance struct { RangeByFuel struct { EvModeRange struct { Value int } } }
type Identity ¶
type Identity struct { *request.Helper oauth2.TokenSource // contains filtered or unexported fields }
Identity implements the Kia/Hyundai bluelink identity. Based on https://github.com/Hacksore/bluelinky.
func NewIdentity ¶
NewIdentity creates BlueLink Identity
func (*Identity) RefreshToken ¶
RefreshToken implements oauth.TokenRefresher
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the vehicle api. Based on https://github.com/Hacksore/bluelinky.
func NewProvider ¶
New creates a new BlueLink API
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
func (*Provider) GetLimitSoc ¶
GetLimitSoc implements the api.SocLimiter interface
type ReservChargeInfo ¶
type ReservChargeInfo struct {
TargetSocList []TargetSoc
}
type StatusLatestResponse ¶
type StatusLatestResponse struct { RetCode string ResCode string ResMsg struct { VehicleStatusInfo struct { VehicleStatus VehicleStatus VehicleLocation *VehicleLocation Odometer *Odometer } } }
func (StatusLatestResponse) BluelinkVehicleStatus ¶
func (d StatusLatestResponse) BluelinkVehicleStatus() BluelinkVehicleStatus
func (StatusLatestResponse) Odometer ¶
func (d StatusLatestResponse) Odometer() (float64, error)
type StatusLatestResponseCCS ¶
type StatusLatestResponseCCS struct { RetCode string ResCode string ResMsg struct { State struct { Vehicle VehicleStatusCCS } LastUpdateTime string } }
func (StatusLatestResponseCCS) BluelinkVehicleStatus ¶
func (d StatusLatestResponseCCS) BluelinkVehicleStatus() BluelinkVehicleStatus
func (StatusLatestResponseCCS) FinishTime ¶
func (d StatusLatestResponseCCS) FinishTime() (time.Time, error)
func (StatusLatestResponseCCS) GetLimitSoc ¶
func (d StatusLatestResponseCCS) GetLimitSoc() (int64, error)
func (StatusLatestResponseCCS) Odometer ¶
func (d StatusLatestResponseCCS) Odometer() (float64, error)
func (StatusLatestResponseCCS) Position ¶
func (d StatusLatestResponseCCS) Position() (float64, float64, error)
func (StatusLatestResponseCCS) Range ¶
func (d StatusLatestResponseCCS) Range() (int64, error)
func (StatusLatestResponseCCS) SoC ¶
func (d StatusLatestResponseCCS) SoC() (float64, error)
func (StatusLatestResponseCCS) Status ¶
func (d StatusLatestResponseCCS) Status() (api.ChargeStatus, error)
type StatusResponse ¶
type StatusResponse struct { RetCode string ResCode string ResMsg VehicleStatus }
type VehicleLocation ¶
type VehicleStatus ¶
type VehicleStatus struct { Time string EvStatus *struct { BatteryCharge bool BatteryStatus float64 BatteryPlugin int RemainTime2 struct { Atc struct { Value, Unit int } } ChargePortDoorOpenStatus int DrvDistance []DrivingDistance ReservChargeInfos ReservChargeInfo } Vehicles []Vehicle }
func (VehicleStatus) FinishTime ¶
func (d VehicleStatus) FinishTime() (time.Time, error)
func (VehicleStatus) GetLimitSoc ¶
func (d VehicleStatus) GetLimitSoc() (int64, error)
func (VehicleStatus) Range ¶
func (d VehicleStatus) Range() (int64, error)
func (VehicleStatus) SoC ¶
func (d VehicleStatus) SoC() (float64, error)
func (VehicleStatus) Status ¶
func (d VehicleStatus) Status() (api.ChargeStatus, error)
type VehicleStatusCCS ¶
type VehicleStatusCCS struct { Location *struct { GeoCoord struct { Latitude, Longitude, Altitude float64 Type int Date string } } Green *struct { BatteryManagement struct { BatteryRemain struct { Ratio float64 Value float64 } BatteryCapacity struct { Value float64 } SoH struct { Ratio float64 } } ChargingInformation struct { ConnectorFastening struct { // 1 connected State int } Charging struct { RemainTime float64 RemainTimeUnit int } EstimatedTime struct { Standard float64 ICCB float64 Quick float64 Unit int } ExpectedTime struct { StartDay int StartHour int StartMin int EndDay int EndHour int EndMin int } TargetSoC struct { Standard int64 Quick int64 } DTE struct { TargetSoC struct { // in Drivetrain.FuelSystem.DTE.Unit Standard float64 Quick float64 } } } ChargingDoor struct { // 0, 2 closed, 1 open State int } Electric struct { SmartGrid struct { VehicleToLoad struct { DischargeLimitation struct { SoC float64 RemainTime float64 } } } } } Drivetrain struct { Odometer float64 FuelSystem struct { DTE struct { Total int64 } } } }
type VehiclesResponse ¶
Click to show internal directories.
Click to hide internal directories.