Documentation ¶
Index ¶
- Constants
- Variables
- func ChargeModeHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func CurrentChargeModeHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func CurrentMinSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func CurrentPhasesHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func CurrentTargetSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func HealthHandler(site core.SiteAPI) http.HandlerFunc
- func HealthListener(site core.SiteAPI)
- func MinSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func PhasesHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func RemoteDemandHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func ServeWebsocket(hub *SocketHub, w http.ResponseWriter, r *http.Request)
- func SocketHandler(hub *SocketHub) http.HandlerFunc
- func StateHandler(cache *util.Cache) http.HandlerFunc
- func TargetChargeHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func TargetSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
- func TemplatesHandler() http.HandlerFunc
- type EEBus
- type EEBusClientCBs
- type HTTPd
- type Influx
- type InfluxConfig
- type MQTT
- type SocketClient
- type SocketHub
Constants ¶
const SocketPath = "/tmp/evcc"
SocketPath is the unix domain socket path
Variables ¶
var ( // Repository name Repository = "evcc" // Owner of repository Owner = "andig" // Version of executable Version = "0.0.1-alpha" // Commit of executable Commit = "HEAD" )
var Assets fs.FS
Assets is the embedded assets file system
Functions ¶
func ChargeModeHandler ¶
func ChargeModeHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
ChargeModeHandler updates charge mode
func CurrentChargeModeHandler ¶
func CurrentChargeModeHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
CurrentChargeModeHandler returns current charge mode
func CurrentMinSoCHandler ¶
func CurrentMinSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
CurrentMinSoCHandler returns current minimum soc
func CurrentPhasesHandler ¶
func CurrentPhasesHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
CurrentPhasesHandler returns current minimum soc
func CurrentTargetSoCHandler ¶
func CurrentTargetSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
CurrentTargetSoCHandler returns current target soc
func HealthHandler ¶
func HealthHandler(site core.SiteAPI) http.HandlerFunc
HealthHandler returns current charge mode
func HealthListener ¶
HealthListener attaches listener to unix domain socket and runs listener
func MinSoCHandler ¶
func MinSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
MinSoCHandler updates minimum soc
func PhasesHandler ¶
func PhasesHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
PhasesHandler updates minimum soc
func RemoteDemandHandler ¶
func RemoteDemandHandler(loadpoint core.LoadPointAPI) 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 core.LoadPointAPI) http.HandlerFunc
TargetChargeHandler updates target soc
func TargetSoCHandler ¶
func TargetSoCHandler(loadpoint core.LoadPointAPI) http.HandlerFunc
TargetSoCHandler updates target soc
func TemplatesHandler ¶
func TemplatesHandler() http.HandlerFunc
TemplatesHandler returns current charge mode
Types ¶
type EEBus ¶
type EEBus struct {
// contains filtered or unexported fields
}
var EEBusInstance *EEBus
func (*EEBus) DeviceInfo ¶
func (c *EEBus) DeviceInfo() communication.ManufacturerDetails
type EEBusClientCBs ¶
type EEBusClientCBs struct {
// contains filtered or unexported fields
}
type HTTPd ¶
HTTPd wraps an http.Server and adds the root router
type Influx ¶
Influx is a influx publisher
func NewInfluxClient ¶
NewInfluxClient creates new publisher for influx
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 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