evcc

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// Update of the list of remote entities supporting the Use Case
	//
	// Use `RemoteEntities` to get the current data
	UseCaseSupportUpdate api.EventType = "cem-evcc-UseCaseSupportUpdate"

	// An EV was connected
	//
	// Use Case EVCC, Scenario 1
	EvConnected api.EventType = "cem-evcc-EvConnected"

	// An EV was disconnected
	//
	// Note: The ev entity is no longer connected to the device!
	//
	// Use Case EVCC, Scenario 8
	EvDisconnected api.EventType = "cem-evcc-EvDisconnected"

	// EV charge state data was updated
	//
	// Use `ChargeState` to get the current data
	DataUpdateChargeState api.EventType = "cem-evcc-DataUpdateChargeState"

	// EV communication standard data was updated
	//
	// Use `CommunicationStandard` to get the current data
	//
	// Use Case EVCC, Scenario 2
	DataUpdateCommunicationStandard api.EventType = "cem-evcc-DataUpdateCommunicationStandard"

	// EV asymmetric charging data was updated
	//
	// Use `AsymmetricChargingSupport` to get the current data
	DataUpdateAsymmetricChargingSupport api.EventType = "cem-evcc-DataUpdateAsymmetricChargingSupport"

	// EV identificationdata was updated
	//
	// Use `Identifications` to get the current data
	//
	// Use Case EVCC, Scenario 4
	DataUpdateIdentifications api.EventType = "cem-evcc-DataUpdateIdentifications"

	// EV manufacturer data was updated
	//
	// Use `ManufacturerData` to get the current data
	//
	// Use Case EVCC, Scenario 5
	DataUpdateManufacturerData api.EventType = "cem-evcc-DataUpdateManufacturerData"

	// EV charging power limits
	//
	// Use `ChargingPowerLimits` to get the current data
	//
	// Use Case EVCC, Scenario 6
	DataUpdateCurrentLimits api.EventType = "cem-evcc-DataUpdateCurrentLimits"

	// EV permitted power limits updated
	//
	// Use `IsInSleepMode` to get the current data
	//
	// Use Case EVCC, Scenario 7
	DataUpdateIsInSleepMode api.EventType = "cem-evcc-DataUpdateIsInSleepMode"
)
View Source
const (
	EVCCCommunicationStandardUnknown model.DeviceConfigurationKeyValueStringType = "unknown"
)

value if the UCEVCC communication standard is unknown

Variables

This section is empty.

Functions

This section is empty.

Types

type EVCC

type EVCC struct {
	*usecase.UseCaseBase
	// contains filtered or unexported fields
}

func NewEVCC

func NewEVCC(
	service api.ServiceInterface,
	localEntity spineapi.EntityLocalInterface,
	eventCB api.EntityEventCallback,
) *EVCC

func (*EVCC) AddFeatures

func (e *EVCC) AddFeatures()

func (*EVCC) AsymmetricChargingSupport

func (e *EVCC) AsymmetricChargingSupport(entity spineapi.EntityRemoteInterface) (bool, error)

return if the EV supports asymmetric charging

possible errors:

  • ErrDataNotAvailable if that information is not (yet) available

func (*EVCC) ChargeState

func (e *EVCC) ChargeState(entity spineapi.EntityRemoteInterface) (ucapi.EVChargeStateType, error)

return the current charge state of the EV

func (*EVCC) ChargingPowerLimits

func (e *EVCC) ChargingPowerLimits(entity spineapi.EntityRemoteInterface) (float64, float64, float64, error)

return the minimum, maximum charging and, standby power of the connected EV

possible errors:

  • ErrDataNotAvailable if no such measurement is (yet) available
  • and others

func (*EVCC) CommunicationStandard

return the current communication standard type used to communicate between EVSE and EV

if an EV is connected via IEC61851, no ISO15118 specific data can be provided! sometimes the connection starts with IEC61851 before it switches to ISO15118, and sometimes it falls back again. so the error return is never absolut for the whole connection time, except if the use case is not supported

the values are not constant and can change due to communication problems, bugs, and sometimes communication starts with IEC61851 before it switches to ISO

possible errors:

  • ErrDataNotAvailable if that information is not (yet) available
  • and others

func (*EVCC) EVConnected

func (e *EVCC) EVConnected(entity spineapi.EntityRemoteInterface) bool

return if an EV is connected

this includes all required features and minimal data being available

func (*EVCC) HandleEvent

func (e *EVCC) HandleEvent(payload spineapi.EventPayload)

handle SPINE events

func (*EVCC) HandleResponse

func (e *EVCC) HandleResponse(responseMsg api.ResponseMessage)

func (*EVCC) Identifications

func (e *EVCC) Identifications(entity spineapi.EntityRemoteInterface) ([]ucapi.IdentificationItem, error)

return the identifications of the currently connected EV or nil if not available

possible errors:

  • ErrDataNotAvailable if that information is not (yet) available
  • and others

func (*EVCC) IsInSleepMode

func (e *EVCC) IsInSleepMode(
	entity spineapi.EntityRemoteInterface,
) (bool, error)

is the EV in sleep mode returns operatingState, lastErrorCode, error

func (*EVCC) ManufacturerData

func (e *EVCC) ManufacturerData(
	entity spineapi.EntityRemoteInterface,
) (
	api.ManufacturerData,
	error,
)

the manufacturer data of an EVSE returns deviceName, serialNumber, error

Jump to

Keyboard shortcuts

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