api

package
v0.0.0-...-e6e1b3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAvailable = errors.New("not available")

ErrNotAvailable indicates that a feature is not available

View Source
var ErrTimeout error = errTimeoutError{}

ErrTimeout is the error returned when a timeout happened. Modeled after context.DeadlineError

Functions

This section is empty.

Types

type Battery

type Battery interface {
	SoC() (float64, error)
}

Battery is able to provide battery SoC in %

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

func (ChargeMode) String

func (c ChargeMode) String() string

String implements Stringer

type ChargePhases

type ChargePhases interface {
	Phases1p3p(phases int) error
}

ChargePhases provides 1p3p switching

type ChargeRater

type ChargeRater interface {
	ChargedEnergy() (float64, error)
}

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

func (ChargeStatus) String

func (c ChargeStatus) String() string

String implements Stringer

type ChargeTimer

type ChargeTimer interface {
	ChargingTime() (time.Duration, error)
}

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 ChargerEx

type ChargerEx interface {
	MaxCurrentMillis(current float64) error
}

ChargerEx provides milli-amp precision charger current control

type Diagnosis

type Diagnosis interface {
	Diagnose()
}

Diagnosis is a helper interface that allows to dump diagnostic data to console

type Meter

type Meter interface {
	CurrentPower() (float64, error)
}

Meter is able to provide current power in W

type MeterCurrent

type MeterCurrent interface {
	Currents() (float64, float64, float64, error)
}

MeterCurrent is able to provide per-line current A

type MeterEnergy

type MeterEnergy interface {
	TotalEnergy() (float64, error)
}

MeterEnergy is able to provide current energy in kWh

type Vehicle

type Vehicle interface {
	Battery
	Title() string
	Capacity() int64
}

Vehicle represents the EV and it's battery

type VehicleCacheReset

type VehicleCacheReset interface {
	CacheReset() error
}

VehicleCacheReset

type VehicleClimater

type VehicleClimater interface {
	Climater() (active bool, outsideTemp float64, targetTemp float64, err error)
}

VehicleClimater provides climatisation data

type VehicleFinishTimer

type VehicleFinishTimer interface {
	FinishTime() (time.Time, error)
}

VehicleFinishTimer provides estimated charge cycle finish time

type VehicleRange

type VehicleRange interface {
	Range() (int64, error)
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL