Version: v0.0.0-...-9fca67b Latest Latest

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 33 Imported by: 0




View Source
const SocketPath = "/tmp/evcc"

SocketPath is the unix domain socket path


View Source
var (
	// Repository name
	Repository = "evcc"

	// Owner of repository
	Owner = "andig"

	// Version of executable
	Version = "0.0.1-alpha"

	// Commit of executable
	Commit = "HEAD"
View Source
var Assets fs.FS

Assets is the embedded assets file system


func ChargeModeHandler

func ChargeModeHandler(lp loadpoint.API) http.HandlerFunc

ChargeModeHandler updates charge mode

func CurrentChargeModeHandler

func CurrentChargeModeHandler(lp loadpoint.API) http.HandlerFunc

CurrentChargeModeHandler returns current charge mode

func CurrentMinSoCHandler

func CurrentMinSoCHandler(lp loadpoint.API) http.HandlerFunc

CurrentMinSoCHandler returns current minimum soc

func CurrentPhasesHandler

func CurrentPhasesHandler(lp loadpoint.API) http.HandlerFunc

CurrentPhasesHandler returns current minimum soc

func CurrentTargetSoCHandler

func CurrentTargetSoCHandler(lp loadpoint.API) http.HandlerFunc

CurrentTargetSoCHandler returns current target soc

func HealthHandler

func HealthHandler(site site.API) http.HandlerFunc

HealthHandler returns current charge mode

func HealthListener

func HealthListener(site site.API)

HealthListener attaches listener to unix domain socket and runs listener

func MinSoCHandler

func MinSoCHandler(lp loadpoint.API) http.HandlerFunc

MinSoCHandler updates minimum soc

func PhasesHandler

func PhasesHandler(lp loadpoint.API) http.HandlerFunc

PhasesHandler updates minimum soc

func RemoteDemandHandler

func RemoteDemandHandler(lp loadpoint.API) http.HandlerFunc

RemoteDemandHandler updates minimum soc

func ServeWebsocket

func ServeWebsocket(hub *SocketHub, w http.ResponseWriter, r *http.Request)

ServeWebsocket handles websocket requests from the peer.

func SocketHandler

func SocketHandler(hub *SocketHub) http.HandlerFunc

SocketHandler attaches websocket handler to uri

func StateHandler

func StateHandler(cache *util.Cache) http.HandlerFunc

StateHandler returns current charge mode

func TargetChargeHandler

func TargetChargeHandler(loadpoint loadpoint.API) http.HandlerFunc

TargetChargeHandler updates target soc

func TargetSoCHandler

func TargetSoCHandler(lp loadpoint.API) http.HandlerFunc

TargetSoCHandler updates target soc

func TemplatesHandler

func TemplatesHandler() http.HandlerFunc

TemplatesHandler returns current charge mode


type EEBus

type EEBus struct {
	// contains filtered or unexported fields
var EEBusInstance *EEBus

func NewEEBus

func NewEEBus(other map[string]interface{}) (*EEBus, error)

func (*EEBus) DeviceInfo

func (c *EEBus) DeviceInfo() communication.ManufacturerDetails

func (*EEBus) Register

func (c *EEBus) Register(ski string, shipConnectHandler func(string, ship.Conn) error, shipDisconnectHandler func(string))

func (*EEBus) Run

func (c *EEBus) Run()

type EEBusClientCBs

type EEBusClientCBs struct {
	// contains filtered or unexported fields

type HTTPd

type HTTPd struct {

HTTPd wraps an http.Server and adds the root router

func NewHTTPd

func NewHTTPd(url string, site site.API, hub *SocketHub, cache *util.Cache) *HTTPd

NewHTTPd creates HTTP server with configured routes for loadpoint

func (*HTTPd) Router

func (s *HTTPd) Router() *mux.Router

Router returns the main router

type Influx

type Influx struct {
	// contains filtered or unexported fields

Influx is a influx publisher

func NewInfluxClient

func NewInfluxClient(url, token, org, user, password, database string) *Influx

NewInfluxClient creates new publisher for influx

func (*Influx) Run

func (m *Influx) Run(loadPoints []loadpoint.API, in <-chan util.Param)

Run Influx publisher

type InfluxConfig

type InfluxConfig struct {
	URL      string
	Database string
	Token    string
	Org      string
	User     string
	Password string
	Interval time.Duration

InfluxConfig is the influx db configuration

type MQTT

type MQTT struct {
	Handler *mqtt.Client
	// contains filtered or unexported fields

MQTT is the MQTT server. It uses the MQTT client for publishing.

func NewMQTT

func NewMQTT(root string) *MQTT

NewMQTT creates MQTT server

func (*MQTT) Run

func (m *MQTT) Run(site site.API, in <-chan util.Param)

Run starts the MQTT publisher for the MQTT API

type SocketClient

type SocketClient struct {
	// contains filtered or unexported fields

SocketClient is a middleman between the websocket connection and the hub.

type SocketHub

type SocketHub struct {
	// contains filtered or unexported fields

SocketHub maintains the set of active clients and broadcasts messages to the clients.

func NewSocketHub

func NewSocketHub() *SocketHub

NewSocketHub creates a web socket hub that distributes meter status and query results for the ui or other clients

func (*SocketHub) Run

func (h *SocketHub) Run(in <-chan util.Param, cache *util.Cache)

Run starts data and status distribution


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL