Documentation ¶
Index ¶
- Variables
- type Battery
- type ChangeLoadpointMode
- type ChargeMode
- type ChargePhases
- type ChargeRater
- type ChargeState
- type ChargeStateExt
- type ChargeStatus
- type ChargeTimer
- type Charger
- type ChargerEx
- type Diagnosis
- type Meter
- type MeterCurrent
- type MeterEnergy
- type Vehicle
- type VehicleCacheReset
- type VehicleClimater
- type VehicleFinishTimer
- type VehicleRange
- type VehicleStartCharge
- type VehicleStopCharge
Constants ¶
This section is empty.
Variables ¶
var ErrNotAvailable = errors.New("not available")
ErrNotAvailable indicates that a feature is not available
var ErrTimeout error = errTimeoutError{}
ErrTimeout is the error returned when a timeout happened. Modeled after context.DeadlineError
Functions ¶
This section is empty.
Types ¶
type ChangeLoadpointMode ¶
type ChangeLoadpointMode interface {
LoadpointMode(ChargeMode, ChargeStatus) error
}
VehicleStopCharge stops the charging session on the vehicle side (e.g. release charge port)
type ChargeMode ¶
type ChargeMode string
ChargeMode are charge modes modeled after OpenWB
const ( ModeOff ChargeMode = "off" ModeNow ChargeMode = "now" ModeMinPV ChargeMode = "minpv" ModePV ChargeMode = "pv" )
Charge modes
func ChargeModeString ¶
func ChargeModeString(mode string) ChargeMode
ChargeModeString converts string to ChargeMode
type ChargePhases ¶
ChargePhases provides 1p3p switching
type ChargeRater ¶
ChargeRater provides charged energy amount in kWh
type ChargeState ¶
type ChargeState interface {
Status() (ChargeStatus, error)
}
ChargeState provides current charging status
type ChargeStateExt ¶
type ChargeStateExt interface {
StatusExt(ChargeStatus, ChargeMode, bool) (ChargeStatus, error)
}
ChargeState provides current charging status and gives the vehicle some lp info to optimize vehicle requests
type ChargeStatus ¶
type ChargeStatus string
ChargeStatus is the EV's charging status from A to F
const ( StatusNone ChargeStatus = "" StatusA ChargeStatus = "A" // Fzg. angeschlossen: nein Laden aktiv: nein - Kabel nicht angeschlossen StatusB ChargeStatus = "B" // Fzg. angeschlossen: ja Laden aktiv: nein - Kabel angeschlossen StatusC ChargeStatus = "C" // Fzg. angeschlossen: ja Laden aktiv: ja - Laden StatusD ChargeStatus = "D" // Fzg. angeschlossen: ja Laden aktiv: ja - Laden mit Lüfter StatusE ChargeStatus = "E" // Fzg. angeschlossen: ja Laden aktiv: nein - Fehler (Kurzschluss) StatusF ChargeStatus = "F" // Fzg. angeschlossen: ja Laden aktiv: nein - Fehler (Ausfall Wallbox) )
Charging states
type ChargeTimer ¶
ChargeTimer provides current charge cycle duration
type Charger ¶
type Charger interface { ChargeState Enabled() (bool, error) Enable(enable bool) error MaxCurrent(current int64) error }
Charger is able to provide current charging status and to enable/disabler charging
type Diagnosis ¶
type Diagnosis interface {
Diagnose()
}
Diagnosis is a helper interface that allows to dump diagnostic data to console
type MeterCurrent ¶
MeterCurrent is able to provide per-line current A
type MeterEnergy ¶
MeterEnergy is able to provide current energy in kWh
type VehicleClimater ¶
type VehicleClimater interface {
Climater() (active bool, outsideTemp float64, targetTemp float64, err error)
}
VehicleClimater provides climatisation data
type VehicleFinishTimer ¶
VehicleFinishTimer provides estimated charge cycle finish time
type VehicleRange ¶
VehicleRange provides the vehicles remaining km range
type VehicleStartCharge ¶
type VehicleStartCharge interface {
StartCharge() error
}
VehicleStartCharge starts the charging session on the vehicle side
type VehicleStopCharge ¶
type VehicleStopCharge interface {
StopCharge() error
}
VehicleStopCharge stops the charging session on the vehicle side (e.g. release charge port)