eebus

package
v0.0.0-...-f385b4b Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EEBUSBrandName  string = "EVCC"
	EEBUSModel      string = "HEMS"
	EEBUSDeviceCode string = "EVCC_HEMS_01" // used as common name in cert generation
)

Variables

This section is empty.

Functions

func CreateCertificate

func CreateCertificate() (tls.Certificate, error)

CreateCertificate returns a newly created EEBUS compatible certificate

func GetX509KeyPair

func GetX509KeyPair(cert tls.Certificate) (string, string, error)

GetX509KeyPair saves returns the cert and key string values

func SkiFromCert

func SkiFromCert(cert tls.Certificate) (string, error)

SkiFromCert extracts SKI from certificate

Types

type Config

type Config struct {
	URI         string
	ShipID      string
	Interfaces  []string
	Certificate struct {
		Public, Private string
	}
}

func (Config) Configured

func (c Config) Configured() bool

Configured returns true if the EEbus server is configured

type EEBUSDeviceInterface

type EEBUSDeviceInterface interface {
	DeviceConnect()
	DeviceDisconnect()
	UseCaseEventCB(device spineapi.DeviceRemoteInterface, entity spineapi.EntityRemoteInterface, event eebusapi.EventType)
}

type EEBus

type EEBus struct {
	SKI string
	// contains filtered or unexported fields
}
var Instance *EEBus

func NewServer

func NewServer(other Config) (*EEBus, error)

func (*EEBus) Debug

func (c *EEBus) Debug(args ...interface{})

func (*EEBus) Debugf

func (c *EEBus) Debugf(format string, args ...interface{})

func (*EEBus) Error

func (c *EEBus) Error(args ...interface{})

func (*EEBus) Errorf

func (c *EEBus) Errorf(format string, args ...interface{})

func (*EEBus) Info

func (c *EEBus) Info(args ...interface{})

func (*EEBus) Infof

func (c *EEBus) Infof(format string, args ...interface{})

func (*EEBus) RegisterEVSE

func (c *EEBus) RegisterEVSE(ski string, device EEBUSDeviceInterface) *UseCasesEVSE

func (*EEBus) RemoteSKIConnected

func (c *EEBus) RemoteSKIConnected(service eebusapi.ServiceInterface, ski string)

func (*EEBus) RemoteSKIDisconnected

func (c *EEBus) RemoteSKIDisconnected(service eebusapi.ServiceInterface, ski string)

func (*EEBus) Run

func (c *EEBus) Run()

func (*EEBus) ServicePairingDetailUpdate

func (c *EEBus) ServicePairingDetailUpdate(ski string, detail *shipapi.ConnectionStateDetail)

Provides the current pairing state for the remote service This is called whenever the state changes and can be used to provide user information for the pairing/connection process

func (*EEBus) ServiceShipIDUpdate

func (c *EEBus) ServiceShipIDUpdate(ski string, shipdID string)

Provides the SHIP ID the remote service reported during the handshake process This needs to be persisted and passed on for future remote service connections when using `PairRemoteService`

func (*EEBus) Shutdown

func (c *EEBus) Shutdown()

func (*EEBus) Trace

func (c *EEBus) Trace(args ...interface{})

func (*EEBus) Tracef

func (c *EEBus) Tracef(format string, args ...interface{})

func (*EEBus) VisibleRemoteServicesUpdated

func (c *EEBus) VisibleRemoteServicesUpdated(service eebusapi.ServiceInterface, entries []shipapi.RemoteService)

report all currently visible EEBUS services this is needed to provide an UI for pairing with other devices if not all incoming pairing requests should be accepted

type UseCasesEVSE

EVSE UseCases

Jump to

Keyboard shortcuts

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